1 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2 Jiong Wang <jiong.wang@arm.com>
4 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5 (initialize_low_tracepoint): Likewise.
6 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
7 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
8 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
9 (aarch64_linux_read_description): Likewise.
10 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
12 2019-03-12 John Baldwin <jhb@FreeBSD.org>
14 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
15 i386_create_target_description for 'segments' parameter.
16 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
17 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
18 * win32-i386-low.c (i386_arch_setup): Likewise.
20 2019-03-12 Tom Tromey <tromey@adacore.com>
22 * linux-low.c (iterate_over_lwps): Update.
24 2019-03-06 Tom Tromey <tom@tromey.com>
26 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
27 (captured_main): Use SCOPE_EXIT.
29 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
31 * configure.srv: Use '$enable_unittest' instead of '$development'
32 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
35 2019-02-27 Tom Tromey <tromey@adacore.com>
37 * gdbreplay.c (logchar): Handle \r\n.
39 2019-02-07 Alan Hayward <alan.hayward@arm.com>
41 * linux-low.c (linux_attach): Add process before lwp.
42 * server.c (attach_inferior): Check if already attached.
44 2019-02-07 Tom Tromey <tom@tromey.com>
46 * x86-tdesc.h: Rename include guard.
47 * x86-low.h: Add include guard.
48 * wincecompat.h: Rename include guard.
49 * win32-low.h: Add include guard.
50 * utils.h: Rename include guard.
51 * tracepoint.h: Rename include guard.
52 * tdesc.h: Rename include guard.
53 * target.h: Rename include guard.
54 * server.h: Rename include guard.
55 * remote-utils.h: Rename include guard.
56 * regcache.h: Rename include guard.
57 * nto-low.h: Rename include guard.
58 * notif.h: Add include guard.
59 * mem-break.h: Rename include guard.
60 * lynx-low.h: Add include guard.
61 * linux-x86-tdesc.h: Add include guard.
62 * linux-s390-tdesc.h: Add include guard.
63 * linux-ppc-tdesc-init.h: Add include guard.
64 * linux-low.h: Add include guard.
65 * linux-aarch64-tdesc.h: Add include guard.
66 * linux-aarch32-low.h: Add include guard.
67 * inferiors.h: Rename include guard.
68 * i387-fp.h: Rename include guard.
69 * hostio.h: Rename include guard.
70 * gdbthread.h: Rename include guard.
71 * gdb_proc_service.h: Rename include guard.
72 * event-loop.h: Rename include guard.
73 * dll.h: Rename include guard.
74 * debug.h: Rename include guard.
75 * ax.h: Rename include guard.
77 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
80 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
81 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
83 2019-01-25 Tom Tromey <tom@tromey.com>
85 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
87 2019-01-25 Tom Tromey <tom@tromey.com>
89 * win32-low.c: Fix common/ includes.
90 * win32-i386-low.c: Fix common/ includes.
91 * tracepoint.c: Fix common/ includes.
92 * thread-db.c: Fix common/ includes.
93 * target.h: Fix common/ includes.
94 * symbol.c: Fix common/ includes.
95 * spu-low.c: Fix common/ includes.
96 * server.h: Fix common/ includes.
97 * server.c: Fix common/ includes.
98 * remote-utils.c: Fix common/ includes.
99 * regcache.h: Fix common/ includes.
100 * regcache.c: Fix common/ includes.
101 * nto-x86-low.c: Fix common/ includes.
102 * notif.h: Fix common/ includes.
103 * mem-break.h: Fix common/ includes.
104 * lynx-low.c: Fix common/ includes.
105 * lynx-i386-low.c: Fix common/ includes.
106 * linux-x86-tdesc-selftest.c: Fix common/ includes.
107 * linux-x86-low.c: Fix common/ includes.
108 * linux-low.c: Fix common/ includes.
109 * inferiors.h: Fix common/ includes.
110 * i387-fp.c: Fix common/ includes.
111 * hostio.c: Fix common/ includes.
112 * hostio-errno.c: Fix common/ includes.
113 * gdbthread.h: Fix common/ includes.
114 * gdbreplay.c: Fix common/ includes.
115 * fork-child.c: Fix common/ includes.
116 * event-loop.c: Fix common/ includes.
118 (enum gdb_agent_op): Fix common/ includes.
120 2019-01-21 Tom Tromey <tom@tromey.com>
122 * tracepoint.c: Fix includes.
123 * remote-utils.c: Fix includes.
124 * linux-x86-low.c: Fix includes.
126 2019-01-01 Joel Brobecker <brobecker@adacore.com>
128 * gdbreplay.c (gdbreplay_version): Update copyright year in
130 * server.c (gdbserver_version): Likewise.
132 2018-12-05 Alan Hayward <alan.hayward@arm.com>
134 * linux-low.c (add_lwp): Switch ordering.
136 2018-11-29 Tom Tromey <tom@tromey.com>
138 * win32-low.c (win32_join): Take pid, not process.
139 * target.h (struct target_ops) <join>: Change argument type.
140 (join_inferior): Change argument name.
141 * spu-low.c (spu_join): Take pid, not process.
142 * server.c (handle_detach): Preserve pid before destroying
144 * lynx-low.c (lynx_join): Take pid, not process.
145 * linux-low.c (linux_join): Take pid, not process.
147 2018-11-23 Alan Hayward <alan.hayward@arm.com>
149 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
150 (aarch64_cannot_fetch_register): Likewise.
151 (struct linux_target_ops): Update references.
153 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
155 * linux-ppc-low.c: Include nat/linux-ptrace.h.
157 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
159 * configure.srv (ipa_ppc_linux_regobj): Add
160 powerpc-isa207-htm-vsx32l-ipa.o and
161 powerpc-isa207-htm-vsx64l-ipa.o.
162 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
163 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
164 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
165 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
166 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
167 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
168 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
169 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
170 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
171 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
172 (init_registers_powerpc_isa207_htm_vsx32l)
173 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
174 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
175 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
176 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
177 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
178 (ppc_store_tm_ctarregset): New functions.
179 (ppc_regsets): Add entries for HTM regsets.
180 (ppc_arch_setup): Set htm in features struct when needed. Set
181 sizes for the HTM regsets.
182 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
183 (initialize_low_arch): Call
184 init_registers_powerpc_isa207_htm_vsx32l and
185 init_registers_powerpc_isa207_htm_vsx64l.
186 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
187 PPC_TDESC_ISA207_HTM_VSX.
188 (initialize_low_tracepoint): Call
189 init_registers_powerpc_isa207_htm_vsx32l and
190 init_registers_powerpc_isa207_htm_vsx64l.
192 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
194 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
195 rs6000/power-linux-pmu.xml to srv_xmlfiles.
196 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
197 (ppc_store_pmuregset): New functions.
198 (ppc_regsets): Add entries for ebb and pmu regsets.
199 (ppc_arch_setup): Set isa207 in features struct if the ebb and
200 pmu regsets are available. Set sizes for these regsets.
202 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
204 * configure.srv (ipa_ppc_linux_regobj): Add
205 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
206 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
207 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
208 rs6000/powerpc-isa207-vsx32l.xml, and
209 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
210 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
211 <PPC_TDESC_ISA207_VSX>: New enum value.
212 (init_registers_powerpc_isa207_vsx32l): Declare.
213 (init_registers_powerpc_isa207_vsx64l): Declare.
214 * linux-ppc-low.c (ppc_fill_tarregset): New function.
215 (ppc_store_tarregset): New function.
216 (ppc_regsets): Add entry for the TAR regset.
217 (ppc_arch_setup): Set isa207 in features struct when needed. Set
218 size for the TAR regsets.
219 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
220 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
221 and init_registers_powerpc_isa207_vsx64l.
222 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
223 (initialize_low_tracepoint): Call
224 init_registers_powerpc_isa207_vsx32l and
225 init_registers_powerpc_isa207_vsx64l.
227 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
228 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
230 * configure.srv (ipa_ppc_linux_regobj): Add
231 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
232 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
233 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
234 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
235 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
236 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
237 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
238 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
239 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
240 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
241 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
242 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
243 (ppc_hwcap): Add comment.
244 (ppc_hwcap2): New global.
245 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
246 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
247 (ppc_regsets): Add entries for the DSCR and PPR regsets.
248 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
249 when needed. Set sizes for the the DSCR and PPR regsets.
250 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
251 (initialize_low_arch): Call
252 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
253 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
254 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
255 PPC_TDESC_ISA205_PPR_DSCR_VSX.
256 (initialize_low_tracepoint): Call
257 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
258 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
260 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
262 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
264 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
265 Simon Marchi <simark@simark.ca>
267 * acinclude.m4: Include "../selftest.m4".
268 * configure: Regenerate.
269 * configure.ac: Use "GDB_AC_SELFTEST".
270 * configure.srv: Use "$enable_unittests" instead of
271 "$development" when checking whether unit tests have been
273 * server.c (captured_main): Update message informing that
274 selftests have been disabled.
276 2018-10-04 Tom Tromey <tom@tromey.com>
278 * configure: Rebuild.
280 2018-10-04 Tom Tromey <tom@tromey.com>
282 * server.c (handle_status): Rename inner "thread".
283 (process_serial_event): Declare "res" in 'm' case.
284 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
285 (iterate_over_lwps): Rename inner "thread".
286 (linux_qxfer_libraries_svr4): Rename inner "len".
287 * gdbthread.h (find_thread_in_random): Rename inner "thread".
289 2018-10-01 Gary Benson <gbenson@redhat.com>
291 * gdb_proc_service.h: Moved common code to
292 common/gdb_proc_service.h.
294 2018-10-01 Gary Benson <gbenson@redhat.com>
296 * gdb_proc_service.h: Synchronize comments and whitespace with
297 GDB's version of this file.
299 2018-09-25 Tom Tromey <tom@tromey.com>
301 * configure: Rebuild.
302 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
304 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
306 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
307 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
308 ($(IPA_LIB)): Sort IPA_OBJS.
310 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
312 * Makefile.in: Remove references to $(ADD_DEPS).
314 2018-09-16 Tom Tromey <tom@tromey.com>
316 * remote-utils.c (remote_open): Use GNU style for metasyntactic
318 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
321 2018-09-05 Tom Tromey <tom@tromey.com>
323 * configure: Rebuild.
325 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
328 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
330 2018-08-27 Tom Tromey <tom@tromey.com>
333 * configure: Rebuild.
335 2018-08-27 Tom Tromey <tom@tromey.com>
337 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
338 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
339 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
340 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
341 (s390x_emit_stack_adjust): Add casts to unsigned char.
343 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
347 * server.h (struct client_state) <disable_randomization>:
350 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
352 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
354 (mips_supply_ptrace_register): Likewise.
356 2018-07-22 Tom Tromey <tom@tromey.com>
358 * configure: Rebuild.
360 2018-07-22 Tom Tromey <tom@tromey.com>
362 * win32-low.c (win32_create_inferior): Remove unused variables.
363 * gdbreplay.c (remote_open): Remove unused variable.
364 * remote-utils.c (remote_prepare): Remove unused variable.
365 * x86-tdesc.h (X86_TDESC_H): Define.
366 (amd64_expedite_regs): Define conditionally.
367 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
368 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
369 * remote-utils.c (readchar): Remove unused variable.
371 2018-07-13 Pedro Alves <palves@redhat.com>
373 * linux-low.c (linux_kill): Change parameter to process_info
374 pointer instead of pid. Adjust.
375 * lynx-low.c (lynx_kill): Likewise.
376 * nto-low.c (nto_kill): Likewise.
377 * spu-low.c (spu_kill): Likewise.
378 * win32-low.c (win32_kill): Likewise.
379 * server.c (handle_v_kill, kill_inferior_callback)
380 (detach_or_kill_for_exit): Adjust.
381 * target.c (kill_inferior): Change parameter to process_info
382 pointer instead of pid. Adjust.
383 * target.h (struct target_ops) <kill>: Change parameter to
384 process_info pointer instead of pid. Adjust all implementations
386 (kill_inferior): Likewise.
388 2018-07-13 Pedro Alves <palves@redhat.com>
390 * linux-low.c (linux_detach, linux_join): Change parameter to
391 process_info pointer instead of pid. Adjust.
392 * lynx-low.c (lynx_detach, lynx_join): Likewise.
393 * nto-low.c (nto_detach): Likewise.
394 * spu-low.c (spu_detach, spu_join): Likewise.
395 * win32-low.c (win32_detach, win32_join): Likewise.
396 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
397 * target.h (struct target_ops) <detach, join>: Change parameter to
398 process_info pointer instead of pid. Adjust all implementations
400 (detach_inferior, join_inferior): Rename 'pid' parameter to
403 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
404 Jan Kratochvil <jan.kratochvil@redhat.com>
405 Paul Fertser <fercerpav@gmail.com>
406 Tsutomu Seki <sekiriki@gmail.com>
408 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
409 (OBS): Add 'common/netstuff.o'.
410 (GDBREPLAY_OBS): Likewise.
411 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
412 (remote_open): Implement support for IPv6
414 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
416 (handle_accept_event): Accept connections from IPv6 sources.
417 (remote_prepare): Handle IPv6-style hostnames; implement
418 support for IPv6 connections.
419 (remote_open): Implement support for printing connections from
422 2018-07-11 Pedro Alves <palves@redhat.com>
425 * mem-break.c (any_persistent_commands): Add process_info
426 parameter and use it instead of relying on the current process.
427 Change return type to bool.
428 * mem-break.h (any_persistent_commands): Add process_info
429 parameter and change return type to bool.
430 * server.c (handle_detach): Remove require_running_or_return call.
431 Look up the process_info for the process we're about to detach.
432 If not found, return back error to GDB. Adjust
433 any_persistent_commands call to pass down a process pointer.
435 2018-07-11 Pedro Alves <palves@redhat.com>
437 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
438 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
439 instead of collect_register_by_name.
440 * regcache.c (regcache_raw_get_unsigned_by_name): New.
441 * regcache.h (regcache_raw_get_unsigned_by_name): New.
443 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
444 Pedro Alves <palves@redhat.com>
446 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
448 2018-07-03 Tom Tromey <tom@tromey.com>
450 * linux-low.c: Update.
451 * lynx-low.c: Update.
452 * mem-break.c: Update.
454 * remote-utils.c: Update.
458 * win32-low.c: Update.
460 2018-07-03 Tom Tromey <tom@tromey.com>
464 2018-07-03 Tom Tromey <tom@tromey.com>
466 * linux-low.c: Update.
468 2018-07-03 Tom Tromey <tom@tromey.com>
472 2018-07-03 Tom Tromey <tom@tromey.com>
474 * linux-low.c: Update.
475 * linux-mips-low.c: Update.
476 * lynx-low.c: Update.
478 * remote-utils.c: Update.
482 * thread-db.c: Update.
484 2018-07-03 Tom Tromey <tom@tromey.com>
486 * linux-low.c: Update.
487 * linux-mips-low.c: Update.
488 * lynx-low.c: Update.
489 * mem-break.c: Update.
491 * remote-utils.c: Update.
495 * tracepoint.c: Update.
497 2018-07-03 Tom Tromey <tom@tromey.com>
499 * linux-low.c: Update.
500 * linux-ppc-low.c: Update.
501 * linux-x86-low.c: Update.
502 * proc-service.c: Update.
505 * thread-db.c: Update.
506 * win32-low.c: Update.
508 2018-07-03 Tom Tromey <tom@tromey.com>
510 * linux-low.c: Update.
511 * lynx-low.c: Update.
513 * remote-utils.c: Update.
515 * thread-db.c: Update.
516 * win32-low.c: Update.
518 2018-06-29 Joel Brobecker <brobecker@adacore.com>
520 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
521 parameter in call to 'amd64_create_target_description'.
523 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
525 * x86-tdesc.h: Remove executable permission flag.
527 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
529 * configure.ac: Remove AC_PREREQ, add missing quoting.
530 * configure: Re-generate.
531 * config.in: Re-generate.
532 * aclocal.m4: Re-generate.
534 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
536 * tracepoint.h (current_traceframe): Remove declaration.
538 2018-06-18 Alan Hayward <alan.hayward@arm.com>
540 * linux-aarch64-low.c (is_sve_tdesc): New function.
541 (aarch64_sve_regs_copy_to_regcache): Likewise.
542 (aarch64_sve_regs_copy_from_regcache): Likewise.
543 (aarch64_regs_info): Add SVE checks.
544 (initialize_low_arch): Initialize SVE.
546 2018-06-18 Alan Hayward <alan.hayward@arm.com>
548 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
550 2018-06-11 Alan Hayward <alan.hayward@arm.com>
552 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
553 (initialize_low_tracepoint): Likewise
554 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
555 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
557 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
559 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
561 2018-06-11 Alan Hayward <alan.hayward@arm.com>
563 * server.h (PBUFSIZ): Increase size
565 2018-06-11 Alan Hayward <alan.hayward@arm.com>
567 * regcache.c (regcache::raw_compare): New function.
568 * regcache.h (regcache::raw_compare): New declaration.
570 2018-06-11 Alan Hayward <alan.hayward@arm.com>
572 * regcache.c (new_register_cache): Use new.
573 (free_register_cache): Use delete.
574 (register_data): Use const.
575 (supply_register): Move body inside regcache.
576 (regcache::raw_supply): New override function.
577 (collect_register): Move body inside regcache.
578 (regcache::raw_collect): New override function.
579 (regcache::get_register_status): New override function.
580 * regcache.h (struct regcache): Inherit from reg_buffer_common.
582 2018-06-09 Tom Tromey <tom@tromey.com>
584 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
586 (event_queue): Use std::queue.
587 (gdb_event_xfree): Remove.
588 (initialize_event_loop, process_event, wait_for_event): Update.
590 2018-06-08 Stan Cox <scox@redhat.com>
592 * win32-low.c (win32_create_inferior): last_ptid and last_status
593 moved to client_state.
595 2018-06-08 Pedro Alves <palves@redhat.com>
597 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
598 common/common-exceptions.o, common/common-utils.o,
599 common/errors.o, common/print-utils.o and utils.o.
600 * gdbreplay.c: Include "common-defs.h" instead of the two
601 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
602 string.h or alloca.h.
603 (perror_with_name): Delete.
604 (remote_open): Use xstrdup instead of strdup.
605 (main): Rename to ...
606 (captured_main): ... this.
609 2018-06-08 Tom Tromey <tom@tromey.com>
611 * linux-low.c (linux_low_read_btrace): Update.
613 2018-06-04 Stan Cox <scox@redhat.com>
615 * server.h (struct client_state): New.
616 * server.c (cont_thread, general_thread, multi_process)
617 (report_fork_events, report_vfork_events, report_exec_events)
618 (report_thread_events, swbreak_feature, hwbreak_feature)
619 (vCont_supported, disable_randomization, pass_signals)
620 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
621 Moved to client_state.
622 * remote-utils.c (remote_debug, noack_mode)
623 (transport_is_reliable): Moved to client_state.
624 * tracepoint.c (current_traceframe): Moved to client_state.
627 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
628 linux-low.c, remote-utils.h, target.c: Use client_state.
630 2018-05-31 Alan Hayward <alan.hayward@arm.com>
632 * configure.srv: Add new c/h file.
634 2018-05-31 Alan Hayward <alan.hayward@arm.com>
636 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
639 2018-05-25 Maciej W. Rozycki <macro@mips.com>
641 * gdb.arch/mips-fpregset-core.exp: New test.
642 * gdb.arch/mips-fpregset-core.c: New test source.
644 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
647 * hostio.c (require_int): Do not report overflow for integers
648 between 0xfffffff and 0x7fffffff.
650 2018-05-22 Maciej W. Rozycki <macro@mips.com>
652 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
653 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
654 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
656 (the_low_target): Wire them.
658 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
660 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
661 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
662 mode. Call collect_register_by_name with vscr using
663 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
664 (ppc_store_vrregset): Add and set vscr_offset variable as in
665 ppc_fill_vrregset. Call supply_register_by_name with vscr using
668 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
670 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
671 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
672 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
674 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
676 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
677 (ppc_store_vsxregset): Likewise.
678 (ppc_fill_vrregset): Likewise.
679 (ppc_store_vrregset): Likewise.
680 (ppc_fill_evrregset): Likewise.
681 (ppc_store_evrregset): Likewise.
682 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
683 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
686 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
688 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
689 wordsize of the inferior. Call ppc_linux_target_wordsize.
691 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
693 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
694 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
695 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
696 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
697 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
698 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
699 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
700 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
701 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
702 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
703 (tdesc_powerpc_e500l): Remove.
704 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
705 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
706 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
707 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
709 (ppc_arch_setup): Remove target description matching code. Fill a
710 ppc_linux_features struct and call ppc_linux_match_description
713 2018-05-22 Maciej W. Rozycki <macro@mips.com>
715 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
716 width of the requested register exceeds the width of the
718 (mips_cannot_store_register): Likewise.
720 2018-05-21 Maciej W. Rozycki <macro@mips.com>
722 * linux-mips-low.c (mips_fetch_register): New function. Update
724 (mips_store_gregset): Supply 0 rather than $restart for $zero.
725 (the_low_target): Wire `mips_fetch_register'.
727 2018-05-10 Joel Brobecker <brobecker@adacore.com>
729 * lynx-i386-low.c (LYNXOS_178): New macro.
730 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
731 the layout on LynxOS-178.
732 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
733 handle floating point registers that are not supported by
736 2018-05-10 Tom Tromey <tom@tromey.com>
738 * configure: Rebuild.
740 2018-05-10 Joel Brobecker <brobecker@adacore.com>
743 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
744 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
745 Use it to set the expedite_regs field in the given tdesc.
746 * x86-tdesc.h: New file.
747 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
748 Adjust following the addition of the new expedite_regs parameter
750 * linux-tic6x-low.c (tic6x_read_description): Likewise.
751 * linux-x86-tdesc.c: #include "x86-tdesc.h".
752 (i386_linux_read_description, amd64_linux_read_description):
753 Adjust following the addition of the new expedite_regs parameter
755 * lynx-i386-low.c: #include "x86-tdesc.h".
756 (lynx_i386_arch_setup): Adjust following the addition of the new
757 expedite_regs parameter to init_target_desc.
758 * nto-x86-low.c: #include "x86-tdesc.h".
759 (nto_x86_arch_setup): Adjust following the addition of the new
760 expedite_regs parameter to init_target_desc.
761 * win32-i386-low.c: #include "x86-tdesc.h".
762 (i386_arch_setup): Adjust following the addition of the new
763 expedite_regs parameter to init_target_desc.
765 2018-05-10 Joel Brobecker <brobecker@adacore.com>
768 * win32-low.c (win32_create_inferior): Add call to my_wait
769 setting last_status global.
771 2018-05-10 Joel Brobecker <brobecker@adacore.com>
774 * win32-low.c (create_process): Only call gdb_tilde_expand if
775 inferior_cwd is not NULL.
777 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
779 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
780 registers to the cache if their values have changed.
781 (i387_xsave_to_cache): Provide default values for x87 control
782 registers when these features are available, but disabled.
783 * regcache.c (supply_register_by_name_zeroed): New function.
784 * regcache.h (supply_register_by_name_zeroed): Declare new
787 2018-05-07 Tom Tromey <tom@tromey.com>
789 * configure: Rebuild.
791 2018-05-04 Tom Tromey <tom@tromey.com>
793 * configure: Rebuild.
795 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
796 Pedro Alves <palves@redhat.com>
798 * linux-aarch64-low.c (aarch64_stopped_data_address):
801 2018-04-27 Tom Tromey <tom@tromey.com>
803 * configure: Rebuild.
805 2018-04-23 Tom Tromey <tom@tromey.com>
807 * configure: Rebuild.
809 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
811 * Makefile.in (depcomp): Add "..".
812 (all_deps_files): New and use it.
814 2018-04-18 Alan Hayward <alan.hayward@arm.com>
816 * configure.srv (aarch64*-*-linux*): Don't include xml.
817 (i[34567]86-*-cygwin*): Likewise.
818 (i[34567]86-*-linux*): Likewise.
819 (i[34567]86-*-lynxos*): Likewise.
820 (i[34567]86-*-mingw32ce*): Likewise.
821 (i[34567]86-*-mingw*): Likewise.
822 (i[34567]86-*-nto*): Likewise.
823 (tic6x-*-uclinux): Likewise.
824 (x86_64-*-linux*): Likewise.
825 (x86_64-*-mingw*): Likewise.
826 (x86_64-*-cygwin*): Likewise.
828 2018-04-18 Alan Hayward <alan.hayward@arm.com>
830 * tdesc.c: Remove xml parameter.
832 2018-04-18 Alan Hayward <alan.hayward@arm.com>
834 * server.c (get_features_xml): Remove cast.
835 * tdesc.c (void target_desc::accept): Fill in function.
836 (tdesc_get_features_xml): Remove old xml creation.
837 (print_xml_feature::visit_pre): Add xml vistor.
838 * tdesc.h (struct target_desc): Make xmltarget mutable.
839 (tdesc_get_features_xml): Remove declaration.
841 2018-04-18 Alan Hayward <alan.hayward@arm.com>
843 * tdesc.c (tdesc_architecture_name): Add new function.
844 (tdesc_osabi_name): Likewise.
845 (tdesc_get_features_xml): Use new functions.
847 2018-04-18 Alan Hayward <alan.hayward@arm.com>
849 * tdesc.c (tdesc_create_flags): Remove.
850 (tdesc_add_flag): Likewise.
851 (tdesc_named_type): Likewise.
852 (tdesc_create_union): Likewise.
853 (tdesc_create_struct): Likewise.
854 (tdesc_create_vector): Likewise.
855 (tdesc_add_bitfield): Likewise.
856 (tdesc_add_field): Likewise.
857 (tdesc_set_struct_size): Likewise.
859 2018-04-18 Alan Hayward <alan.hayward@arm.com>
861 * tdesc.c (~target_desc): Remove implictly deleted items.
862 (init_target_desc): Iterate all features.
863 (tdesc_get_features_xml): Use vector.
864 (tdesc_create_feature): Create feature.
865 * tdesc.h (tdesc_feature) Remove
866 (target_desc): Add features.
868 2018-04-18 Alan Hayward <alan.hayward@arm.com>
870 * Makefile.in: Add common/tdesc.c
871 * tdesc.c (init_target_desc): init all reg_defs from register
873 (tdesc_create_reg): Create tdesc_reg.
874 * tdesc.h (tdesc_feature): Add register vector.
876 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
878 * tdesc.h (struct target_desc) <features>: Change type to
879 std::vector<std::string>.
880 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
882 (tdesc_get_features_xml): Likewise.
883 (tdesc_create_feature): Likewise.
885 2018-03-26 Alan Hayward <alan.hayward@arm.com>
887 * regcache.c (find_register_by_number): Return a ref.
888 (find_regno): Use references.
889 (register_size): Likewise.
890 (register_data): Likewise.
891 * tdesc.c (target_desc::~target_desc): Remove free calls.
892 (target_desc::operator==): Use std::vector compare.
893 (init_target_desc): Use reference.
894 (tdesc_create_reg): Use reg constructors.
895 * tdesc.h (struct target_desc): Replace pointer with object.
897 2018-03-23 Alan Hayward <alan.hayward@arm.com>
899 * regcache.c (find_register_by_number): Make static.
900 (find_regno): Use find_register_by_number
901 * regcache.h (struct reg): Remove declaration.
903 2018-03-23 Alan Hayward <alan.hayward@arm.com>
905 * tdesc.c (target_desc::~target_desc): Move to here.
906 (target_desc::operator==): Likewise.
907 * tdesc.h (target_desc::~target_desc): Move from here.
908 (target_desc::operator==): Likewise.
910 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
912 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
914 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
916 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
918 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
919 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
920 and init_registers_s390_gs_linux64.
922 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
924 * linux-s390-low.c (s390_fill_gs): Remove function.
925 (s390_fill_gsbc): Remove function.
926 (s390_regsets): Set fill functions for the guarded storage regsets
929 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
931 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
932 the word size. Add comment.
933 (s390_get_wordsize): New function.
934 (s390_arch_setup): No longer select a temporary tdesc to fetch the
935 pswm with it. Instead, use s390_get_wordsize to determine the
936 word size first and derive the correct tdesc from that directly.
938 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
940 * Makefile.in: Include silent-rules.mk.
941 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
942 (COMPILE): Add ECHO_CXX.
943 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
944 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
945 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
946 (version-generated.c): Add ECHO_GEN.
947 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
948 (IPAGENT_COMPILE): Add ECHO_CXX.
949 (%-generated.c): Add ECHO_REGDAT.
951 2018-03-14 Tom Tromey <tom@tromey.com>
954 * ax.c (ax_printf): Special case for NULL.
956 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
958 * linux-low.c (linux_qxfer_libraries_svr4): Use
959 xml_escape_text_append.
961 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
963 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
965 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
967 * server.c (handle_general_set): Remove unnecessary xstrdup.
969 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
971 * server.c (parse_debug_format_options): Adjust to
972 delim_string_to_char_ptr_vec changes.
973 * thread-db.c (thread_db_load_search): Adjust to
974 dirnames_to_char_ptr_vec changes.
976 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
978 * target.h (target_enable_btrace, target_disable_btrace)
979 (target_read_btrace, target_read_btrace_conf): Turn macro into
980 inline function. Throw error if target method is not defined.
981 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
982 check for btrace target method. Be prepared to handle exceptions
983 from btrace target methods.
985 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
987 * server.c (captured_main): Change order of error message printed
988 when the current working directory cannot be found.
990 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
992 * server.c: Include "filenames.h" and "pathstuff.h".
993 (program_name): Delete variable.
994 (program_path): New anonymous class.
995 (get_exec_wrapper): Use "program_path" instead of
997 (handle_v_run): Likewise.
998 (captured_main): Likewise.
999 (process_serial_event): Likewise.
1001 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1003 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1004 (OBJS): Add "pathstuff.o".
1005 * server.c (current_directory): New global variable.
1006 (captured_main): Initialize "current_directory".
1008 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1010 * tdesc.c: Use common/tdesc.h.
1011 * tdesc.h: Likewise.
1013 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1014 Simon Marchi <simon.marchi@ericsson.com>
1016 * Makefile.in: Switch order of make rules.
1018 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1020 * Makefile.in: Add common directory in build.
1021 * configure.ac: Add common reference.
1022 * configure: Regenerate.
1024 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1026 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1027 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1028 * spu-low.c (spu_target_ops): Likewise.
1029 * win32-low.c (win32_target_ops): Likewise.
1030 * server.c (supported_btrace_packets): Report packets unconditionally.
1031 * target.h (target_ops) <supports_btrace>: Remove.
1032 (target_supports_btrace): Remove.
1034 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1036 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1037 (handle_btrace_disable): Change return type to void. Use exceptions
1039 (handle_btrace_general_set): Catch exception and copy message to
1042 2018-02-08 Tom Tromey <tom@tromey.com>
1044 * linux-low.c (install_software_single_step_breakpoints): Use
1045 make_scoped_restore.
1046 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1047 (do_restore_current_thread_cleanup): Remove.
1048 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1051 2018-02-08 Tom Tromey <tom@tromey.com>
1053 * mem-break.c (set_raw_breakpoint_at): Use
1054 gdb::unique_xmalloc_ptr.
1056 2018-01-30 Pedro Alves <palves@redhat.com>
1059 * target.c (target_terminal::terminal_state): Rename to ...
1060 (target_terminal::m_terminal_state): ... this.
1062 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1064 * linux-low.c (handle_extended_wait): Surround call to
1065 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1067 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1069 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1070 linux_ptrace_attach_fail_reason_string now returning an
1072 (linux_attach): Likewise.
1073 * thread-db.c (attach_thread): Likewise.
1075 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1078 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1079 checking for fs_base/gs_base fields in struct user_regs_struct.
1080 * configure: Regenerate.
1082 2018-01-16 Yao Qi <yao.qi@linaro.org>
1085 * linux-low.c (fetch_register): Call supply_register instead of
1088 2018-01-08 Yao Qi <yao.qi@linaro.org>
1089 Simon Marchi <simon.marchi@ericsson.com>
1091 * Makefile.in (OBS): Remove selftest.o.
1092 * configure.ac: Set srv_selftest_objs if $development is true.
1093 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1094 * configure: Re-generated.
1095 * server.c (captured_main): Wrap variable selftest_filter with
1098 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1100 * server.c (parse_debug_format_options): Return std::string.
1101 (handle_monitor_command, captured_main): Adjust.
1103 2018-01-05 Pedro Alves <palves@redhat.com>
1106 * server.c (captured_main): Pass quiet=false to
1107 save_original_signals_state.
1109 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1111 * gdbreplay.c (gdbreplay_version): Update copyright year in
1113 * server.c (gdbserver_version): Likewise.
1115 2017-12-08 Tom Tromey <tom@tromey.com>
1117 * ax.c (ax_printf): Update.
1119 2017-12-07 Yao Qi <yao.qi@linaro.org>
1121 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1122 aarch64_linux_read_description.
1123 * linux-amd64-ipa.c (idx2mask): New array.
1124 (get_ipa_tdesc): Move idx2mask out.
1125 (initialize_low_tracepoint): Initialize target descriptions.
1126 * linux-i386-ipa.c (idx2mask): New array.
1127 (get_ipa_tdesc): Move idx2mask out.
1128 (initialize_low_tracepoint): Initialize target descriptions.
1130 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1132 * tdesc.c (struct tdesc_type): Change return type.
1133 (tdesc_add_flag): Change parameter type.
1134 (tdesc_add_bitfield): Likewise.
1135 (tdesc_add_field): Likewise.
1136 (tdesc_set_struct_size): Likewise.
1138 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1140 * regcache.c (registers_to_string): Remove unused variable.
1142 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1144 * inferiors.c (for_each_inferior_with_data): Remove.
1145 * inferiors.h (for_each_inferior_with_data): Remove.
1146 * server.c (handle_qxfer_threads_worker): Change parameter type.
1147 (handle_qxfer_threads_proper): Use for_each_thread.
1149 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1151 * inferiors.c (for_each_inferior): Remove.
1152 (clear_inferiors): Use for_each_thread.
1153 * inferiors.h (for_each_inferior): Remove.
1154 * linux-low.c (linux_wait_for_event_filtered): Use
1156 (linux_stabilize_threads): Likewise.
1157 * regcache.c (regcache_release): Likewise.
1158 * server.c (gdb_wants_all_threads_stopped): Likewise.
1159 (clear_pending_status_callback): Remove.
1160 (handle_status): Use for_each_thread.
1161 (captured_main): Likewise.
1162 * win32-low.c (child_init_thread_list): Likewise.
1163 (win32_clear_inferiors): Likewise.
1164 (fake_breakpoint_event): Likewise.
1166 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1168 * inferiors.h (find_inferior): Remove.
1169 * inferiors.c (find_inferior): Remove.
1171 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1173 * linux-low.c (resume_status_pending_p): Update comment.
1174 (need_step_over_p): Update comment.
1176 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1178 * linux-low.c (proceed_one_lwp): Return void, change parameter
1180 (unsuspend_and_proceed_one_lwp): Likewise.
1181 (proceed_all_lwps): Use for_each_thread.
1182 (unstop_all_lwps): Likewise.
1184 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1186 * linux-low.c (linux_resume_one_thread): Return void, take
1188 (linux_resume): Use for_each_thread.
1190 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1192 * linux-low.c (send_sigstop_callback): Return void, change
1193 parameter type. Rename to...
1194 (send_sigstop): ... this.
1195 (suspend_and_send_sigstop_callback): Return void, change parameter
1197 (suspend_and_send_sigstop): ... this.
1198 (stop_all_lwps): Use for_each_thread.
1200 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1202 * linux-low.c (lwp_running): Return bool, remove unused
1204 (linux_stabilize_threads): Use find_thread.
1206 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1208 * linux-low.c (select_singlestep_lwp_callback): Remove.
1209 (count_events_callback): Remove.
1210 (select_event_lwp_callback): Remove.
1211 (select_event_lwp): Use find_thread/for_each_thread.
1213 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1215 * linux-low.c (not_stopped_callback): Return bool, take filter
1217 (linux_wait_for_event_filtered): Use find_thread.
1218 (linux_wait_1): Likewise.
1220 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1222 * linux-low.c (same_lwp): Remove.
1223 (find_lwp_pid): Use find_thread.
1225 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1227 * linux-low.c (delete_lwp_callback): Remove.
1228 (linux_mourn): Use for_each_thread.
1230 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1232 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1233 args parameter, don't check for pid.
1234 (linux_detach): Use for_each_thread.
1236 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1238 * linux-low.c (struct counter): Remove.
1239 (second_thread_of_pid_p): Remove.
1240 (last_thread_of_process_p): Use find_thread.
1242 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1244 * inferiors.c (find_inferior_in_random): Remove.
1245 * inferiors.h (find_inferior_in_random): Remove.
1246 * linux-low.c (status_pending_p_callback): Return bool, accept
1247 parameter ptid directly.
1248 (linux_wait_for_event_filtered): Use find_thread_in_random.
1249 (linux_wait_1): Likewise.
1251 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1253 * inferiors.c (find_inferior_id): Remove.
1254 (find_thread_ptid): Move implemention from find_inferior_id to
1256 * inferiors.h (find_inferior_id): Remove.
1257 * server.c (handle_status): Use find_thread_ptid.
1258 (process_serial_event): Likewise.
1259 * thread-db.c (find_one_thread): Likewise.
1260 (thread_db_thread_handle): Likewise.
1261 * win32-low.c (thread_rec): Likewise.
1262 (child_delete_thread): Likewise.
1263 (win32_thread_alive): Likewise.
1264 (get_child_debug_event): Likewise.
1266 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1268 * linux-mips-low.c (update_watch_registers_callback): Return
1269 void, remove pid_p parameter, don't check for pid.
1270 (mips_insert_point, mips_remove_point): Use for_each_thread.
1272 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1274 * lynx.low (lynx_delete_thread_callback): Remove.
1275 (lynx_mourn): Use for_each_thread.
1277 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1279 * regcache.c (regcache_invalidate_one): Remove.
1280 (regcache_invalidate_pid): use for_each_thread.
1282 2017-11-26 Tom Tromey <tom@tromey.com>
1284 * linux-low.c (linux_create_inferior): Update.
1286 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1288 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1290 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1292 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1293 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1294 * linux-aarch64-tdesc-selftest.c: New file.
1295 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1297 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1299 * configure.srv: Add new file.
1300 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1301 * linux-aarch64-tdesc-selftest.c: New file.
1302 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1304 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1306 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1307 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1308 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1310 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1312 * configure.srv: Add new files.
1313 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1314 aarch64_linux_read_description.
1315 * linux-aarch64-low.c (aarch64_linux_read_description):
1316 Merge with aarch64_arch_setup.
1317 (aarch64_arch_setup): Call aarch64_linux_read_description.
1318 * linux-aarch64-tdesc.c: New file.
1319 * linux-aarch64-tdesc.h: New file.
1321 2017-11-24 Yao Qi <yao.qi@linaro.org>
1323 * configure.srv: Set $srv_regobj for tic6x-linux.
1324 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1325 (tic6x_read_description): Move some code to tic6x_arch_setup.
1326 (tic6x_tdesc_test): New function.
1327 (initialize_low_arch): Call selftests::register_test.
1329 2017-11-22 Yao Qi <yao.qi@linaro.org>
1331 * remote-utils.c (prepare_resume_reply): Use memcpy.
1333 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1335 * linux-low.c (kill_one_lwp_callback): Return void, take
1336 argument directly, don't filter on pid.
1337 (linux_kill): Use for_each_thread.
1339 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1341 * linux-low.c (need_step_over_p): Return bool, remove dummy
1343 (linux_resume, proceed_all_lwps): Use find_thread.
1345 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1347 * linux-low.c (resume_status_pending_p): Return bool, remove
1349 (linux_resume): Use find_thread.
1351 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1353 * linux-low.c (struct thread_resume_array): Remove.
1354 (linux_set_resume_request): Return void, take arguments
1356 (linux_resume): Use for_each_thread.
1358 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1360 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1361 return bool, remove data argument.
1362 (linux_stabilize_threads): Use find_thread.
1364 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1366 * linux-low.c (unsuspend_one_lwp): Remove.
1367 (unsuspend_all_lwps): Use for_each_thread, inline code from
1370 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1372 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1373 * linux-low.c (struct iterate_over_lwps_args): Remove.
1374 (iterate_over_lwps_filter): Remove.
1375 (iterate_over_lwps): Use find_thread.
1377 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1379 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1380 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1381 code from reset_lwp_ptrace_options_callback.
1383 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1385 * linux-arm-low.c (struct update_registers_data): Remove.
1386 (update_registers_callback): Return void, take arguments
1387 directly, don't check thread's pid.
1388 (arm_insert_point, arm_remove_point): Use for_each_thread.
1390 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1392 * win32-low.c (continue_one_thread): Return void, take argument
1394 (child_continue): Use for_each_thread.
1396 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1398 * win32-i386-low.c (update_debug_registers_callback): Rename
1400 (update_debug_registers): ... this, return void, remove pid_p arg.
1401 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1403 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1405 * inferiors.h (struct process_info): Add constructor, initialize
1407 <syscalls_to_catch>: Change type to std::vector<int>.
1408 * inferiors.c (add_process): Allocate process_info with new.
1409 (remove_process): Free process_info with delete.
1410 * linux-low.c (handle_extended_wait): Adjust.
1411 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1412 * server.c (handle_general_set): Adjust.
1414 2017-11-16 Pedro Alves <palves@redhat.com>
1416 * remote-utils.c (remote_close): Block SIGIO signals instead of
1417 uninstalling the SIGIO handler.
1419 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1421 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1423 2017-11-16 Yao Qi <yao.qi@linaro.org>
1425 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1426 (tic6x_store_gregset): Likewise.
1427 (tic6x_usrregs_info): Move it up.
1429 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1431 * Makefile.in: Update arch rules.
1432 * configure.srv: Explicitly mark arch/ files.
1434 2017-11-13 Andreas Schwab <schwab@suse.de>
1436 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1438 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1440 2017-11-06 Pedro Alves <palves@redhat.com>
1442 * config.in, configure: Regenerate.
1444 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1446 * target.c (struct thread_search): Remove.
1447 (thread_search_callback): Remove.
1448 (prepare_to_access_memory): Use for_each_thread instead of
1449 find_inferior. Inline code from thread_search_callback.
1451 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1453 * server.c (struct visit_actioned_threads_data): Remove.
1454 (visit_actioned_threads): Change prototype to take arguments
1456 (resume): Use find_thread instead of find_inferior.
1458 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1460 * server.c (queue_stop_reply_callback): Change prototype, return
1462 (find_status_pending_thread_callback): Remove.
1463 (handle_status): Replace find_inferior with find_thread and
1466 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1468 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1470 (aarch64_store_gregset): Likewise.
1471 (aarch64_fill_fpregset): Likewise.
1472 (aarch64_store_fpregset): Likewise.
1474 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1476 * gdbthread.h (find_thread, for_each_thread): New functions.
1477 * inferiors.c (thread_of_pid): Remove.
1478 (find_any_thread_of_pid): Use find_thread.
1479 * linux-low.c (num_lwps): Use for_each_thread.
1481 2017-10-17 Yao Qi <yao.qi@linaro.org>
1483 * Makefile.in: Remove one rule.
1484 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1486 2017-10-17 Yao Qi <yao.qi@linaro.org>
1488 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1489 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1491 2017-10-17 Yao Qi <yao.qi@linaro.org>
1493 * configure.srv: Rename arm.o with arch/arm.o.
1495 2017-10-17 Yao Qi <yao.qi@linaro.org>
1497 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1498 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1499 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1500 (arch-i386.o, arch-amd64.o): Remove rules.
1501 (arch/%.o): New rule.
1502 Update POSTCOMPILE and COMPILE.pre.
1503 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1504 * configure: Re-generated.
1505 * configure.srv: Replace arch-i386.o with arch/i386.o.
1506 Replace arch-amd64.o with arch/amd64.o.
1508 2017-10-16 Yao Qi <yao.qi@linaro.org>
1510 * configure: Regenerated.
1512 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1514 * inferiors.h: (struct inferior_list): Remove.
1515 (struct inferior_list_entry); Remove.
1516 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1517 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1518 get_first_inferior): Remove.
1519 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1520 find_inferior_id, find_inferior_in_random): Change signature.
1521 * inferiors.c (all_threads): Change type to
1522 std::list<thread_info *>.
1523 (get_thread): Remove macro.
1524 (find_inferior, find_inferior_id): Change signature, implement
1526 (find_inferior_in_random): Change signature, implement using
1527 find_thread_in_random.
1528 (for_each_inferior, for_each_inferior_with_data): Change
1529 signature, implement using for_each_thread.
1530 (add_inferior_to_list, remove_inferior): Remove.
1531 (add_thread, get_first_thread, thread_of_pid,
1532 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1533 (get_first_inferior, one_inferior_p, clear_inferior_list):
1535 (clear_inferiors, get_thread_process): Update.
1536 * gdbthread.h: Include <list>.
1537 (struct thread_info) <entry>: Remove field.
1539 (all_threads): Change type to std::list<thread_info *>.
1540 (get_first_inferior): Add doc.
1541 (find_thread, for_each_thread, find_thread_in_random): New
1543 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1544 * linux-arm-low.c (update_registers_callback): Update.
1545 * linux-low.c (second_thread_of_pid_p): Update.
1546 (kill_one_lwp_callback, linux_detach_lwp_callback,
1547 delete_lwp_callback, status_pending_p_callback, same_lwp,
1548 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1549 iterate_over_lwps, not_stopped_callback,
1550 resume_stopped_resumed_lwps, count_events_callback,
1551 select_singlestep_lwp_callback, select_event_lwp_callback,
1552 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1553 suspend_and_send_sigstop_callback, wait_for_sigstop,
1554 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1555 lwp_running, linux_set_resume_request, resume_status_pending_p,
1556 need_step_over_p, start_step_over, linux_resume_one_thread,
1557 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1558 reset_lwp_ptrace_options_callback): Update.
1559 * linux-mips-low.c (update_watch_registers_callback): Update.
1560 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1562 (free_register_cache_thread_one): Remove.
1563 (regcache_release): Update.
1564 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1565 handle_qxfer_threads_worker): Update.
1566 (handle_query): Update, use list iterator.
1567 (visit_actioned_threads, handle_pending_status,
1568 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1569 clear_pending_status_callback, set_pending_status_callback,
1570 find_status_pending_thread_callback, handle_status,
1571 process_serial_event): Update.
1572 * target.c (thread_search_callback): Update.
1573 * thread-db.c (thread_db_get_tls_address): Update.
1574 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1576 * win32-i386-low.c (update_debug_registers_callback): Update.
1577 * win32-low.c (delete_thread_info, child_delete_thread,
1578 continue_one_thread, suspend_one_thread,
1579 get_child_debug_event): Adjust.
1581 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1583 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1584 * inferiors.h: Include <list>.
1585 (struct process_info) <entry>: Remove field.
1587 (pid_of): Change macro to function.
1588 (ptid_of, lwpid_of): Remove macro.
1589 (all_processes): Change type to std::list<process_info *>.
1590 (ALL_PROCESSES): Remove macro.
1591 (for_each_process, find_process): New function.
1592 * inferiors.c (all_processes): Change type to
1593 std::list<process_info *>.
1594 (find_thread_process): Adjust.
1595 (add_process): Likewise.
1596 (remove_process): Likewise.
1597 (find_process_pid): Likewise.
1598 (get_first_process): Likewise.
1599 (started_inferior_callback): Remove.
1600 (have_started_inferiors_p): Adjust.
1601 (attached_inferior_callback): Remove.
1602 (have_attached_inferiors_p): Adjust.
1603 * linux-low.c (check_zombie_leaders): Likewise.
1604 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1605 (x86_linux_update_xmltarget): Adjust.
1606 * server.c (handle_query): Likewise.
1607 (gdb_reattached_process): Remove.
1608 (handle_status): Adjust.
1609 (kill_inferior_callback): Likewise.
1610 (detach_or_kill_inferior): Remove.
1611 (print_started_pid): Likewise.
1612 (print_attached_pid): Likewise.
1613 (detach_or_kill_for_exit): Update.
1614 (process_serial_event): Likewise.
1615 * linux-arm-low.c (arm_new_fork): Likewise.
1617 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1619 * dll.h: Include <list>.
1620 (struct dll_info): Add constructor.
1621 <entry>: Remove field.
1622 (all_dlls): Change type to std::list<dll_info>.
1623 * dll.c: Include <algorithm>.
1624 (get_dll): Remove macro.
1625 (all_dlls): Change type to std::list<dll_info *>.
1626 (free_one_dll): Remove.
1627 (match_dll): Likewise.
1628 (loaded_dll): Adjust.
1629 (unloaded_dll): Adjust to all_dlls type change, use
1630 std::find_if. Inline code from match_dll.
1631 (clear_dlls): Adjust to all_dlls type change.
1632 * server.c (emit_dll_description): Remove.
1633 (handle_qxfer_libraries): Adjust to all_dlls type change,
1634 integrate emit_dll_description's functionality.
1636 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1638 * linux-low.h (struct linux_target_ops) <delete_process>: New
1640 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1641 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1642 (struct linux_target_ops): Add delete_process callback.
1643 * linux-arm-low.c (arm_delete_process): New.
1644 (struct linux_target_ops): Add delete_process callback.
1645 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1646 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1647 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1648 * linux-mips-low.c (mips_linux_delete_process): New.
1649 (struct linux_target_ops): Add delete_process callback.
1650 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1651 * linux-s390-low.c (struct linux_target_ops): Likewise.
1652 * linux-sh-low.c (struct linux_target_ops): Likewise.
1653 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1654 * linux-tile-low.c (struct linux_target_ops): Likewise.
1655 * linux-x86-low.c (x86_linux_delete_process): New.
1656 (struct linux_target_ops): Add delete_process callback.
1657 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1659 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1661 * linux-aarch64-low.c (the_low_target): Add thread delete
1663 * linux-arm-low.c (arm_delete_thread): New function.
1664 (the_low_target): Add thread delete callback.
1665 * linux-bfin-low.c (the_low_target): Likewise.
1666 * linux-crisv32-low.c (the_low_target): Likewise.
1667 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1669 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1671 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1672 * linux-mips-low.c (mips_linux_delete_thread): New function.
1673 (the_low_target): Add thread delete callback.
1674 * linux-ppc-low.c (the_low_target): Likewise.
1675 * linux-s390-low.c (the_low_target): Likewise.
1676 * linux-sh-low.c (the_low_target): Likewise.
1677 * linux-tic6x-low.c (the_low_target): Likewise.
1678 * linux-tile-low.c (the_low_target): Likewise.
1679 * linux-x86-low.c (the_low_target): Likewise.
1680 * linux-xtensa-low.c (the_low_target): Likewise.
1682 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1684 * win32-low.c: Include "common-inferior.h".
1686 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1688 * inferiors.c (set_inferior_cwd): New function.
1689 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1690 (handle_query): Inform that QSetWorkingDir is supported.
1691 * win32-low.c (create_process): Pass the inferior's cwd to
1694 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1696 * inferiors.c (current_inferior_cwd): New global variable.
1697 (get_inferior_cwd): New function.
1698 * inferiors.h (struct process_info) <cwd>: New field.
1700 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1702 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1703 (OBS): Add gdb_tilde_expand.o.
1705 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1707 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1708 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1710 2017-09-29 Pedro Alves <palves@redhat.com>
1712 * ax.c (gdb_parse_agent_expr): Constify.
1713 * ax.h (gdb_parse_agent_expr): Constify.
1714 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1716 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1717 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1718 * remote-utils.h (read_ptid): Constify.
1719 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1720 (process_point_options, process_serial_event): Constify.
1721 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1722 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1723 (cmd_qtbuffer): Constify.
1725 2017-09-29 Pedro Alves <palves@redhat.com>
1727 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1730 2017-09-29 Pedro Alves <palves@redhat.com>
1732 * linux-low.c (handle_extended_wait): Pass parent thread instead
1733 of process to thread_db_notice_clone.
1734 * linux-low.h (thread_db_notice_clone): Replace parent process
1735 parameter with parent thread parameter.
1736 * thread-db.c (find_one_thread): Add comment.
1737 (thread_db_notice_clone): Replace parent process parameter with
1738 parent thread parameter. Temporarily switch to the parent thread.
1740 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1742 * gdbthread.h: Include "common-gdbthread.h".
1743 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1744 "if" when validating the ptid.
1745 * remote-utils.c: Include "gdbthread.h".
1746 (prepare_resume_reply): Use "switch_to_thread".
1747 * target.c (done_accessing_memory): Likewise.
1749 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1751 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1752 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1753 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1754 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1755 s390x-gs-linux64-ipa.o to ipa_obj.
1756 * linux-s390-low.c (HWCAP_S390_GS): New define.
1757 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1759 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1760 (s390_arch_setup): Check for guarded-storage support and choose
1762 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1763 init_registers_s390x_gs_linux64.
1764 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1766 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1767 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1769 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1771 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1773 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1775 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1776 (thread_db_thread_handle): Declare.
1777 * linux-low.c (linux_target_ops): Initialize thread_handle.
1778 * server.c (handle_qxfer_threads_worker): Add support for
1780 * target.h (struct target_ops): Add new function pointer,
1782 (target_thread_handle): Define.
1783 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1785 (thread_db_thread_handle): New function.
1787 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1789 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1790 * linux-low.h (thread_db_notice_clone): Declare.
1791 * thread-db.c (thread_db_notice_clone): New function.
1793 2017-09-21 Pedro Alves <palves@redhat.com>
1795 * server.c (gdb_read_memory, handle_status, process_serial_event)
1796 (handle_serial_event, handle_target_event): Adjust to
1797 set_desired_thread prototype change.
1798 * target.c (set_desired_thread): Remove 'use_general' parameter
1800 * target.h (set_desired_thread): Remove 'use_general' parameter.
1802 2017-09-20 Tom Tromey <tom@tromey.com>
1804 * target.c (target_terminal::terminal_state): Define.
1805 (target_terminal::init): Rename from target_terminal_init.
1806 (target_terminal::inferior): Rename from
1807 target_terminal_inferior.
1808 (target_terminal::ours): Rename from target_terminal_ours.
1809 (target_terminal::ours_for_output, target_terminal::info): New.
1811 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1813 * server.c (accumulate_file_name_length): Remove.
1814 (emit_dll_description): Adjust to std::string change.
1815 (handle_qxfer_libraries): Use std::string to hold document.
1817 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1819 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1820 return type of xml_escape_text.
1821 * server.c (emit_dll_description): Likewise.
1823 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1825 * server.c (captured_main): Accept argument for --selftest.
1826 Update run_tests call.
1827 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1828 when registering selftests.
1830 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1832 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1833 instead of "VEC" for "target_desc.reg_defs".
1834 (regcache_cpy): Likewise.
1835 (registers_to_string): Likewise.
1836 (registers_from_string): Likewise.
1837 (find_regno): Likewise.
1838 (supply_regblock): Likewise.
1839 (regcache_raw_read_unsigned): Likewise.
1840 * tdesc.c (init_target_desc): Likewise.
1841 (tdesc_create_reg): Likewise.
1842 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1843 (struct target_desc) <reg_defs>: Convert to "std::vector".
1844 (target_desc): Do not initialize "reg_defs".
1845 (~target_desc): Update code to use "std::vector" instead of "VEC"
1846 for "target_desc.reg_defs".
1847 (operator==): Likewise.
1849 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1851 * inferiors.h (thread_to_gdb_id): Remove.
1852 * inferiors.c (thread_to_gdb_id): Remove.
1853 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1854 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1855 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1857 * nto-low.c (nto_fetch_registers, nto_store_registers,
1858 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1860 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1862 * inferiors.h (gdb_id_to_thread_id): Remove.
1863 * inferiors.c (gdb_id_to_thread_id): Remove.
1864 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1865 removal. Move pid declaration closer to where it's used.
1867 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1869 * server.c (handle_detach): New function.
1870 (process_serial_event): Move code out, call handle_detach.
1872 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1874 * server.c (require_running): Rename to ...
1875 (require_running_or_return): ... this ...
1876 (require_running_or_break): ... and this.
1877 (handle_query, process_serial_event): Adjust.
1879 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1881 * linux-low.c (linux_set_resume_request): Remove unused
1884 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1886 * server.c (first_thread_of): Remove.
1887 (process_serial_event): Replace usage of first_thread_of with
1888 find_any_thread_of_pid.
1889 * tracepoint.c (same_process_p): Remove.
1890 (gdb_agent_about_to_close): Replace usage of same_process_p with
1891 find_any_thread_of_pid.
1892 * linux-x86-low.c (same_process_callback): Remove.
1893 (x86_arch_setup_process_callback): Replace usage of
1894 same_process_callback with find_any_thread_of_pid.
1895 * thread-db.c (any_thread_of): Remove.
1896 (switch_to_process): Replace usage of any_thread_of with
1897 find_any_thread_of_pid.
1898 * inferiors.c (thread_pid_matches_callback): Remove.
1899 (find_thread_process): Adjust to use find_any_thread_of_pid.
1901 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1903 * regcache.c (get_thread_regcache): Guard calls to "memset"
1906 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1908 * linux-low.c (handle_extended_wait): Use
1909 "allocate_target_description" instead of "XNEW".
1910 * linux-x86-low.c (initialize_low_arch): Likewise.
1912 2017-09-05 Yao Qi <yao.qi@linaro.org>
1914 * configure.srv (srv_i386_regobj): Remove.
1915 (srv_amd64_regobj): Remove.
1916 (srv_regobj): Set it to "" for x86 non-linux targets.
1917 * linux-x86-tdesc.c (i386_linux_read_description):
1918 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1919 (init_registers_i386): Remove the declaration.
1920 (tdesc_i386): Remove the declaration.
1921 (lynx_i386_arch_setup): Call i386_create_target_description.
1922 * nto-x86-low.c: Likewise.
1923 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1924 [!__x86_64__]: include arch/i386.h.
1925 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1927 2017-09-05 Yao Qi <yao.qi@linaro.org>
1929 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1930 i386/amd64-XXX-linux from it.
1932 2017-09-05 Yao Qi <yao.qi@linaro.org>
1934 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1936 (ipa_amd64_linux_regobj): Remove.
1937 (ipa_x32_linux_regobj): Remove.
1939 2017-09-05 Yao Qi <yao.qi@linaro.org>
1941 * Makefile.in (arch-amd64.o): New rule.
1942 * configure.srv: Append arch-amd64.o.
1943 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1944 (get_ipa_tdesc): Call amd64_linux_read_description.
1945 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1946 and init_registers_amd64_XXX.
1947 * linux-x86-low.c (x86_linux_read_description): Call
1948 amd64_linux_read_description.
1949 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1950 (initialize_low_arch): Don't call init_registers_x32_XXX and
1951 init_registers_amd64_XXX.
1952 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1953 and tdesc_amd64_XXX.
1954 [__x86_64__] (amd64_tdesc_test): New function.
1955 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1956 and init_registers_amd64_XXX.
1957 * linux-x86-tdesc.c: Include arch/amd64.h.
1958 (xcr0_to_tdesc_idx): New function.
1959 (i386_linux_read_description): New function.
1960 (amd64_get_ipa_tdesc_idx): New function.
1961 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1962 (amd64_get_ipa_tdesc): Declare.
1964 2017-09-05 Yao Qi <yao.qi@linaro.org>
1966 * configure.srv (srv_i386_linux_xmlfiles): Remove
1967 i386/i386-XXX-linux.xml from it.
1969 2017-09-05 Yao Qi <yao.qi@linaro.org>
1971 * configure.srv: Set srv_i386_linux_regobj empty if $development
1973 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1974 initialize_low_tdesc.
1975 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1976 with #if initialize_low_tdesc.
1977 * linux-x86-tdesc-selftest.c: New file.
1978 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1980 2017-09-05 Yao Qi <yao.qi@linaro.org>
1982 * Makefile.in (arch-i386.o): New rule.
1983 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1984 (x86_64-*-linux*): Likewise.
1985 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1986 include arch/i386.h.
1987 (i386_linux_read_description): Remove code and call
1988 i386_create_target_description.
1989 * tdesc.c (allocate_target_description): New function.
1990 * tdesc.h (set_tdesc_architecture): Remove declaration.
1991 (set_tdesc_osabi): Likewise.
1993 2017-09-05 Yao Qi <yao.qi@linaro.org>
1995 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1996 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1997 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1999 * server.c (get_features_xml): Call tdesc_get_features_xml.
2000 * tdesc.c (set_tdesc_architecture): New function.
2001 (set_tdesc_osabi): New function.
2002 (tdesc_get_features_xml): New function.
2003 (tdesc_create_feature): Add an argument.
2004 * tdesc.h (struct target_desc) <features>: New field.
2005 <arch, osabi>: New field.
2006 (~target_desc): xfree features, arch, and osabi.
2007 (target_desc::oerator==): Don't compare .xmltarget.
2008 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2009 (set_tdesc_osabi): Likewise.
2010 (tdesc_get_features_xml): Likewise.
2012 2017-09-05 Yao Qi <yao.qi@linaro.org>
2014 * linux-x86-tdesc.c: Include selftest.h.
2015 (i386_tdesc_test): New function.
2016 (initialize_low_tdesc): Call selftests::register_test.
2017 * tdesc.h: Include regdef.h.
2018 (target_desc): Override operator == and !=.
2020 2017-09-05 Yao Qi <yao.qi@linaro.org>
2022 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2023 (ipa_obj): Likewise.
2024 * linux-i386-ipa.c: Include common/x86-xstate.h
2025 (get_ipa_tdesc): Call i386_linux_read_description.
2026 (initialize_low_tracepoint): Don't call init_registers_XXX
2027 functions, call initialize_low_tdesc instead.
2028 * linux-x86-low.c (x86_linux_read_description): Call
2029 i386_linux_read_description.
2030 (initialize_low_arch): Don't call init_registers_i386_XXX
2031 functions, call initialize_low_tdesc.
2032 * linux-x86-tdesc.c: New file.
2033 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2034 (i386_get_ipa_tdesc_idx): Declare.
2035 (i386_get_ipa_tdesc): Declare.
2036 (initialize_low_tdesc): Declare.
2038 2017-09-05 Yao Qi <yao.qi@linaro.org>
2040 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2043 2017-09-05 Yao Qi <yao.qi@linaro.org>
2045 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2046 * regcache.c (get_thread_regcache): Use VEC_length.
2047 (init_register_cache): Likewise.
2048 (regcache_cpy): Likewise.
2049 (registers_to_string): Iterate reg_defs via VEC_iterate.
2050 (find_regno): Likewise.
2051 (find_register_by_number): Use VEC_index.
2052 (register_size): Call find_register_by_number.
2053 (register_data): Call find_register_by_number.
2054 (supply_regblock): Use VEC_length.
2055 (regcache_raw_read_unsigned): Likewise.
2056 * tdesc.c (init_target_desc): Iterate reg_defs via
2058 (default_description): Update initializer.
2059 (copy_target_description): Don't update field num_registers.
2060 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2061 <num_registers>: Remove.
2063 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2065 * Makefile.in (.SECONDARY): Define target.
2067 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2069 * linux-low.c (linux_wait_1): Adjust.
2070 * server.c (queue_stop_reply_callback): Adjust.
2072 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2074 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2075 QEnvironmentUnset and QEnvironmentReset packets.
2076 (handle_query): Inform remote that QEnvironmentHexEncoded,
2077 QEnvironmentUnset and QEnvironmentReset are supported.
2079 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2081 * inferiors.h (inferior_target_data): Rename to ...
2082 (thread_target_data): ... this.
2083 (inferior_regcache_data): Rename to ...
2084 (thread_regcache_data): ... this.
2085 (set_inferior_regcache_data): Rename to ...
2086 (set_thread_regcache_data): ... this.
2087 * inferiors.c (inferior_target_data): Rename to ...
2088 (thread_target_data): ... this.
2089 (inferior_regcache_data): Rename to ...
2090 (thread_regcache_data): ... this.
2091 (set_inferior_regcache_data): Rename to ...
2092 (set_thread_regcache_data): ... this.
2093 (free_one_thread): Update.
2094 * linux-low.h (get_thread_lwp): Update.
2095 * regcache.c (get_thread_regcache): Update.
2096 (regcache_invalidate_thread): Update.
2097 (free_register_cache_thread): Update.
2098 * win32-i386-low.c (update_debug_registers_callback): Update.
2099 (win32_get_current_dr): Update.
2100 * win32-low.c (thread_rec): Update.
2101 (delete_thread_info): Update.
2102 (continue_one_thread): Update.
2103 (suspend_one_thread): Update.
2105 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2107 * inferiors.c (set_inferior_target_data): Remove.
2108 * inferiors.h (set_inferior_target_data): Remove.
2110 2017-08-18 Yao Qi <yao.qi@linaro.org>
2112 * Makefile.in (OBS): Add selftest.o.
2113 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2114 * configure, config.in: Re-generated.
2115 * server.c: Include common/sefltest.h.
2116 (captured_main): Handle option --selftest.
2118 2017-08-09 Yao Qi <yao.qi@linaro.org>
2120 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2121 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2122 i386-avx-mpx.o and i386-mmx.o.
2123 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2124 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2125 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2126 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2127 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2128 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2129 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2130 i386/amd64-avx-mpx.xml.
2132 2017-08-09 Yao Qi <yao.qi@linaro.org>
2134 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2135 and x32-avx-avx512.o.
2136 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2137 i386/x32-avx-avx512.xml.
2139 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2141 * tracepoint.h (enum class fast_tpoint_collect_result): New
2143 (fast_tracepoint_collecting): Change return type to
2144 fast_tpoint_collect_result.
2145 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2146 * linux-low.h: Include tracepoint.h.
2147 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2148 fast_tpoint_collect_result.
2149 * linux-low.c (handle_tracepoints): Adjust.
2150 (linux_fast_tracepoint_collecting): Change return type to
2151 fast_tpoint_collect_result.
2152 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2153 linux_wait_1, stuck_in_jump_pad_callback,
2154 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2155 proceed_one_lwp): Adjust to type change.
2157 2017-07-10 Yao Qi <yao.qi@linaro.org>
2159 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2161 2017-06-29 Yao Qi <yao.qi@linaro.org>
2163 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2165 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2167 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2169 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2171 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2173 * linux-low.c (linux_create_inferior): Adjust code to access the
2174 environment information via 'gdb_environ' class.
2175 * lynx-low.c (lynx_create_inferior): Likewise.
2176 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2177 (get_environ): Return a pointer to 'our_environ'.
2178 (captured_main): Initialize 'our_environ'.
2179 * server.h (get_environ): Adjust prototype.
2180 * spu-low.c (spu_create_inferior): Adjust code to access the
2181 environment information via 'gdb_environ' class.
2183 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2185 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2186 usage of "register" keyword.
2188 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2190 * configure: Re-generate.
2192 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2194 * configure: Re-generate.
2196 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2198 * Makefile.in (COMPILE.pre): Add "-x c++".
2200 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2202 * fork-child.c: Conditionally include <signal.h>.
2204 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2206 * server.c (handle_general_set): Handle new packet
2207 "QStartupWithShell".
2208 (handle_query): Add "QStartupWithShell" to the list of supported
2210 (gdbserver_usage): Add help text explaining the
2211 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2213 (captured_main): Recognize and act upon the presence of the new
2216 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2217 Pedro Alves <palves@redhat.com>
2219 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2220 * configure: Regenerate.
2221 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2223 (i[34567]86-*-lynxos*): Likewise.
2224 (spu*-*-*): Likewise.
2225 * fork-child.c: New file.
2226 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2228 (linux_ptrace_fun): New function.
2229 (linux_create_inferior): Adjust function prototype to reflect
2230 change on "target.h". Adjust function code to use
2232 (linux_request_interrupt): Delete "signal_pid".
2233 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2234 (lynx_ptrace_fun): New function.
2235 (lynx_create_inferior): Adjust function prototype to reflect
2236 change on "target.h". Adjust function code to use
2238 * nto-low.c (nto_create_inferior): Adjust function prototype and
2239 code to reflect change on "target.h". Update comments.
2240 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2241 "common-terminal.h" and "environ.h".
2242 (terminal_fd): Moved to fork-child.c.
2243 (old_foreground_pgrp): Likewise.
2244 (restore_old_foreground_pgrp): Likewise.
2245 (last_status): Make it global.
2246 (last_ptid): Likewise.
2247 (our_environ): New variable.
2248 (startup_with_shell): Likewise.
2249 (program_name): Likewise.
2250 (program_argv): Rename to...
2251 (program_args): ...this.
2252 (wrapper_argv): New variable.
2253 (start_inferior): Delete function.
2254 (get_exec_wrapper): New function.
2255 (get_exec_file): Likewise.
2256 (get_environ): Likewise.
2257 (prefork_hook): Likewise.
2258 (post_fork_inferior): Likewise.
2259 (postfork_hook): Likewise.
2260 (postfork_child_hook): Likewise.
2261 (handle_v_run): Update code to deal with arguments coming from the
2262 remote host. Update calls from "start_inferior" to
2264 (captured_main): Likewise. Initialize environment variable. Call
2266 * server.h (post_fork_inferior): New prototype.
2267 (get_environ): Likewise.
2268 (last_status): Declare.
2269 (last_ptid): Likewise.
2270 (signal_pid): Likewise.
2271 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2272 (spu_ptrace_fun): New function.
2273 (spu_create_inferior): Adjust function prototype to reflect change
2274 on "target.h". Adjust function code to use "fork_inferior".
2275 * target.c (target_terminal_init): New function.
2276 (target_terminal_inferior): Likewise.
2277 (target_terminal_ours): Likewise.
2278 * target.h: Include <vector>.
2279 (struct target_ops) <create_inferior>: Update prototype.
2280 (create_inferior): Update macro.
2281 * utils.c (gdb_flush_out_err): New function.
2282 * win32-low.c (win32_create_inferior): Adjust function prototype
2283 and code to reflect change on "target.h".
2285 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2287 * inferiors.c (switch_to_thread): New function.
2289 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2291 * Makefile.in (SFILE): Add "common/job-control.c".
2292 (OBS): Add "job-control.o".
2294 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2296 * Makefile: Remove "@host_makefile_frag@".
2298 2017-05-05 Pedro Alves <palves@redhat.com>
2300 * configure: Regenerate.
2302 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2304 * configure: Regenerate.
2306 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2308 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2309 software_single_step change of return type to
2310 std::vector<CORE_ADDR>.
2311 * linux-low.c (install_software_single_step_breakpoints):
2313 * linux-low.h (install_software_single_step_breakpoints):
2316 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2318 * remote-utils.c: Include "gdb_termios.h" instead of
2320 * terminal.h: Delete file.
2322 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2324 * server.c: Include <vector>.
2325 <program_argv, wrapper_argv>: Convert to std::vector.
2326 (start_inferior): Rewrite function to use C++.
2327 (handle_v_run): Likewise. Update code that calculates the argv
2328 based on the vRun packet; use C++.
2329 (captured_main): Likewise.
2331 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2333 * server.c (handle_v_cont): Initialize thread_resume::thread
2336 2017-04-05 Pedro Alves <palves@redhat.com>
2338 * configure: Regenerate.
2340 2017-04-05 Pedro Alves <palves@redhat.com>
2342 * gdbreplay.c (sync_error): Constify.
2343 * linux-x86-low.c (push_opcode): Constify.
2345 2017-04-05 Pedro Alves <palves@redhat.com>
2347 * win32-low.c (get_child_debug_event)
2348 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2349 Report TARGET_WAITKIND_SPURIOUS instead.
2351 2017-04-05 Pedro Alves <palves@redhat.com>
2353 * remote-utils.c (remote_prepare, remote_open): Constify.
2354 * remote-utils.h (remote_prepare, remote_open): Constify.
2355 * server.c (captured_main): Constify 'port' handling.
2357 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2359 * Makefile.in (clean): Clear .deps.
2361 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2363 * .gitignore: Remove generated files, replace with wildcard.
2364 * (clean): Replace removal of generated files with wildcard.
2365 (version.c): Replace with...
2366 (version-generated.c): ...this.
2367 (xml-builtin.c): Replace with...
2368 (xml-builtin-generated.c): ...this.
2369 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2370 (%.c: *regformats*): Replace with...
2371 (%-generated.c: *regformats*): ...this.
2373 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2375 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2376 (xtensa_fill_gregset): Call collect_register_by_name for
2378 (xtensa_store_gregset): Call supply_register_by_name for
2381 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2383 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2384 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2385 (xtensa_store_gregset): Call supply_register for all registers in
2386 a0_regnum..a0_regnum + C0_NREGS range.
2388 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2390 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2391 (ax-ipa.o: ax.c): Remove.
2392 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2393 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2394 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2395 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2396 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2398 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2400 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2401 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2402 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2403 (errors-ipa.o: ../common/errors.c): Remove.
2404 (format-ipa.o: ../common/format.c): Remove.
2405 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2407 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2409 * Makefile.in (%-ipa.o: %.c): New rule.
2410 (tracepoint-ipa.o: tracepoint.c): Remove.
2411 (utils-ipa.o: utils.c): Remove.
2412 (remote-utils-ipa.o: remote-utils.c): Remove.
2413 (regcache-ipa.o: regcache.c): Remove.
2414 (i386-linux-ipa.o: i386-linux.c): Remove.
2415 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2416 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2417 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2418 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2419 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2420 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2421 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2422 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2423 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2424 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2425 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2426 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2427 (aarch64-ipa.o: aarch64.c): Remove.
2428 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2429 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2430 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2431 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2432 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2433 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2434 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2435 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2436 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2437 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2438 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2439 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2440 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2441 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2442 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2443 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2444 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2445 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2446 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2447 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2448 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2449 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2450 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2451 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2452 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2453 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2454 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2455 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2456 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2457 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2458 (tdesc-ipa.o: tdesc.c): Remove.
2459 (x32-linux-ipa.o: x32-linux.c): Remove.
2460 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2461 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2463 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2465 * Makefile.in (%.o: ../arch/%.c): New rule.
2466 (arm.o: ../arch/arm.c): Remove.
2467 (arm-linux.o: ../arch/arm-linux.c): Remove.
2468 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2469 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2471 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2473 * Makefile.in (%.o: ../nat/%.c): New rule.
2474 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2475 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2476 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2477 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2478 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2479 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2480 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2481 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2482 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2483 (linux-personality.o: ../nat/linux-personality.c): Remove.
2484 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2485 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2486 (x86-linux.o: ../nat/x86-linux.c): Remove.
2487 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2488 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2490 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2492 * Makefile.in (%.o: ../common/%.c): New rule.
2493 (signals.o: ../common/signals.c): Remove.
2494 (print-utils.o: ../common/print-utils.c): Remove.
2495 (rsp-low.o: ../common/rsp-low.c): Remove.
2496 (common-utils.o: ../common/common-utils.c): Remove.
2497 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2498 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2499 (vec.o: ../common/vec.c): Remove.
2500 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2501 (xml-utils.o: ../common/xml-utils.c): Remove.
2502 (ptid.o: ../common/ptid.c): Remove.
2503 (buffer.o: ../common/buffer.c): Remove.
2504 (format.o: ../common/format.c): Remove.
2505 (filestuff.o: ../common/filestuff.c): Remove.
2506 (agent.o: ../common/agent.c): Remove.
2507 (errors.o: ../common/errors.c): Remove.
2508 (environ.o: ../common/environ.c): Remove.
2509 (common-debug.o: ../common/common-debug.c): Remove.
2510 (cleanups.o: ../common/cleanups.c): Remove.
2511 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2512 (fileio.o: ../common/fileio.c): Remove.
2513 (common-regcache.o: ../common/common-regcache.c): Remove.
2514 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2515 (new-op.o: ../common/new-op.c): Remove.
2516 (btrace-common.o: ../common/btrace-common.c): Remove.
2518 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2520 * Makefile.in (%.o: ../target/%.c): New rule.
2521 (waitstatus.o: ../target/waitstatus.c): Remove.
2523 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2526 (%.c: ../regformats/%.dat,
2527 (%.c: ../regformats/arm/%.dat,
2528 (%.c: ../regformats/i386/%.dat,
2529 (%.c: ../regformats/rs6000/%.dat): New rules.
2530 (aarch64.c): Remove.
2531 (reg-arm.c): Remove.
2532 (arm-with-iwmmxt.c): Remove.
2533 (arm-with-vfpv2.c): Remove.
2534 (arm-with-vfpv3.c): Remove.
2535 (arm-with-neon.c): Remove.
2536 (reg-bfin.c): Remove.
2537 (reg-cris.c): Remove.
2538 (reg-crisv32.c): Remove.
2540 (i386-linux.c): Remove.
2541 (i386-avx.c): Remove.
2542 (i386-avx-linux.c): Remove.
2543 (i386-avx-avx512.c): Remove.
2544 (i386-avx-avx512-linux.c): Remove.
2545 (i386-mpx.c): Remove.
2546 (i386-mpx-linux.c): Remove.
2547 (i386-avx-mpx-avx512-pku.c): Remove.
2548 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2549 (i386-avx-mpx.c): Remove.
2550 (i386-avx-mpx-linux.c): Remove.
2551 (i386-mmx.c): Remove.
2552 (i386-mmx-linux.c): Remove.
2553 (reg-ia64.c): Remove.
2554 (reg-m32r.c): Remove.
2555 (reg-m68k.c): Remove.
2557 (mips-linux.c): Remove.
2558 (mips-dsp-linux.c): Remove.
2559 (mips64-linux.c): Remove.
2560 (mips64-dsp-linux.c): Remove.
2561 (nios2-linux.c): Remove.
2562 (powerpc-32.c): Remove.
2563 (powerpc-32l.c): Remove.
2564 (powerpc-altivec32l.c): Remove.
2565 (powerpc-cell32l.c): Remove.
2566 (powerpc-vsx32l.c): Remove.
2567 (powerpc-isa205-32l.c): Remove.
2568 (powerpc-isa205-altivec32l.c): Remove.
2569 (powerpc-isa205-vsx32l.c): Remove.
2570 (powerpc-e500l.c): Remove.
2571 (powerpc-64l.c): Remove.
2572 (powerpc-altivec64l.c): Remove.
2573 (powerpc-cell64l.c): Remove.
2574 (powerpc-vsx64l.c): Remove.
2575 (powerpc-isa205-64l.c): Remove.
2576 (powerpc-isa205-altivec64l.c): Remove.
2577 (powerpc-isa205-vsx64l.c): Remove.
2578 (s390-linux32.c): Remove.
2579 (s390-linux32v1.c): Remove.
2580 (s390-linux32v2.c): Remove.
2581 (s390-linux64.c): Remove.
2582 (s390-linux64v1.c): Remove.
2583 (s390-linux64v2.c): Remove.
2584 (s390-te-linux64.c): Remove.
2585 (s390-vx-linux64.c): Remove.
2586 (s390-tevx-linux64.c): Remove.
2587 (s390x-linux64.c): Remove.
2588 (s390x-linux64v1.c): Remove.
2589 (s390x-linux64v2.c): Remove.
2590 (s390x-te-linux64.c): Remove.
2591 (s390x-vx-linux64.c): Remove.
2592 (s390x-tevx-linux64.c): Remove.
2593 (tic6x-c64xp-linux.c): Remove.
2594 (tic6x-c64x-linux.c): Remove.
2595 (tic6x-c62x-linux.c): Remove.
2597 (reg-sparc64.c): Remove.
2598 (reg-spu.c): Remove.
2600 (amd64-linux.c): Remove.
2601 (amd64-avx.c): Remove.
2602 (amd64-avx-linux.c): Remove.
2603 (amd64-avx-avx512.c): Remove.
2604 (amd64-avx-avx512-linux.c): Remove.
2605 (amd64-mpx.c): Remove.
2606 (amd64-mpx-linux.c): Remove.
2607 (amd64-avx-mpx-avx512-pku.c): Remove.
2608 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2609 (amd64-avx-mpx.c): Remove.
2610 (amd64-avx-mpx-linux.c): Remove.
2612 (x32-linux.c): Remove.
2613 (x32-avx.c): Remove.
2614 (x32-avx-linux.c): Remove.
2615 (x32-avx-avx512.c): Remove.
2616 (x32-avx-avx512-linux.c): Remove.
2617 (reg-xtensa.c): Remove.
2618 (reg-tilegx.c): Remove.
2619 (reg-tilegx32.c): Remove.
2621 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2623 * Makefile.in (SFILES): Add "common/environ.c".
2624 (OBJS): Add "common/environ.h".
2626 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2628 * configure.ac: Check if the fs_base and gs_base members of
2629 `struct user_regs_struct' exist.
2630 * config.in: Regenerated.
2631 * configure: Likewise.
2633 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2635 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2637 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2638 (get_next_pcs_syscall_next_pc): Likewise.
2640 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2642 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2643 * nto-x86-low.c: Likewise.
2645 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2647 * Makefile.in: Include disable-implicit-rules.mk.
2649 2016-11-23 Pedro Alves <palves@redhat.com>
2651 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2652 (debug_vprintf): Use std::chrono::steady_clock instead of
2653 gettimeofday. Use '.' instead of ':'.
2654 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2655 (get_timestamp): Use std::chrono::steady_clock instead of
2658 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2660 * Makefile.in: Fix whitespace formatting.
2662 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2664 * Makefile.in (SFILES, OBS): Flatten list and order
2667 2016-11-23 Pedro Alves <palves@redhat.com>
2669 * event-loop.c (handle_file_event): Use warning.
2670 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2671 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2674 2016-11-23 Pedro Alves <palves@redhat.com>
2676 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2678 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2679 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2680 debug_printf and debug_flush for debug output.
2681 * server.c (handle_general_set): Likewise.
2682 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2685 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2687 * Makefile.in (.c.o): Replace rule with ...
2688 (%.o: %.c): ... this one.
2690 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2692 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2693 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2695 * configure.ac: Remove checks for the make program.
2696 * configure: Re-generate.
2698 2016-10-28 Pedro Alves <palves@redhat.com>
2700 * Makefile.in (CXX_DIALECT): Get from configure.
2701 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2702 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2703 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2704 * config.in: Regenerate.
2705 * configure: Regenerate.
2707 2016-10-27 Yao Qi <yao.qi@linaro.org>
2709 * linux-low.c (linux_supports_range_stepping): Return true if
2710 can_software_single_step return true.
2712 2016-10-27 Yao Qi <yao.qi@linaro.org>
2714 * inferiors.c (find_inferior_in_random): New function.
2715 * inferiors.h (find_inferior_in_random): Declare.
2716 * linux-low.c (linux_wait_for_event_filtered): Call
2717 find_inferior_in_random instead of find_inferior.
2719 2016-10-27 Yao Qi <yao.qi@linaro.org>
2721 * linux-low.c (linux_wait_1): If single-step breakpoints are
2722 inserted, remove them.
2724 2016-10-26 Pedro Alves <palves@redhat.com>
2726 * linux-low.c (handle_extended_wait): Link parent/child fork
2728 (linux_wait_1): Unlink them.
2729 (linux_set_resume_request): Ignore resume requests for
2730 already-resumed and unhandled fork child threads.
2731 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2732 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2734 (handle_v_requests) <vCont>: Don't call require_running.
2735 * server.h (in_queued_stop_replies): New declaration.
2737 2016-10-24 Yao Qi <yao.qi@linaro.org>
2740 * linux-aarch64-low.c (append_insns): Cast the return value to
2743 2016-10-10 Yao Qi <yao.qi@linaro.org>
2745 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2747 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2749 * target.c (target_supports_multi_process): New function, moved
2751 * target.h (target_supports_multi_process): ... here. Remove
2754 2016-10-05 Tom Tromey <tom@tromey.com>
2757 * tracepoint.c (handle_tracepoint_bkpts): Check
2758 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2760 2016-10-05 Yao Qi <yao.qi@linaro.org>
2762 * configure.srv: Update the path of arm-*.xml files.
2764 2016-10-05 Terry Guo <terry.guo@arm.com>
2765 Yao Qi <yao.qi@linaro.org>
2767 * Makefile.in: Adjust the path of rules.
2768 * configure.srv: Update the path of xml files.
2769 * regformats/arm-with-iwmmxt.dat: Regenerated.
2770 * regformats/arm-with-neon.dat: Likewise.
2771 * regformats/arm-with-vfpv2.dat: Likewise.
2772 * regformats/arm-with-vfpv3.dat Likewise.
2774 2016-09-30 Yao Qi <yao.qi@linaro.org>
2777 * target.c (target_stop_and_wait): Don't call
2778 target_continue_no_signal, use resume_stop instead.
2780 2016-09-26 Yao Qi <yao.qi@linaro.org>
2782 * linux-low.c (linux_wait_1): Call debug_exit.
2784 2016-09-23 Pedro Alves <palves@redhat.com>
2786 * Makefile.in (SFILES): Add common/new-op.c.
2787 (OBS): Add common/new-op.o.
2788 (new-op.o): New rule.
2790 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2792 * .gitinore: Ignore more files.
2794 2016-09-21 Yao Qi <yao.qi@linaro.org>
2796 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2799 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2801 * server.c (start_inferior): Call target_mourn_inferior instead of
2802 mourn_inferior; pass ptid_t argument to it.
2804 (handle_target_event): Likewise.
2805 * target.c (target_mourn_inferior): New function.
2806 * target.h (mourn_inferior): Delete macro.
2808 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2810 * linux-low.c (lwp_is_stepping): New function.
2812 2016-09-06 Carl Love <cel@us.ibm.com>
2814 * server.c (start_inferior): Fixed comment, requested comment change
2815 didn't get updated correctly. Removed reference to ptrace () call as
2816 it is only true on Linux systems.
2818 2016-09-06 Carl Love <cel@us.ibm.com>
2820 * server.c (start_inferior): Do not call
2821 function target_post_create_inferior () if the
2822 inferior process has already exited.
2824 2016-09-05 Pedro Alves <palves@redhat.com>
2826 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2827 (COMPILE.pre, CC_LD): Use CXX directly.
2828 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2829 * acinclude.m4: Don't include build-with-cxx.m4.
2830 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2831 * configure: Regenerate.
2833 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2836 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2837 call writing data to own_buf.
2839 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2841 * target.c (mywait): Call target_wait instead of
2843 (target_wait): New function.
2845 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2847 * server.c (start_inferior): New variable 'ptid'. Replace calls
2848 to the_target->resume by target_continue{,_no_signal}, depending
2850 * target.c (target_stop_and_wait): Call target_continue_no_signal
2851 instead of the_target->resume.
2852 (target_continue): New function.
2854 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2856 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2858 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2861 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2863 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2864 * linux-arm-low.c (ps_get_thread_area): Likewise.
2865 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2866 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2867 * linux-mips-low.c (ps_get_thread_area): Likewise.
2868 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2869 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2870 * linux-x86-low.c (ps_get_thread_area): Likewise.
2871 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2873 2016-08-19 Pedro Alves <palves@redhat.com>
2875 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2877 2016-08-19 Pedro Alves <palves@redhat.com>
2879 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2880 comment. Use memcpy instead of casting through unsigned long.
2882 2016-08-19 Pedro Alves <palves@redhat.com>
2884 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2885 allocating around 0x80000000.
2887 2016-08-19 Pedro Alves <palves@redhat.com>
2890 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2891 (x32-avx512-linux-ipa.o): New rules.
2892 * configure.ac (x86_64-*-linux*): New x32 check.
2893 * configure.srv (ipa_x32_linux_regobj): New.
2894 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2895 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2897 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2899 * configure: Regenerate.
2901 2016-08-09 Pedro Alves <palves@redhat.com>
2904 * Makefile.in (OBS): Add signals-state-save-restore.o.
2905 (signals-state-save-restore.o): New rule.
2906 * config.in: Regenerate.
2907 * configure: Regenerate.
2908 * linux-low.c: Include "signals-state-save-restore.h".
2909 (linux_create_inferior): Call
2910 restore_original_signals_state.
2911 * server.c: Include "dispositions-save-restore.h".
2912 (captured_main): Call save_original_signals_state.
2914 2016-08-05 Pedro Alves <palves@redhat.com>
2916 * configure: Regenerate.
2918 2016-08-04 Yao Qi <yao.qi@linaro.org>
2920 * linux-low.c (regsets_fetch_inferior_registers): Check
2921 errno is ESRCH or not.
2923 2016-08-02 Yao Qi <yao.qi@linaro.org>
2925 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2926 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2927 (thread_db_load_search): Update.
2928 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2929 td_ta_set_event and td_ta_event_getmsg.
2931 2016-07-26 Pedro Alves <palves@redhat.com>
2934 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2935 of unsigned long for 64-bit registers and use uint32_t instead of
2936 unsigned int for 32-bit registers.
2938 2016-07-26 Pedro Alves <palves@redhat.com>
2940 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2943 2016-07-21 Tom Tromey <tom@tromey.com>
2945 * configure: Rebuild.
2947 2016-07-21 Yao Qi <yao.qi@linaro.org>
2949 * mem-break.c (find_gdb_breakpoint): Cast bp to
2950 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2952 2016-07-21 Yao Qi <yao.qi@linaro.org>
2954 * server.c (handle_v_requests): Support s and S actions
2955 if target_supports_software_single_step return true.
2957 2016-07-21 Yao Qi <yao.qi@linaro.org>
2959 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2960 is resume_step, call maybe_hw_step.
2961 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2963 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2965 (proceed_one_lwp): If resume request is resume_step, install
2966 reinsert breakpoints and call maybe_hw_step.
2968 2016-07-21 Yao Qi <yao.qi@linaro.org>
2970 * linux-low.c (proceed_one_lwp): Declare.
2971 (linux_resume_one_thread): Remove local variable 'step'.
2972 Lift code enqueue signal. Call proceed_one_lwp instead of
2973 linux_resume_one_lwp.
2975 2016-07-21 Yao Qi <yao.qi@linaro.org>
2977 * linux-low.c (linux_resume_one_thread): Call
2978 enqueue_pending_signal.
2980 2016-07-21 Yao Qi <yao.qi@linaro.org>
2982 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2983 * inferiors.c (do_restore_current_thread_cleanup): New function.
2984 (make_cleanup_restore_current_thread): Likewise.
2985 * linux-low.c (install_software_single_step_breakpoints): Call
2986 make_cleanup_restore_current_thread. Switch current_thread to
2989 2016-07-21 Yao Qi <yao.qi@linaro.org>
2991 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2992 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2993 (clone_one_breakpoint): Likewise.
2994 (delete_reinsert_breakpoints): Change parameter to thread.
2996 (has_reinsert_breakpoints): Likewise.
2997 (uninsert_reinsert_breakpoints): Likewise.
2998 (reinsert_reinsert_breakpoints): Likewise.
2999 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3000 (delete_reinsert_breakpoints): Likewise.
3001 (reinsert_reinsert_breakpoints): Likewise.
3002 (uninsert_reinsert_breakpoints): Likewise.
3003 (has_reinsert_breakpoints): Likewise.
3005 2016-07-21 Yao Qi <yao.qi@linaro.org>
3007 * inferiors.c (get_thread_process): Make parameter const.
3008 * inferiors.h (get_thread_process): Update declaration.
3009 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3010 Add new parameters child_thread and parent_thread. Callers
3012 * mem-break.h (clone_all_breakpoints): Update declaration.
3014 2016-07-21 Yao Qi <yao.qi@linaro.org>
3016 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3017 <command_list, handler>: Remove.
3018 (struct gdb_breakpoint): New.
3019 (struct other_breakpoint): New.
3020 (struct reinsert_breakpoint): New.
3021 (is_gdb_breakpoint): New function.
3022 (any_persistent_commands): Update command_list if
3023 is_gdb_breakpoint returns true.
3024 (set_breakpoint): Create breakpoints according to their types.
3025 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3026 (set_gdb_breakpoint_1): Likewise.
3027 (set_gdb_breakpoint): Likewise.
3028 (clear_breakpoint_conditions): Change parameter type to
3029 'struct gdb_breakpoint *'.
3030 (clear_breakpoint_commands): Likewise.
3031 (clear_breakpoint_conditions_and_commands): Likewise.
3032 (add_condition_to_breakpoint): Likewise.
3033 (add_breakpoint_condition): Likewise.
3034 (add_commands_to_breakpoint): Likewise.
3035 (check_breakpoints): Check other_breakpoint.
3036 (clone_one_breakpoint): Clone breakpopint according to its type.
3037 * mem-break.h (struct gdb_breakpoint): Declare.
3038 (set_gdb_breakpoint): Update declaration.
3039 (clear_breakpoint_conditions_and_commands): Likewise.
3040 (add_breakpoint_condition): Likewise.
3041 (add_breakpoint_commands): Likewise.
3042 * server.c (process_point_options): Change parameter type to
3043 'struct gdb_breakpoint *'.
3045 2016-07-21 Yao Qi <yao.qi@linaro.org>
3047 * mem-break.c (set_breakpoint_at): Rename it to ...
3048 (set_breakpoint_type_at): ... it.
3049 (set_breakpoint_at): Call set_breakpoint_type_at.
3050 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3051 * mem-break.h (set_breakpoint_at): Update comments.
3053 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3055 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3057 (nios2_store_gregset): Likewise.
3059 2016-07-01 Pedro Alves <palves@redhat.com>
3060 Antoine Tremblay <antoine.tremblay@ericsson.com>
3062 * linux-low.c: Change interface to take the target lwp_info
3063 pointer directly and return void. Handle detaching from a zombie
3065 (linux_detach_lwp_callback): New function.
3066 (linux_detach): Detach from the leader thread after detaching from
3069 2016-06-28 Yao Qi <yao.qi@linaro.org>
3071 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3072 for variable new_offset.
3073 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3074 (aarch64_ftrace_insn_reloc_cb): Likewise.
3075 (aarch64_ftrace_insn_reloc_tb): Likewise.
3076 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3077 PRIx64 instead of PRIx32.
3079 2016-06-28 Yao Qi <yao.qi@linaro.org>
3081 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3082 (the_low_target): Install arm_get_syscall_trapinfo.
3084 2016-06-28 Yao Qi <yao.qi@linaro.org>
3086 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3088 (the_low_target): Install aarch64_get_syscall_trapinfo.
3090 2016-06-28 Yao Qi <yao.qi@linaro.org>
3092 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3094 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3095 Remove parameter sysno.
3096 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3099 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3101 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3102 (s390_emit_ne_goto): Likewise.
3103 (s390_emit_lt_goto): Likewise.
3104 (s390_emit_le_goto): Likewise.
3105 (s390_emit_gt_goto): Likewise.
3106 (s390_emit_ge_goto): Likewise.
3107 (s390x_emit_eq_goto): Likewise.
3108 (s390x_emit_ne_goto): Likewise.
3109 (s390x_emit_lt_goto): Likewise.
3110 (s390x_emit_le_goto): Likewise.
3111 (s390x_emit_gt_goto): Likewise.
3112 (s390x_emit_ge_goto): Likewise.
3113 (s390_emit_ops_impl): Mark variable static.
3114 (s390x_emit_ops): Likewise.
3116 2016-06-17 Yao Qi <yao.qi@linaro.org>
3118 * linux-low.c (handle_extended_wait): Call
3119 uninsert_reinsert_breakpoints for the parent process. Remove
3120 reinsert breakpoints from the child process. Reinsert them to
3121 the parent process when vfork is done.
3122 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3123 (reinsert_reinsert_breakpoints): New function.
3124 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3125 (reinsert_reinsert_breakpoints): Declare.
3127 2016-06-17 Yao Qi <yao.qi@linaro.org>
3129 * linux-low.c (handle_extended_wait): If the parent is doing
3130 step-over, remove the reinsert breakpoints from the forked child.
3132 2016-06-17 Yao Qi <yao.qi@linaro.org>
3134 * linux-low.c (unsuspend_all_lwps): Declare.
3135 (linux_low_filter_event): If thread exited, call finish_step_over.
3136 If step-over is finished, unsuspend other threads.
3138 2016-06-17 Yao Qi <yao.qi@linaro.org>
3140 * linux-low.c (linux_resume_one_lwp_throw): Assert
3141 has_reinsert_breakpoints returns false.
3142 * mem-break.c (delete_disabled_breakpoints): Assert
3143 bp type isn't reinsert_breakpoint.
3145 2016-06-17 Yao Qi <yao.qi@linaro.org>
3147 * linux-low.c (maybe_hw_step): New function.
3148 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3149 (finish_step_over): Switch current_thread to lwp temporarily,
3150 and assert has_reinsert_breakpoints returns true.
3151 (proceed_one_lwp): Call maybe_hw_step.
3152 * mem-break.c (has_reinsert_breakpoints): New function.
3153 * mem-break.h (has_reinsert_breakpoints): Declare.
3155 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3157 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3159 2016-05-17 Yao Qi <yao.qi@linaro.org>
3161 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3162 instead of find_inferior.
3164 2016-05-05 Yao Qi <yao.qi@linaro.org>
3166 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3167 Initialize res to zero.
3169 2016-05-05 Yao Qi <yao.qi@linaro.org>
3171 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3174 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3176 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3177 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3178 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3180 2016-04-28 Par Olsson <par.olsson@windriver.com>
3181 Simon Marchi <simon.marchi@ericsson.com>
3183 * tracepoint.c (write_inferior_int8): New function.
3184 (cmd_qtenable_disable): Write enable flag using
3185 write_inferior_int8.
3187 2016-04-25 Yao Qi <yao.qi@linaro.org>
3189 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3190 (need_step_over_p): Return zero if the LWP has pending signals
3191 can be delivered on software single step target.
3193 2016-04-25 Yao Qi <yao.qi@linaro.org>
3195 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3196 return instead of error.
3198 2016-04-22 Yao Qi <yao.qi@linaro.org>
3200 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3203 2016-04-22 Yao Qi <yao.qi@linaro.org>
3205 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3206 signal when stepping over breakpoint with software single
3209 2016-04-21 Pedro Alves <palves@redhat.com>
3211 * linux-s390-low.c (s390_collect_ptrace_register)
3212 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3214 (s390_check_regset): Use void * instead of gdb_byte *.
3216 2016-04-20 Pedro Alves <palves@redhat.com>
3218 * configure: Renegerate.
3220 2016-04-20 Yao Qi <yao.qi@linaro.org>
3222 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3223 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3225 (arm_store_gregset): Likewise.
3227 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3229 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3230 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3231 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3232 (amd64-avx-mpx-linux.c): New rules.
3233 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3234 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3235 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3236 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3237 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3238 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3239 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3240 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3241 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3242 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3243 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3244 * linux-x86-low.c (x86_linux_read_description): Add case for
3245 X86_XSTATE_AVX_MPX_MASK.
3246 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3247 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3248 init_registers_i386_avx_mpx_linux.
3249 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3250 (initialize_low_tracepoint): Call
3251 init_registers_i386_avx_mpx_linux.
3252 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3253 (initialize_low_tracepoint): Call
3254 init_registers_amd64_avx_mpx_linux.
3255 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3256 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3257 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3260 2016-04-18 Pedro Alves <palves@redhat.com>
3262 * configure: Regenerate.
3264 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3266 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3267 (aarch64_emit_sub): Likewise.
3269 2016-04-12 Pedro Alves <palves@redhat.com>
3271 * utils.c (prepare_to_throw_exception): Delete.
3273 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3275 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3277 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3279 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3281 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3283 * linux-aarch64-ipa.c: Add <elf.h> include.
3284 * linux-ppc-ipa.c: Add <elf.h> include.
3285 * linux-s390-ipa.c: Add <elf.h> include.
3287 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3289 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3290 (get_raw_reg_ptr): Likewise.
3291 (get_trace_state_variable_value_ptr): Likewise.
3292 (set_trace_state_variable_value_ptr): Likewise.
3293 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3296 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3297 Marcin Kościelnicki <koriakin@0x04.net>
3300 * linux-ppc-low.c (emit_insns): New function.
3301 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3302 (ppc_emit_prologue): New function.
3303 (ppc_emit_epilogue): New function.
3304 (ppc_emit_add): New function.
3305 (ppc_emit_sub): New function.
3306 (ppc_emit_mul): New function.
3307 (ppc_emit_lsh): New function.
3308 (ppc_emit_rsh_signed): New function.
3309 (ppc_emit_rsh_unsigned): New function.
3310 (ppc_emit_ext): New function.
3311 (ppc_emit_zero_ext): New function.
3312 (ppc_emit_log_not): New function.
3313 (ppc_emit_bit_and): New function.
3314 (ppc_emit_bit_or): New function.
3315 (ppc_emit_bit_xor): New function.
3316 (ppc_emit_bit_not): New function.
3317 (ppc_emit_equal): New function.
3318 (ppc_emit_less_signed): New function.
3319 (ppc_emit_less_unsigned): New function.
3320 (ppc_emit_ref): New function.
3321 (ppc_emit_const): New function.
3322 (ppc_emit_reg): New function.
3323 (ppc_emit_pop): New function.
3324 (ppc_emit_stack_flush): New function.
3325 (ppc_emit_swap): New function.
3326 (ppc_emit_stack_adjust): New function.
3327 (ppc_emit_call): New function.
3328 (ppc_emit_int_call_1): New function.
3329 (ppc_emit_void_call_2): New function.
3330 (ppc_emit_if_goto): New function.
3331 (ppc_emit_goto): New function.
3332 (ppc_emit_eq_goto): New function.
3333 (ppc_emit_ne_goto): New function.
3334 (ppc_emit_lt_goto): New function.
3335 (ppc_emit_le_goto): New function.
3336 (ppc_emit_gt_goto): New function.
3337 (ppc_emit_ge_goto): New function.
3338 (ppc_write_goto_address): New function.
3339 (ppc_emit_ops_impl): New static variable.
3340 (ppc64v1_emit_prologue): New function.
3341 (ppc64v2_emit_prologue): New function.
3342 (ppc64_emit_epilogue): New function.
3343 (ppc64_emit_add): New function.
3344 (ppc64_emit_sub): New function.
3345 (ppc64_emit_mul): New function.
3346 (ppc64_emit_lsh): New function.
3347 (ppc64_emit_rsh_signed): New function.
3348 (ppc64_emit_rsh_unsigned): New function.
3349 (ppc64_emit_ext): New function.
3350 (ppc64_emit_zero_ext): New function.
3351 (ppc64_emit_log_not): New function.
3352 (ppc64_emit_bit_and): New function.
3353 (ppc64_emit_bit_or): New function.
3354 (ppc64_emit_bit_xor): New function.
3355 (ppc64_emit_bit_not): New function.
3356 (ppc64_emit_equal): New function.
3357 (ppc64_emit_less_signed): New function.
3358 (ppc64_emit_less_unsigned): New function.
3359 (ppc64_emit_ref): New function.
3360 (ppc64_emit_const): New function.
3361 (ppc64v1_emit_reg): New function.
3362 (ppc64v2_emit_reg): New function.
3363 (ppc64_emit_pop): New function.
3364 (ppc64_emit_stack_flush): New function.
3365 (ppc64_emit_swap): New function.
3366 (ppc64v1_emit_call): New function.
3367 (ppc64v2_emit_call): New function.
3368 (ppc64v1_emit_int_call_1): New function.
3369 (ppc64v2_emit_int_call_1): New function.
3370 (ppc64v1_emit_void_call_2): New function.
3371 (ppc64v2_emit_void_call_2): New function.
3372 (ppc64_emit_if_goto): New function.
3373 (ppc64_emit_eq_goto): New function.
3374 (ppc64_emit_ne_goto): New function.
3375 (ppc64_emit_lt_goto): New function.
3376 (ppc64_emit_le_goto): New function.
3377 (ppc64_emit_gt_goto): New function.
3378 (ppc64_emit_ge_goto): New function.
3379 (ppc64v1_emit_ops_impl): New static variable.
3380 (ppc64v2_emit_ops_impl): New static variable.
3381 (ppc_emit_ops): New function.
3382 (linux_low_target): Wire in ppc_emit_ops.
3384 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3385 Marcin Kościelnicki <koriakin@0x04.net>
3388 * Makefile.in: Add powerpc-*-ipa.o
3389 * configure.srv: Add ipa_obj for powerpc*-linux.
3390 * linux-ppc-ipa.c: New file.
3391 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3393 (PPC_FIELD): New macro.
3394 (PPC_SEXT): New macro.
3395 (PPC_OP6): New macro.
3396 (PPC_BO): New macro.
3397 (PPC_LI): New macro.
3398 (PPC_BD): New macro.
3399 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3400 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3401 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3402 (ppc_get_thread_area): New function.
3403 (is_elfv2_inferior): New function.
3404 (gen_ds_form): New function.
3405 (GEN_STD): New macro.
3406 (GEN_STDU): New macro.
3407 (GEN_LD): New macro.
3408 (GEN_LDU): New macro.
3409 (gen_d_form): New function.
3410 (GEN_ADDI): New macro.
3411 (GEN_ADDIS): New macro.
3412 (GEN_LI): New macro.
3413 (GEN_LIS): New macro.
3414 (GEN_ORI): New macro.
3415 (GEN_ORIS): New macro.
3416 (GEN_LWZ): New macro.
3417 (GEN_STW): New macro.
3418 (GEN_STWU): New macro.
3419 (gen_xfx_form): New function.
3420 (GEN_MFSPR): New macro.
3421 (GEN_MTSPR): New macro.
3422 (GEN_MFCR): New macro.
3423 (GEN_MTCR): New macro.
3424 (GEN_SYNC): New macro.
3425 (GEN_LWSYNC): New macro.
3426 (gen_x_form): New function.
3427 (GEN_OR): New macro.
3428 (GEN_MR): New macro.
3429 (GEN_LWARX): New macro.
3430 (GEN_STWCX): New macro.
3431 (GEN_CMPW): New macro.
3432 (gen_md_form): New function.
3433 (GEN_RLDICL): New macro.
3434 (GEN_RLDICR): New macro.
3435 (gen_i_form): New function.
3437 (GEN_BL): New macro.
3438 (gen_b_form): New function.
3439 (GEN_BNE): New macro.
3440 (GEN_LOAD): New macro.
3441 (GEN_STORE): New macro.
3442 (gen_limm): New function.
3443 (gen_atomic_xchg): New function.
3444 (gen_call): New function.
3445 (ppc_relocate_instruction): New function.
3446 (ppc_install_fast_tracepoint_jump_pad): New function.
3447 (ppc_get_min_fast_tracepoint_insn_len): New function.
3448 (ppc_get_ipa_tdesc_idx): New function.
3449 (the_low_target): Wire in the new functions.
3450 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3452 * linux-ppc-tdesc.h: New file.
3454 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3456 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3457 (alloc_jump_pad_buffer): New function.
3458 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3459 (alloc_jump_pad_buffer): New function.
3460 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3461 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3462 (alloc_jump_pad_buffer): New function.
3463 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3464 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3465 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3466 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3468 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3470 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3471 * linux-amd64-ipa.c: Likewise.
3472 * linux-i386-ipa.c: Likewise.
3473 * linux-s390-ipa.c: Likewise.
3474 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3475 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3476 set_trace_state_variable_value_ptr.
3477 (struct ipa_sym_addresses): Likewise.
3478 (symbol_list): Likewise.
3479 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3480 accessing gdb_collect directly.
3481 (gdb_collect_ptr_type): New typedef.
3482 (get_raw_reg_ptr_type): New typedef.
3483 (get_trace_state_variable_value_ptr_type): New typedef.
3484 (set_trace_state_variable_value_ptr_type): New typedef.
3485 (gdb_collect_ptr): New global.
3486 (get_raw_reg_ptr): New global.
3487 (get_trace_state_variable_value_ptr): New global.
3488 (set_trace_state_variable_value_ptr): New global.
3489 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3490 accessing get_raw_reg directly.
3491 (get_get_tsv_func_addr): Likewise for
3492 get_trace_state_variable_value_ptr.
3493 (get_set_tsv_func_addr): Likewise for
3494 set_trace_state_variable_value_ptr.
3495 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3497 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3499 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3501 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3503 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3505 (relocate_instruction): Remove own_buf.
3506 * server.c (own_buf): Make global.
3507 (handle_v_requests): Make global.
3508 * server.h (own_buf): New declaration.
3509 (handle_v_requests): New prototype.
3511 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3514 * linux-s390-low.c (add_insns): New function.
3515 (s390_emit_prologue): New function.
3516 (s390_emit_epilogue): New function.
3517 (s390_emit_add): New function.
3518 (s390_emit_sub): New function.
3519 (s390_emit_mul): New function.
3520 (s390_emit_lsh): New function.
3521 (s390_emit_rsh_signed): New function.
3522 (s390_emit_rsh_unsigned): New function.
3523 (s390_emit_ext): New function.
3524 (s390_emit_log_not): New function.
3525 (s390_emit_bit_and): New function.
3526 (s390_emit_bit_or): New function.
3527 (s390_emit_bit_xor): New function.
3528 (s390_emit_bit_not): New function.
3529 (s390_emit_equal): New function.
3530 (s390_emit_less_signed): New function.
3531 (s390_emit_less_unsigned): New function.
3532 (s390_emit_ref): New function.
3533 (s390_emit_if_goto): New function.
3534 (s390_emit_goto): New function.
3535 (s390_write_goto_address): New function.
3536 (s390_emit_litpool): New function.
3537 (s390_emit_const): New function.
3538 (s390_emit_call): New function.
3539 (s390_emit_reg): New function.
3540 (s390_emit_pop): New function.
3541 (s390_emit_stack_flush): New function.
3542 (s390_emit_zero_ext): New function.
3543 (s390_emit_swap): New function.
3544 (s390_emit_stack_adjust): New function.
3545 (s390_emit_set_r2): New function.
3546 (s390_emit_int_call_1): New function.
3547 (s390_emit_void_call_2): New function.
3548 (s390_emit_eq_goto): New function.
3549 (s390_emit_ne_goto): New function.
3550 (s390_emit_lt_goto): New function.
3551 (s390_emit_le_goto): New function.
3552 (s390_emit_gt_goto): New function.
3553 (s390_emit_ge_goto): New function.
3554 (s390x_emit_prologue): New function.
3555 (s390x_emit_epilogue): New function.
3556 (s390x_emit_add): New function.
3557 (s390x_emit_sub): New function.
3558 (s390x_emit_mul): New function.
3559 (s390x_emit_lsh): New function.
3560 (s390x_emit_rsh_signed): New function.
3561 (s390x_emit_rsh_unsigned): New function.
3562 (s390x_emit_ext): New function.
3563 (s390x_emit_log_not): New function.
3564 (s390x_emit_bit_and): New function.
3565 (s390x_emit_bit_or): New function.
3566 (s390x_emit_bit_xor): New function.
3567 (s390x_emit_bit_not): New function.
3568 (s390x_emit_equal): New function.
3569 (s390x_emit_less_signed): New function.
3570 (s390x_emit_less_unsigned): New function.
3571 (s390x_emit_ref): New function.
3572 (s390x_emit_if_goto): New function.
3573 (s390x_emit_const): New function.
3574 (s390x_emit_call): New function.
3575 (s390x_emit_reg): New function.
3576 (s390x_emit_pop): New function.
3577 (s390x_emit_stack_flush): New function.
3578 (s390x_emit_zero_ext): New function.
3579 (s390x_emit_swap): New function.
3580 (s390x_emit_stack_adjust): New function.
3581 (s390x_emit_int_call_1): New function.
3582 (s390x_emit_void_call_2): New function.
3583 (s390x_emit_eq_goto): New function.
3584 (s390x_emit_ne_goto): New function.
3585 (s390x_emit_lt_goto): New function.
3586 (s390x_emit_le_goto): New function.
3587 (s390x_emit_gt_goto): New function.
3588 (s390x_emit_ge_goto): New function.
3589 (s390_emit_ops): New function.
3590 (struct linux_target_ops): Fill in emit_ops hook.
3592 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3595 * Makefile.in: Add s390 IPA files.
3596 * configure.srv: Build IPA for s390.
3597 * linux-s390-ipa.c: New file.
3598 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3599 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3600 (tdesc_s390_linux32): Likewise.
3601 (init_registers_s390_linux32v1): Likewise.
3602 (tdesc_s390_linux32v1): Likewise.
3603 (init_registers_s390_linux32v2): Likewise.
3604 (tdesc_s390_linux32v2): Likewise.
3605 (init_registers_s390_linux64): Likewise.
3606 (tdesc_s390_linux64): Likewise.
3607 (init_registers_s390_linux64v1): Likewise.
3608 (tdesc_s390_linux64v1): Likewise.
3609 (init_registers_s390_linux64v2): Likewise.
3610 (tdesc_s390_linux64v2): Likewise.
3611 (init_registers_s390_te_linux64): Likewise.
3612 (tdesc_s390_te_linux64): Likewise.
3613 (init_registers_s390_vx_linux64): Likewise.
3614 (tdesc_s390_vx_linux64): Likewise.
3615 (init_registers_s390_tevx_linux64): Likewise.
3616 (tdesc_s390_tevx_linux64): Likewise.
3617 (init_registers_s390x_linux64): Likewise.
3618 (tdesc_s390x_linux64): Likewise.
3619 (init_registers_s390x_linux64v1): Likewise.
3620 (tdesc_s390x_linux64v1): Likewise.
3621 (init_registers_s390x_linux64v2): Likewise.
3622 (tdesc_s390x_linux64v2): Likewise.
3623 (init_registers_s390x_te_linux64): Likewise.
3624 (tdesc_s390x_te_linux64): Likewise.
3625 (init_registers_s390x_vx_linux64): Likewise.
3626 (tdesc_s390x_vx_linux64): Likewise.
3627 (init_registers_s390x_tevx_linux64): Likewise.
3628 (tdesc_s390x_tevx_linux64): Likewise.
3629 (have_hwcap_s390_vx): New static variable.
3630 (s390_arch_setup): Fill have_hwcap_s390_vx.
3631 (s390_get_thread_area): New function.
3632 (s390_ft_entry_gpr_esa): New const.
3633 (s390_ft_entry_gpr_zarch): New const.
3634 (s390_ft_entry_misc): New const.
3635 (s390_ft_entry_fr): New const.
3636 (s390_ft_entry_vr): New const.
3637 (s390_ft_main_31): New const.
3638 (s390_ft_main_64): New const.
3639 (s390_ft_exit_fr): New const.
3640 (s390_ft_exit_vr): New const.
3641 (s390_ft_exit_misc): New const.
3642 (s390_ft_exit_gpr_esa): New const.
3643 (s390_ft_exit_gpr_zarch): New const.
3644 (append_insns): New function.
3645 (s390_relocate_instruction): New function.
3646 (s390_install_fast_tracepoint_jump_pad): New function.
3647 (s390_get_min_fast_tracepoint_insn_len): New function.
3648 (s390_get_ipa_tdesc_idx): New function.
3649 (struct linux_target_ops): Wire in the above functions.
3650 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3651 * linux-s390-tdesc.h: New file.
3653 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3655 * linux-s390-low.c (s390_supports_tracepoints): New function.
3656 (struct linux_target_ops): Fill supports_tracepoints hook.
3658 2016-03-18 Yao Qi <yao.qi@linaro.org>
3660 * linux-low.c (lwp_signal_can_be_delivered): New function.
3661 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3663 2016-03-18 Yao Qi <yao.qi@linaro.org>
3665 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3666 0 if signal is enqueued. Remove 'signal' from one debugging
3667 message. Move one debugging message to some lines below.
3668 Remove code setting 'signal' to 0.
3670 2016-03-18 Yao Qi <yao.qi@linaro.org>
3672 * linux-low.c (linux_low_filter_event): Remove redundant
3673 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3675 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3677 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3678 (struct linux_target_ops): Wire in the above.
3680 2016-03-03 Yao Qi <yao.qi@linaro.org>
3682 * linux-low.c: Update comments to start_step_over.
3684 2016-03-03 Yao Qi <yao.qi@linaro.org>
3687 * linux-low.c (handle_extended_wait): Set child suspended
3688 if event_lwp->bp_reinsert isn't zero.
3690 2016-03-02 Yao Qi <yao.qi@linaro.org>
3692 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3693 enqueue_pending_signal.
3695 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3697 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3700 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3702 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3703 (s390_regmap_3264) [!__s390x__]: New global.
3704 (s390_collect_ptrace_register): Skip map entries containing -1.
3705 (s390_supply_ptrace_register): Ditto.
3706 (s390_fill_gprs_high): New function.
3707 (s390_store_gprs_high): New function.
3708 (s390_regsets): Add NT_S390_HIGH_GPRS.
3709 (s390_get_hwcap): Enable on 31-bit.
3710 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3711 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3712 Detect NT_S390_HIGH_GPRS.
3713 (s390_usrregs_info_3264): Enable on 31-bit.
3714 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3715 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3717 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3720 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3721 * configure.srv: Ditto.
3722 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3723 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3724 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3725 (init_registers_amd64_linux): Remove prototype.
3726 (tdesc_amd64_linux): Remove declaration.
3727 (get_ipa_tdesc): New function.
3728 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3729 initialize remaining tdescs.
3730 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3731 (init_registers_i386_linux): Remove prototype.
3732 (tdesc_i386_linux): Remove declaration.
3733 (get_ipa_tdesc): New function.
3734 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3735 initialize remaining tdescs.
3736 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3737 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3738 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3739 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3740 (x86_get_ipa_tdesc_idx): New function.
3741 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3742 * linux-x86-tdesc.h: New file.
3743 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3744 (target_get_ipa_tdesc_idx): New macro.
3745 * tracepoint.c (ipa_tdesc_idx): New macro.
3746 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3747 (symbol_list): Add ipa_tdesc_idx.
3748 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3749 (ipa_tdesc): Remove.
3750 (ipa_tdesc_idx): New variable.
3751 (get_context_regcache): Use get_ipa_tdesc.
3752 (gdb_collect): Ditto.
3754 * tracepoint.h (get_ipa_tdesc): New prototype.
3755 (ipa_tdesc): Remove.
3757 2016-02-24 Pedro Alves <palves@redhat.com>
3759 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3760 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3761 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3762 Factor out common code between the USE_SIGTRAP_SIGINFO and
3763 !USE_SIGTRAP_SIGINFO blocks.
3764 (linux_low_filter_event): Call save_stop_reason instead of
3765 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3767 (linux_wait_1): Update comments.
3769 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3771 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3772 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3773 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3774 ppc_insert_point, ppc_remove_point.
3776 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3778 * linux-s390-low.c (s390_supports_z_point_type): New function.
3779 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3781 2016-02-16 Yao Qi <yao.qi@linaro.org>
3783 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3784 PC. Get pc from regcache_read_pc.
3786 2016-02-12 Yao Qi <yao.qi@linaro.org>
3788 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3789 or linux_get_pc_32bit.
3790 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3792 2016-02-12 Yao Qi <yao.qi@linaro.org>
3794 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3795 arm_linux_get_next_pcs_fixup.
3797 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3799 * tracepoint.c (x_tracepoint_action_download): Change
3800 write_inferior_data_ptr to write_inferior_data_pointer.
3801 (cmd_qtstart): Likewise.
3802 (write_inferior_data_ptr): Remove.
3803 (download_agent_expr): Change write_inferior_data_ptr to
3804 write_inferior_data_pointer.
3805 (download_tracepoint_1): Likewise.
3806 (download_tracepoint): Likewise.
3807 (download_trace_state_variables): Likewise.
3809 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3810 Marcin Kościelnicki <koriakin@0x04.net>
3812 * tracepoint.c (struct tracepoint_action_ops): Remove.
3813 (struct tracepoint_action): Remove ops.
3814 (m_tracepoint_action_download, r_tracepoint_action_download)
3815 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3816 size and offset accordingly.
3817 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3818 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3819 (tracepoint_action_send, tracepoint_action_download): New functions.
3820 Helpers for trace action handlers.
3821 (add_tracepoint_action): Remove setup actions ops.
3822 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3824 2016-02-10 Yao Qi <yao.qi@linaro.org>
3826 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3828 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3830 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3832 * configure: Regenerate.
3834 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3836 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3837 void * to gdb_byte *.
3838 * linux-low.c (siginfo_fixup): Likewise.
3839 (linux_xfer_siginfo): Likewise.
3840 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3842 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3844 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3846 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3848 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3850 * linux-x86-low.c [__x86_64__]: Include
3851 "nat/amd64-linux-siginfo.h".
3852 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3853 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3854 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3855 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3856 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3857 (cpt_si_fd, si_timerid, si_overrun): Move from
3858 nat/amd64-linux-siginfo.c.
3859 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3861 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3863 * server.c (skip_to_semicolon): Remove.
3864 (process_point_options): Use strchrnul instead of
3867 2016-01-26 Yao Qi <yao.qi@linaro.org>
3869 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3870 * linux-low.c (install_software_single_step_breakpoints): Don't
3871 call regcache_read_pc.
3872 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3875 2016-01-26 Yao Qi <yao.qi@linaro.org>
3877 * linux-low.c (install_software_single_step_breakpoints): Call
3878 regcache_read_pc instead of get_pc.
3880 2016-01-26 Yao Qi <yao.qi@linaro.org>
3882 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3883 (unblock_async_io): Rename to ...
3884 (block_unblock_async_io): ... it. New function.
3885 (enable_async_io): Don't install SIGIO handler. Unblock it
3887 (disable_async_io): Don't ignore SIGIO. Block it instead.
3888 (initialize_async_io): Install SIGIO handler. Don't call
3891 2016-01-26 Yao Qi <yao.qi@linaro.org>
3893 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3894 first character is '\003', call *the_target->request_interrupt.
3896 2016-01-25 Yao Qi <yao.qi@linaro.org>
3898 * remote-utils.c (new_thread_notify): Remove.
3899 (dead_thread_notify): Likewise.
3900 * remote-utils.h (new_thread_notify): Remove declaration.
3901 (dead_thread_notify): Likewise.
3903 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3905 * gdb.trace/pending.exp: Fix expected message on continue.
3907 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3909 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3910 it works properly on big-endian machines where sizeof (CORE_ADDR)
3913 2016-01-21 Pedro Alves <palves@redhat.com>
3915 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3916 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3917 * configure: Regenerate.
3919 2016-01-21 Yao Qi <yao.qi@linaro.org>
3921 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3922 is_thumb and set it according to CPSR saved on the stack.
3923 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3924 arm_sigreturn_next_pc.
3926 2016-01-18 Yao Qi <yao.qi@linaro.org>
3928 * linux-low.c (linux_set_pc_64bit): New function.
3929 (linux_get_pc_64bit): New function.
3930 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3932 * linux-sparc-low.c (debug_threads): Remove declaration.
3933 (sparc_get_pc): Remove.
3934 (the_low_target): Use linux_get_pc_64bit instead of
3936 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3937 (the_low_target): Use linux_get_pc_64bit and
3940 2016-01-18 Yao Qi <yao.qi@linaro.org>
3942 * linux-arm-low.c (debug_threads): Remove declaration.
3943 (arm_get_pc, arm_set_pc): Remove.
3944 (the_low_target): Use linux_get_pc_32bit and
3946 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3947 (the_low_target): Use linux_get_pc_32bit and
3949 * linux-cris-low.c (debug_threads): Remove declaration.
3950 (cris_get_pc, cris_set_pc,): Remove.
3951 (the_low_target): Use linux_get_pc_32bit and
3953 * linux-crisv32-low.c (debug_threads): Remove declaration.
3954 (cris_get_pc, cris_set_pc): Remove.
3955 (the_low_target): Use linux_get_pc_32bit and
3957 * linux-low.c: Include inttypes.h.
3958 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3959 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3960 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3961 (the_low_target): Use linux_get_pc_32bit and
3963 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3964 (the_low_target): Use linux_get_pc_32bit and
3966 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3967 (the_low_target): Use linux_get_pc_32bit and
3969 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3970 (the_low_target): Use linux_get_pc_32bit and
3972 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3973 (the_low_target): Use linux_get_pc_32bit and
3976 2016-01-18 Gary Benson <gbenson@redhat.com>
3978 * configure.ac (AC_FUNC_FORK): New check.
3979 * config.in: Regenerate.
3980 * configure: Likewise.
3982 2016-01-14 Yao Qi <yao.qi@linaro.org>
3984 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3985 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3986 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3987 arm_get_next_pcs_ctor.
3989 2016-01-12 Josh Stone <jistone@redhat.com>
3990 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3992 * inferiors.h: Include "gdb_vecs.h".
3993 (struct process_info): Add syscalls_to_catch.
3994 * inferiors.c (remove_process): Free syscalls_to_catch.
3995 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3996 syscall_return stops.
3997 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3998 * server.c (handle_general_set): Handle QCatchSyscalls.
3999 (handle_query): Report support for QCatchSyscalls.
4000 * target.h (struct target_ops): Add supports_catch_syscall.
4001 (target_supports_catch_syscall): New macro.
4002 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4003 (struct lwp_info): Add syscall_state.
4004 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4005 Maintain syscall_state and syscalls_to_catch across exec.
4006 (get_syscall_trapinfo): New function, proxy to the_low_target.
4007 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4008 (linux_low_filter_event): Toggle syscall_state entry/return for
4009 syscall traps, and set it ignored for all others.
4010 (gdb_catching_syscalls_p): New function.
4011 (gdb_catch_this_syscall_p): New function.
4012 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4013 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4014 (linux_supports_catch_syscall): New function.
4015 (linux_target_ops): Install it.
4016 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4017 (the_low_target): Install it.
4019 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4021 * acinclude.m4: Include new ../warning.m4 file.
4022 * configure: Regenerated.
4023 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4025 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4027 * ax.c (is_goto_target): Mark static.
4028 * linux-low.c (register_addr): Likewise.
4029 (linux_fetch_registers, linux_store_registers): Likewise.
4030 * mem-break.c (any_persistent_commands): Fix old prototype.
4031 (add_commands_to_breakpoint): Mark static.
4032 * regcache.c (find_register_by_name): Delete unused func.
4033 * remote-utils.c (hex_or_minus_one): Mark static.
4034 * server.c (monitor_show_help): Mark static.
4035 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4036 handle_v_requests): Likewise.
4038 2016-01-12 Pedro Alves <palves@redhat.com>
4040 Remove use of the registered trademark symbol throughout.
4042 2016-01-08 Yao Qi <yao.qi@linaro.org>
4044 * remote-utils.c (getpkt): If c is '\003', call target hook
4047 2016-01-06 Yao Qi <yao.qi@linaro.org>
4049 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4050 linux-aarch32-low.c.
4051 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4052 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4053 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4054 (thumb2_breakpoint): Declare.
4055 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4056 linux-aarch32-low.h.
4057 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4058 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4059 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4061 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4063 * gdbreplay.c (gdbreplay_version): Change copyright year in
4065 * server.c (gdbserver_version): Likewise.
4067 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4069 * server.c (crc32_table): Delete.
4070 (crc32): Use libiberty's xcrc32 function.
4072 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4074 * lynx-low.c (lynx_delete_thread_callback): New function.
4075 (lynx_mourn): Properly delete our process and all of its
4076 threads. Remove call to clear_inferiors.
4078 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4080 * target.c (thread_search_callback): Add check that
4081 the thread_stopped target callback is not NULL before
4084 2015-12-21 Yao Qi <yao.qi@linaro.org>
4086 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4089 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4091 * server.c (handle_query): Call target_supports_software_single_step.
4093 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4095 * linux-low.c (single_step): New function.
4096 (linux_resume_one_lwp_throw): Call single_step.
4097 (start_step_over): Likewise.
4099 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4101 * Makefile.in (SFILES): Append arch/arm-linux.c,
4102 arch/arm-get-next-pcs.c.
4103 (arm-linux.o): New rule.
4104 (arm-get-next-pcs.o): New rule.
4105 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4107 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4108 to linux-aarch32-low.c.
4109 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4110 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4111 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4112 (thumb2_breakpoint_len): Likewise.
4113 (arm_is_thumb_mode): Make non-static.
4114 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4115 from linux-aarch32-low.c.
4116 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4117 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4118 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4119 (thumb2_breakpoint_len): Likewise.
4120 (arm_is_thumb_mode): New declaration.
4121 * linux-arm-low.c: Include arch/arm-linux.h
4122 aarch/arm-get-next-pcs.h, sys/syscall.h.
4123 (get_next_pcs_ops): New struct.
4124 (get_next_pcs_addr_bits_remove): New function.
4125 (get_next_pcs_is_thumb): New function.
4126 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4127 (arm_sigreturn_next_pc): Likewise.
4128 (get_next_pcs_syscall_next_pc): Likewise.
4129 (arm_gdbserver_get_next_pcs): Likewise.
4130 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4132 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4133 * server.h: Include gdb_vecs.h.
4135 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4137 * Makefile.in (SFILES): Append common/common-regcache.c.
4138 (OBS): Append common-regcache.o.
4139 (common-regcache.o): New rule.
4140 * regcache.c (init_register_cache): Initialize cache to
4142 (regcache_raw_read_unsigned): New function.
4143 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4144 register_status enum.
4146 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4148 * linux-aarch64-low.c (the_low_targets): Rename
4149 breakpoint_reinsert_addr to get_next_pcs.
4150 * linux-arm-low.c (the_low_targets): Likewise.
4151 * linux-bfin-low.c (the_low_targets): Likewise.
4152 * linux-cris-low.c (the_low_targets): Likewise.
4153 * linux-crisv32-low.c (the_low_targets): Likewise.
4154 * linux-low.c (can_software_single_step): Likewise.
4155 (install_software_single_step_breakpoints): New function.
4156 (start_step_over): Use install_software_single_step_breakpoints.
4157 * linux-low.h: New CORE_ADDR vector.
4158 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4160 * linux-mips-low.c (the_low_targets): Likewise.
4161 * linux-nios2-low.c (the_low_targets): Likewise.
4162 * linux-sparc-low.c (the_low_targets): Likewise.
4164 2015-12-17 Pedro Alves <palves@redhat.com>
4166 * linux-low.c (linux_kill_one_lwp): Remove references to
4168 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4170 (linux_init_signals): Delete.
4171 (initialize_low): Adjust.
4172 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4174 2015-12-16 Pedro Alves <palves@redhat.com>
4176 * configure.ac (compiler warning flags): When testing a
4177 -Wno-foo option, check whether -Wfoo works instead.
4178 * configure: Regenerate.
4180 2015-12-11 Don Breazeal <donb@codesourcery.com>
4182 * server.c (process_serial_event): Don't exit from gdbserver
4183 in remote mode if there are still active inferiors.
4185 2015-12-11 Yao Qi <yao.qi@linaro.org>
4187 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4188 arm_breakpoint_at if the process is 32-bit.
4190 2015-12-11 Yao Qi <yao.qi@linaro.org>
4192 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4195 2015-12-07 Yao Qi <yao.qi@linaro.org>
4197 * configure.srv: Append arm.o to srv_tgtobj for
4198 aarch64*-*-linux* target.
4199 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4200 from linux-arm-low.c.
4201 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4202 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4203 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4204 (thumb2_breakpoint_len): Likewise.
4205 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4206 (arm_breakpoint_kinds): Likewise.
4207 (arm_breakpoint_kind_from_pc): Likewise.
4208 (arm_sw_breakpoint_from_kind): Likewise.
4209 (arm_breakpoint_kind_from_current_state): Likewise.
4210 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4211 (arm_sw_breakpoint_from_kind): Declare.
4212 (arm_breakpoint_kind_from_current_state): Declare.
4213 (arm_breakpoint_at): Declare.
4214 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4215 arm_sw_breakpoint_from_kind if process is 32-bit.
4216 (aarch64_breakpoint_kind_from_pc): New function.
4217 (aarch64_breakpoint_kind_from_current_state): New function.
4218 (the_low_target): Initialize fields breakpoint_kind_from_pc
4219 and breakpoint_kind_from_current_state.
4220 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4221 linux-aarch32-low.c.
4222 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4223 (arm_breakpoint, arm_breakpoint_len): Likewise.
4224 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4225 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4226 (arm_is_thumb_mode): Likewise.
4227 (arm_breakpoint_at): Likewise.
4228 (arm_breakpoint_kind_from_pc): Likewise.
4229 (arm_sw_breakpoint_from_kind): Likewise.
4230 (arm_breakpoint_kind_from_current_state): Likewise.
4233 2015-08-04 Yao Qi <yao.qi@linaro.org>
4235 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4236 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4237 * server.c (extended_protocol): Remove "static".
4238 * server.h (extended_protocol): Declare it.
4240 2015-12-04 Josh Stone <jistone@redhat.com>
4242 * target.h (struct target_ops) <arch_setup>: Rename to ...
4243 (struct target_ops) <post_create_inferior>: ... this.
4244 (target_arch_setup): Rename to ...
4245 (target_post_create_inferior): ... this, calling post_create_inferior.
4246 * server.c (start_inferior): Update target_arch_setup calls to
4247 target_post_create_inferior.
4248 * linux-low.c (linux_low_ptrace_options): Forward declare.
4249 (linux_arch_setup): Update its comment for general use.
4250 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4251 (struct linux_target_ops): Use linux_post_create_inferior.
4252 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4253 to post_create_inferior.
4254 * nto-low.c (struct nto_target_ops): Likewise.
4255 * spu-low.c (struct spu_target_ops): Likewise.
4256 * win32-low.c (struct win32_target_ops): Likewise.
4258 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4260 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4262 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4264 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4265 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4266 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4267 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4268 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4269 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4270 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4271 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4272 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4273 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4274 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4275 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4277 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4279 * linux-low.c (linux_look_up_symbols): Don't call
4280 linux_supports_traceclone.
4281 * linux-low.h (thread_db_init): Remove use_events argument.
4282 * thread-db.c (thread_db_use_event): Remove global variable.
4283 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4284 (struct thread_db) <td_create_bp>: Remove field.
4285 (thread_db_create_event): Remove function.
4286 (thread_db_enable_reporting): Likewise.
4287 (find_one_thread): Don't check for thread_db_use_events.
4288 (attach_thread): Likewise.
4289 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4290 (try_thread_db_load_1): Don't check for thread_db_use_events.
4291 (thread_db_init): Remove use_events argument and thread events
4293 (remove_thread_event_breakpoints): Remove function.
4294 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4296 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4298 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4300 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4301 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4302 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4303 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4304 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4306 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4308 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4309 * linux-low.c (can_hardware_single_step): Use
4310 supports_hardware_single_step.
4311 (can_software_single_step): New function.
4312 (start_step_over): Call can_software_single_step.
4313 (linux_supports_hardware_single_step): New function.
4314 (struct target_ops) <supports_software_single_step>: Initialize.
4315 * linux-low.h (struct linux_target_ops)
4316 <supports_hardware_single_step>: Initialize.
4317 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4318 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4319 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4320 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4321 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4322 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4323 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4324 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4325 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4326 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4328 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4329 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4331 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4332 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4333 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4335 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4336 * target.h (struct target_ops): <supports_software_single_step>:
4338 (target_supports_software_single_step): New macro.
4340 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4342 * linux-low.c (linux_wait_1): Fix pc advance condition.
4343 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4344 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4346 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4348 * linux-arm-low.c (arm_is_thumb_mode): New function.
4349 (arm_breakpoint_at): Use arm_is_thumb_mode.
4350 (arm_breakpoint_kind_from_current_state): New function.
4351 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4353 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4354 (linux_breakpoint_kind_from_current_state): New function.
4355 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4356 * linux-low.h (struct linux_target_ops)
4357 <breakpoint_kind_from_current_state>: New field.
4358 * target.h (struct target_ops): Likewise.
4359 (target_breakpoint_kind_from_current_state): New macro.
4361 2015-11-30 Pedro Alves <palves@redhat.com>
4363 * linux-low.c (linux_resume): Wake up the event loop before
4366 2015-11-30 Pedro Alves <palves@redhat.com>
4368 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4370 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4372 * target.c (struct thread_search): New structure.
4373 (thread_search_callback): New function.
4374 (prev_general_thread): New global.
4375 (prepare_to_access_memory, done_accessing_memory): New functions.
4376 * target.h (prepare_to_access_memory, done_accessing_memory):
4377 Replace macros with function declarations.
4379 2015-11-30 Pedro Alves <palves@redhat.com>
4382 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4383 report TARGET_WAITKIND_NO_RESUMED.
4384 * remote-utils.c (prepare_resume_reply): Handle
4385 TARGET_WAITKIND_NO_RESUMED.
4386 * server.c (report_no_resumed): New global.
4387 (handle_query) <qSupported>: Handle "no-resumed+". Report
4388 "no-resumed+" support.
4389 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4390 return error if the client doesn't support no-resumed events.
4391 (push_stop_notification): New function.
4392 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4393 events if the client supports them.
4395 2015-11-30 Pedro Alves <palves@redhat.com>
4397 * linux-low.c (thread_still_has_status_pending_p): Don't check
4399 (lwp_resumed): New function.
4400 (status_pending_p_callback): Return early if the LWP is not
4401 supposed to be resumed.
4403 2015-11-30 Pedro Alves <palves@redhat.com>
4405 * linux-low.c (handle_extended_wait): Assert that the LWP's
4406 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4407 thread create events, leave the new child's status pending.
4408 (linux_low_filter_event): If GDB wants to hear about thread exit
4409 events, leave the LWP marked dead and don't delete it.
4410 (linux_wait_for_event_filtered): Don't check for thread exit.
4411 (filter_exit_event): New function.
4412 (linux_wait_1): Use it, when returning an exit event.
4413 (linux_resume_one_lwp_throw): Assert that the LWP's
4414 waitstatus is TARGET_WAITKIND_IGNORE.
4415 * remote-utils.c (prepare_resume_reply): Handle
4416 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4417 * server.c (report_thread_events): New global.
4418 (handle_general_set): Handle QThreadEvents.
4419 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4420 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4421 TARGET_WAITKIND_THREAD_EXITED.
4422 * server.h (report_thread_events): Declare.
4424 2015-11-30 Pedro Alves <palves@redhat.com>
4426 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4427 the thread's last_resume_kind was resume_stop.
4429 2015-11-30 Pedro Alves <palves@redhat.com>
4431 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4434 2015-11-30 Pedro Alves <palves@redhat.com>
4436 * server.c (handle_v_requests): Handle vCtrlC.
4438 2015-11-30 Pedro Alves <palves@redhat.com>
4440 * gdbthread.h (find_any_thread_of_pid): Declare.
4441 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4443 * server.c (handle_query): If current_thread is NULL, look for
4444 another thread of the selected process.
4446 2015-11-26 Daniel Colascione <dancol@dancol.org>
4447 Simon Marchi <simon.marchi@ericsson.com>
4449 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4450 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4452 * target.h (struct target_ops) <thread_name>: New field.
4453 (target_thread_name): New macro.
4455 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4457 * regcache.h (regcache_invalidate_pid): Add declaration.
4458 * regcache.c (regcache_invalidate_pid): New function, extracted
4459 from regcache_invalidate.
4460 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4461 Add trivial documentation comment.
4462 * lynx-low.c: Use regcache_invalidate_pid instead of
4463 regcache_invalidate.
4465 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4467 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4468 and Elf64_auxv_t if the target is Android.
4470 2015-11-22 Doug Evans <xdje42@gmail.com>
4472 * target.h: #include <sys/types.h>.
4474 2015-11-19 Pedro Alves <palves@redhat.com>
4476 * linux-low.c (linux_process_qsupported): Change prototype.
4478 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4480 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4481 and adjust to loop over all features.
4482 * server.c (handle_query) <qSupported>: Adjust to call
4483 target_process_qsupported once, passing it a vector of unprocessed
4485 * target.h (struct target_ops) <process_qsupported>: Change
4487 (target_process_qsupported): Adjust.
4489 2015-11-19 Pedro Alves <palves@redhat.com>
4491 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4493 * configure: Regenerate.
4495 2015-11-19 Pedro Alves <palves@redhat.com>
4497 * configure: Regenerate.
4499 2015-11-19 Yao Qi <yao.qi@linaro.org>
4501 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4504 2015-11-19 Yao Qi <yao.qi@linaro.org>
4506 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4507 (struct aarch64_operand): Move enum out.
4509 2015-11-19 Yao Qi <yao.qi@linaro.org>
4511 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4512 struct user_fpsimd_state *.
4513 (aarch64_store_fpregset): Likewise.
4515 2015-11-19 Yao Qi <yao.qi@linaro.org>
4517 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4518 struct user_pt_regs *.
4519 (aarch64_store_gregset): Likewise.
4521 2015-11-18 Pedro Alves <palves@redhat.com>
4523 * Makefile.in (all_object_files): Add $IPA_OBJS.
4525 2015-11-17 Pedro Alves <palves@redhat.com>
4527 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4528 GDB_SIGNAL_0 and gdb_signal_to_string.
4530 2015-11-17 Pedro Alves <palves@redhat.com>
4532 * win32-low.c (handle_output_debug_string): Remove parameter.
4533 (win32_kill): Remove our_status local and adjust call to
4534 handle_output_debug_string.
4535 (get_child_debug_event): Adjust call to
4536 handle_output_debug_string.
4538 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4540 * linux-mips-low.c (mips_fill_gregset): Add cast.
4541 (mips_store_gregset): Likewise.
4542 (mips_fill_fpregset): Likewise.
4543 (mips_store_fpregset): Likewise.
4545 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4547 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4550 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4552 * linux-mips-low.c (mips_linux_new_thread): Change type of
4553 watch_type to enum target_hw_bp_type.
4555 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4557 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4558 Change return type to arm_hwbp_type.
4560 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4562 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4563 (arm_store_gregset): Likewise.
4564 * linux-arm-low.c (arm_get_hwcap): Likewise.
4565 (arm_read_description): Likewise.
4567 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4569 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4571 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4573 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4574 (ppc_fill_vsxregset): Likewise.
4575 (ppc_store_vsxregset): Likewise.
4576 (ppc_fill_vrregset): Likewise.
4577 (ppc_store_vrregset): Likewise.
4578 (ppc_fill_evrregset): Likewise.
4579 (ppc_store_evrregset): Likewise.
4581 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4583 * linux-ppc-low.c (ppc_usrregs_info): Remove
4584 forward-declaration.
4585 (ppc_arch_setup): Move lower in file.
4587 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4589 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4590 (ps_pdwrite): Likewise.
4592 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4594 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4595 to after assert checks.
4597 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4599 * proc-service.c (ps_pdread): Add/adjust casts.
4600 (ps_pdwrite): Add/adjust casts.
4602 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4604 * server.c (handle_search_memory_1): Cast return value of
4607 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4609 * server.c (write_qxfer_response): Change type of data to
4612 2015-10-29 Pedro Alves <palves@redhat.com>
4614 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4616 2015-10-29 Pedro Alves <palves@redhat.com>
4618 * tracepoint.c (clear_installed_tracepoints): Add casts.
4620 2015-10-29 Pedro Alves <palves@redhat.com>
4622 * server.c (handle_v_cont, process_serial_event): Add enum
4623 gdb_signal casts to signal parsing code.
4625 2015-10-29 Pedro Alves <palves@redhat.com>
4627 * linux-low.h (NULL_REGSET): Define.
4628 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4629 * linux-arm-low.c (arm_regsets): Likewise.
4630 * linux-crisv32-low.c (cris_regsets): Likewise.
4631 * linux-m68k-low.c (m68k_regsets): Likewise.
4632 * linux-mips-low.c (mips_regsets): Likewise.
4633 * linux-nios2-low.c (nios2_regsets): Likewise.
4634 * linux-ppc-low.c (ppc_regsets): Likewise.
4635 * linux-s390-low.c (s390_regsets): Likewise.
4636 * linux-sh-low.c (sh_regsets): Likewise.
4637 * linux-sparc-low.c (sparc_regsets): Likewise.
4638 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4639 * linux-tile-low.c (tile_regsets): Likewise.
4640 * linux-x86-low.c (x86_regsets): Likewise.
4641 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4643 2015-10-29 Pedro Alves <palves@redhat.com>
4645 * linux-low.h (NULL_REGSET): Define.
4646 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4647 * linux-arm-low.c (arm_regsets): Likewise.
4648 * linux-crisv32-low.c (cris_regsets): Likewise.
4649 * linux-m68k-low.c (m68k_regsets): Likewise.
4650 * linux-mips-low.c (mips_regsets): Likewise.
4651 * linux-nios2-low.c (nios2_regsets): Likewise.
4652 * linux-ppc-low.c (ppc_regsets): Likewise.
4653 * linux-s390-low.c (s390_regsets): Likewise.
4654 * linux-sh-low.c (sh_regsets): Likewise.
4655 * linux-sparc-low.c (sparc_regsets): Likewise.
4656 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4657 * linux-tile-low.c (tile_regsets): Likewise.
4658 * linux-x86-low.c (x86_regsets): Likewise.
4659 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4661 2015-10-26 Doug Evans <dje@google.com>
4663 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4665 2015-10-26 Doug Evans <dje@google.com>
4667 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4669 2015-10-26 Doug Evans <dje@google.com>
4671 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4673 (attach_thread, find_new_threads_callback): Ditto.
4675 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4677 * mem-break.h (set_breakpoint_data): Remove.
4679 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4681 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4682 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4683 (initialize_low): Remove set_breakpoint_data call.
4684 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4685 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4686 (initialize_low): Remove set_breakpoint_data call.
4687 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4688 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4689 (initialize_low): Remove set_breakpoint_data call.
4691 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4693 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4694 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4695 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4696 * target.h (target_breakpoint_kind_from_pc): New macro.
4698 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4700 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4701 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4702 the default breakpoint kind.
4704 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4706 * linux-arm-low.c (arm_supports_z_point_type): Add software
4709 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4711 * linux-arm-low.c: Refactor breakpoint definitions.
4712 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4713 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4715 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4717 * Makefile.in: Add arm.c/o.
4718 * configure.srv: Likewise.
4719 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4720 (arm_breakpoint_kind_from_pc): New function.
4721 (arm_sw_breakpoint_from_kind): Return proper kind.
4722 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4724 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4726 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4728 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4729 (struct raw_breakpoint) <size>: Remove.
4730 (struct raw_breakpoint) <kind>: Add.
4731 (bp_size): New function.
4732 (bp_opcode): Likewise.
4733 (find_raw_breakpoint_at): Adjust for kind.
4734 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4735 (remove_memory_breakpoint): Adjust for kind call bp_size.
4736 (set_raw_breakpoint_at): Adjust for kind.
4737 (set_breakpoint): Likewise.
4738 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4739 (delete_raw_breakpoint): Adjust for kind.
4740 (delete_breakpoint): Likewise.
4741 (find_gdb_breakpoint): Likewise.
4742 (set_gdb_breakpoint_1): Likewise.
4743 (set_gdb_breakpoint): Likewise.
4744 (delete_gdb_breakpoint_1): Likewise.
4745 (delete_gdb_breakpoint): Likewise.
4746 (uninsert_raw_breakpoint): Likewise.
4747 (reinsert_raw_breakpoint): Likewise.
4748 (set_breakpoint_data): Remove.
4749 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4750 (check_mem_read): Adjust for kind call bp_size.
4751 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4752 (clone_one_breakpoint): Adjust for kind.
4753 * mem-break.h (set_gdb_breakpoint): Likewise.
4754 (delete_gdb_breakpoint): Likewise.
4755 * server.c (process_serial_event): Likewise.
4757 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4759 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4760 (struct linux_target_ops) <breakpoint>: Remove.
4761 (struct linux_target_ops) <breakpoint_len>: Remove.
4762 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4763 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4764 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4765 (arm_sw_breakpoint_from_kind): New function.
4766 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4767 (struct linux_target_ops) <breakpoint>: Remove.
4768 (struct linux_target_ops) <breakpoint_len>: Remove.
4769 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4770 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4771 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4772 (struct linux_target_ops) <breakpoint>: Remove.
4773 (struct linux_target_ops) <breakpoint_len>: Remove.
4774 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4775 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4776 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4777 (struct linux_target_ops) <breakpoint>: Remove.
4778 (struct linux_target_ops) <breakpoint_len>: Remove.
4779 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4780 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4781 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4782 and sw_breakpoint_from_kind to increment the pc.
4783 (linux_breakpoint_kind_from_pc): New function.
4784 (linux_sw_breakpoint_from_kind): New function.
4785 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4786 (initialize_low): Call breakpoint_kind_from_pc and
4787 sw_breakpoint_from_kind to replace breakpoint_data/len.
4788 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4790 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4791 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4792 (struct linux_target_ops) <breakpoint>: Remove.
4793 (struct linux_target_ops) <breakpoint_len>: Remove.
4794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4795 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4796 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4797 (struct linux_target_ops) <breakpoint>: Remove.
4798 (struct linux_target_ops) <breakpoint_len>: Remove.
4799 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4800 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4801 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4802 (struct linux_target_ops) <breakpoint>: Remove.
4803 (struct linux_target_ops) <breakpoint_len>: Remove.
4804 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4805 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4806 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4807 (struct linux_target_ops) <breakpoint>: Remove.
4808 (struct linux_target_ops) <breakpoint_len>: Remove.
4809 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4810 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4811 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4812 (struct linux_target_ops) <breakpoint>: Remove.
4813 (struct linux_target_ops) <breakpoint_len>: Remove.
4814 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4815 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4816 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4817 (struct linux_target_ops) <breakpoint>: Remove.
4818 (struct linux_target_ops) <breakpoint_len>: Remove.
4819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4820 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4821 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4822 (struct linux_target_ops) <breakpoint>: Remove.
4823 (struct linux_target_ops) <breakpoint_len>: Remove.
4824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4826 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4827 (struct linux_target_ops) <breakpoint>: Remove.
4828 (struct linux_target_ops) <breakpoint_len>: Remove.
4829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4831 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4832 (struct linux_target_ops) <breakpoint>: Remove.
4833 (struct linux_target_ops) <breakpoint_len>: Remove.
4834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4836 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4837 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4838 (struct linux_target_ops) <breakpoint>: Remove.
4839 (struct linux_target_ops) <breakpoint_len>: Remove.
4840 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4841 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4842 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4843 (struct linux_target_ops) <breakpoint>: Remove.
4844 (struct linux_target_ops) <breakpoint_len>: Remove.
4845 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4846 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4848 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4850 * linux-cris-low.c (cris_get_pc): Remove void arg.
4852 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4854 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4857 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4859 * inferiors.c (thread_pid_matches_callback): New function.
4860 (find_thread_process): New function.
4861 (remove_thread): Reset current_thread.
4862 (remove_process): Assert threads have been removed first.
4864 2015-10-15 Yao Qi <yao.qi@linaro.org>
4866 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4868 (aarch64_remove_point): Likewise.
4869 * regcache.c (regcache_register_size): New function.
4871 2015-10-12 Yao Qi <yao.qi@linaro.org>
4873 * linux-aarch64-low.c: Update all callers as emit_load_store
4874 is renamed to aarch64_emit_load_store.
4876 2015-10-12 Yao Qi <yao.qi@linaro.org>
4878 * linux-aarch64-low.c: Update all callers of function renaming
4879 from emit_insn to aarch64_emit_insn.
4881 2015-10-12 Yao Qi <yao.qi@linaro.org>
4883 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4884 arch/aarch64-insn.h.
4885 (struct aarch64_memory_operand): Likewise.
4887 (emit_insn): Move to arch/aarch64-insn.c.
4888 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4889 (emit_load_store): Move to arch/aarch64-insn.c.
4890 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4891 (can_encode_int32): Remove.
4893 2015-10-12 Yao Qi <yao.qi@linaro.org>
4895 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4896 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4897 (aarch64_relocate_instruction): Likewise.
4898 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4899 (struct aarch64_insn_visitor): Likewise.
4901 2015-10-12 Yao Qi <yao.qi@linaro.org>
4903 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4904 (struct aarch64_insn_visitor): New.
4905 (struct aarch64_insn_relocation_data): New.
4906 (aarch64_ftrace_insn_reloc_b): New function.
4907 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4908 (aarch64_ftrace_insn_reloc_cb): Likewise.
4909 (aarch64_ftrace_insn_reloc_tb): Likewise.
4910 (aarch64_ftrace_insn_reloc_adr): Likewise.
4911 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4912 (aarch64_ftrace_insn_reloc_others): Likewise.
4914 (aarch64_relocate_instruction): Use visitor.
4916 2015-10-12 Yao Qi <yao.qi@linaro.org>
4918 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4919 int. Add argument buf.
4920 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4921 aarch64_relocate_instruction.
4923 2015-10-12 Yao Qi <yao.qi@linaro.org>
4925 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4926 argument insn. Remove local variable insn. Don't call
4928 (aarch64_install_fast_tracepoint_jump_pad): Call
4931 2015-09-30 Yao Qi <yao.qi@linaro.org>
4933 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4934 (emit_load_store_pair): Likewise.
4936 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4938 * dll.c (match_dll): Add cast(s).
4939 (unloaded_dll): Likewise.
4940 * linux-low.c (second_thread_of_pid_p): Likewise.
4941 (delete_lwp_callback): Likewise.
4942 (count_events_callback): Likewise.
4943 (select_event_lwp_callback): Likewise.
4944 (linux_set_resume_request): Likewise.
4945 * server.c (accumulate_file_name_length): Likewise.
4946 (emit_dll_description): Likewise.
4947 (handle_qxfer_threads_worker): Likewise.
4948 (visit_actioned_threads): Likewise.
4949 * thread-db.c (any_thread_of): Likewise.
4950 * tracepoint.c (same_process_p): Likewise.
4951 (match_blocktype): Likewise.
4952 (build_traceframe_info_xml): Likewise.
4954 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4956 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4958 (gdb_unparse_agent_expr): Likewise.
4959 * hostio.c (require_data): Likewise.
4960 (handle_pread): Likewise.
4961 * linux-low.c (disable_regset): Likewise.
4962 (fetch_register): Likewise.
4963 (store_register): Likewise.
4964 (get_dynamic): Likewise.
4965 (linux_qxfer_libraries_svr4): Likewise.
4966 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4967 (set_fast_tracepoint_jump): Likewise.
4968 (uninsert_fast_tracepoint_jumps_at): Likewise.
4969 (reinsert_fast_tracepoint_jumps_at): Likewise.
4970 (validate_inserted_breakpoint): Likewise.
4971 (clone_agent_expr): Likewise.
4972 * regcache.c (init_register_cache): Likewise.
4973 * remote-utils.c (putpkt_binary_1): Likewise.
4974 (decode_M_packet): Likewise.
4975 (decode_X_packet): Likewise.
4976 (look_up_one_symbol): Likewise.
4977 (relocate_instruction): Likewise.
4978 (monitor_output): Likewise.
4979 * server.c (handle_search_memory): Likewise.
4980 (handle_qxfer_exec_file): Likewise.
4981 (handle_qxfer_libraries): Likewise.
4982 (handle_qxfer): Likewise.
4983 (handle_query): Likewise.
4984 (handle_v_cont): Likewise.
4985 (handle_v_run): Likewise.
4986 (captured_main): Likewise.
4987 * target.c (write_inferior_memory): Likewise.
4988 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4989 * tracepoint.c (init_trace_buffer): Likewise.
4990 (add_tracepoint_action): Likewise.
4991 (add_traceframe): Likewise.
4992 (add_traceframe_block): Likewise.
4993 (cmd_qtdpsrc): Likewise.
4994 (cmd_qtdv): Likewise.
4995 (cmd_qtstatus): Likewise.
4996 (response_source): Likewise.
4997 (response_tsv): Likewise.
4998 (cmd_qtnotes): Likewise.
4999 (gdb_collect): Likewise.
5000 (initialize_tracepoint): Likewise.
5002 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5004 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5005 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5006 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5008 (enum aarch64_condition_codes): New enum.
5009 (w0): New static global.
5012 (struct aarch64_memory_operand) <type>: New
5013 MEMORY_OPERAND_POSTINDEX type.
5014 (postindex_memory_operand): New helper function.
5015 (emit_ret): New function.
5016 (emit_load_store_pair): New function, factored out of emit_stp
5017 with support for MEMORY_OPERAND_POSTINDEX.
5018 (emit_stp): Rewrite using emit_load_store_pair.
5019 (emit_ldp): New function.
5020 (emit_load_store): Likewise.
5021 (emit_ldr): Mention post-index instruction in comment.
5022 (emit_ldrh): New function.
5023 (emit_ldrb): New function.
5024 (emit_ldrsw): Mention post-index instruction in comment.
5025 (emit_str): Likewise.
5026 (emit_subs): New function.
5027 (emit_cmp): Likewise.
5028 (emit_and): Likewise.
5029 (emit_orr): Likewise.
5030 (emit_orn): Likewise.
5031 (emit_eor): Likewise.
5032 (emit_mvn): Likewise.
5033 (emit_lslv): Likewise.
5034 (emit_lsrv): Likewise.
5035 (emit_asrv): Likewise.
5036 (emit_mul): Likewise.
5037 (emit_sbfm): Likewise.
5038 (emit_sbfx): Likewise.
5039 (emit_ubfm): Likewise.
5040 (emit_ubfx): Likewise.
5041 (emit_csinc): Likewise.
5042 (emit_cset): Likewise.
5043 (emit_nop): Likewise.
5044 (emit_ops_insns): New helper function.
5045 (emit_pop): Likewise.
5046 (emit_push): Likewise.
5047 (aarch64_emit_prologue): New function.
5048 (aarch64_emit_epilogue): Likewise.
5049 (aarch64_emit_add): Likewise.
5050 (aarch64_emit_sub): Likewise.
5051 (aarch64_emit_mul): Likewise.
5052 (aarch64_emit_lsh): Likewise.
5053 (aarch64_emit_rsh_signed): Likewise.
5054 (aarch64_emit_rsh_unsigned): Likewise.
5055 (aarch64_emit_ext): Likewise.
5056 (aarch64_emit_log_not): Likewise.
5057 (aarch64_emit_bit_and): Likewise.
5058 (aarch64_emit_bit_or): Likewise.
5059 (aarch64_emit_bit_xor): Likewise.
5060 (aarch64_emit_bit_not): Likewise.
5061 (aarch64_emit_equal): Likewise.
5062 (aarch64_emit_less_signed): Likewise.
5063 (aarch64_emit_less_unsigned): Likewise.
5064 (aarch64_emit_ref): Likewise.
5065 (aarch64_emit_if_goto): Likewise.
5066 (aarch64_emit_goto): Likewise.
5067 (aarch64_write_goto_address): Likewise.
5068 (aarch64_emit_const): Likewise.
5069 (aarch64_emit_call): Likewise.
5070 (aarch64_emit_reg): Likewise.
5071 (aarch64_emit_pop): Likewise.
5072 (aarch64_emit_stack_flush): Likewise.
5073 (aarch64_emit_zero_ext): Likewise.
5074 (aarch64_emit_swap): Likewise.
5075 (aarch64_emit_stack_adjust): Likewise.
5076 (aarch64_emit_int_call_1): Likewise.
5077 (aarch64_emit_void_call_2): Likewise.
5078 (aarch64_emit_eq_goto): Likewise.
5079 (aarch64_emit_ne_goto): Likewise.
5080 (aarch64_emit_lt_goto): Likewise.
5081 (aarch64_emit_le_goto): Likewise.
5082 (aarch64_emit_gt_goto): Likewise.
5083 (aarch64_emit_ge_got): Likewise.
5084 (aarch64_emit_ops_impl): New static global variable.
5085 (aarch64_emit_ops): New target function, return
5086 &aarch64_emit_ops_impl.
5087 (struct linux_target_ops): Install it.
5089 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5091 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5092 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5094 * linux-aarch64-ipa.c: New file.
5095 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5097 (aarch64_get_thread_area): New target method.
5098 (extract_signed_bitfield): New helper function.
5099 (aarch64_decode_ldr_literal): New function.
5100 (enum aarch64_opcodes): New enum.
5101 (struct aarch64_register): New struct.
5102 (struct aarch64_operand): New struct.
5103 (x0): New static global.
5112 (aarch64_register): New helper function.
5113 (register_operand): Likewise.
5114 (immediate_operand): Likewise.
5115 (struct aarch64_memory_operand): New struct.
5116 (offset_memory_operand): New helper function.
5117 (preindex_memory_operand): Likewise.
5118 (enum aarch64_system_control_registers): New enum.
5119 (ENCODE): New macro.
5120 (emit_insn): New helper function.
5121 (emit_b): New function.
5122 (emit_bcond): Likewise.
5123 (emit_cb): Likewise.
5124 (emit_tb): Likewise.
5125 (emit_blr): Likewise.
5126 (emit_stp): Likewise.
5127 (emit_ldp_q_offset): Likewise.
5128 (emit_stp_q_offset): Likewise.
5129 (emit_load_store): Likewise.
5130 (emit_ldr): Likewise.
5131 (emit_ldrsw): Likewise.
5132 (emit_str): Likewise.
5133 (emit_ldaxr): Likewise.
5134 (emit_stxr): Likewise.
5135 (emit_stlr): Likewise.
5136 (emit_data_processing_reg): Likewise.
5137 (emit_data_processing): Likewise.
5138 (emit_add): Likewise.
5139 (emit_sub): Likewise.
5140 (emit_mov): Likewise.
5141 (emit_movk): Likewise.
5142 (emit_mov_addr): Likewise.
5143 (emit_mrs): Likewise.
5144 (emit_msr): Likewise.
5145 (emit_sevl): Likewise.
5146 (emit_wfe): Likewise.
5147 (append_insns): Likewise.
5148 (can_encode_int32_in): New helper function.
5149 (aarch64_relocate_instruction): New function.
5150 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5151 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5152 (struct linux_target_ops): Install aarch64_get_thread_area,
5153 aarch64_install_fast_tracepoint_jump_pad and
5154 aarch64_get_min_fast_tracepoint_insn_len.
5156 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5158 * Makefile.in (aarch64-insn.o): New rule.
5159 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5161 2015-09-21 Yao Qi <yao.qi@linaro.org>
5163 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5165 2015-09-21 Yao Qi <yao.qi@linaro.org>
5167 * tracepoint.c (max_jump_pad_size): Remove.
5169 2015-09-18 Yao Qi <yao.qi@linaro.org>
5171 * linux-aarch64-low.c: Don't include sys/uio.h.
5172 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5174 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5176 * tracepoint.c (eval_result_type): Change prototype.
5177 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5179 2015-09-15 Pedro Alves <palves@redhat.com>
5181 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5182 Check whether to report exec events instead of checking whether
5183 multiprocess is enabled.
5185 2015-09-15 Pedro Alves <palves@redhat.com>
5188 * remote-utils.c (prepare_resume_reply): Merge
5189 TARGET_WAITKIND_VFORK_DONE switch case with the
5190 TARGET_WAITKIND_FORKED case.
5192 2015-09-15 Yao Qi <yao.qi@linaro.org>
5194 * server.c (handle_query): Check string comparison using
5195 "else if" instead of "if".
5197 2015-09-15 Yao Qi <yao.qi@linaro.org>
5199 * server.c (vCont_supported): New global variable.
5200 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5201 matches. Append ";vContSupported+" to own_buf.
5202 (handle_v_requests): Append ";s;S" to own_buf if target supports
5203 hardware single step or vCont_supported is false.
5204 (capture_main): Set vCont_supported to zero.
5206 2015-09-15 Yao Qi <yao.qi@linaro.org>
5208 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5210 (linux_supports_hardware_single_step): ... New function.
5211 (linux_target_ops): Update.
5212 * lynx-low.c (lynx_target_ops): Set field
5213 supports_hardware_single_step to target_can_do_hardware_single_step.
5214 * nto-low.c (nto_target_ops): Likewise.
5215 * spu-low.c (spu_target_ops): Likewise.
5216 * win32-low.c (win32_target_ops): Likewise.
5217 * target.c (target_can_do_hardware_single_step): New function.
5218 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5219 Remove. <supports_hardware_single_step>: New field.
5220 (target_supports_conditional_breakpoints): Remove.
5221 (target_supports_hardware_single_step): New macro.
5222 (target_can_do_hardware_single_step): Declare.
5223 * server.c (handle_query): Use target_supports_hardware_single_step
5224 instead of target_supports_conditional_breakpoints.
5226 2015-09-15 Yao Qi <yao.qi@linaro.org>
5228 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5230 (struct linux_target_ops the_low_target): Install
5231 aarch64_linux_siginfo_fixup.
5233 2015-09-11 Don Breazeal <donb@codesourcery.com>
5234 Luis Machado <lgustavo@codesourcery.com>
5236 * linux-low.c (linux_mourn): Static declaration.
5237 (linux_arch_setup): Move in front of
5238 handle_extended_wait.
5239 (linux_arch_setup_thread): New function.
5240 (handle_extended_wait): Handle exec events. Call
5241 linux_arch_setup_thread. Make event_lwp argument a
5242 pointer-to-a-pointer.
5243 (check_zombie_leaders): Do not check stopped threads.
5244 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5245 (linux_low_filter_event): Add lwp and thread for exec'ing
5246 non-leader thread if leader thread has been deleted.
5247 Refactor code into linux_arch_setup_thread and call it.
5248 Pass child lwp pointer by reference to handle_extended_wait.
5249 (linux_wait_for_event_filtered): Update comment.
5250 (linux_wait_1): Prevent clobbering exec event status.
5251 (linux_supports_exec_events): New function.
5252 (linux_target_ops) <supports_exec_events>: Initialize new member.
5253 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5255 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5256 * server.c (report_exec_events): New global variable.
5257 (handle_query): Handle qSupported query for exec-events feature.
5258 (captured_main): Initialize report_exec_events.
5259 * server.h (report_exec_events): Declare new global variable.
5260 * target.h (struct target_ops) <supports_exec_events>: New
5262 (target_supports_exec_events): New macro.
5263 * win32-low.c (win32_target_ops) <supports_exec_events>:
5264 Initialize new member.
5266 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5268 * linux-low.c (linux_low_enable_btrace): Remove.
5269 (linux_target_ops): Replace linux_low_enable_btrace with
5270 linux_enable_btrace.
5272 2015-09-03 Yao Qi <yao.qi@linaro.org>
5274 * linux-aarch64-low.c (aarch64_insert_point): Call
5275 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5278 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5280 * linux-low.c (check_stopped_by_breakpoint): Use
5281 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5283 2015-08-27 Pedro Alves <palves@redhat.com>
5285 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5287 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5289 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5290 the XNEW-family equivalent.
5291 (compile_bytecodes): Likewise.
5292 * dll.c (loaded_dll): Likewise.
5293 * event-loop.c (append_callback_event): Likewise.
5294 (create_file_handler): Likewise.
5295 (create_file_event): Likewise.
5296 * hostio.c (handle_open): Likewise.
5297 * inferiors.c (add_thread): Likewise.
5298 (add_process): Likewise.
5299 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5300 * linux-arm-low.c (arm_new_process): Likewise.
5301 (arm_new_thread): Likewise.
5302 * linux-low.c (add_to_pid_list): Likewise.
5303 (linux_add_process): Likewise.
5304 (handle_extended_wait): Likewise.
5305 (add_lwp): Likewise.
5306 (enqueue_one_deferred_signal): Likewise.
5307 (enqueue_pending_signal): Likewise.
5308 (linux_resume_one_lwp_throw): Likewise.
5309 (linux_resume_one_thread): Likewise.
5310 (linux_read_memory): Likewise.
5311 (linux_write_memory): Likewise.
5312 * linux-mips-low.c (mips_linux_new_process): Likewise.
5313 (mips_linux_new_thread): Likewise.
5314 (mips_add_watchpoint): Likewise.
5315 * linux-x86-low.c (initialize_low_arch): Likewise.
5316 * lynx-low.c (lynx_add_process): Likewise.
5317 * mem-break.c (set_raw_breakpoint_at): Likewise.
5318 (set_breakpoint): Likewise.
5319 (add_condition_to_breakpoint): Likewise.
5320 (add_commands_to_breakpoint): Likewise.
5321 (clone_agent_expr): Likewise.
5322 (clone_one_breakpoint): Likewise.
5323 * regcache.c (new_register_cache): Likewise.
5324 * remote-utils.c (look_up_one_symbol): Likewise.
5325 * server.c (queue_stop_reply): Likewise.
5326 (start_inferior): Likewise.
5327 (queue_stop_reply_callback): Likewise.
5328 (handle_target_event): Likewise.
5329 * spu-low.c (fetch_ppc_memory): Likewise.
5330 (store_ppc_memory): Likewise.
5331 * target.c (set_target_ops): Likewise.
5332 * thread-db.c (thread_db_load_search): Likewise.
5333 (try_thread_db_load_1): Likewise.
5334 * tracepoint.c (add_tracepoint): Likewise.
5335 (add_tracepoint_action): Likewise.
5336 (create_trace_state_variable): Likewise.
5337 (cmd_qtdpsrc): Likewise.
5338 (cmd_qtro): Likewise.
5339 (add_while_stepping_state): Likewise.
5340 * win32-low.c (child_add_thread): Likewise.
5341 (get_image_name): Likewise.
5343 2015-08-25 Yao Qi <yao.qi@linaro.org>
5345 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5347 2015-08-25 Yao Qi <yao.qi@linaro.org>
5349 * Makefile.in (aarch64-linux.o): New rule.
5350 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5352 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5353 (aarch64_init_debug_reg_state): Make it extern.
5354 (aarch64_linux_prepare_to_resume): Remove.
5356 2015-08-25 Yao Qi <yao.qi@linaro.org>
5358 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5359 lwp_arch_private_info and ptid_of_lwp.
5361 2015-08-25 Yao Qi <yao.qi@linaro.org>
5363 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5364 Find proc_info by find_process_pid. All callers updated.
5366 2015-08-25 Yao Qi <yao.qi@linaro.org>
5368 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5370 (debug_reg_change_callback): Remove.
5371 (aarch64_notify_debug_reg_change): Remove.
5373 2015-08-25 Yao Qi <yao.qi@linaro.org>
5375 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5376 Call current_lwp_ptid.
5378 2015-08-25 Yao Qi <yao.qi@linaro.org>
5380 * linux-aarch64-low.c (debug_reg_change_callback): Use
5383 2015-08-25 Yao Qi <yao.qi@linaro.org>
5385 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5387 2015-08-25 Yao Qi <yao.qi@linaro.org>
5389 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5391 2015-08-25 Yao Qi <yao.qi@linaro.org>
5393 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5396 2015-08-25 Yao Qi <yao.qi@linaro.org>
5398 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5400 (debug_reg_change_callback): Remove argument entry and add argument
5401 lwp. Remove local variable thread. Don't print thread id in the
5402 debugging output. Don't check whether pid of thread equals to pid.
5403 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5404 iterate_over_lwps instead find_inferior.
5406 2015-08-24 Pedro Alves <palves@redhat.com>
5408 * inferiors.c (get_first_process): New function.
5409 * inferiors.h (get_first_process): New declaration.
5410 * remote-utils.c (read_ptid): Default to the first process in the
5411 list, instead of to the current thread's process.
5413 2015-08-24 Pedro Alves <palves@redhat.com>
5415 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5416 * event-loop.c: Likewise.
5417 * remote-utils.c: Likewise.
5418 * tracepoint.c: Likewise.
5420 2015-08-24 Pedro Alves <palves@redhat.com>
5422 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5425 2015-08-21 Pedro Alves <palves@redhat.com>
5427 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5428 instead of literal 1.
5430 2015-08-21 Pedro Alves <palves@redhat.com>
5432 * tdesc.c (default_description): Explicitly zero-initialize.
5434 2015-08-21 Pedro Alves <palves@redhat.com>
5437 * inferiors.c (remove_thread): Discard any pending stop reply for
5439 * server.c (remove_all_on_match_pid): Rename to ...
5440 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5442 (discard_queued_stop_replies): Change parameter to a ptid. Now
5444 (handle_v_kill, kill_inferior_callback, captured_main)
5445 (process_serial_event): Adjust.
5446 * server.h (discard_queued_stop_replies): Declare.
5448 2015-08-21 Pedro Alves <palves@redhat.com>
5450 * linux-low.c (wait_for_sigstop): Always switch to no thread
5451 selected if the previously current thread dies.
5452 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5453 process instead of the current thread's.
5454 * remote-utils.c (input_interrupt): Don't check if there's no
5456 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5457 current thread to the general thread fails, error out.
5458 (handle_qxfer_auxv, handle_qxfer_libraries)
5459 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5460 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5461 (handle_query): Check if there's a thread selected instead of
5462 checking whether there's any thread in the thread list.
5463 (handle_qxfer_threads, handle_qxfer_btrace)
5464 (handle_qxfer_btrace_conf): Don't error out early if there's no
5465 thread in the thread list.
5466 (handle_v_cont, myresume): Don't set the current thread to the
5468 (process_serial_event) <Hg handling>: Also set thread_id if the
5469 previous general thread is still alive.
5470 (process_serial_event) <g/G handling>: If setting the current
5471 thread to the general thread fails, error out.
5472 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5473 thread's lwp instead of the current thread's.
5474 * target.c (set_desired_thread): If the desired thread was not
5475 found, leave the current thread pointing to NULL. Return an int
5476 (boolean) indicating success.
5477 * target.h (set_desired_thread): Change return type to int.
5479 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5481 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5482 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5484 (ps_get_thread_area): New function.
5486 2015-08-19 Gary Benson <gbenson@redhat.com>
5488 * hostio.c (handle_pread): Do not attempt to read more data
5489 than hostio_reply_with_data can fit in a packet.
5491 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5493 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5495 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5497 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5499 2015-08-06 Pedro Alves <palves@redhat.com>
5501 * tracepoint.c (expr_eval_result): Now an int.
5503 2015-08-06 Pedro Alves <palves@redhat.com>
5505 * gdbthread.h (struct regcache): Forward declare.
5506 (struct thread_info) <regcache_data>: Now a struct regcache
5508 * inferiors.c (inferior_regcache_data)
5509 (set_inferior_regcache_data): Now work with struct regcache
5511 * inferiors.h (struct regcache): Forward declare.
5512 (inferior_regcache_data, set_inferior_regcache_data): Now work
5513 with struct regcache pointers.
5514 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5515 (free_register_cache_thread): Remove struct regcache pointer
5518 2015-08-06 Pedro Alves <palves@redhat.com>
5520 * server.c (captured_main): On error, print the exception message
5521 to stderr, and if run_once is set, throw a quit.
5523 2015-08-06 Pedro Alves <palves@redhat.com>
5525 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5528 2015-08-06 Pedro Alves <palves@redhat.com>
5530 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5531 reading beyond the passed in buffer length.
5533 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5535 * tracepoint.c (symbol_list) <required>: Remove.
5537 2015-08-06 Pedro Alves <palves@redhat.com>
5539 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5540 count if stopping and suspending threads.
5541 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5542 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5543 (linux_detach): Complete an ongoing step-over.
5544 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5546 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5547 (linux_wait_1): If passing a signal to the inferior after
5548 finishing a step-over, unsuspend and re-resume all lwps. If we
5549 see a single-step event but the thread should be continuing, don't
5550 pass the trap to gdb.
5551 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5552 internal_error instead of gdb_assert.
5553 (enqueue_pending_signal): New function.
5554 (check_ptrace_stopped_lwp_gone): Add debug output.
5555 (start_step_over): Use internal_error instead of gdb_assert.
5556 (complete_ongoing_step_over): New function.
5557 (linux_resume_one_thread): Don't resume a suspended thread.
5558 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5561 2015-08-06 Pedro Alves <palves@redhat.com>
5563 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5564 (linux_thread_alive): Use lwp_is_marked_dead.
5565 (extended_event_reported): Delete.
5566 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5567 instead of extended_event_reported.
5568 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5570 (lwp_is_marked_dead): New function.
5571 (lwp_running): Use lwp_is_marked_dead.
5572 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5575 2015-08-06 Pedro Alves <palves@redhat.com>
5577 * linux-low.c (linux_wait_1): Move fork event output out of the
5578 !report_to_gdb check. Pass event_child->waitstatus to
5579 target_waitstatus_to_string instead of ourstatus.
5581 2015-08-04 Yao Qi <yao.qi@linaro.org>
5583 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5584 if current_thread is 32 bit.
5586 2015-08-04 Yao Qi <yao.qi@linaro.org>
5588 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5589 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5590 * server.c (extended_protocol): Remove "static".
5591 * server.h (extended_protocol): Declare it.
5593 2015-08-04 Yao Qi <yao.qi@linaro.org>
5595 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5596 both aarch64 and aarch32.
5597 (aarch64_set_pc): Likewise.
5599 2015-08-04 Yao Qi <yao.qi@linaro.org>
5601 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5602 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5603 arm-with-neon.xml to srv_xmlfiles.
5604 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5605 (is_64bit_tdesc): New function.
5606 (aarch64_linux_read_description): New function.
5607 (aarch64_arch_setup): Call aarch64_linux_read_description.
5608 (regs_info): Rename to regs_info_aarch64.
5609 (aarch64_regs_info): Return right regs_info.
5610 (initialize_low_arch): Call initialize_low_arch_aarch32.
5612 2015-08-04 Yao Qi <yao.qi@linaro.org>
5614 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5615 * linux-aarch32-low.c: New file.
5616 * linux-aarch32-low.h: New file.
5617 * linux-arm-low.c (arm_fill_gregset): Move it to
5618 linux-aarch32-low.c.
5619 (arm_store_gregset): Likewise.
5620 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5621 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5622 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5623 (regs_info): Rename to regs_info_arm.
5624 (arm_regs_info): Return regs_info_aarch32 if
5625 have_ptrace_getregset is 1 and target description is
5626 arm_with_neon or arm_with_vfpv3.
5627 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5628 Call initialize_low_arch_aarch32 instead.
5630 2015-08-04 Yao Qi <yao.qi@linaro.org>
5632 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5633 * linux-low.c: ... here.
5634 * linux-low.h (have_ptrace_getregset): Declare it.
5636 2015-08-04 Pedro Alves <palves@redhat.com>
5638 * thread-db.c (struct thread_db): Use new typedefs.
5639 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5641 (disable_thread_event_reporting): Cast result of dlsym to
5642 destination function pointer type.
5643 (thread_db_mourn): Use td_ta_delete_ftype.
5645 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5647 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5649 (CDX_BREAKPOINT): Define for R2.
5650 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5651 (the_low_target): Add comments.
5653 2015-07-30 Yao Qi <yao.qi@linaro.org>
5655 * linux-arm-low.c (arm_hwcap): Remove it.
5656 (arm_read_description): New local variable arm_hwcap. Don't
5657 set arm_hwcap to zero.
5659 2015-07-30 Yao Qi <yao.qi@linaro.org>
5661 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5662 Use regcache->tdesc instead.
5663 (arm_store_wmmxregset): Likewise.
5664 (arm_fill_vfpregset): Likewise.
5665 (arm_store_vfpregset): Likewise.
5667 2015-07-30 Yao Qi <yao.qi@linaro.org>
5669 * linux-arm-low.c: Include arch/arm.h.
5670 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5671 (arm_store_gregset): Likewise.
5673 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5675 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5676 ptrace's 4th parameter.
5678 2015-07-27 Yao Qi <yao.qi@linaro.org>
5680 * configure.srv (case aarch64*-*-linux*): Don't set
5683 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5685 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5687 * linux-arm-low.c: Likewise.
5688 * linux-cris-low.c: Likewise.
5689 * linux-crisv32-low.c: Likewise.
5690 * linux-low.c: Likewise.
5691 * linux-m68k-low.c: Likewise.
5692 * linux-mips-low.c: Likewise.
5693 * linux-nios2-low.c: Likewise.
5694 * linux-s390-low.c: Likewise.
5695 * linux-sparc-low.c: Likewise.
5696 * linux-tic6x-low.c: Likewise.
5697 * linux-tile-low.c: Likewise.
5698 * linux-x86-low.c: Likewise.
5700 2015-07-24 Pedro Alves <palves@redhat.com>
5702 * config.in: Regenerate.
5703 * configure: Regenerate.
5705 2015-07-24 Pedro Alves <palves@redhat.com>
5707 * acinclude.m4: Include ../ptrace.m4.
5708 * configure.ac: Call GDB_AC_PTRACE.
5709 * config.in, configure: Regenerate.
5711 2015-07-24 Yao Qi <yao.qi@linaro.org>
5713 * linux-low.c (linux_create_inferior): Remove setting to
5714 proc->priv->new_inferior.
5715 (linux_attach): Likewise.
5716 (linux_low_filter_event): Likewise.
5717 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5719 2015-07-24 Yao Qi <yao.qi@linaro.org>
5721 * linux-low.c (linux_arch_setup): New function.
5722 (linux_low_filter_event): If proc->tdesc is NULL and
5723 proc->attached is true, call the_low_target.arch_setup.
5724 Otherwise, keep status pending, and return.
5725 (linux_resume_one_lwp_throw): Don't call get_pc if
5726 thread->while_stepping isn't NULL. Don't call
5727 get_thread_regcache if proc->tdesc is NULL.
5728 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5729 (linux_target_ops): Install arch_setup.
5730 * server.c (start_inferior): Call the_target->arch_setup.
5731 * target.h (struct target_ops) <arch_setup>: New field.
5732 (target_arch_setup): New marco.
5733 * lynx-low.c (lynx_target_ops): Update.
5734 * nto-low.c (nto_target_ops): Update.
5735 * spu-low.c (spu_target_ops): Update.
5736 * win32-low.c (win32_target_ops): Update.
5738 2015-07-24 Yao Qi <yao.qi@linaro.org>
5740 * linux-low.c (linux_add_process): Don't set
5741 proc->priv->new_inferior.
5742 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5743 (linux_attach): Likewise.
5745 2015-07-24 Yao Qi <yao.qi@linaro.org>
5747 * server.c (start_inferior): Code refactor.
5749 2015-07-24 Yao Qi <yao.qi@linaro.org>
5751 * server.c (process_serial_event): Set general_thread.
5753 2015-07-21 Yao Qi <yao.qi@linaro.org>
5755 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5756 aarch64_linux_get_debug_reg_capacity.
5758 2015-07-17 Yao Qi <yao.qi@linaro.org>
5760 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5761 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5762 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5763 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5764 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5765 (AARCH64_HWP_ALIGNMENT): Likewise.
5766 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5767 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5768 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5769 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5770 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5771 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5772 (struct aarch64_debug_reg_state): Likewise.
5773 (struct arch_lwp_info): Likewise.
5774 (aarch64_align_watchpoint): Likewise.
5775 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5776 (aarch64_watchpoint_length): Likewise.
5777 (aarch64_point_encode_ctrl_reg): Likewise
5778 (aarch64_point_is_aligned): Likewise.
5779 (aarch64_align_watchpoint): Likewise.
5780 (aarch64_linux_set_debug_regs):
5781 (aarch64_dr_state_insert_one_point): Likewise.
5782 (aarch64_dr_state_remove_one_point): Likewise.
5783 (aarch64_handle_breakpoint): Likewise.
5784 (aarch64_handle_aligned_watchpoint): Likewise.
5785 (aarch64_handle_unaligned_watchpoint): Likewise.
5786 (aarch64_handle_watchpoint): Likewise.
5788 2015-07-17 Yao Qi <yao.qi@linaro.org>
5790 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5791 and don't aarch64_get_debug_reg_state. All callers update.
5792 (aarch64_handle_aligned_watchpoint): Likewise.
5793 (aarch64_handle_unaligned_watchpoint): Likewise.
5794 (aarch64_handle_watchpoint): Likewise.
5795 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5796 (aarch64_remove_point): Likewise.
5798 2015-07-17 Yao Qi <yao.qi@linaro.org>
5800 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5802 (aarch64_handle_unaligned_watchpoint): Likewise.
5804 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5806 Revert the previous 3 commits:
5807 Move gdb_regex* to common/
5808 Move linux_find_memory_regions_full & co.
5809 gdbserver build-id attribute generator
5811 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5812 Jan Kratochvil <jan.kratochvil@redhat.com>
5814 gdbserver build-id attribute generator.
5815 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5816 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5817 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5819 (get_dynamic): Use find_pdhr to traverse program headers.
5820 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5821 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5822 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5823 (get_hex_build_id): New.
5824 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5825 to reply XML document.
5827 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5828 Jan Kratochvil <jan.kratochvil@redhat.com>
5830 * target.c: Include target/target-utils.h and fcntl.h.
5831 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5832 (target_fileio_read_stralloc): New functions.
5834 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5836 * Makefile.in (OBS): Add gdb_regex.o.
5838 * config.in: Rebuilt.
5839 * configure: Rebuilt.
5841 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5842 Jan Kratochvil <jan.kratochvil@redhat.com>
5844 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5845 * Makefile.in (OBS): Add target-utils.o.
5846 (linux-maps.o, target-utils.o): New.
5847 * configure.srv (srv_linux_obj): Add linux-maps.o.
5849 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5851 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5853 (the_low_target): Install it.
5855 2015-07-14 Pedro Alves <palves@redhat.com>
5857 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5858 Instead, ignore ECHILD, and throw an error for other errnos.
5860 2015-07-10 Pedro Alves <palves@redhat.com>
5862 * event-loop.c (struct callback_event) <data>: Change type to
5863 gdb_client_data instance instead of gdb_client_data pointer.
5864 (append_callback_event): Adjust.
5866 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5868 * linux-aarch64-low.c: Add comments for each linux_target_ops
5869 method. Remove comments already covered in target_ops and
5870 linux_target_ops definitions.
5871 (the_low_target): Add comments for each unimplemented method.
5873 2015-07-09 Yao Qi <yao.qi@linaro.org>
5875 * linux-aarch64-low.c (aarch64_regmap): Remove.
5876 (aarch64_usrregs_info): Remove.
5877 (regs_info): Set field usrregs to NULL.
5879 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5881 * linux-low.c: Include "rsp-low.h"
5882 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5883 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5884 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5885 (handle_btrace_enable_pt): New.
5886 (handle_btrace_general_set): Support "pt".
5887 (handle_btrace_conf_general_set): Support "pt:size".
5889 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5891 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5894 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5896 * linux-aarch64-low.c: Remove comment about endianness.
5897 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5898 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5901 2015-06-24 Gary Benson <gbenson@redhat.com>
5903 * linux-i386-ipa.c (stdint.h): Do not include.
5904 * lynx-i386-low.c (stdint.h): Likewise.
5905 * lynx-ppc-low.c (stdint.h): Likewise.
5906 * mem-break.c (stdint.h): Likewise.
5907 * thread-db.c (stdint.h): Likewise.
5908 * tracepoint.c (stdint.h): Likewise.
5909 * win32-low.c (stdint.h): Likewise.
5911 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5913 * server.c (write_qxfer_response): Update call to
5914 remote_escape_output.
5916 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5917 Jan Kratochvil <jan.kratochvil@redhat.com>
5919 Merge multiple hex conversions.
5920 * gdbreplay.c (tohex): Rename to 'fromhex'.
5921 (logchar): Use fromhex.
5923 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5925 * server.c (handle_qxfer_libraries): Set `version' attribute for
5928 2015-06-10 Gary Benson <gbenson@redhat.com>
5930 * target.h (struct target_ops) <multifs_open>: New field.
5931 <multifs_unlink>: Likewise.
5932 <multifs_readlink>: Likewise.
5933 * linux-low.c (nat/linux-namespaces.h): New include.
5934 (linux_target_ops): Initialize the_target->multifs_open,
5935 the_target->multifs_unlink and the_target->multifs_readlink.
5936 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5937 * hostio.c (hostio_fs_pid): New static variable.
5938 (hostio_handle_new_gdb_connection): New function.
5939 (handle_setfs): Likewise.
5940 (handle_open): Use the_target->multifs_open as appropriate.
5941 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5942 (handle_readlink): Use the_target->multifs_readlink as
5944 (handle_vFile): Handle vFile:setfs packets.
5945 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5946 after target_handle_new_gdb_connection.
5948 2015-06-10 Gary Benson <gbenson@redhat.com>
5950 * configure.ac (AC_CHECK_FUNCS): Add setns.
5951 * config.in: Regenerate.
5952 * configure: Likewise.
5953 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5954 (linux-namespaces.o): New rule.
5955 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5957 2015-06-09 Gary Benson <gbenson@redhat.com>
5959 * hostio.c (handle_open): Process mode argument with
5960 fileio_to_host_mode.
5962 2015-06-01 Yao Qi <yao.qi@linaro.org>
5964 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5965 * linux-x86-low.c: Likewise.
5967 2015-05-28 Don Breazeal <donb@codesourcery.com>
5969 * linux-low.c (handle_extended_wait): Initialize
5970 thread_info.last_resume_kind for new fork children.
5972 2015-05-15 Pedro Alves <palves@redhat.com>
5974 * target.h (target_handle_new_gdb_connection): Rewrite using if
5975 wrapped in do/while.
5977 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5979 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5980 * configure, config.in: Regenerate.
5981 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5984 2015-05-12 Don Breazeal <donb@codesourcery.com>
5986 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5987 PTRACE_EVENT_VFORK_DONE.
5988 (linux_low_ptrace_options, extended_event_reported): Add vfork
5990 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5991 and "vforkdone" for RSP 'T' Stop Reply Packet.
5992 * server.h (report_vfork_events): Declare
5995 2015-05-12 Don Breazeal <donb@codesourcery.com>
5997 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5998 (the_low_target) <new_fork>: Initialize new member.
5999 * linux-arm-low.c (arm_new_fork): New function.
6000 (the_low_target) <new_fork>: Initialize new member.
6001 * linux-low.c (handle_extended_wait): Call new target function
6003 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6004 * linux-mips-low.c (mips_add_watchpoint): New function
6005 extracted from mips_insert_point.
6006 (the_low_target) <new_fork>: Initialize new member.
6007 (mips_linux_new_fork): New function.
6008 (mips_insert_point): Call mips_add_watchpoint.
6009 * linux-x86-low.c (x86_linux_new_fork): New function.
6010 (the_low_target) <new_fork>: Initialize new member.
6012 2015-05-12 Don Breazeal <donb@codesourcery.com>
6014 * linux-low.c (handle_extended_wait): Implement return value,
6015 rename argument 'event_child' to 'event_lwp', handle
6016 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6017 (linux_low_ptrace_options): New function.
6018 (linux_low_filter_event): Call linux_low_ptrace_options,
6019 use different argument fo linux_enable_event_reporting,
6020 use return value from handle_extended_wait.
6021 (extended_event_reported): New function.
6022 (linux_wait_1): Call extended_event_reported and set
6023 status to report fork events.
6024 (linux_write_memory): Add pid to debug message.
6025 (reset_lwp_ptrace_options_callback): New function.
6026 (linux_handle_new_gdb_connection): New function.
6027 (linux_target_ops): Initialize new structure member.
6028 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6029 * lynx-low.c: Initialize new structure member.
6030 * remote-utils.c (prepare_resume_reply): Implement stop reason
6031 "fork" for "T" stop message.
6032 * server.c (handle_query): Call handle_new_gdb_connection.
6033 * server.h (report_fork_events): Declare global flag.
6034 * target.h (struct target_ops) <handle_new_gdb_connection>:
6036 (target_handle_new_gdb_connection): New macro.
6037 * win32-low.c: Initialize new structure member.
6039 2015-05-12 Don Breazeal <donb@codesourcery.com>
6041 * mem-break.c (APPEND_TO_LIST): Define macro.
6042 (clone_agent_expr): New function.
6043 (clone_one_breakpoint): New function.
6044 (clone_all_breakpoints): New function.
6045 * mem-break.h: Declare new functions.
6047 2015-05-12 Don Breazeal <donb@codesourcery.com>
6049 * linux-low.c (linux_supports_fork_events): New function.
6050 (linux_supports_vfork_events): New function.
6051 (linux_target_ops): Initialize new structure members.
6052 (initialize_low): Call linux_check_ptrace_features.
6053 * lynx-low.c (lynx_target_ops): Initialize new structure
6055 * server.c (report_fork_events, report_vfork_events):
6057 (handle_query): Add new features to qSupported packet and
6059 (captured_main): Initialize new global variables.
6060 * target.h (struct target_ops) <supports_fork_events>:
6062 <supports_vfork_events>: New member.
6063 (target_supports_fork_events): New macro.
6064 (target_supports_vfork_events): New macro.
6065 * win32-low.c (win32_target_ops): Initialize new structure
6068 2015-05-12 Gary Benson <gbenson@redhat.com>
6070 * server.c (handle_qxfer_exec_file): Use current process
6073 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6075 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6076 Remove HAVE_PTRACE_GETREGS conditionals.
6077 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6078 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6080 2015-05-08 Yao Qi <yao.qi@linaro.org>
6082 * linux-low.c (linux_supports_conditional_breakpoints): New
6084 (linux_target_ops): Install new target method.
6085 * lynx-low.c (lynx_target_ops): Install NULL hook for
6086 supports_conditional_breakpoints.
6087 * nto-low.c (nto_target_ops): Likewise.
6088 * spu-low.c (spu_target_ops): Likewise.
6089 * win32-low.c (win32_target_ops): Likewise.
6090 * server.c (handle_query): Check
6091 target_supports_conditional_breakpoints.
6092 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6094 (target_supports_conditional_breakpoints): New macro.
6096 2015-05-06 Pedro Alves <palves@redhat.com>
6099 * server.c (start_inferior): If the process exits, mourn it.
6101 2015-04-21 Gary Benson <gbenson@redhat.com>
6103 * hostio.c (fileio_open_flags_to_host): Factored out to
6104 fileio_to_host_openflags in common/fileio.c. Single use
6107 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6109 * linux-xtensa-low.c (xtensa_fill_gregset)
6110 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6113 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6115 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6116 (regs_info): Replace usrregs pointer with NULL.
6118 2015-04-17 Gary Benson <gbenson@redhat.com>
6120 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6121 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6122 * server.c (handle_qxfer_exec_file): New function.
6123 (qxfer_packets): Add exec-file entry.
6124 (handle_query): Report qXfer:exec-file:read as supported packet.
6126 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6128 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6130 2015-04-09 Gary Benson <gbenson@redhat.com>
6132 * hostio-errno.c (errno_to_fileio_error): Remove function.
6133 Update caller to use remote_fileio_to_fio_error.
6135 2015-04-09 Yao Qi <yao.qi@linaro.org>
6137 * linux-low.c (linux_insert_point): Call
6138 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6139 (linux_remove_point): Call remove_memory_breakpoint if type is
6141 * linux-x86-low.c (x86_insert_point): Don't call
6142 insert_memory_breakpoint.
6143 (x86_remove_point): Don't call remove_memory_breakpoint.
6145 2015-04-01 Pedro Alves <palves@redhat.com>
6146 Cleber Rosa <crosa@redhat.com>
6148 * server.c (gdbserver_usage): Reorganize and extend the usage
6151 2015-03-24 Pedro Alves <palves@redhat.com>
6153 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6154 output. Also dump TRAP_TRACE.
6155 (linux_low_filter_event): In debug output, distinguish a
6156 resume_stop SIGSTOP from a delayed SIGSTOP.
6158 2015-03-24 Gary Benson <gbenson@redhat.com>
6160 * linux-x86-low.c (x86_linux_new_thread): Moved to
6162 (x86_linux_prepare_to_resume): Likewise.
6164 2015-03-24 Gary Benson <gbenson@redhat.com>
6166 * Makefile.in (x86-linux-dregs.o): New rule.
6167 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6168 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6169 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6170 (x86_linux_dr_get): Likewise.
6171 (x86_linux_dr_set): Likewise.
6172 (update_debug_registers_callback): Likewise.
6173 (x86_linux_dr_set_addr): Likewise.
6174 (x86_linux_dr_get_addr): Likewise.
6175 (x86_linux_dr_set_control): Likewise.
6176 (x86_linux_dr_get_control): Likewise.
6177 (x86_linux_dr_get_status): Likewise.
6178 (x86_linux_update_debug_registers): Likewise.
6180 2015-03-24 Gary Benson <gbenson@redhat.com>
6182 * linux-x86-low.c (x86_linux_update_debug_registers):
6183 New function, factored out from...
6184 (x86_linux_prepare_to_resume): ...this.
6186 2015-03-24 Gary Benson <gbenson@redhat.com>
6188 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6189 (x86_linux_dr_set): Likewise.
6190 (update_debug_registers_callback): Likewise.
6191 (x86_linux_dr_set_addr): Likewise.
6192 (x86_linux_dr_get_addr): Likewise.
6193 (x86_linux_dr_set_control): Likewise.
6194 (x86_linux_dr_get_control): Likewise.
6195 (x86_linux_dr_get_status): Likewise.
6196 (x86_linux_prepare_to_resume): Likewise.
6198 2015-03-24 Gary Benson <gbenson@redhat.com>
6200 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6201 Use perror_with_name. Pass string through gettext.
6202 (x86_linux_dr_set): Likewise.
6204 2015-03-24 Gary Benson <gbenson@redhat.com>
6206 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6207 (x86_linux_dr_set_addr): ...this.
6208 (x86_dr_low_get_addr): Rename to...
6209 (x86_linux_dr_get_addr): ...this.
6210 (x86_dr_low_set_control): Rename to...
6211 (x86_linux_dr_set_control): ...this.
6212 (x86_dr_low_get_control): Rename to...
6213 (x86_linux_dr_get_control): ...this.
6214 (x86_dr_low_get_status): Rename to...
6215 (x86_linux_dr_get_status): ...this.
6216 (x86_dr_low): Update with new function names.
6218 2015-03-24 Gary Benson <gbenson@redhat.com>
6220 * Makefile.in (x86-linux.o): New rule.
6221 * configure.srv: Add x86-linux.o to relevant targets.
6222 * linux-low.c (lwp_set_arch_private_info): New function.
6223 (lwp_arch_private_info): Likewise.
6224 * linux-x86-low.c: Include nat/x86-linux.h.
6225 (arch_lwp_info): Removed structure.
6226 (update_debug_registers_callback):
6227 Use lwp_set_debug_registers_changed.
6228 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6229 and lwp_set_debug_registers_changed.
6230 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6232 2015-03-24 Gary Benson <gbenson@redhat.com>
6234 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6235 * linux-arm-low.c (arm_new_thread): Likewise.
6236 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6237 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6238 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6239 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6241 2015-03-24 Gary Benson <gbenson@redhat.com>
6243 * linux-low.c (ptid_of_lwp): New function.
6244 (lwp_is_stopped): Likewise.
6245 (lwp_stop_reason): Likewise.
6246 * linux-x86-low.c (update_debug_registers_callback):
6248 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6251 2015-03-24 Gary Benson <gbenson@redhat.com>
6253 * linux-low.h (linux_stop_lwp): Remove declaration.
6255 2015-03-24 Gary Benson <gbenson@redhat.com>
6257 * linux-low.h: Include nat/linux-nat.h.
6258 * linux-low.c (iterate_over_lwps_args): New structure.
6259 (iterate_over_lwps_filter): New function.
6260 (iterate_over_lwps): Likewise.
6261 * linux-x86-low.c (update_debug_registers_callback):
6262 Update signature to what iterate_over_lwps expects.
6263 Remove PID check that iterate_over_lwps now performs.
6264 (x86_dr_low_set_addr): Use iterate_over_lwps.
6265 (x86_dr_low_set_control): Likewise.
6267 2015-03-24 Gary Benson <gbenson@redhat.com>
6269 * linux-x86-low.c (x86_debug_reg_state): New function.
6270 (x86_linux_prepare_to_resume): Use the above.
6272 2015-03-24 Gary Benson <gbenson@redhat.com>
6274 * linux-low.c (current_lwp_ptid): New function.
6275 * linux-x86-low.c: Include nat/linux-nat.h.
6276 (x86_dr_low_get_addr): Use current_lwp_ptid.
6277 (x86_dr_low_get_control): Likewise.
6278 (x86_dr_low_get_status): Likewise.
6280 2015-03-20 Pedro Alves <palves@redhat.com>
6282 * tracepoint.c (cmd_qtstatus): Make "str" const.
6284 2015-03-20 Pedro Alves <palves@redhat.com>
6286 * server.c (handle_general_set): Make "req_str" const.
6288 2015-03-19 Pedro Alves <palves@redhat.com>
6290 * linux-low.c (linux_resume_one_lwp): Rename to ...
6291 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6292 instead call perror_with_name.
6293 (check_ptrace_stopped_lwp_gone): New function.
6294 (linux_resume_one_lwp): Reimplement as wrapper around
6295 linux_resume_one_lwp_throw that swallows errors if the LWP is
6298 2015-03-19 Pedro Alves <palves@redhat.com>
6300 * linux-low.c (count_events_callback, select_event_lwp_callback):
6301 No longer check whether the thread has resume_stop as last resume
6304 2015-03-19 Pedro Alves <palves@redhat.com>
6306 * linux-low.c (count_events_callback, select_event_lwp_callback):
6307 Use the lwp's status_pending_p field, not the thread's.
6309 2015-03-19 Pedro Alves <palves@redhat.com>
6311 * linux-low.c (select_event_lwp_callback): Update comments to
6312 no longer mention SIGTRAP.
6314 2015-03-18 Gary Benson <gbenson@redhat.com>
6316 * server.c (handle_query): Do not report vFile:fstat as supported.
6318 2015-03-11 Gary Benson <gbenson@redhat.com>
6320 * hostio.c (sys/types.h): New include.
6321 (sys/stat.h): Likewise.
6322 (common-remote-fileio.h): Likewise.
6323 (handle_fstat): New function.
6324 (handle_vFile): Handle vFile:fstat packets.
6326 2015-03-11 Gary Benson <gbenson@redhat.com>
6328 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6329 struct stat.st_blocks and struct stat.st_blksize.
6330 * configure: Regenerate.
6331 * config.in: Likewise.
6332 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6333 (OBS): Add common-remote-fileio.o.
6334 (common-remote-fileio.o): New rule.
6336 2015-03-09 Pedro Alves <palves@redhat.com>
6338 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6339 'struct sockaddr' pointer in 'accept' call.
6341 2015-03-09 Pedro Alves <palves@redhat.com>
6344 2015-03-07 Pedro Alves <palves@redhat.com>
6345 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6346 or <winsock2.h> here. Instead include "gdb_socket.h".
6347 (remote_open): Use union gdb_sockaddr_u.
6348 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6349 or <winsock2.h> here. Instead include "gdb_socket.h".
6350 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6351 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6353 (init_named_socket, gdb_agent_helper_thread): Use union
6356 2015-03-07 Pedro Alves <palves@redhat.com>
6358 * configure.ac (build_warnings): Move
6359 -Wdeclaration-after-statement to the C-specific set.
6360 * configure: Regenerate.
6362 2015-03-07 Pedro Alves <palves@redhat.com>
6364 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6365 or <winsock2.h> here. Instead include "gdb_socket.h".
6366 (remote_open): Use union gdb_sockaddr_u.
6367 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6368 or <winsock2.h> here. Instead include "gdb_socket.h".
6369 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6370 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6372 (init_named_socket, gdb_agent_helper_thread): Use union
6375 2015-03-07 Pedro Alves <palves@redhat.com>
6377 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6380 2015-03-06 Yao Qi <yao.qi@linaro.org>
6382 * linux-aarch64-low.c (aarch64_insert_point): Use
6383 show_debug_regs as a boolean.
6384 (aarch64_remove_point): Likewise.
6386 2015-03-05 Pedro Alves <palves@redhat.com>
6388 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6389 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6390 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6391 * nto-low.c (nto_target_ops): Likewise.
6392 * spu-low.c (spu_target_ops): Likewise.
6393 * win32-low.c (win32_target_ops): Likewise.
6395 2015-03-04 Pedro Alves <palves@redhat.com>
6397 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6398 Decide whether a breakpoint triggered based on the SIGTRAP's
6400 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6401 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6402 (linux_low_filter_event): Check for breakpoints before checking
6404 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6406 (linux_stopped_by_sw_breakpoint)
6407 (linux_supports_stopped_by_sw_breakpoint)
6408 (linux_stopped_by_hw_breakpoint)
6409 (linux_supports_stopped_by_hw_breakpoint): New functions.
6410 (linux_target_ops): Install new target methods.
6412 2015-03-04 Pedro Alves <palves@redhat.com>
6414 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6415 * server.c (swbreak_feature, hwbreak_feature): New globals.
6416 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6417 (captured_main): Clear swbreak_feature and hwbreak_feature.
6418 * server.h (swbreak_feature, hwbreak_feature): Declare.
6419 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6420 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6421 supports_stopped_by_hw_breakpoint>: New fields.
6422 (target_supports_stopped_by_sw_breakpoint)
6423 (target_stopped_by_sw_breakpoint)
6424 (target_supports_stopped_by_hw_breakpoint)
6425 (target_stopped_by_hw_breakpoint): Declare.
6427 2015-03-04 Pedro Alves <palves@redhat.com>
6429 enum lwp_stop_reason -> enum target_stop_reason
6430 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6431 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6432 (linux_wait_1, stuck_in_jump_pad_callback)
6433 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6434 (linux_stopped_by_watchpoint):
6435 * linux-low.h (enum lwp_stop_reason): Delete.
6436 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6437 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6439 2015-03-04 Yao Qi <yao.qi@linaro.org>
6441 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6443 2015-03-03 Gary Benson <gbenson@redhat.com>
6445 * hostio.c (handle_vFile): Fix prefix lengths.
6447 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6449 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6452 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6454 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6455 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6456 (clean): Add "rm -f" for above C files.
6457 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6458 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6459 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6460 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6461 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6462 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6463 (init_registers_s390x_vx_linux64)
6464 (init_registers_s390x_tevx_linux64)
6465 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6466 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6468 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6469 (s390_store_vxrs_high): New functions.
6470 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6472 (s390_arch_setup): Add logic for selecting one of the new target
6473 descriptions. Activate the new vector regsets if applicable.
6474 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6475 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6476 and init_registers_s390x_tevx_linux64.
6478 2015-03-01 Pedro Alves <palves@redhat.com>
6480 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6483 2015-02-27 Pedro Alves <palves@redhat.com>
6485 * linux-x86-low.c (u_debugreg_offset): New function.
6486 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6488 2015-02-27 Pedro Alves <palves@redhat.com>
6490 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6491 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6492 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6493 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6494 (ps_lsetfpregs, ps_getpid)
6495 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6496 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6497 (ps_lsetxregs, ps_plog): Declare.
6499 2015-02-27 Pedro Alves <palves@redhat.com>
6501 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6502 IP_AGENT_EXPORT_FUNC.
6503 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6504 IP_AGENT_EXPORT_FUNC.
6505 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6506 (IP_AGENT_EXPORT): Delete.
6507 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6508 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6509 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6510 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6511 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6512 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6513 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6514 (traceframe_read_count, traceframe_write_count)
6515 (traceframes_created, trace_state_variables, get_raw_reg)
6516 (get_trace_state_variable_value, set_trace_state_variable_value)
6517 (ust_loaded, helper_thread_id, cmd_buf): Use
6518 IPA_SYM_EXPORTED_NAME.
6519 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6520 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6521 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6522 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6523 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6524 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6525 EXTERN_C_PUSH/EXTERN_C_POP.
6526 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6527 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6528 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6529 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6530 (traceframe_write_count, traceframe_read_count)
6531 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6532 (about_to_request_buffer_space, get_trace_state_variable_value)
6533 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6534 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6535 EXTERN_C_PUSH/EXTERN_C_POP.
6536 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6537 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6538 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6539 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6540 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6541 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6542 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6543 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6545 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6546 (IP_AGENT_EXPORT_VAR_DECL): Define.
6548 (gdb_agent_get_raw_reg): Declare.
6550 2015-02-27 Tom Tromey <tromey@redhat.com>
6551 Pedro Alves <palves@redhat.com>
6553 Rename symbols whose names are reserved C++ keywords throughout.
6555 2015-02-27 Pedro Alves <palves@redhat.com>
6557 * Makefile.in (COMPILER): New, get it from autoconf.
6558 (CXX): Get from autoconf instead.
6559 (COMPILE.pre): Use COMPILER.
6560 (CC-LD): Rename to ...
6561 (CC_LD): ... this. Use COMPILER.
6562 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6563 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6564 * acinclude.m4: Include build-with-cxx.m4.
6565 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6566 Disable -Werror by default if building in C++ mode.
6567 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6568 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6569 the C++ compiler. Save/restore CXXFLAGS too.
6570 * configure: Regenerate.
6572 2015-02-27 Pedro Alves <palves@redhat.com>
6574 * acinclude.m4: Include libiberty.m4.
6575 * configure.ac: Call libiberty_INIT.
6576 * config.in, configure: Regenerate.
6578 2015-02-26 Pedro Alves <palves@redhat.com>
6580 * linux-low.c (linux_wait_1): When incrementing the PC past a
6581 program breakpoint always use the_low_target.breakpoint_len as
6582 increment, rather than the maximum between that and
6583 the_low_target.decr_pc_after_break.
6585 2015-02-23 Pedro Alves <palves@redhat.com>
6587 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6588 thread was doing a step-over; always adjust the PC if
6589 we stepped over a permanent breakpoint.
6590 (linux_wait_1): If we stepped over breakpoint that was on top of a
6591 permanent breakpoint, manually advance the PC past it.
6593 2015-02-23 Pedro Alves <palves@redhat.com>
6595 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6597 (x86_fill_gregset, x86_store_gregset): Use it when handling
6600 2015-02-20 Pedro Alves <palves@redhat.com>
6602 * thread-db.c: Include "nat/linux-procfs.h".
6603 (thread_db_init): Skip listing new threads if the kernel supports
6604 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6606 2015-02-20 Pedro Alves <palves@redhat.com>
6608 * linux-low.c (status_pending_p_callback): Use ptid_match.
6610 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6612 PR breakpoints/16812
6613 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6614 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6615 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6617 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6619 PR breakpoints/15956
6620 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6622 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6624 * linux-low.c (linux_low_btrace_conf): Print size.
6625 * server.c (handle_btrace_conf_general_set): New.
6626 (hanle_general_set): Call handle_btrace_conf_general_set.
6627 (handle_query): Report Qbtrace-conf:bts:size as supported.
6629 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6631 * linux-low.c (linux_low_enable_btrace): Update parameters.
6632 (linux_low_btrace_conf): New.
6633 (linux_target_ops)<to_btrace_conf>: Initialize.
6634 * server.c (current_btrace_conf): New.
6635 (handle_btrace_enable): Rename to ...
6636 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6637 to target_enable_btrace. Update comment. Update users.
6638 (handle_qxfer_btrace_conf): New.
6639 (qxfer_packets): Add btrace-conf entry.
6640 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6641 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6642 (target_ops)<read_btrace_conf>: New.
6643 (target_enable_btrace): Update parameters.
6644 (target_read_btrace_conf): New.
6646 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6648 * server.c (handle_btrace_general_set): Remove call to
6649 target_supports_btrace.
6650 (supported_btrace_packets): New.
6651 (handle_query): Call supported_btrace_packets.
6652 * target.h: include btrace-common.h.
6653 (btrace_target_info): Removed.
6654 (supports_btrace, target_supports_btrace): Update parameters.
6656 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6658 * Makefile.in (SFILES): Add common/btrace-common.c.
6659 (OBS): Add common/btrace-common.o.
6660 (btrace-common.o): Add build rules.
6661 * linux-low: Include btrace-common.h.
6662 (linux_low_read_btrace): Use struct btrace_data. Call
6663 btrace_data_init and btrace_data_fini.
6665 2015-02-06 Pedro Alves <palves@redhat.com>
6667 * thread-db.c (find_new_threads_callback): Add debug output.
6669 2015-02-04 Pedro Alves <palves@redhat.com>
6671 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6672 (resume_stopped_resumed_lwps): New function.
6673 (linux_wait_for_event_filtered): Use it.
6675 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6677 * Makefile.in (SFILES): Add linux-personality.c.
6678 (linux-personality.o): New rule.
6679 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6680 list of objects to be built.
6681 * linux-low.c: Include nat/linux-personality.h.
6682 (linux_create_inferior): Remove code to disable address space
6683 randomization (moved to ../nat/linux-personality.c). Create
6684 cleanup to disable address space randomization.
6686 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6688 * Makefile.in (posix-strerror.o): New rule.
6689 (mingw-strerror.o): Likewise.
6690 * configure: Regenerated.
6691 * configure.ac: Source file ../common/common.host. Initialize new
6692 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6694 2015-01-14 Yao Qi <yao@codesourcery.com>
6696 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6697 (ppc-linux.o): New rule.
6698 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6699 * configure.ac: AC_CHECK_FUNCS(getauxval).
6700 * config.in: Re-generated.
6701 * configure: Re-generated.
6702 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6703 ppc64_64bit_inferior_p
6705 2015-01-14 Yao Qi <yao@codesourcery.com>
6707 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6708 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6709 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6710 (PT_ORIG_R3, PT_TRAP): Likewise.
6711 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6712 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6713 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6715 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6717 * i387-fp.c (i387_cache_to_xsave): In look over
6718 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6719 zmmh_low_space field by use of zmmh_high_space.
6721 2015-01-09 Pedro Alves <palves@redhat.com>
6723 * linux-low.c (step_over_bkpt): Move higher up in the file.
6724 (handle_extended_wait): Don't store the stop_pc here.
6725 (get_stop_pc): Adjust comments and rename to ...
6726 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6727 stopped for a software breakpoint or hardware breakpoint.
6728 (thread_still_has_status_pending_p): New function.
6729 (status_pending_p_callback): Use
6730 thread_still_has_status_pending_p. If the event is no longer
6731 interesting, resume the LWP.
6732 (handle_tracepoints): Add assert.
6733 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6734 (wstatus_maybe_breakpoint): New function.
6735 (cancel_breakpoint): Delete function.
6736 (check_stopped_by_watchpoint): New function, factored out from
6737 linux_low_filter_event.
6738 (lp_status_maybe_breakpoint): Delete function.
6739 (linux_low_filter_event): Remove filter_ptid argument.
6740 Leave thread group exits pending here. Store the LWP's stop PC.
6741 Always leave events pending.
6742 (linux_wait_for_event_filtered): Pull all events out of the
6743 kernel, and leave them all pending.
6744 (count_events_callback, select_event_lwp_callback): Consider all
6746 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6747 (select_event_lwp): Only give preference to the stepping LWP in
6748 all-stop mode. Adjust comments.
6749 (ignore_event): New function.
6750 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6751 references to cancel_breakpoints. Adjust to renames. Also give
6752 equal priority to all LWPs that have had events in non-stop mode.
6753 If reporting a software breakpoint event, unadjust the LWP's PC.
6754 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6755 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6757 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6758 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6759 (linux_stopped_by_watchpoint): Adjust.
6760 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6761 * linux-low.h (enum lwp_stop_reason): New.
6762 (struct lwp_info) <stop_pc>: Adjust comment.
6763 <stopped_by_watchpoint>: Delete field.
6764 <stop_reason>: New field.
6765 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6766 * mem-break.c (software_breakpoint_inserted_here)
6767 (hardware_breakpoint_inserted_here): New function.
6768 * mem-break.h (software_breakpoint_inserted_here)
6769 (hardware_breakpoint_inserted_here): Declare.
6770 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6771 (cancel_breakpoints): Delete.
6772 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6773 (upload_fast_traceframes): Remove references to
6776 2015-01-09 Pedro Alves <palves@redhat.com>
6778 * thread-db.c (find_new_threads_callback): Ignore thread if the
6779 kernel thread ID is -1.
6781 2015-01-09 Pedro Alves <palves@redhat.com>
6783 * linux-low.c (linux_attach_fail_reason_string): Move to
6784 nat/linux-ptrace.c, and rename.
6785 (linux_attach_lwp): Update comment.
6786 (attach_proc_task_lwp_callback): New function.
6787 (linux_attach): Adjust to rename and use
6788 linux_proc_attach_tgid_threads.
6789 (linux_attach_fail_reason_string): Delete declaration.
6791 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6793 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6794 * server.c (gdbserver_version): Likewise.
6796 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6798 * remote-utils.c: Include ctype.h.
6799 (input_interrupt): Explicitly handle the case when the char
6800 received is the NUL byte. Improve the printing of non-ASCII
6803 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6805 * linux-low.c (linux_low_filter_event): Update call to
6806 linux_enable_event_reporting following the addition of
6807 a new parameter to that function.
6809 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6812 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6813 (AARCH64_FPCR_REGNO): Likewise.
6814 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6815 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6816 (aarch64_store_fpregset): Likewise.
6818 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6820 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6821 Remove FIXME comment about assumption about N.
6823 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6825 * configure.ac: If large-file support is disabled in GDBserver,
6826 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6827 * configure: Regenerate.
6829 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6831 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6832 warning upon ENODATA from ptrace.
6833 * linux-s390-low.c (s390_store_tdb): New.
6834 (s390_regsets): Add regset for NT_S390_TDB.
6836 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6838 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6839 without a fill_function.
6840 * linux-s390-low.c (s390_fill_last_break): Remove.
6841 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6842 (s390_arch_setup): Use regset's size instead of fill_function for
6845 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6847 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6848 the regset's store function when ptrace returned an error.
6849 * regcache.c (get_thread_regcache): Invalidate register cache
6850 before fetching inferior's registers.
6852 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6854 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6855 while-loop as for-loop.
6856 (regsets_store_inferior_registers): Likewise.
6858 2014-11-28 Yao Qi <yao@codesourcery.com>
6860 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6861 * config.in, configure: Re-generate.
6862 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6865 2014-11-21 Yao Qi <yao@codesourcery.com>
6867 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6868 (AC_CHECK_HEADERS): Remove malloc.h.
6869 * configure: Re-generated.
6870 * config.in: Re-generated.
6871 * server.h: Don't include alloca.h and malloc.h.
6872 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6873 Don't include malloc.h.
6875 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6877 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6878 corresponding ERRNO check in same block.
6880 2014-11-12 Pedro Alves <palves@redhat.com>
6882 * server.c (cont_thread): Update comment.
6883 (start_inferior, attach_inferior): No longer clear cont_thread.
6884 (handle_v_cont): No longer set cont_thread.
6885 (captured_main): Clear cont_thread each time a GDB connects.
6887 2014-11-12 Pedro Alves <palves@redhat.com>
6889 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6890 thread, and don't resume all threads if the Hc thread has exited.
6892 2014-11-12 Pedro Alves <palves@redhat.com>
6894 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6895 the process group instead of to a specific LWP.
6897 2014-10-15 Pedro Alves <palves@redhat.com>
6900 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6902 (arm_set_thread_context): Delete.
6903 (the_low_target): Adjust.
6904 * win32-i386-low.c (debug_registers_changed)
6905 (debug_registers_used): Delete.
6906 (update_debug_registers_callback): New function.
6907 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6908 needing to update their debug registers.
6909 (win32_get_current_dr): New function.
6910 (x86_dr_low_get_addr, x86_dr_low_get_control)
6911 (x86_dr_low_get_status): Fetch the debug register from the thread
6913 (i386_initial_stuff): Adjust.
6914 (i386_get_thread_context): Remove current_event parameter. Don't
6915 clear debug_registers_changed nor copy DR values to
6917 (i386_set_thread_context): Delete.
6918 (i386_prepare_to_resume): New function.
6919 (i386_thread_added): Mark the thread as needing to update irs
6921 (the_low_target): Remove i386_set_thread_context and install
6922 i386_prepare_to_resume.
6923 * win32-low.c (win32_get_thread_context): Adjust.
6924 (win32_set_thread_context): Use SetThreadContext
6926 (win32_prepare_to_resume): New function.
6927 (win32_require_context): New function, factored out from ...
6928 (thread_rec): ... this.
6929 (continue_one_thread): Call win32_prepare_to_resume on each thread
6930 we're about to continue.
6931 (win32_resume): Call win32_prepare_to_resume on the event thread.
6932 * win32-low.h (struct win32_thread_info)
6933 <debug_registers_changed>: New field.
6934 (struct win32_target_ops): Change prototype of set_thread_context,
6935 delete set_thread_context and add prepare_to_resume.
6936 (win32_require_context): New declaration.
6938 2014-10-08 Gary Benson <gbenson@redhat.com>
6940 * server.h: Do not include common-exceptions.h.
6942 2014-10-08 Gary Benson <gbenson@redhat.com>
6944 * server.h: Do not include cleanups.h.
6946 2014-09-30 James Hogan <james.hogan@imgtec.com>
6948 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6951 2014-09-23 Yao Qi <yao@codesourcery.com>
6953 * linux-low.c (lp_status_maybe_breakpoint): New function.
6954 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6955 (count_events_callback): Likewise.
6956 (select_event_lwp_callback): Likewise.
6957 (cancel_breakpoints_callback): Likewise.
6959 2014-09-19 Don Breazeal <donb@codesourcery.com>
6961 * linux-low.c (handle_extended_wait): Call
6962 linux_ptrace_get_extended_event.
6963 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6964 linux_is_extended_waitstatus.
6966 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6968 * Makefile.in (CPPFLAGS): Define.
6969 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6970 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6972 2014-09-16 Gary Benson <gbenson@redhat.com>
6974 * inferiors.h (current_inferior): Renamed as...
6975 (current_thread): New variable. All uses updated.
6976 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6977 (maybe_move_out_of_jump_pad): Likewise.
6978 (cancel_breakpoint): Likewise.
6979 (linux_low_filter_event): Likewise.
6980 (wait_for_sigstop): Likewise.
6981 (linux_resume_one_lwp): Likewise.
6982 (need_step_over_p): Likewise.
6983 (start_step_over): Likewise.
6984 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6985 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6986 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6987 and save_inferior as saved_thread.
6988 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6990 (regcache_invalidate_thread): Likewise.
6991 * remote-utils.c (prepare_resume_reply): Likewise.
6992 * thread-db.c (thread_db_get_tls_address): Likewise.
6993 (disable_thread_event_reporting): Likewise.
6994 (remove_thread_event_breakpoints): Likewise.
6995 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6997 * target.h (set_desired_inferior): Renamed as...
6998 (set_desired_thread): New declaration. All uses updated.
6999 * server.c (myresume): Updated comment to reference thread instead
7001 (handle_serial_event): Likewise.
7002 (handle_target_event): Likewise.
7004 2014-09-12 Tom Tromey <tromey@redhat.com>
7005 Gary Benson <gbenson@redhat.com>
7007 * regcache.h: Include common-regcache.h.
7008 (regcache_read_pc): Don't declare.
7009 * regcache.c (get_thread_regcache_for_ptid): New function.
7011 2014-09-11 Tom Tromey <tromey@redhat.com>
7012 Gary Benson <gbenson@redhat.com>
7014 * symbol.c: New file.
7015 * Makefile.in (SFILES): Add symbol.c.
7016 (OBS): Add symbol.o.
7018 2014-09-11 Gary Benson <gbenson@redhat.com>
7020 * target.c (target_stop_ptid, target_continue_ptid): New
7023 2014-09-11 Tom Tromey <tromey@redhat.com>
7024 Gary Benson <gbenson@redhat.com>
7026 * target.h: Include target/target.h.
7027 * target.c (target_read_memory, target_read_uint32)
7028 (target_write_memory): New functions.
7030 2014-09-11 Gary Benson <gbenson@redhat.com>
7032 * server.h (debug_hw_points): Don't declare.
7033 * server.c (debug_hw_points): Don't define. Replace all uses
7034 with show_debug_regs.
7035 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7036 all uses with show_debug_regs.
7038 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7040 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7041 endianness into account.
7042 (ppc_supply_ptrace_register): Likewise.
7044 2014-09-03 James Hogan <james.hogan@imgtec.com>
7046 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7047 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7049 2014-09-03 Gary Benson <gbenson@redhat.com>
7051 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7052 ALL_DEBUG_ADDRESS_REGISTERS.
7054 2014-09-02 Gary Benson <gbenson@redhat.com>
7056 * i386-low.h: Renamed as...
7057 * x86-low.h: New file. All type, function and variable name
7058 prefixes changed from "i386_" to "x86_". All references updated.
7059 * i386-low.c: Renamed as...
7060 * x86-low.c: New file. All type, function and variable name
7061 prefixes changed from "i386_" to "x86_". All references updated.
7063 2014-09-02 Gary Benson <gbenson@redhat.com>
7065 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7066 (x86_linux_new_thread): Likewise.
7068 2014-08-29 Gary Benson <gbenson@redhat.com>
7070 * server.h (setjmp.h): Do not include.
7071 (toplevel): Do not declare.
7072 (common-exceptions.h): Include.
7073 (cleanups.h): Likewise.
7074 * server.c (toplevel): Do not define.
7075 (exit_code): New static global.
7076 (detach_or_kill_for_exit_cleanup): New function.
7077 (main): New function. Original main renamed to...
7078 (captured_main): New function.
7079 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7081 2014-08-29 Gary Benson <gbenson@redhat.com>
7083 * Makefile.in (SFILES): Add common/common-exceptions.c.
7084 (OBS): Add common-exceptions.o.
7085 (common-exceptions.o): New rule.
7086 * utils.c (prepare_to_throw_exception): New function.
7088 2014-08-29 Gary Benson <gbenson@redhat.com>
7090 * config.in: Regenerate.
7091 * configure: Likewise.
7093 2014-08-29 Gary Benson <gbenson@redhat.com>
7095 * Makefile.in (SFILES): Add common/cleanups.c.
7097 (cleanups.o): New rule.
7099 2014-08-29 Gary Benson <gbenson@redhat.com>
7101 * utils.c (internal_vwarning): New function.
7103 2014-08-28 Gary Benson <gbenson@redhat.com>
7105 * utils.h (fatal): Remove declaration.
7106 * utils.c (fatal): Remove function.
7108 2014-08-28 Gary Benson <gbenson@redhat.com>
7110 * tracepoint.c (gdb_agent_init): Replace fatal with
7112 (initialize_tracepoint): Likewise.
7114 2014-08-28 Gary Benson <gbenson@redhat.com>
7116 * remote-utils.c (remote_prepare): Replace fatal with error.
7118 2014-08-28 Gary Benson <gbenson@redhat.com>
7120 * linux-low.c (linux_async): Replace fatal with warning.
7122 (linux_start_non_stop): Return -1 if linux_async failed.
7124 2014-08-28 Gary Benson <gbenson@redhat.com>
7126 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7128 (i386_dr_low_get_addr): Remove vague comment.
7129 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7132 2014-08-28 Gary Benson <gbenson@redhat.com>
7134 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7135 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7137 (linux_resume_one_lwp): Likewise.
7138 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7140 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7141 with internal_error.
7142 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7143 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7144 (find_register_by_name): Replace fatal with internal_error.
7145 (find_regno): Likewise.
7146 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7147 * thread-db.c (thread_db_create_event): Likewise.
7148 (thread_db_load_search): Likewise.
7149 (try_thread_db_load_1): Likewise.
7150 * tracepoint.c (get_jump_space_head): Replace fatal with
7152 (claim_trampoline_space): Likewise.
7153 (have_fast_tracepoint_trampoline_buffer): Likewise.
7154 (cmd_qtstart): Likewise.
7155 (stop_tracing): Likewise.
7156 (fast_tracepoint_collecting): Likewise.
7157 (target_malloc): Likewise.
7158 (download_tracepoint): Likewise.
7159 (download_trace_state_variables): Replace check with gdb_assert.
7160 (upload_fast_traceframes): Replace fatal with internal_error.
7162 2014-08-19 Tom Tromey <tromey@redhat.com>
7163 Gary Benson <gbenson@redhat.com>
7165 * Makefile.in (SFILES): Add common/common-debug.c.
7166 (OBS): Add common-debug.o.
7167 (common-debug.o): New rule.
7168 * debug.h (debug_printf): Don't declare.
7169 * debug.c (debug_printf): Renamed and rewritten as...
7170 (debug_vprintf): New function.
7172 2014-08-19 Gary Benson <gbenson@redhat.com>
7174 * utils.h: Do not include print-utils.h.
7176 2014-08-19 Tom Tromey <tromey@redhat.com>
7177 Gary Benson <gbenson@redhat.com>
7179 * server.h: Add static assertion.
7180 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7182 2014-08-19 Tom Tromey <tromey@redhat.com>
7183 Gary Benson <gbenson@redhat.com>
7185 * Makefile.in (SFILES): Add common/errors.c.
7186 (OBS): Add errors.o.
7187 (IPA_OBS): Add errors-ipa.o.
7188 (errors.o): New rule.
7189 (errors-ipa.o): Likewise.
7190 * utils.h (perror_with_name, error, warning): Don't declare.
7191 * utils.c (warning): Renamed and rewritten as...
7192 (vwarning): New function.
7193 (error): Renamed and rewritten as...
7194 (verror): New function.
7195 (internal_error): Renamed and rewritten as...
7196 (internal_verror): New function.
7198 2014-08-07 Gary Benson <gbenson@redhat.com>
7200 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7201 * configure: Regenerate.
7202 * config.in: Likewise.
7203 * server.h: Do not include errno.h.
7204 * event-loop.c: Likewise.
7205 * hostio-errno.c: Likewise.
7206 * linux-low.c: Likewise.
7207 * remote-utils.c: Likewise.
7208 * spu-low.c: Likewise.
7209 * utils.c: Likewise.
7210 * gdbreplay.c: Unconditionally include errno.h.
7212 2014-08-07 Gary Benson <gbenson@redhat.com>
7214 * server.h: Do not include string.h.
7215 * event-loop.c: Likewise.
7216 * linux-low.c: Likewise.
7217 * regcache.c: Likewise.
7218 * remote-utils.c: Likewise.
7219 * spu-low.c: Likewise.
7220 * utils.c: Likewise.
7222 2014-08-07 Gary Benson <gbenson@redhat.com>
7224 * server.h: Do not include gdb_assert.h.
7226 2014-08-07 Gary Benson <gbenson@redhat.com>
7228 * server.h: Do not include common-utils.h.
7230 2014-08-07 Gary Benson <gbenson@redhat.com>
7232 * server.h: Do not include ptid.h.
7233 * notif.h: Likewise.
7235 2014-08-07 Gary Benson <gbenson@redhat.com>
7237 * server.h: Do not include gdb_locale.h.
7239 2014-08-07 Gary Benson <gbenson@redhat.com>
7241 * server.h: Do not include gdb/signals.h.
7242 * win32-low.c: Likewise.
7244 2014-08-07 Gary Benson <gbenson@redhat.com>
7246 * server.h: Do not include pathmax.h.
7248 2014-08-07 Gary Benson <gbenson@redhat.com>
7250 * server.h: Do not include libiberty.h.
7251 * linux-bfin-low.c: Likewise.
7253 2014-08-07 Gary Benson <gbenson@redhat.com>
7255 * server.h: Do not include ansidecl.h.
7257 2014-08-07 Gary Benson <gbenson@redhat.com>
7259 * linux-x86-low.c: Do not include stddef.h.
7260 * lynx-ppc-low.c: Likewise.
7261 * tracepoint.c: Likewise.
7263 2014-08-07 Gary Benson <gbenson@redhat.com>
7265 * server.h: Do not include stdarg.h.
7266 * nto-low.c: Likewise.
7268 2014-08-07 Gary Benson <gbenson@redhat.com>
7270 * server.h: Do not include stdlib.h.
7271 * inferiors.c: Likewise.
7272 * linux-low.c: Likewise.
7273 * regcache.c: Likewise.
7274 * spu-low.c: Likewise.
7275 * tracepoint.c: Likewise.
7276 * utils.c: Likewise.
7278 2014-08-07 Gary Benson <gbenson@redhat.com>
7280 * server.h: Do not include stdio.h.
7281 * linux-low.c: Likewise.
7282 * remote-utils.c: Likewise.
7283 * spu-low.c: Likewise.
7284 * utils.c: Likewise.
7285 * wincecompat.c: Likewise.
7287 2014-08-06 Gary Benson <gbenson@redhat.com>
7289 * regcache.c (init_register_cache): Move conditionals inside if.
7291 2014-08-06 Gary Benson <gbenson@redhat.com>
7293 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7295 2014-07-31 Gary Benson <gbenson@redhat.com>
7297 * ax.h: Do not include server.h.
7298 * gdbthread.h: Likewise.
7299 * lynx-low.h: Likewise.
7300 * notif.h: Likewise.
7302 2014-07-30 Gary Benson <gbenson@redhat.com>
7304 * server.h: Include common-defs.h.
7305 Do not include config.h or build-gnulib-gdbserver/config.h.
7307 2014-07-30 Gary Benson <gbenson@redhat.com>
7309 * hostio-errno.c: Move server.h to top of includes list.
7310 * inferiors.c: Likewise.
7311 * linux-x86-low.c: Likewise.
7312 * notif.c: Include server.h.
7314 2014-07-24 Tom Tromey <tromey@redhat.com>
7315 Gary Benson <gbenson@redhat.com>
7317 * server.h (CORE_ADDR): Now unsigned.
7319 2014-07-16 Pedro Alves <palves@redhat.com>
7321 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7323 2014-07-15 Pedro Alves <palves@redhat.com>
7325 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7328 2014-07-11 Pedro Alves <palves@redhat.com>
7330 * linux-low.c (kill_wait_lwp): New function, based on
7331 kill_one_lwp_callback, but use my_waitpid directly.
7332 (kill_one_lwp_callback, linux_kill): Use it.
7334 2014-06-23 Pedro Alves <palves@redhat.com>
7336 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7337 before setting DR0..DR3.
7339 2014-06-20 Gary Benson <gbenson@redhat.com>
7341 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7342 * configure: Regenerated.
7343 * config.in: Likewise.
7345 2014-06-20 Gary Benson <gbenson@redhat.com>
7347 * Makefile.in (SFILES): Update locations for files moved
7349 (object file files): Reordered.
7351 2014-06-20 Gary Benson <gbenson@redhat.com>
7353 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7354 (i386_dr_low_set_addr): Likewise.
7355 (i386_dr_low_get_addr): Likewise.
7356 (i386_dr_low_can_set_control): Likewise.
7357 (i386_dr_low_set_control): Likewise.
7358 (i386_dr_low_get_control): Likewise.
7359 (i386_dr_low_get_status): Likewise.
7360 (i386_get_debug_register_length): Likewise.
7361 * linux-x86-low.c (i386_dr_low_set_addr):
7362 Changed signature. Made static.
7363 (i386_dr_low_get_addr): Likewise.
7364 (i386_dr_low_set_control): Likewise.
7365 (i386_dr_low_get_control): Likewise.
7366 (i386_dr_low_get_status): Likewise.
7367 (i386_dr_low): New global variable.
7368 * win32-i386-low.c (i386_dr_low_set_addr):
7369 Changed signature. Made static.
7370 (i386_dr_low_get_addr): Likewise.
7371 (i386_dr_low_set_control): Likewise.
7372 (i386_dr_low_get_control): Likewise.
7373 (i386_dr_low_get_status): Likewise.
7374 (i386_dr_low): New global variable.
7376 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7378 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7379 * Makefile.in (AR, AR_FLAGS): Define.
7380 * configure: Regenerate.
7382 2014-06-19 Gary Benson <gbenson@redhat.com>
7384 * Makefile.in (i386-dregs.o): New rule.
7385 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7386 * i386-low.c (target.h): Remove include.
7387 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7388 (DR_CONTROL_SHIFT): Likewise.
7389 (DR_CONTROL_SIZE): Likewise.
7390 (DR_RW_EXECUTE): Likewise.
7391 (DR_RW_WRITE): Likewise.
7392 (DR_RW_READ): Likewise.
7393 (DR_RW_IORW): Likewise.
7394 (DR_LEN_1): Likewise.
7395 (DR_LEN_2): Likewise.
7396 (DR_LEN_4): Likewise.
7397 (DR_LEN_8): Likewise.
7398 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7399 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7400 (DR_ENABLE_SIZE): Likewise.
7401 (DR_LOCAL_SLOWDOWN): Likewise.
7402 (DR_GLOBAL_SLOWDOWN): Likewise.
7403 (DR_CONTROL_RESERVED): Likewise.
7404 (I386_DR_CONTROL_MASK): Likewise.
7405 (I386_DR_VACANT): Likewise.
7406 (I386_DR_LOCAL_ENABLE): Likewise.
7407 (I386_DR_GLOBAL_ENABLE): Likewise.
7408 (I386_DR_DISABLE): Likewise.
7409 (I386_DR_SET_RW_LEN): Likewise.
7410 (I386_DR_GET_RW_LEN): Likewise.
7411 (I386_DR_WATCH_HIT): Likewise.
7412 (i386_wp_op_t): Likewise.
7413 (i386_show_dr): Likewise.
7414 (i386_length_and_rw_bits): Likewise.
7415 (i386_insert_aligned_watchpoint): Likewise.
7416 (i386_remove_aligned_watchpoint): Likewise.
7417 (i386_handle_nonaligned_watchpoint): Likewise.
7418 i386_update_inferior_debug_regs(): Likewise.
7419 (i386_dr_insert_watchpoint): Likewise.
7420 (i386_dr_remove_watchpoint): Likewise.
7421 (i386_dr_region_ok_for_watchpoint): Likewise.
7422 (i386_dr_stopped_data_address): Likewise.
7423 (i386_dr_stopped_by_watchpoint): Likewise.
7425 2014-06-19 Gary Benson <gbenson@redhat.com>
7427 * i386-low.c (i386_dr_show): Renamed to
7428 i386_show_dr and made static. All uses updated.
7429 (i386_dr_length_and_rw_bits): Renamed to
7430 i386_length_and_rw_bits and made static.
7432 (i386_dr_insert_aligned_watchpoint): Renamed to
7433 i386_insert_aligned_watchpoint and made static.
7435 (i386_dr_remove_aligned_watchpoint): Renamed to
7436 i386_remove_aligned_watchpoint and made static.
7438 (i386_dr_update_inferior_debug_regs): Renamed to
7439 i386_update_inferior_debug_regs and made static.
7442 2014-06-18 Gary Benson <gbenson@redhat.com>
7444 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7445 (i386_dr_low_can_set_control): Likewise.
7446 (i386_get_debug_register_length): Likewise.
7447 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7448 (i386_dr_low_can_set_control): Likewise.
7449 (i386_get_debug_register_length): Likewise.
7451 2014-06-17 Gary Benson <gbenson@redhat.com>
7453 * i386-low.h (i386-dregs.h): New include.
7454 (DR_FIRSTADDR): Now in i386-dregs.h.
7455 (DR_LASTADDR): Likewise.
7456 (DR_NADDR): Likewise.
7457 (DR_STATUS): Likewise.
7458 (DR_CONTROL): Likewise.
7459 (i386_debug_reg_state): Likewise.
7460 (i386_dr_insert_watchpoint): Likewise.
7461 (i386_dr_remove_watchpoint): Likewise.
7462 (i386_dr_region_ok_for_watchpoint): Likewise.
7463 (i386_dr_stopped_data_address): Likewise.
7464 (i386_dr_stopped_by_watchpoint): Likewise.
7465 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7467 2014-06-18 Gary Benson <gbenson@redhat.com>
7469 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7470 i386_dr_insert_watchpoint.
7471 (i386_low_remove_watchpoint): Renamed to
7472 i386_dr_remove_watchpoint.
7473 (i386_low_region_ok_for_watchpoint): Renamed to
7474 i386_dr_region_ok_for_watchpoint.
7475 (i386_low_stopped_data_address): Renamed to
7476 i386_dr_stopped_data_address.
7477 (i386_low_stopped_by_watchpoint): Renamed to
7478 i386_dr_stopped_by_watchpoint.
7479 * i386-low.c (i386_show_dr): Renamed to
7480 i386_dr_show and made nonstatic. All uses updated.
7481 (i386_length_and_rw_bits): Renamed to
7482 i386_dr_length_and_rw_bits and made nonstatic.
7484 (i386_insert_aligned_watchpoint): Renamed to
7485 i386_dr_insert_aligned_watchpoint and made nonstatic.
7487 (i386_remove_aligned_watchpoint): Renamed to
7488 i386_dr_remove_aligned_watchpoint and made nonstatic.
7490 (i386_update_inferior_debug_regs): Renamed to
7491 i386_dr_update_inferior_debug_regs and made nonstatic.
7493 (i386_low_insert_watchpoint): Renamed to
7494 i386_dr_insert_watchpoint. All uses updated.
7495 (i386_low_remove_watchpoint): Renamed to
7496 i386_dr_remove_watchpoint. All uses updated.
7497 (i386_low_region_ok_for_watchpoint): Renamed to
7498 i386_dr_region_ok_for_watchpoint. All uses updated.
7499 (i386_low_stopped_data_address): Renamed to
7500 i386_dr_stopped_data_address. All uses updated.
7501 (i386_low_stopped_by_watchpoint): Renamed to
7502 i386_dr_stopped_by_watchpoint. All uses updated.
7504 2014-06-18 Gary Benson <gbenson@redhat.com>
7506 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7507 (i386_dr_low_can_set_control): Likewise.
7508 (i386_insert_aligned_watchpoint): New check.
7510 2014-06-18 Gary Benson <gbenson@redhat.com>
7512 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7515 2014-06-18 Gary Benson <gbenson@redhat.com>
7517 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7518 instead of fatal and error.
7519 (i386_handle_nonaligned_watchpoint): Likewise.
7521 2014-06-18 Gary Benson <gbenson@redhat.com>
7523 * i386-low.c (i386_get_debug_register_length): New macro.
7524 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7525 (i386_show_dr): Use debug_printf instead of fprintf. Use
7526 phex to format values.
7528 2014-06-18 Gary Benson <gbenson@redhat.com>
7530 * i386-low.h: Comment changes.
7531 * i386-low.c: Likewise.
7533 2014-06-18 Gary Benson <gbenson@redhat.com>
7535 * i386-low.c: Whitespace changes.
7537 2014-06-12 Tom Tromey <tromey@redhat.com>
7539 * utils.c (freeargv): Remove.
7541 2014-06-12 Tom Tromey <tromey@redhat.com>
7543 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7544 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7545 (parse_debug_format_options): Likewise.
7546 (gdbserver_usage): Likewise.
7547 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7548 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7549 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7551 ($(LIBGNU)): Depend on libiberty.
7552 (all-lib): Recurse into all subdirs.
7553 (install-only): Invoke "install" target in subdirs.
7554 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7556 * configure: Rebuild.
7557 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7558 for vasprintf, vsnprintf, or gettimeofday.
7559 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7562 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7564 * development.sh: Delete.
7565 * Makefile.in (config.status): Adjust dependency on development.sh.
7566 * configure.ac: Adjust development.sh source call.
7567 * configure: Regenerate.
7569 2014-06-02 Pedro Alves <palves@redhat.com>
7571 * ax.c (gdb_free_agent_expr): New function.
7572 * ax.h (gdb_free_agent_expr): New declaration.
7573 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7575 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7577 (clear_breakpoint_conditions_and_commands): New function.
7578 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7579 (clear_breakpoint_conditions_and_commands): New declaration.
7581 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7583 * linux-aarch64-low.c (asm/ptrace.h): Include.
7585 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7587 Fix TLS access for -static -pthread.
7588 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7589 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7590 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7592 2014-05-20 Pedro Alves <palves@redhat.com>
7594 * linux-aarch64-low.c (aarch64_insert_point)
7595 (aarch64_remove_point): No longer check whether the type is
7596 supported here. Adjust to new interface.
7597 (the_low_target): Install aarch64_supports_z_point_type as
7598 supports_z_point_type method.
7599 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7600 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7601 instead of a Z packet char. Adjust.
7602 (arm_supports_z_point_type): New function.
7603 (arm_insert_point, arm_remove_point): Adjust to new interface.
7604 (the_low_target): Install arm_supports_z_point_type.
7605 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7606 (cris_insert_point, cris_remove_point): Adjust to new interface.
7607 Don't check whether the type is supported here.
7608 (the_low_target): Install cris_supports_z_point_type.
7609 * linux-low.c (linux_supports_z_point_type): New function.
7610 (linux_insert_point, linux_remove_point): Adjust to new interface.
7611 * linux-low.h (struct linux_target_ops) <insert_point,
7612 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7613 raw_breakpoint pointer parameter.
7614 <supports_z_point_type>: New method.
7615 * linux-mips-low.c (mips_supports_z_point_type): New function.
7616 (mips_insert_point, mips_remove_point): Adjust to new interface.
7617 Use mips_supports_z_point_type.
7618 (the_low_target): Install mips_supports_z_point_type.
7619 * linux-ppc-low.c (the_low_target): Install NULL as
7620 supports_z_point_type method.
7621 * linux-s390-low.c (the_low_target): Install NULL as
7622 supports_z_point_type method.
7623 * linux-sparc-low.c (the_low_target): Install NULL as
7624 supports_z_point_type method.
7625 * linux-x86-low.c (x86_supports_z_point_type): New function.
7626 (x86_insert_point): Adjust to new insert_point interface. Use
7627 insert_memory_breakpoint. Adjust to new
7628 i386_low_insert_watchpoint interface.
7629 (x86_remove_point): Adjust to remove_point interface. Use
7630 remove_memory_breakpoint. Adjust to new
7631 i386_low_remove_watchpoint interface.
7632 (the_low_target): Install x86_supports_z_point_type.
7633 * lynx-low.c (lynx_target_ops): Install NULL as
7634 supports_z_point_type callback.
7635 * nto-low.c (nto_supports_z_point_type): New.
7636 (nto_insert_point, nto_remove_point): Adjust to new interface.
7637 (nto_target_ops): Install nto_supports_z_point_type.
7638 * mem-break.c: Adjust intro comment.
7639 (struct raw_breakpoint) <raw_type, size>: New fields.
7640 <inserted>: Update comment.
7641 <shlib_disabled>: Delete field.
7642 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7643 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7644 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7645 (raw_bkpt_type_to_target_hw_bp_type): New function.
7646 (find_enabled_raw_code_breakpoint_at): New function.
7647 (find_raw_breakpoint_at): New type and size parameters. Use them.
7648 (insert_memory_breakpoint): New function, based off
7649 set_raw_breakpoint_at.
7650 (remove_memory_breakpoint): New function.
7651 (set_raw_breakpoint_at): Reimplement.
7652 (set_breakpoint): New, based on set_breakpoint_at.
7653 (set_breakpoint_at): Reimplement.
7654 (delete_raw_breakpoint): Go through the_target->remove_point
7655 instead of assuming memory breakpoints.
7656 (find_gdb_breakpoint_at): Delete.
7657 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7658 (find_gdb_breakpoint): New function.
7659 (set_gdb_breakpoint_at): Delete.
7660 (z_type_supported): New function.
7661 (set_gdb_breakpoint_1): New function, loosely based off
7662 set_gdb_breakpoint_at.
7663 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7664 (delete_gdb_breakpoint_at): Delete.
7665 (delete_gdb_breakpoint_1): New function, loosely based off
7666 delete_gdb_breakpoint_at.
7667 (delete_gdb_breakpoint): New function.
7668 (clear_gdb_breakpoint_conditions): Rename to ...
7669 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7671 (add_condition_to_breakpoint): Make static.
7672 (add_breakpoint_condition): Take a struct breakpoint pointer
7673 instead of an address. Adjust.
7674 (gdb_condition_true_at_breakpoint): Rename to ...
7675 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7677 (gdb_condition_true_at_breakpoint): Reimplement.
7678 (add_breakpoint_commands): Take a struct breakpoint pointer
7679 instead of an address. Adjust.
7680 (gdb_no_commands_at_breakpoint): Rename to ...
7681 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7682 parameter. Return true if no breakpoint was found. Change debug
7684 (gdb_no_commands_at_breakpoint): Reimplement.
7685 (run_breakpoint_commands): Rename to ...
7686 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7687 and change return type to boolean.
7688 (run_breakpoint_commands): New function.
7689 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7690 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7691 breakpoint. Go through the_target->remove_point instead of
7692 assuming memory breakpoint.
7693 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7694 software and hardware breakpoints.
7695 (reinsert_raw_breakpoint): Go through the_target->insert_point
7696 instead of assuming memory breakpoint.
7697 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7698 software and hardware breakpoints.
7699 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7700 Check both software and hardware breakpoints.
7701 (validate_inserted_breakpoint): Assert the breakpoint is a
7702 software breakpoint. Set the inserted flag to -1 instead of
7703 setting shlib_disabled.
7704 (delete_disabled_breakpoints): Adjust.
7705 (validate_breakpoints): Only validate software breakpoints.
7706 Adjust to inserted flag change.
7707 (check_mem_read, check_mem_write): Skip breakpoint types other
7708 than software breakpoints. Adjust to inserted flag change.
7709 * mem-break.h (enum raw_bkpt_type): New enum.
7710 (raw_breakpoint, struct process_info): Forward declare.
7711 (Z_packet_to_target_hw_bp_type): Delete declaration.
7712 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7713 (set_gdb_breakpoint, delete_gdb_breakpoint)
7714 (clear_breakpoint_conditions): New declarations.
7715 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7716 (breakpoint_inserted_here): Update comment.
7717 (add_breakpoint_condition, add_breakpoint_commands): Replace
7718 address parameter with a breakpoint pointer parameter.
7719 (gdb_breakpoint_here): Update comment.
7720 (delete_gdb_breakpoint_at): Delete.
7721 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7722 * server.c (process_point_options): Take a struct breakpoint
7723 pointer instead of an address. Adjust.
7724 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7725 delete_gdb_breakpoint.
7726 * spu-low.c (spu_target_ops): Install NULL as
7727 supports_z_point_type method.
7728 * target.h: Include mem-break.h.
7729 (struct target_ops) <prepare_to_access_memory>: Update comment.
7730 <supports_z_point_type>: New field.
7731 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7732 instead of a char. Also take a raw breakpoint pointer.
7733 * win32-arm-low.c (the_low_target): Install NULL as
7734 supports_z_point_type.
7735 * win32-i386-low.c (i386_supports_z_point_type): New function.
7736 (i386_insert_point, i386_remove_point): Adjust to new interface.
7737 (the_low_target): Install i386_supports_z_point_type.
7738 * win32-low.c (win32_supports_z_point_type): New function.
7739 (win32_insert_point, win32_remove_point): Adjust to new interface.
7740 (win32_target_ops): Install win32_supports_z_point_type.
7741 * win32-low.h (struct win32_target_ops):
7742 <supports_z_point_type>: New method.
7743 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7744 instead of a char. Also take a raw breakpoint pointer.
7746 2014-05-20 Pedro Alves <palves@redhat.com>
7748 * mem-break.h: Include break-common.h.
7749 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7750 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7751 (Z_packet_to_target_hw_bp_type): New declaration.
7752 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7753 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7754 (Z_PACKET_ACCESS_WP): Delete macros.
7755 (Z_packet_to_hw_type): Delete function.
7756 * i386-low.h: Don't include break-common.h here.
7757 (Z_packet_to_hw_type): Delete declaration.
7758 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7759 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7760 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7761 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7762 * linux-aarch64-low.c: Don't include break-common.h here.
7763 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7764 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7765 (Z_packet_to_target_hw_bp_type): Delete function.
7766 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7768 (mips_insert_point, mips_remove_point): Use
7769 Z_packet_to_target_hw_bp_type.
7771 2014-05-20 Pedro Alves <palves@redhat.com>
7773 * linux-aarch64-low.c: Include break-common.h.
7774 (enum target_point_type): Delete.
7775 (Z_packet_to_point_type): Rename to ...
7776 (Z_packet_to_target_hw_bp_type): ... this, and return a
7777 target_hw_bp_type instead.
7778 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7779 instead of an enum target_point_type.
7780 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7782 (aarch64_dr_state_insert_one_point)
7783 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7784 (aarch64_handle_aligned_watchpoint)
7785 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7786 Take an enum target_hw_bp_type instead of an enum
7788 (aarch64_supports_z_point_type): New function.
7789 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7790 use Z_packet_to_target_hw_bp_type.
7792 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7794 * configure.ac: Only use -Werror by default when DEVELOPMENT
7796 * configure: Regenerate.
7798 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7800 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7801 * linux-x86-low.c (X86_64_USER_REGS): New.
7802 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7804 2014-04-28 Yao Qi <yao@codesourcery.com>
7806 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7809 2014-04-25 Pedro Alves <palves@redhat.com>
7812 * linux-low.c (linux_attach_fail_reason_string): New function.
7813 (linux_attach_lwp): Delete.
7814 (linux_attach_lwp_1): Rename to ...
7815 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7816 argument. Remove "initial" parameter. Return int instead of
7817 void. Don't error or warn here.
7818 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7819 failure to attach to the tgid. Call warning when failing to
7821 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7822 argument. Remove "initial" parameter. Return int instead of
7823 void. Don't error or warn here.
7824 (linux_attach_fail_reason_string): New declaration.
7825 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7826 interface change. Use linux_attach_fail_reason_string.
7828 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7829 Walfred Tedeschi <walfred.tedeschi@intel.com>
7831 * Makefile.in: Added rules to handle new files
7832 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7833 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7834 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7835 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7836 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7837 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7839 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7840 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7841 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7842 i386/x32-avx512.xml.
7843 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7844 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7845 i386/x32-avx512-linux.xml.
7846 * i387-fp.c (num_avx512_k_registers): New constant for number
7848 (num_avx512_zmmh_low_registers): New constant for number of
7849 lower ZMM registers (0-15).
7850 (num_avx512_zmmh_high_registers): New constant for number of
7851 higher ZMM registers (16-31).
7852 (num_avx512_ymmh_registers): New contant for number of higher
7853 YMM registers (ymm16-31 added by avx521 on x86_64).
7854 (num_avx512_xmm_registers): New constant for number of higher
7855 XMM registers (xmm16-31 added by AVX512 on x86_64).
7856 (struct i387_xsave): Add space for AVX512 registers.
7857 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7858 Add code to handle AVX512 registers.
7859 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7860 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7861 prototypei from generated file.
7862 (tdesc_amd64_avx512_linux): Likewise.
7863 (init_registers_x32_avx512_linux): Likewise.
7864 (tdesc_x32_avx512_linux): Likewise.
7865 (init_registers_i386_avx512_linux): Likewise.
7866 (tdesc_i386_avx512_linux): Likewise.
7867 (x86_64_regmap): Add AVX512 registers.
7868 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7870 (initialize_low_arch): Add code to initialize AVX512 registers.
7872 2014-04-23 Pedro Alves <palves@redhat.com>
7874 * mem-break.c (find_gdb_breakpoint_at): Make static.
7875 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7877 2014-04-23 Pedro Alves <palves@redhat.com>
7879 * i386-low.c: Don't include break-common.h here.
7880 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7881 prototype to take target_hw_bp_type as argument instead of a Z
7883 * i386-low.h: Include break-common.h here.
7884 (Z_packet_to_hw_type): Declare.
7885 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7887 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7888 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7889 (x86_remove_point): Convert the packet number to a
7890 target_hw_bp_type before calling i386_low_remove_watchpoint.
7891 * win32-i386-low.c (i386_insert_point): Convert the packet number
7892 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7893 (i386_remove_point): Convert the packet number to a
7894 target_hw_bp_type before calling i386_low_remove_watchpoint.
7896 2014-04-23 Pedro Alves <palves@redhat.com>
7898 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7900 2014-04-10 Pedro Alves <palves@redhat.com>
7902 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7903 Check if the condition or command is NULL before checking if the
7904 breakpoint is known. On success, return true.
7905 * mem-break.h (add_breakpoint_condition): Document return.
7906 (add_breakpoint_commands): Add describing comment.
7907 * server.c (skip_to_semicolon): New function.
7908 (process_point_options): Use it.
7910 2014-04-09 Pedro Alves <palves@redhat.com>
7912 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7915 2014-02-27 Pedro Alves <palves@redhat.com>
7918 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7920 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7922 (last_thread_of_process_p): Take a PID argument instead of a
7924 (linux_wait_for_lwp): Delete.
7925 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7927 (linux_low_filter_event): New function, party factored out from
7928 linux_wait_for_event.
7929 (linux_wait_for_event): Rename to ...
7930 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7931 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7932 sigsuspend. Check for zombie leaders.
7933 (linux_wait_for_event): Reimplement as wrapper around
7934 linux_wait_for_event_filtered.
7935 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7936 a normal or signal exit is seen, it's the whole process exiting.
7937 (wait_for_sigstop): No longer a for_each_inferior callback.
7938 Rewrite on top of linux_wait_for_event_filtered.
7939 (stop_all_lwps): Call wait_for_sigstop directly.
7940 * server.c (resume, handle_target_event): Handle
7941 TARGET_WAITKIND_NO_RESUMED.
7943 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7945 * win32-low.c (psapi_get_dll_name,
7946 * win32_CreateToolhelp32Snapshot): Delete.
7947 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7948 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7950 (handle_load_dll): Add function description.
7951 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7953 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7955 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7957 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7958 base address when calling win32_add_one_solib.
7959 (handle_load_dll): Delete local variable load_addr.
7960 Remove 0x1000 offset applied to DLL base address when calling
7961 win32_add_one_solib.
7962 (handle_unload_dll): Add comment.
7964 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7966 * win32-low.c (win32_add_all_dlls): Renames
7967 win32_ensure_ntdll_loaded. Rewrite function documentation.
7968 Adjust implementation to always load all DLLs.
7969 Add 0x1000 offset to DLL base address when calling
7970 win32_add_one_solib.
7971 (child_initialization_done): New static global.
7972 (do_initial_child_stuff): Set child_initialization_done to
7973 zero during child initialization, and 1 after. Replace call
7974 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7976 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7977 (handle_unload_dll): Add function documentation.
7978 (get_child_debug_event): Ignore load and unload DLL events
7979 during child initialization.
7981 2014-02-20 Doug Evans <dje@google.com>
7983 Remove global all_lwps.
7984 * inferiors.h (ptid_of): Move here from linux-low.h.
7985 (pid_of, lwpid_of): Ditto.
7986 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7987 parameter is a struct thread_info * now.
7988 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7989 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7990 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7992 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7993 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7994 * linux-arm-low.c (update_registers_callback): Update, "entry"
7995 parameter is a struct thread_info * now.
7996 Fetch lwpid from current_inferior directly.
7997 (arm_insert_point): Pass &all_threads to find_inferior instead of
7999 (arm_remove_point): Ditto.
8000 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8001 (arm_prepare_to_resume): Fetch pid from thread.
8002 (arm_read_description): Fetch lwpid from current_inferior directly.
8003 * linux-low.c (all_lwps): Delete.
8004 (delete_lwp): Delete call to remove_inferior.
8005 (handle_extended_wait): Fetch lwpid from thread.
8006 (add_lwp): Don't set lwp->entry.id. Remove call to
8007 add_inferior_to_list.
8008 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8009 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8010 (kill_one_lwp_callback): Ditto.
8011 (linux_kill): Don't dereference NULL pointer.
8012 Fetch ptid,lwpid from thread.
8013 (get_detach_signal): Fetch ptid from thread.
8014 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8015 Simplify call to regcache_invalidate_thread.
8016 (delete_lwp_callback): Update, "entry" parameter is a
8017 struct thread_info * now. Fetch pid from thread.
8018 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8019 (status_pending_p_callback): Update, "entry" parameter is a
8020 struct thread_info * now. Fetch ptid from thread.
8021 (find_lwp_pid): Update, "entry" parameter is a
8022 struct thread_info * now.
8023 (linux_wait_for_lwp): Fetch pid from thread.
8024 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8025 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8026 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8027 (dequeue_one_deferred_signal): Ditto.
8028 (cancel_breakpoint): Fetch ptid from current_inferior.
8029 (linux_wait_for_event): Pass &all_threads to find_inferior,
8030 not &all_lwps. Fetch ptid, lwpid from thread.
8031 (count_events_callback): Update, "entry" parameter is a
8032 struct thread_info * now.
8033 (select_singlestep_lwp_callback): Ditto.
8034 (select_event_lwp_callback): Ditto.
8035 (cancel_breakpoints_callback): Ditto.
8036 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8038 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8039 (unsuspend_one_lwp): Update, "entry" parameter is a
8040 struct thread_info * now.
8041 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8043 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8044 Fetch lwpid from thread, not lwp.
8045 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8046 Pass &all_threads to find_inferior, not &all_lwps.
8047 (send_sigstop): Fetch lwpid from thread, not lwp.
8048 (send_sigstop_callback): Update, "entry" parameter is a
8049 struct thread_info * now.
8050 (suspend_and_send_sigstop_callback): Ditto.
8051 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8052 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8053 struct thread_info * now.
8054 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8056 (lwp_running): Update, "entry" parameter is a
8057 struct thread_info * now.
8058 (stop_all_lwps): Fetch ptid from thread.
8059 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8060 (linux_resume_one_lwp): Fetch lwpid from thread.
8061 (linux_set_resume_request): Update, "entry" parameter is a
8062 struct thread_info * now. Fetch pid, lwpid from thread.
8063 (resume_status_pending_p): Update, "entry" parameter is a
8064 struct thread_info * now.
8065 (need_step_over_p): Ditto. Fetch lwpid from thread.
8066 (start_step_over): Fetch lwpid from thread.
8067 (linux_resume_one_thread): Update, "entry" parameter is a
8068 struct thread_info * now. Fetch lwpid from thread.
8069 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8070 (proceed_one_lwp): Update, "entry" parameter is a
8071 struct thread_info * now. Fetch lwpid from thread.
8072 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8073 struct thread_info * now.
8074 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8075 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8076 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8078 (regsets_store_inferior_registers): Ditto.
8079 (fetch_register, store_register): Ditto.
8080 (linux_read_memory, linux_write_memory): Ditto.
8081 (linux_request_interrupt): Ditto.
8082 (linux_read_auxv): Ditto.
8083 (linux_xfer_siginfo): Ditto.
8084 (linux_qxfer_spu): Ditto.
8085 (linux_qxfer_libraries_svr4): Ditto.
8086 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8087 moved to inferiors.h.
8089 (get_thread_lwp): Update.
8090 (struct lwp_info): Delete member "entry". Simplify comment for
8093 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8094 current_inferior directly.
8095 (update_watch_registers_callback): Update, "entry" parameter is a
8096 struct thread_info * now. Fetch pid from thread.
8097 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8098 (mips_insert_point): Fetch lwpid from current_inferior.
8099 Pass &all_threads to find_inferior, not &all_lwps.
8100 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8101 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8103 (mips_stopped_data_address): Ditto.
8104 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8106 * linux-tile-low.c (tile_arch_setup): Ditto.
8107 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8108 (update_debug_registers_callback): Update, "entry" parameter is a
8109 struct thread_info * now. Fetch pid from thread.
8110 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8111 Pass &all_threads to find_inferior, not &all_lwps.
8112 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8113 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8114 Pass &all_threads to find_inferior, not &all_lwps.
8115 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8116 (i386_dr_low_get_status): Ditto.
8117 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8118 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8119 (x86_linux_read_description): Ditto.
8120 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8122 2014-02-20 Doug Evans <dje@google.com>
8124 * inferiors.c (get_first_inferior): Fix buglet.
8126 2014-02-19 Doug Evans <dje@google.com>
8128 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8129 * inferiors.c (add_thread): Change result type to struct thread_info *.
8130 All callers updated.
8131 (add_lwp): Call add_thread here instead of in callers.
8132 All callers updated.
8133 * linux-low.h (get_lwp_thread): Rewrite.
8134 (struct lwp_info): New member "thread".
8136 2014-02-19 Doug Evans <dje@google.com>
8138 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8139 All callers updated.
8141 2014-02-19 Doug Evans <dje@google.com>
8143 * inferiors.c (add_thread): Fix whitespace.
8145 2014-02-19 Doug Evans <dje@google.com>
8147 * dll.c (clear_dlls): Replace accessing list implemention details
8149 * gdbthread.h (get_first_thread): Declare.
8150 * inferiors.c (for_each_inferior_with_data): New function.
8151 (get_first_thread): New function.
8152 (find_thread_ptid): Simplify.
8153 (get_first_inferior): New function.
8154 (clear_list): Delete.
8155 (one_inferior_p): New function.
8156 (clear_inferior_list): New function.
8157 (clear_inferiors): Update.
8158 * inferiors.h (for_each_inferior_with_data): Declare.
8159 (clear_inferior_list): Declare.
8160 (one_inferior_p): Declare.
8161 (get_first_inferior): Declare.
8162 * linux-low.c (linux_wait_for_event): Replace accessing list
8163 implemention details with API function.
8164 * server.c (target_running): Ditto.
8165 (accumulate_file_name_length): New function.
8166 (emit_dll_description): New function.
8167 (handle_qxfer_libraries): Replace accessing list implemention
8168 details with API function.
8169 (handle_qxfer_threads_worker): New function.
8170 (handle_qxfer_threads_proper): Replace accessing list implemention
8171 details with API function.
8172 (handle_query): Ditto.
8173 (visit_actioned_threads_callback_ftype): New typedef.
8174 (visit_actioned_threads_data): New struct.
8175 (visit_actioned_threads): Rewrite to be find_inferior callback.
8176 (resume): Call find_inferior.
8177 (handle_status): Replace accessing list implemention
8178 details with API function.
8179 (process_serial_event): Replace accessing list implemention details
8181 * target.c (set_desired_inferior): Replace accessing list implemention
8182 details with API function.
8183 * tracepoint.c (same_process_p): New function.
8184 (gdb_agent_about_to_close): Replace accessing list implemention
8185 details with API function.
8186 * win32-low.c (child_delete_thread): Replace accessing list
8187 implemention details with API function.
8188 (match_dll_by_basename): New function.
8189 (dll_is_loaded_by_basename): New function.
8190 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8191 details call to dll_is_loaded_by_basename.
8193 2014-02-19 Doug Evans <dje@google.com>
8195 * dll.h (struct dll_info): Add comment.
8196 * gdbthread.h (struct thread_info): Add comment.
8197 (current_ptid): Simplify.
8198 * inferiors.c (add_process): Update.
8199 (remove_process): Update.
8200 * inferiors.h (struct process_info): Rename member "head" to "entry".
8201 * linux-low.c (delete_lwp): Update.
8203 (last_thread_of_process_p): Update.
8204 (kill_one_lwp_callback, linux_kill): Update.
8205 (status_pending_p_callback): Update.
8206 (wait_for_sigstop): Update. Simplify read of ptid.
8207 (start_step_over): Update.
8208 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8209 (get_lwp_thread): Update.
8210 (struct lwp_info): Rename member "head" to "entry".
8211 * regcache.h (inferior_list_entry): Delete.
8212 * server.c (kill_inferior_callback): Update.
8213 (detach_or_kill_inferior_callback): Update.
8214 (print_started_pid): Update.
8215 (print_attached_pid): Update.
8216 (process_serial_event): Simplify read of ptid.
8217 * thread-db.c (thread_db_create_event): Update.
8218 (thread_db_get_tls_address): Update.
8219 * win32-low.c (current_inferior_ptid): Simplify.
8221 2014-02-19 Tom Tromey <tromey@redhat.com>
8223 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8225 (target_supports_btrace): Update.
8227 2014-02-14 Yao Qi <yao@codesourcery.com>
8229 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8230 (rsp-low-ipa.o): New target.
8232 2014-02-12 Tom Tromey <tromey@redhat.com>
8234 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8235 convert_ascii_to_int.
8236 * regcache.c (registers_to_string): Likewise.
8237 * remote-utils.c (decode_M_packet): Likewise.
8238 * server.c (process_serial_event): Likewise.
8240 2014-02-12 Tom Tromey <tromey@redhat.com>
8242 * server.c (handle_query, handle_v_run): Use hex2bin, not
8244 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8246 2014-02-12 Tom Tromey <tromey@redhat.com>
8248 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8249 convert_int_to_ascii.
8250 * regcache.c (registers_to_string, collect_register_as_string):
8252 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8254 * server.c (process_serial_event): Likewise.
8255 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8256 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8258 2014-02-12 Tom Tromey <tromey@redhat.com>
8260 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8261 bin2hex, not hexify.
8262 * tracepoint.c (cmd_qtstatus): Likewise.
8264 2014-02-12 Tom Tromey <tromey@redhat.com>
8266 * remote-utils.c (monitor_output): Pass explicit length to
8269 2014-02-12 Tom Tromey <tromey@redhat.com>
8271 * tracepoint.c: Include rsp-low.h.
8272 * server.c: Include rsp-low.h.
8273 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8274 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8276 * remote-utils.c: Include rsp-low.h.
8277 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8278 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8279 (convert_int_to_ascii, convert_ascii_to_int): Move to
8281 * regcache.c: Include rsp-low.h.
8282 * ax.c: Include rsp-low.h.
8283 * Makefile.in (SFILES): Add common/rsp-low.c.
8284 (OBS): Add rsp-low.o.
8285 (rsp-low.o): New target.
8287 2014-02-12 Tom Tromey <tromey@redhat.com>
8289 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8290 Include print-utils.h.
8291 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8292 (plongest, thirty_two, phex_nz): Remove.
8293 * Makefile.in (SFILES): Add common/print-utils.c.
8294 (OBS): Add print-utils.o.
8295 (print-utils-ipa.o): New target.
8296 (print-utils.o): New target.
8297 (IPA_OBJS): Add print-utils-ipa.o.
8299 2014-02-06 Tom Tromey <tromey@redhat.com>
8301 * Makefile.in (SFILES): Fix indentation.
8303 2014-02-05 Doug Evans <dje@google.com>
8305 * linux-low.c (linux_wait_for_event): Improve comment.
8306 (linux_wait_1): Keep current_inferior in sync with event_child.
8308 2014-01-22 Doug Evans <dje@google.com>
8310 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8312 2014-01-22 Doug Evans <dje@google.com>
8314 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8315 * configure: Regenerate.
8316 * config.in: Regenerate.
8317 * Makefile.in (SFILES): Add debug.c.
8319 * debug.c: New file.
8320 * debug.h: New file.
8321 * linux-aarch64-low.c (*): Update all debugging printfs to use
8322 debug_printf instead of fprintf.
8323 * linux-arm-low.c (*): Ditto.
8324 * linux-cris-low.c (*): Ditto.
8325 * linux-crisv32-low.c (*): Ditto.
8326 * linux-m32r-low.c (*): Ditto.
8327 * linux-sparc-low.c (*): Ditto.
8328 * linux-x86.c (*): Ditto.
8329 * linux-low.c (*): Ditto.
8330 (linux_wait_1): Add calls to debug_enter, debug_exit.
8331 (linux_wait): Remove redundant debugging printf.
8332 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8333 (linux_resume, unstop_all_lwps): Ditto.
8334 * mem-break.c (*): Update all debugging printfs to use
8335 debug_printf instead of fprintf.
8336 * remote-utils.c (*): Ditto.
8337 * thread-db.c (*): Ditto.
8338 * server.c #include <ctype.h>, "gdb_vecs.h".
8339 (debug_threads): Moved to debug.c.
8340 (*): Update all debugging printfs to use debug_printf instead of
8342 (start_inferior): Replace call to fflush with call to debug_flush.
8343 (monitor_show_help): Mention set debug-format.
8344 (parse_debug_format_options): New function.
8345 (handle_monitor_command): Handle "monitor set debug-format".
8346 (gdbserver_usage): Mention --debug-format.
8347 (main): Parse --debug-format.
8348 * server.h (debug_threads): Declaration moved to debug.h.
8350 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8351 trace_debug_1 that uses debug_printf.
8352 (tracepoint_look_up_symbols): Update all debugging printfs to use
8353 debug_printf instead of fprintf.
8355 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8357 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8360 2014-01-17 Pedro Alves <palves@redhat.com>
8363 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8364 defined after including gdb_proc_service.h.
8366 2014-01-16 Doug Evans <dje@google.com>
8368 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8369 (match_dll): Use it.
8371 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8373 * target.h (target_ops) <read_btrace>: Change parameters and
8374 return type to allow error reporting.
8375 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8376 trace reading errors on.
8377 * linux-low.c (linux_low_read_btrace): Pass trace reading
8379 (linux_low_disable_btrace): New.
8381 2014-01-15 Doug Evans <dje@google.com>
8383 * inferiors.c (thread_id_to_gdb_id): Delete.
8384 * inferiors.h (thread_id_to_gdb_id): Delete.
8386 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8388 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8389 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8392 2014-01-08 Pedro Alves <palves@redhat.com>
8394 * server.c (handle_status): Don't discard previous queued stop
8395 replies or thread's pending status here.
8396 (main) <disconnection>: Do it here instead.
8398 2014-01-08 Pedro Alves <palves@redhat.com>
8400 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8401 * server.c (visit_actioned_threads, handle_pending_status): New
8403 (handle_v_cont): Factor out parts to ...
8404 (resume): ... this new function. If in all-stop, and a thread
8405 being resumed has a pending status, report it without actually
8407 (myresume): Adjust to use the new 'resume' function.
8408 (clear_pending_status_callback, set_pending_status_callback)
8409 (find_status_pending_thread_callback): New functions.
8410 (handle_status): Handle the case of multiple threads having
8411 interesting statuses to report. Report threads' real last signal
8412 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8413 with an interesting thread to report the status for, instead of
8414 always reporting the status of the first thread.
8416 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8418 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8419 * gdbreplay.c (gdbreplay_version): Likewise.
8421 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8423 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8424 iov.iov_len with the real length in use.
8426 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8428 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8429 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8430 for all targets that use win32-low.c.
8431 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8432 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8434 2013-12-13 Pedro Alves <palves@redhat.com>
8436 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8437 if equal to TARGET_WAITKIND_LOADED.
8438 * win32-low.c (cached_status): New static global.
8439 (win32_wait): Add declaration.
8440 (do_initial_child_stuff): Flush all initial pending debug events
8441 up to the initial breakpoint.
8442 (win32_wait): If CACHED_STATUS was set, return that instead
8443 of doing a real wait. Remove the code resuming the execution
8444 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8445 during the initial phase. Also remove the code changing
8446 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8447 TARGET_WAITKIND_STOPPED.
8449 2013-12-11 Yao Qi <yao@codesourcery.com>
8451 * notif.c (handle_notif_ack): Return 0 if no notification
8454 2013-11-20 Doug Evans <dje@google.com>
8456 * linux-low.c (linux_set_resume_request): Fix comment.
8458 2013-11-20 Doug Evans <dje@google.com>
8460 * linux-low.c (resume_status_pending_p): Tweak comment.
8462 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8464 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8465 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8466 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8467 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8468 (srv_amd64_regobj): Add amd64-mpx.o.
8469 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8470 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8471 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8472 * i387-fp.c (num_pl_bnd_register) Added constant.
8473 (num_pl_bnd_cfg_registers) Added constant.
8474 (struct i387_xsave) Added reserved area and MPX fields.
8475 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8476 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8478 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8479 (init_registers_amd64_mpx_linux): Declare new function.
8480 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8481 (x86_64_regmap): Add MPX registers.
8482 (x86_linux_read_description): Add MPX case.
8483 (initialize_low_arch): Initialize MPX targets.
8485 2013-11-18 Tom Tromey <tromey@redhat.com>
8487 * configure: Rebuild.
8488 * configure.ac: Don't check for stdlib.h.
8489 * gdbreplay.c: Unconditionally include stdlib.h.
8491 2013-11-18 Tom Tromey <tromey@redhat.com>
8493 * config.in: Rebuild.
8494 * configure: Rebuild.
8495 * configure.ac: Don't use AC_HEADER_DIRENT.
8497 2013-11-18 Tom Tromey <tromey@redhat.com>
8499 * server.h: Don't check HAVE_STRING_H.
8500 * gdbreplay.c: Don't check HAVE_STRING_H.
8501 * configure: Rebuild.
8503 2013-11-18 Tom Tromey <tromey@redhat.com>
8505 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8508 2013-11-08 Tom Tromey <tromey@redhat.com>
8510 * configure, config.in: Rebuild.
8511 * configure.ac: Remove unused configury.
8513 2013-11-08 Tom Tromey <tromey@redhat.com>
8515 * acinclude.m4: Include common.m4, codeset.m4.
8516 * configure, config.in: Rebuild.
8517 * configure.ac: Use GDB_AC_COMMON.
8519 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8521 * linux-s390-low.c (HWCAP_S390_TE): New define.
8522 (s390_arch_setup): Consider the TE field in the HWCAP for
8523 determining 'have_regset_tdb'.
8525 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8528 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8531 2013-10-02 Pedro Alves <palves@redhat.com>
8533 * server.c (process_serial_event): Don't output "GDBserver
8534 exiting" if GDB is connected through stdio.
8535 * target.c (mywait): Likewise, be silent if GDB is connected
8538 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8540 * lynx-low.c (lynx_add_threads_after_attach): New function.
8541 (lynx_attach): Remove call to add_thread. Add call to
8542 lynx_add_threads_after_attach instead.
8544 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8546 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8547 * config.in, configure: Regenerated.
8549 2013-09-18 Yao Qi <yao@codesourcery.com>
8552 * server.c (start_inferior): Clear 'resume_info'.
8554 2013-09-16 Jiong Wang <jiwang@tilera.com>
8556 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8559 2013-09-16 Jiong Wang <jiwang@tilera.com>
8561 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8562 linux-tile-low.o to srv_tgtobj.
8564 2013-09-16 Will Newton <will.newton@linaro.org>
8566 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8569 2013-09-06 Pedro Alves <palves@redhat.com>
8571 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8572 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8573 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8574 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8575 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8576 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8578 2013-09-06 Pedro Alves <palves@redhat.com>
8580 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8581 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8583 2013-09-06 Pedro Alves <palves@redhat.com>
8585 * linux-amd64-ipa.c: Include tracepoint.h.
8586 * linux-i386-ipa.c: Include tracepoint.h.
8588 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8590 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8591 (ps_get_thread_area): New function.
8593 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8595 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8596 (initialize_low_arch): Call init_registers_crisv32 rather than
8597 init_register_crisv32.
8599 2013-09-05 Pedro Alves <palves@redhat.com>
8601 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8603 * hostio.h: ... this new file.
8604 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8605 win32-low.c: Include hostio.h.
8607 2013-09-05 Pedro Alves <palves@redhat.com>
8609 * server.h (gdb_client_data, handler_func, callback_handler_func)
8610 (delete_file_handler, add_file_handler, append_callback_event)
8611 (delete_callback_event, start_event_loop, initialize_event_loop):
8612 Move to event-loop.h and include it.
8613 * event-loop.h: New file.
8615 2013-09-05 Pedro Alves <palves@redhat.com>
8617 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8618 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8619 (loaded_dll, unloaded_dll): Move to ...
8620 * dll.h: ... this new file.
8621 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8623 2013-09-05 Pedro Alves <palves@redhat.com>
8625 * server.h (current_process, get_thread_process, all_processes)
8626 (add_inferior_to_list, for_each_inferior, current_inferior)
8627 (remove_inferior, add_process, remove_process, find_process_pid)
8628 (have_started_inferiors_p, have_attached_inferiors_p)
8629 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8630 (clear_inferiors, find_inferior, find_inferior_id)
8631 (inferior_target_data, set_inferior_target_data)
8632 (inferior_regcache_data, set_inferior_regcache_data): Move to
8633 inferiors.h, and include it.
8634 * inferiors.h: New file.
8636 2013-09-05 Pedro Alves <palves@redhat.com>
8638 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8642 2013-09-05 Pedro Alves <palves@redhat.com>
8644 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8646 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8647 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8648 (handle_tracepoint_general_set, handle_tracepoint_query)
8649 (tracepoint_finished_step, tracepoint_was_hit)
8650 (release_while_stepping_state_list, current_traceframe)
8651 (in_readonly_region, traceframe_read_mem)
8652 (fetch_traceframe_registers, traceframe_read_sdata)
8653 (traceframe_read_info, struct fast_tpoint_collect_status)
8654 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8655 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8656 (supply_fast_tracepoint_registers)
8657 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8658 (ipa_tdesc, claim_trampoline_space)
8659 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8660 (agent_mem_read, agent_get_trace_state_variable_value)
8661 (agent_set_trace_state_variable_value, agent_tsv_read)
8662 (agent_mem_read_string, get_raw_reg_func_addr)
8663 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8664 * tracepoint.h: ... this new file.
8666 2013-09-05 Pedro Alves <palves@redhat.com>
8668 * server.h (perror_with_name, error, fatal, warning, paddress)
8669 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8671 * utils.h: New file.
8673 2013-09-05 Pedro Alves <palves@redhat.com>
8675 * server.h (remote_debug, noack_mode, transport_is_reliable)
8676 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8677 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8678 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8679 (write_enn, initialize_async_io, enable_async_io)
8680 (disable_async_io, check_remote_input_interrupt_request)
8681 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8682 (dead_thread_notify, prepare_resume_reply)
8683 (decode_address_to_semicolon, decode_address, decode_m_packet)
8684 (decode_M_packet, decode_X_packet, decode_xfer_write)
8685 (decode_search_memory_packet, unhexify, hexify)
8686 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8687 (look_up_one_symbol, relocate_instruction)
8688 (monitor_output): Move to remote-utils.h, and include it.
8689 * remote-utils.h: New file.
8691 2013-09-05 Pedro Alves <palves@redhat.com>
8693 * server.h (_): Delete.
8695 2013-09-02 Pedro Alves <palves@redhat.com>
8697 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8698 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8700 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8702 2013-09-02 Pierre Muller <muller@sourceware.org>
8704 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8705 or WriteProcessMemory complete successfully and handle
8706 ERROR_PARTIAL_COPY error.
8708 2013-09-02 Pedro Alves <palves@redhat.com>
8710 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8711 error instead of EIO.
8713 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8716 * linux-low.c: Include filestuff.h.
8717 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8718 * lynx-low.c: Include filestuff.h.
8719 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8720 * server.c: Include filestuff.h.
8721 (main): Call notice_open_fds.
8722 * spu-low.c: Include filestuff.h.
8723 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8725 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8727 * Makefile.in: Explain why ../target and ../nat are not
8728 listed as include file search paths.
8729 (linux-waitpid.o): New object file rule.
8730 * configure.srv (srv_native_linux_obj): New variable.
8731 Replace all occurrences of linux native object files with
8732 $srv_native_linux_obj.
8733 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8734 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8735 (linux_enable_event_reporting): Remove declaration.
8736 (my_waitpid): Moved to common/linux-waitpid.c.
8737 (linux_wait_for_event): Pass ptid when calling
8738 linux_enable_event_reporting.
8739 (linux_supports_tracefork_flag): Remove.
8740 (linux_enable_event_reporting): Likewise.
8741 (linux_tracefork_grandchild): Remove.
8742 (STACK_SIZE): Moved to common/linux-ptrace.c.
8743 (linux_tracefork_child): Remove.
8744 (linux_test_for_tracefork): Remove.
8745 (linux_look_up_symbols): Call linux_supports_traceclone.
8746 (initialize_low): Remove call to linux_test_for_tracefork.
8747 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8748 common/linux-ptrace.h.
8749 (PTRACE_TYPE_ARG4): Likewise.
8750 Include linux-ptrace.h.
8752 2013-08-21 Pedro Alves <palves@redhat.com>
8754 * config.in: Renegerate.
8756 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8758 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8759 (SFILES): Remove $(srcdir)/common/target-common.c and
8760 add $(srcdir)/target/waitstatus.c.
8761 (OBS): Remove target-common.o and add waitstatus.o.
8762 (server_h): Remove $(srcdir)/../common/target-common.h and
8763 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8764 and $(srcdir)/../target/waitstatus.h.
8765 (target-common.o): Remove.
8766 (waitstatus.o): New target object file.
8767 * target.h: Do not include target-common.h and
8768 include target/resume.h, target/wait.h and
8769 target/waitstatus.h.
8771 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8773 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8774 to PTRACE_TYPE_ARG3.
8775 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8776 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8778 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8779 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8781 2013-07-27 Jie Zhang <jie@codesourcery.com>
8782 Daniel Jacobowitz <dan@codesourcery.com>
8783 Yao Qi <yao@codesourcery.com>
8785 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8786 (mips-linux-watch.o): New rule.
8787 (mips_linux_watch_h): New variable.
8788 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8790 * linux-mips-low.c: Include mips-linux-watch.h.
8791 (struct arch_process_info, struct arch_lwp_info): New.
8792 (update_watch_registers_callback): New function.
8793 (mips_linux_new_process, mips_linux_new_thread) New functions.
8794 (mips_linux_prepare_to_resume, mips_insert_point): New
8796 (mips_remove_point, mips_stopped_by_watchpoint): New
8798 (rsp_bp_type_to_target_hw_bp_type): New function.
8799 (mips_stopped_data_address): New function.
8800 (the_low_target): Add watchpoint support functions.
8802 2013-07-27 Yao Qi <yao@codesourcery.com>
8804 * i386-low.c: Include break-common.h.
8805 (enum target_hw_bp_type): Remove.
8807 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8809 * Makefile.in (SFILES): /common/target-common.c.
8810 (OBS): Add target-common.o.
8811 (server_h): Add $(srcdir)/../common/target-common.h.
8812 (target-common.o): New target.
8813 * server.c (queue_stop_reply_callback): Free
8814 status string after use.
8815 * target.c (target_waitstatus_to_string): Remove.
8816 * target.h: Include target-common.h.
8817 (resume_kind): Likewise.
8818 (target_waitkind): Likewise.
8819 (target_waitstatus): Likewise.
8820 (TARGET_WNOHANG): Likewise.
8822 2013-07-04 Yao Qi <yao@codesourcery.com>
8824 * Makefile.in (host_alias): Use @host_noncanonical@.
8825 (target_alias): Use @target_noncanonical@.
8826 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8827 ACX_NONCANONICAL_HOST.
8828 * configure: Regenerated.
8831 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8833 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8834 * configure: Rebuild.
8835 * Makefile.in (version_host, version_target): Get from configure.
8836 (version.c): Use $(version_host) and $(version_target).
8838 2013-07-03 Pedro Alves <palves@redhat.com>
8840 * Makefile.in (config.status): Depend on development.sh.
8841 * acinclude.m4: Include libmcheck.m4.
8842 * configure: Regenerate.
8844 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8846 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8847 attribute inside the parentheses.
8848 (winapi_DebugSetProcessKillOnExit): Ditto.
8849 (winapi_DebugBreakProcess): Ditto.
8850 (winapi_GenerateConsoleCtrlEvent): Ditto.
8852 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8854 * notif.h (notif_event): Add a dummy member to avoid compiler
8857 2013-07-01 Pedro Alves <palves@redhat.com>
8859 * hostio.c (HOSTIO_PATH_MAX): Define.
8860 (require_filename, handle_open, handle_unlink, handle_readlink):
8863 2013-07-01 Pedro Alves <palves@redhat.com>
8865 * server.h: Include "pathmax.h".
8866 * linux-low.c: Don't include sys/param.h.
8867 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8869 * win32-low.c: Don't include sys/param.h.
8870 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8872 2013-07-01 Pedro Alves <palves@redhat.com>
8874 * event-loop.c: Don't check HAVE_UNISTD_H before including
8876 * gdbreplay.c: Likewise.
8877 * remote-utils.c: Likewise.
8878 * server.c: Likewise.
8879 * configure.ac: Don't check for unistd.h.
8880 * configure: Regenerate.
8882 2013-06-28 Tom Tromey <tromey@redhat.com>
8884 * Makefile.in (version.c): Use version.in, not
8887 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8889 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8890 * configure: Rebuild.
8891 * Makefile.in (version_host, version_target): Get from configure.
8892 (version.c): Use $(version_host) and $(version_target).
8894 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8896 Fix trace-status to output user name without trailing colon.
8897 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8899 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8901 Fix trace-status to output proper start-time and stop-time.
8902 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8903 output start time and stop time in hex as gdb expects.
8905 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8907 * tracepoint.c (build_traceframe_info_xml): Output trace state
8908 variables present in the trace buffer.
8910 2013-06-24 Tom Tromey <tromey@redhat.com>
8912 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8914 (version.o): Remove.
8915 * gdbreplay.c: Include version.h.
8916 (version, host_name): Don't declare.
8917 * server.h: Include version.h.
8918 (version, host_name): Don't declare.
8920 2013-06-12 Pedro Alves <palves@redhat.com>
8922 * linux-x86-low.c (linux_is_elf64): Delete global.
8923 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8924 with local linux_pid_exe_is_elf_64_file use.
8926 2013-06-11 Pedro Alves <palves@redhat.com>
8928 * linux-low.c (regset_disabled, disable_regset): New functions.
8929 (regsets_fetch_inferior_registers)
8930 (regsets_store_inferior_registers): Use them.
8931 (initialize_regsets_info); Don't allocate the disabled_regsets
8933 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8936 2013-06-11 Pedro Alves <palves@redhat.com>
8938 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8941 2013-06-11 Pedro Alves <palves@redhat.com>
8943 * linux-x86-low.c (initialize_low_arch): Call
8944 init_registers_x32_avx_linux.
8946 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8948 Fix compatibility with Android Bionic.
8949 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8952 2013-06-07 Pedro Alves <palves@redhat.com>
8955 * Makefile.in (OBS): Add tdesc.o.
8956 (IPA_OBJS): Add tdesc-ipa.o.
8957 (tdesc-ipa.o): New rule.
8958 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8960 * linux-low.c (new_inferior): Delete.
8961 (disabled_regsets, num_regsets): Delete.
8962 (linux_add_process): Adjust to set the new per-process
8964 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8965 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8966 was a stop. When calling arch_setup, switch the current inferior
8967 to the thread that got an event.
8968 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8969 (regsets_fetch_inferior_registers)
8970 (regsets_store_inferior_registers): New regsets_info parameter.
8972 (linux_register_in_regsets): New regs_info parameter. Adjust to
8974 (register_addr, fetch_register, store_register): New usrregs_info
8975 parameter. Adjust to use it.
8976 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8977 parameter regs_info. Adjust to use it.
8978 (linux_fetch_registers): Get the current inferior's regs_info, and
8980 (linux_store_registers): Ditto.
8981 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8982 (initialize_low): Don't initialize the target_regsets here. Call
8983 initialize_low_arch.
8984 * linux-low.h (target_regsets): Delete declaration.
8985 (struct regsets_info): New.
8986 (struct usrregs_info): New.
8987 (struct regs_info): New.
8988 (struct process_info_private) <new_inferior>: New field.
8989 (struct linux_target_ops): Delete the num_regs, regmap, and
8990 regset_bitmap fields. New field regs_info.
8991 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8992 * i387-fp.c (num_xmm_registers): Delete.
8993 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8994 calls to new interface.
8995 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8996 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8997 Infer the number of xmm registers from the regcache's target
8999 * i387-fp.h (num_xmm_registers): Delete.
9000 * inferiors.c (add_thread): Don't install the thread's regcache
9002 * proc-service.c (gregset_info): Fetch the current inferior's
9003 regs_info. Adjust to use it.
9004 * regcache.c: Include tdesc.h.
9005 (register_bytes, reg_defs, num_registers)
9006 (gdbserver_expedite_regs): Delete.
9007 (get_thread_regcache): If the thread doesn't have a regcache yet,
9008 create one, instead of aborting gdbserver.
9009 (regcache_invalidate_one): Rename to ...
9010 (regcache_invalidate_thread): ... this.
9011 (regcache_invalidate_one): New.
9012 (regcache_invalidate): Only invalidate registers of the current
9014 (init_register_cache): Add target_desc parameter, and use it.
9015 (new_register_cache): Ditto. Assert the target description has a
9016 non zero registers_size.
9017 (regcache_cpy): Add assertions. Adjust.
9018 (realloc_register_cache, set_register_cache): Delete.
9019 (registers_to_string, registers_from_string): Adjust.
9020 (find_register_by_name, find_regno, find_register_by_number)
9021 (register_cache_size): Add target_desc parameter, and use it.
9022 (free_register_cache_thread, free_register_cache_thread_one)
9023 (regcache_release, register_cache_size): New.
9024 (register_size): Add target_desc parameter, and use it.
9025 (register_data, supply_register, supply_register_zeroed)
9026 (supply_regblock, supply_register_by_name, collect_register)
9027 (collect_register_as_string, collect_register_by_name): Adjust.
9028 * regcache.h (struct target_desc): Forward declare.
9029 (struct regcache) <tdesc>: New field.
9030 (init_register_cache, new_register_cache): Add target_desc
9032 (regcache_invalidate_thread): Declare.
9033 (regcache_invalidate_one): Delete declaration.
9034 (regcache_release): Declare.
9035 (find_register_by_number, register_cache_size, register_size)
9036 (find_regno): Add target_desc parameter.
9037 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9039 * remote-utils.c: Include tdesc.h.
9040 (outreg, prepare_resume_reply): Adjust.
9041 * server.c: Include tdesc.h.
9042 (gdbserver_xmltarget): Delete declaration.
9043 (get_features_xml, process_serial_event): Adjust.
9044 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9046 (struct process_info) <tdesc>: New field.
9047 (ipa_tdesc): Declare.
9048 * tdesc.c: New file.
9049 * tdesc.h: New file.
9050 * tracepoint.c: Include tdesc.h.
9051 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9052 (get_context_regcache): Adjust to pass ipa_tdesc down.
9053 (do_action_at_tracepoint): Adjust to get the register cache size
9054 from the context regcache's description.
9055 (traceframe_walk_blocks): Adjust to get the register cache size
9056 from the current trace frame's description.
9057 (traceframe_get_pc): Adjust to get current trace frame's
9058 description and pass it down.
9059 (gdb_collect): Adjust to get the register cache size from the
9061 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9062 (gdbserver_xmltarget): Delete.
9063 (initialize_low_tracepoint): Set the ipa's target description.
9064 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9065 (initialize_low_tracepoint): Set the ipa's target description.
9066 * linux-x86-low.c: Include tdesc.h.
9067 [__x86_64__] (is_64bit_tdesc): New.
9068 (ps_get_thread_area, x86_get_thread_area): Use it.
9069 (i386_cannot_store_register): Rename to ...
9070 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9071 (i386_cannot_fetch_register): Rename to ...
9072 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9073 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9075 (target_regsets): Rename to ...
9076 (x86_regsets): ... this.
9077 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9079 (x86_siginfo_fixup): Use is_64bit_tdesc.
9080 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9081 (tdesc_x32_avx_linux, tdesc_x32_linux)
9082 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9084 (x86_linux_update_xmltarget): Delete.
9085 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9086 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9087 (AMD64_LINUX_USER64_CS): New.
9088 (x86_linux_read_description): New, based on
9089 x86_linux_update_xmltarget.
9090 (same_process_callback): New.
9091 (x86_arch_setup_process_callback): New.
9092 (x86_linux_update_xmltarget): New.
9093 (x86_regsets_info): New.
9094 (amd64_linux_regs_info): New.
9095 (i386_linux_usrregs_info): New.
9096 (i386_linux_regs_info): New.
9097 (x86_linux_regs_info): New.
9098 (x86_arch_setup): Reimplement.
9099 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9100 (x86_emit_ops): Ditto.
9101 (the_low_target): Adjust. Install x86_linux_regs_info,
9102 x86_cannot_fetch_register, and x86_cannot_store_register.
9103 (initialize_low_arch): New.
9104 * linux-ia64-low.c (tdesc_ia64): Declare.
9105 (ia64_fetch_register): Adjust.
9106 (ia64_usrregs_info, regs_info): New globals.
9107 (ia64_regs_info): New function.
9108 (the_low_target): Adjust.
9109 (initialize_low_arch): New function.
9110 * linux-sparc-low.c (tdesc_sparc64): Declare.
9111 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9113 (sparc_arch_setup): New function.
9114 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9115 (the_low_target): Adjust.
9116 (initialize_low_arch): New function.
9117 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9118 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9119 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9120 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9121 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9122 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9123 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9124 (tdesc_powerpc_isa205_vsx64l): Declare.
9125 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9126 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9127 (ppc_set_pc, ppc_get_hwcap): Adjust.
9128 (ppc_usrregs_info): Forward declare.
9129 (!__powerpc64__) ppc_regmap_adjusted: New global.
9130 (ppc_arch_setup): Adjust to the current process'es target
9132 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9133 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9134 (ppc_store_evrregset): Adjust.
9135 (target_regsets): Rename to ...
9136 (ppc_regsets): ... this, and make static.
9137 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9138 (ppc_regs_info): New function.
9139 (the_low_target): Adjust.
9140 (initialize_low_arch): New function.
9141 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9142 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9143 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9144 (tdesc_s390x_linux64v2): Declare.
9145 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9146 (s390_fill_gregset, s390_store_last_break): Adjust.
9147 (target_regsets): Rename to ...
9148 (s390_regsets): ... this, and make static.
9149 (s390_get_pc, s390_set_pc): Adjust.
9150 (s390_get_hwcap): New target_desc parameter, and use it.
9151 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9152 (s390_arch_setup): Adjust to set the current process'es target
9153 description. Don't adjust the regmap.
9154 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9155 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9156 (regs_info_3264): New globals.
9157 (s390_regs_info): New function.
9158 (the_low_target): Adjust.
9159 (initialize_low_arch): New function.
9160 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9161 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9162 [__mips64] (init_registers_mips_linux)
9163 (init_registers_mips_dsp_linux): Delete defines.
9164 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9165 (have_dsp): New global.
9166 (mips_read_description): New, based on mips_arch_setup.
9167 (mips_arch_setup): Reimplement.
9168 (get_usrregs_info): New function.
9169 (mips_cannot_fetch_register, mips_cannot_store_register)
9170 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9171 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9172 (target_regsets): Rename to ...
9173 (mips_regsets): ... this, and make static.
9174 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9175 (dsp_regs_info, regs_info): New globals.
9176 (mips_regs_info): New function.
9177 (the_low_target): Adjust.
9178 (initialize_low_arch): New function.
9179 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9180 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9182 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9183 (arm_read_description): New, with bits factored from
9185 (arm_arch_setup): Reimplement.
9186 (target_regsets): Rename to ...
9187 (arm_regsets): ... this, and make static.
9188 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9189 (arm_regs_info): New function.
9190 (the_low_target): Adjust.
9191 (initialize_low_arch): New function.
9192 * linux-m68k-low.c (tdesc_m68k): Declare.
9193 (target_regsets): Rename to ...
9194 (m68k_regsets): ... this, and make static.
9195 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9196 (m68k_regs_info): New function.
9197 (m68k_arch_setup): New function.
9198 (the_low_target): Adjust.
9199 (initialize_low_arch): New function.
9200 * linux-sh-low.c (tdesc_sharch): Declare.
9201 (target_regsets): Rename to ...
9202 (sh_regsets): ... this, and make static.
9203 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9204 (sh_regs_info, sh_arch_setup): New functions.
9205 (the_low_target): Adjust.
9206 (initialize_low_arch): New function.
9207 * linux-bfin-low.c (tdesc_bfin): Declare.
9208 (bfin_arch_setup): New function.
9209 (bfin_usrregs_info, regs_info): New globals.
9210 (bfin_regs_info): New function.
9211 (the_low_target): Adjust.
9212 (initialize_low_arch): New function.
9213 * linux-cris-low.c (tdesc_cris): Declare.
9214 (cris_arch_setup): New function.
9215 (cris_usrregs_info, regs_info): New globals.
9216 (cris_regs_info): New function.
9217 (the_low_target): Adjust.
9218 (initialize_low_arch): New function.
9219 * linux-cris-low.c (tdesc_crisv32): Declare.
9220 (cris_arch_setup): New function.
9221 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9222 (cris_regs_info): New function.
9223 (the_low_target): Adjust.
9224 (initialize_low_arch): New function.
9225 * linux-m32r-low.c (tdesc_m32r): Declare.
9226 (m32r_arch_setup): New function.
9227 (m32r_usrregs_info, regs_info): New globals.
9228 (m32r_regs_info): Adjust.
9229 (initialize_low_arch): New function.
9230 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9231 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9232 (tic6x_usrregs_info): Forward declare.
9233 (tic6x_read_description): New function, based on ...
9234 (tic6x_arch_setup): ... this. Reimplement.
9235 (target_regsets): Rename to ...
9236 (tic6x_regsets): ... this, and make static.
9237 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9238 (tic6x_regs_info): New function.
9239 (the_low_target): Adjust.
9240 (initialize_low_arch): New function.
9241 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9242 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9243 (target_regsets): Rename to ...
9244 (xtensa_regsets): ... this, and make static.
9245 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9247 (xtensa_arch_setup, xtensa_regs_info): New functions.
9248 (the_low_target): Adjust.
9249 (initialize_low_arch): New function.
9250 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9251 (nios2_arch_setup): Set the current process'es tdesc.
9252 (target_regsets): Rename to ...
9253 (nios2_regsets): ... this.
9254 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9255 (nios2_regs_info): New function.
9256 (the_low_target): Adjust.
9257 (initialize_low_arch): New function.
9258 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9259 (aarch64_arch_setup): Set the current process'es tdesc.
9260 (target_regsets): Rename to ...
9261 (aarch64_regsets): ... this.
9262 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9263 (aarch64_regs_info): New function.
9264 (the_low_target): Adjust.
9265 (initialize_low_arch): New function.
9266 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9268 (target_regsets): Rename to ...
9269 (tile_regsets): ... this.
9270 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9271 (tile_regs_info): New function.
9272 (tile_arch_setup): Set the current process'es tdesc.
9273 (the_low_target): Adjust.
9274 (initialize_low_arch): New function.
9275 * spu-low.c (tdesc_spu): Declare.
9276 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9277 * win32-arm-low.c (tdesc_arm): Declare.
9278 (arm_arch_setup): New function.
9279 (the_low_target): Install arm_arch_setup instead of
9281 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9282 (init_windows_x86): Rename to ...
9283 (i386_arch_setup): ... this. Set `win32_tdesc'.
9284 (the_low_target): Adjust.
9285 * win32-low.c (win32_tdesc): New global.
9286 (child_add_thread): Don't create the thread cache here.
9287 (do_initial_child_stuff): Set the new process'es tdesc.
9288 * win32-low.h (struct target_desc): Forward declare.
9289 (win32_tdesc): Declare.
9290 * lynx-i386-low.c (tdesc_i386): Declare global.
9291 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9292 * lynx-low.c (lynx_tdesc): New global.
9293 (lynx_add_process): Set the new process'es tdesc.
9294 * lynx-low.h (struct target_desc): Forward declare.
9295 (lynx_tdesc): Declare global.
9296 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9297 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9298 * nto-low.c (nto_tdesc): New global.
9299 (do_attach): Set the new process'es tdesc.
9300 * nto-low.h (struct target_desc): Forward declare.
9301 (nto_tdesc): Declare.
9302 * nto-x86-low.c (tdesc_i386): Declare.
9303 (nto_x86_arch_setup): Set `nto_tdesc'.
9305 2013-06-04 Gary Benson <gbenson@redhat.com>
9307 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9308 to qSupported response when appropriate.
9309 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9310 with nonzero-length annex.
9311 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9312 arguments supplied in annex.
9314 2013-05-31 Doug Evans <dje@google.com>
9317 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9318 64 bits in 64-cross-32 environment.
9320 2013-05-28 Pedro Alves <palves@redhat.com>
9322 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9323 (aarch64-without-fpu.c): Delete rule.
9324 * configure.srv (aarch64*-*-linux*): Remove references to
9325 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9326 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9329 2013-05-24 Pedro Alves <palves@redhat.com>
9331 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9332 instead of strchr/decode_address. Error if the range isn't split
9333 with a ','. Don't assume there's be a ':' in the action.
9335 2013-05-23 Yao Qi <yao@codesourcery.com>
9336 Pedro Alves <palves@redhat.com>
9338 * linux-low.c (lwp_in_step_range): New function.
9339 (linux_wait_1): If the thread was range stepping and stopped
9340 outside the stepping range, report the stop to GDB. Otherwise,
9341 continue stepping. Add range stepping debug output.
9342 (linux_set_resume_request): Copy the step range from the resume
9344 (linux_supports_range_stepping): New.
9345 (linux_target_ops) <supports_range_stepping>: Set to
9346 linux_supports_range_stepping.
9347 * linux-low.h (struct linux_target_ops)
9348 <supports_range_stepping>: New field.
9349 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9350 * linux-x86-low.c (x86_supports_range_stepping): New.
9351 (the_low_target) <supports_range_stepping>: Set to
9352 x86_supports_range_stepping.
9353 * server.c (handle_v_cont): Handle 'r' action.
9354 (handle_v_requests): Append ";r" if the target supports range
9356 * target.h (struct thread_resume) <step_range_start,
9357 step_range_end>: New fields.
9358 (struct target_ops) <supports_range_stepping>:
9360 (target_supports_range_stepping): New macro.
9362 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9364 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9365 confusion in comment.
9367 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9369 * lynx-low.c (struct process_info_private): New type.
9370 (lynx_add_process): New function.
9371 (lynx_create_inferior, lynx_attach): Replace calls to
9372 add_process by calls to lynx_add_process.
9373 (lynx_resume): If PTID is null, then try using
9374 current_process()->private->last_wait_event_ptid.
9376 (lynx_clear_inferiors): Delete. The contents of that function
9377 has been inlined in lynx_mourn;
9378 (lynx_wait_1): Save the ptid in the process's private data.
9379 (lynx_mourn): Free the process' private data. Replace call
9380 to lynx_clear_inferiors by call to clear_inferiors.
9382 2013-05-17 Yao Qi <yao@codesourcery.com>
9384 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9387 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9389 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9390 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9391 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9392 PT_TEXT_END_ADDR guards. Update comments.
9393 (linux_target_op) <read_offsets>: Conditionally define to
9394 linux_read_offsets if the target is UCLIBC and if it defines
9395 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9397 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9398 Andrew Jenner <andrew@codesourcery.com>
9400 * Makefile.in (SFILES): Add linux-nios2-low.c.
9401 (clean): Add action to delete nios2-linux.c.
9402 (nios2-linux.c): New rule.
9403 * configure.srv: Add nios2*-*-linux*.
9404 * linux-nios2-low.c: New.
9406 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9408 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9410 2013-04-25 Hui Zhu <hui@codesourcery.com>
9413 * ax.c (ax_printf): Add fflush.
9415 2013-04-22 Tom Tromey <tromey@redhat.com>
9417 * Makefile.in (SFILES): Add filestuff.c.
9418 (OBS): Add filestuff.o.
9419 (filestuff.o): New target.
9420 * config.in, configure: Rebuild.
9421 * configure.ac: Check for fdwalk, pipe2.
9423 2013-04-17 Pedro Alves <palves@redhat.com>
9425 * configure.ac (USE_THREAD_DB): Delete variable.
9426 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9427 Don't AC_SUBST USE_THREAD_DB.
9428 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9429 * config.in, configure: Regenerate.
9431 2013-04-16 Pedro Alves <palves@redhat.com>
9433 * linux-low.h (struct lwp_info) <thread_known>: Move under
9434 the USE_THREAD_DB #ifdef.
9436 2013-04-16 Pedro Alves <palves@redhat.com>
9438 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9439 (linux-low.o): Delete rule.
9440 * linux-low.h: Always include "gdb_thread_db.h" instead of
9441 conditionally including thread_db.h.
9442 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9445 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9447 * Makefile.in (install-only): Fix make install regression.
9449 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9451 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9452 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9454 * gdbserver.1: Remove.
9456 2013-03-22 Pedro Alves <palves@redhat.com>
9458 * linux-low.c (handle_extended_wait): Don't call
9459 linux_enable_event_reporting.
9461 2013-03-15 Tony Theodore <tonyt@logyst.com>
9464 * Makefile.in (SHELL): Use @SHELL@.
9466 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9468 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9471 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9473 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9474 Remove extraneous NULL element.
9476 2013-03-13 Yao Qi <yao@codesourcery.com>
9478 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9479 'V' block in trace frame.
9481 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9483 * target.h (struct target_ops): Add btrace ops.
9484 (target_supports_btrace): New macro.
9485 (target_enable_btrace): New macro.
9486 (target_disable_btrace): New macro.
9487 (target_read_btrace): New macro.
9488 * gdbthread.h (struct thread_info): Add btrace field.
9489 * server.c: Include btrace-common.h.
9490 (handle_btrace_general_set): New function.
9491 (handle_btrace_enable): New function.
9492 (handle_btrace_disable): New function.
9493 (handle_general_set): Call handle_btrace_general_set.
9494 (handle_qxfer_btrace): New function.
9495 (struct qxfer qxfer_packets[]): Add btrace entry.
9496 * inferiors.c (remove_thread): Disable btrace.
9497 * linux-low: Include linux-btrace.h.
9498 (linux_low_enable_btrace): New function.
9499 (linux_low_read_btrace): New function.
9500 (linux_target_ops): Add btrace ops.
9501 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9502 Add srv_linux_btrace=yes.
9503 (x86_64-*-linux*): Add linux-btrace.o.
9504 Add srv_linux_btrace=yes.
9505 * configure.ac: Define HAVE_LINUX_BTRACE.
9506 * config.in: Regenerated.
9507 * configure: Regenerated.
9509 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9511 * server.c (handle_qxfer): Preserve error message if -3 is
9513 (qxfer): Document the -3 return value.
9515 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9517 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9518 (linux_btrace_h): New variable.
9519 (linux-btrace.o): New rule.
9521 2013-03-08 Stan Shebs <stan@codesourcery.com>
9522 Hafiz Abid Qadeer <abidh@codesourcery.com>
9524 * tracepoint.c (trace_buffer_size): New global.
9525 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9526 (init_trace_buffer): Change to one-argument function. Allocate
9527 trace buffer memory.
9528 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9529 handle QTBuffer:size packet.
9530 (cmd_bigqtbuffer_size): New function.
9531 (initialize_tracepoint): Call init_trace_buffer with
9532 DEFAULT_TRACE_BUFFER_SIZE.
9533 * server.c (handle_query): Add QTBuffer:size in the
9536 2013-03-07 Yao Qi <yao@codesourcery.com>
9538 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9539 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9541 (cmd_qtsp): Adjust condition. Do post increment.
9542 Set cur_action and cur_step_action back to 0.
9544 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9547 * linux-low.c (linux_write_memory): Return early success if LEN is
9550 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9552 * configure.srv: Add x86_64-*-cygwin* as target.
9554 2013-02-28 Tom Tromey <tromey@redhat.com>
9556 * configure.ac: Invoke AC_SYS_LARGEFILE.
9557 * configure, config.in: Rebuild.
9559 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9561 * win32-low.c: Throughout, fix format strings and casts of
9562 printf-like functions to avoid type related warnings on all
9564 (get_child_debug_event): Print dwDebugEventCode as hex since
9565 that's how it's usually documented.
9567 2013-02-28 Yao Qi <yao@codesourcery.com>
9569 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9572 2013-02-27 Jiong Wang <jiwang@tilera.com>
9574 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9575 (reg-tilegx32.c): New rule.
9576 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9577 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9578 different register info initializer according to elf class.
9579 (init_registers_tilgx32): New function. The tilegx32 register info
9581 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9582 (tile_store_gregset): Likewise.
9584 2013-02-27 Yao Qi <yao@codesourcery.com>
9586 * server.c (process_point_options): Print debug message when
9587 debug_threads is true.
9589 2013-02-26 Yao Qi <yao@codesourcery.com>
9591 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9593 2013-02-19 Pedro Alves <palves@redhat.com>
9594 Kai Tietz <ktietz@redhat.com>
9598 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9599 instead of strtoul to extract address from packet.
9600 (process_serial_event) <'z'>: Likewise.
9602 2013-02-18 Yao Qi <yao@codesourcery.com>
9604 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9606 2013-02-14 Pedro Alves <palves@redhat.com>
9610 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9611 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9613 2013-02-14 Pedro Alves <palves@redhat.com>
9615 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9617 2013-02-14 Pedro Alves <palves@redhat.com>
9619 * tracepoint.c (save_string): Delete.
9620 (add_tracepoint_action): Use savestring instead of save_string.
9622 2013-02-12 Pedro Alves <palves@redhat.com>
9624 * linux-xtensa-low.c: Ditto.
9625 * xtensa-xtregs.c: Ditto.
9627 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9629 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9632 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9634 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9635 aarch64_num_wp_regs and aarch64_num_bp_regs to
9636 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9638 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9640 * linux-aarch64-low.c (ps_get_thread_area): Replace
9641 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9643 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9644 Marcus Shawcroft <marcus.shawcroft@arm.com>
9645 Nigel Stephens <nigel.stephens@arm.com>
9646 Yufeng Zhang <yufeng.zhang@arm.com>
9648 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9649 (aarch64.c, aarch64-without-fpu.c): New targets.
9650 * configure.srv (aarch64*-*-linux*): New.
9651 * linux-aarch64-low.c: New file.
9653 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9655 * linux-low.c (handle_extended_wait, linux_create_inferior)
9656 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9657 (dequeue_one_deferred_signal, linux_resume_one_thread)
9658 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9659 (linux_tracefork_grandchild, linux_test_for_tracefork)
9660 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9661 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9662 where the argument is 0.
9664 2013-01-25 Yao Qi <yao@codesourcery.com>
9666 * event-loop.c: Include "queue.h".
9667 (gdb_event_p): New typedef.
9668 (struct gdb_event) <next_event>: Remove.
9669 (event_queue): Change to QUEUE(gdb_event_p).
9670 (async_queue_event): Remove.
9671 (gdb_event_xfree): New.
9672 (initialize_event_loop): New.
9673 (process_event): Use API from QUEUE.
9674 (wait_for_event): Likewise.
9675 * server.c (main): Call initialize_event_loop.
9676 * server.h (initialize_event_loop): Declare.
9678 2013-01-18 Yao Qi <yao@codesourcery.com>
9680 * ax.h (struct eval_agent_expr_context): New.
9681 (gdb_eval_agent_expr): Update declaration.
9682 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9683 TFRAME. Add new argument CTX.
9684 * server.h (struct eval_agent_expr_context): Declare.
9685 (agent_mem_read, agent_tsv_read): Update declaration.
9686 (agent_mem_read_string): Likewise.
9687 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9688 (add_traceframe_block): Add new argument TPOINT.
9689 Increase TPOINT->traceframe_usage.
9690 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9691 eval_tracepoint_agent_expr.
9692 (condition_true_at_tracepoint): Likewise.
9693 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9694 (agent_mem_read_string, agent_tsv_read): Likewise.
9696 2013-01-16 Yao Qi <yao@codesourcery.com>
9698 * linux-low.c (linux_resume_one_lwp): Don't check
9699 'lwp->bp_reinsert != 0'.
9701 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9702 Pedro Alves <palves@redhat.com>
9704 * lynx-low.c (ptrace_request_to_str): Define a temporary
9705 macro and use it to simplify this function's implementation.
9707 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9709 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9712 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9714 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9716 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9718 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9720 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9722 * lynx-low.c (lynx_resume): Use the resume_info parameter
9723 to determine the ptid for the lynx_ptrace call, unless
9724 it is equal to minus_one_ptid, in which case we use the
9725 ptid of the current_inferior.
9726 (lynx_wait_1): After having received a thread create/exit
9727 event, resume the inferior's execution using the signaling
9728 thread's ptid, rather than the old ptid.
9730 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9732 * lynx-low.c (lynx_resume): Delete variable ret.
9734 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9736 * gdbreplay.c (gdbreplay_version): Update copyright year.
9737 * server.c (gdbserver_version): Likewise.
9739 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9741 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9744 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9746 * lynx-low.c (ptrace_request_to_str): Add handling for
9749 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9751 * lynx-low.c (lynx_attach): Delete variable new_process.
9753 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9755 * lynx-low.c (lynx_create_inferior): Delete variable
9758 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9760 * lynx-low.c (ptrace_request_to_str): Do not handle
9761 PTRACE_GETTHREADLIST if this macro does not exist.
9763 2012-12-15 Yao Qi <yao@codesourcery.com>
9765 * Makefile.in (OBS): Add notif.o.
9766 * notif.c, notif.h: New.
9767 * server.c: Include "notif.h".
9768 (struct vstop_notif) <next>: Remove.
9770 (queue_stop_reply): Update.
9771 (push_event, send_next_stop_reply): Remove.
9772 (discard_queued_stop_replies): Update.
9773 (notif_stop): New variable.
9774 (handle_v_stopped): Remove.
9775 (handle_v_requests): Don't call handle_v_stopped. Call
9776 handle_ack_notif instead.
9777 (queue_stop_reply_callback): Call notif_event_enque instead
9778 of queue_stop_reply.
9779 (handle_status): Don't call send_next_stop_reply, call
9780 notif_write_event instead.
9781 (kill_inferior_callback): Likewise.
9782 (detach_or_kill_inferior_callback): Likewise.
9783 (main): Call initialize_notif.
9784 (process_serial_event): Call QUEUE_is_empty.
9785 (handle_target_event): Call notif_push instead of push event.
9786 * server.h (push_event): Remove declaration.
9788 2012-12-10 Tom Tromey <tromey@redhat.com>
9790 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9791 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9794 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9795 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9796 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9797 (amd64-linux-ipa.o, ax.o): Rewrite.
9798 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9799 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9800 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9801 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9802 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9803 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9804 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9805 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9806 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9807 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9808 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9809 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9810 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9811 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9812 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9813 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9814 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9815 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9816 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9817 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9818 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9819 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9820 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9821 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9822 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9823 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9824 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9825 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9826 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9827 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9828 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9829 (reg-tilegx.o): Remove.
9830 (all_object_files): New macro.
9831 Include .deps files.
9832 * aclocal.m4, configure: Rebuild.
9833 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9834 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9835 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9837 2012-12-05 Tom Tromey <tromey@redhat.com>
9840 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9842 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9844 * configure.ac: Check for linux/perf_event.h.
9845 * config.in: Regenerated.
9846 * configure: Regenerated.
9848 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9850 * hostio.c (handle_readlink): Decrease buffer size
9851 parameter passed to readlink by one byte.
9853 2012-11-26 Yao Qi <yao@codesourcery.com>
9855 * configure.ac (build_warnings): Append '-Wempty-body'.
9856 * configure: Regenerated.
9857 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9860 2012-11-15 Pierre Muller <muller@sourceware.org>
9862 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9863 * config.in: Regenerate.
9864 * configure: Regenerate.
9865 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9866 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9867 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9868 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9870 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9871 instead of <sys/wait.h> header.
9872 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9874 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9876 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9877 (various make rules): Remove -DGDBSERVER
9879 2012-11-09 Yao Qi <yao@codesourcery.com>
9881 * spu-low.c (current_ptid): Move it to ..
9882 * gdbthread.h: ... here. New.
9883 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9884 * server.c (myresume, process_serial_event): Likewise.
9885 * thread-db.c (thread_db_find_new_threads): Likewise.
9886 * tracepoint.c (run_inferior_command): Likewise.
9888 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9890 * server.c (handle_search_memory_1): Include access length in
9893 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9895 * linux-crisv32-low.c: Fix compile errors.
9897 2012-09-04 Yao Qi <yao@codesourcery.com>
9899 * tracepoint.c (cmd_qtsv): Adjust debug message.
9900 Don't check CUR_TPOINT.
9902 2012-08-28 Yao Qi <yao@codesourcery.com>
9904 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9905 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9906 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9907 Remove declarations of xmalloc, xreallloc, xstrdup and
9909 * Makefile.in (libiberty_h): New.
9910 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9911 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9913 2012-08-23 Yao Qi <yao@codesourcery.com>
9915 * server.h: Remove declaration of 'xsnprintf'.
9917 2012-08-22 Keith Seitz <keiths@redhat.com>
9919 * server.h: Include build-gnulib-gbserver/config.h.
9920 * gdbreplay.c: Likewise.
9922 2012-08-08 Doug Evans <dje@google.com>
9924 * Makefile.in (SFILES): Add gdb_vecs.c.
9925 (OBS): Add gdb_vecs.o.
9926 (gdb_vecs_h, host_defs_h): New variables.
9927 (thread-db.o): Add $(gdb_vecs_h) dependency.
9928 (gdb_vecs.o): New rule.
9929 * thread-db.c: #include "gdb_vecs.h".
9930 (thread_db_load_search): Use a vector to iterate over path elements.
9931 Handle text appearing after "$pdir".
9933 * configure.ac: Add check for strstr.
9934 * config.in: Regenerate.
9935 * configure: Regenerate.
9937 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9939 * hostio.c (handle_pread): If pread fails, fall back to attempting
9941 (handle_pwrite): Likewise for pwrite.
9943 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9945 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9946 between unsupported TYPE and unimplementable ADDR/LEN combination.
9947 (arm_insert_point): Act on new return value.
9949 2012-07-31 Pedro Alves <palves@redhat.com>
9951 * server.c (process_point_options): Only skip tokens if we find
9952 one that is unrecognized. Don't treat 'X' specially while
9953 skipping unrecognized tokens.
9955 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9957 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9958 to 4-byte-align HW breakpoint addresses for Thumb.
9960 2012-07-27 Yao Qi <yao@codesourcery.com>
9964 * server.h: Declare gdb_agent_about_to_close.
9965 * target.c (kill_inferior): Include "agent.h".
9966 New. Send command 'kill'.
9967 * target.h (kill_inferior): Removed macro.
9968 * tracepoint.c (gdb_agent_about_to_close): New.
9969 (gdb_agent_helper_thread): Handle command 'close'.
9970 Wait endlessly until the inferior stops.
9971 Install gdb_agent_remove_socket to atexit hook.
9972 (agent_socket_name): New static variable.
9973 (gdb_agent_socket_init): Replace local variable 'name' with
9974 'agent_socket_name'.
9975 (gdb_agent_remove_socket): New.
9977 2012-07-27 Yao Qi <yao@codesourcery.com>
9979 * server.c (process_point_options): Stop at 'X' when parsing.
9981 2012-07-19 Michael Eager <eager@eagercon.com>
9983 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9985 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9986 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9987 hardware breakpoint.
9989 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9991 * gdbserver/linux-low.c (initialize_low): Call
9992 linux_ptrace_init_warnings.
9994 2012-07-02 Doug Evans <dje@google.com>
9996 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9999 2012-07-02 Stan Shebs <stan@codesourcery.com>
10001 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10002 (ax.o): Add it to build rule.
10004 (OBS): Add format.o.
10005 (IPA_OBS): Add format.o.
10006 * server.c (handle_query): Claim support for breakpoint commands.
10007 (process_point_options): Add command case.
10008 (process_serial_event): Leave running if there are printfs in
10010 * mem-break.h (any_persistent_commands): Declare.
10011 (add_breakpoint_commands): Declare.
10012 (gdb_no_commands_at_breakpoint): Declare.
10013 (run_breakpoint_commands): Declare.
10014 * mem-break.c (struct point_command_list): New struct.
10015 (struct breakpoint): New field command_list.
10016 (any_persistent_commands): New function.
10017 (add_commands_to_breakpoint): New function.
10018 (add_breakpoint_commands): New function.
10019 (gdb_no_commands_at_breakpoint): New function.
10020 (run_breakpoint_commands): New function.
10021 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10023 * ax.c: Include format.h.
10024 (ax_printf): New function.
10025 (gdb_eval_agent_expr): Add printf opcode.
10027 2012-06-13 Yao Qi <yao@codesourcery.com>
10029 * server.c (start_inferior): Remove duplicated writes to fields
10030 'last_resume_kind' and 'last_status' of 'current_inferior'.
10032 2012-06-12 Yao Qi <yao@codesourcery.com>
10033 Pedro Alves <palves@redhat.com>
10035 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10037 * server.c (handle_v_cont): Extend comment.
10039 2012-06-11 Yao Qi <yao@codesourcery.com>
10041 * linux-low.c (linux_attach): Add 'static'.
10043 2012-06-06 Yao Qi <yao@codesourcery.com>
10045 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10047 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10049 Fix gcc -flto compilation warning.
10050 * server.c (main): Make variable multi_mode and attach volatile.
10052 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10054 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10055 if the platform doesn't know about it.
10057 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10059 * Makefile.in (SFILES): Add linux-tile-low.c.
10060 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10061 * configure.srv: Handle tilegx-*-linux*.
10062 * linux-tile-low.c: New file.
10064 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10066 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10068 2012-05-24 Pedro Alves <palves@redhat.com>
10072 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10074 2012-05-24 Pedro Alves <palves@redhat.com>
10078 Replace target_signal with gdb_signal throughout.
10080 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10082 * linux-low.c (linux_store_registers): Avoid the copying sequence
10083 when no data has been retrieved by ptrace.
10085 2012-05-22 Will Deacon <will.deacon@arm.com>
10087 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10088 Include asm/ptrace.h.
10089 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10092 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10094 * linux-low.c (linux_store_registers): Don't re-retrieve data
10095 with ptrace that has already been obtained from /proc. Always
10096 copy any data retrieved with ptrace to the buffer supplied.
10098 2012-05-11 Yao Qi <yao@codesourcery.com>
10099 Pedro Alves <palves@redhat.com>
10101 * linux-low.c (enum stopping_threads_kind): New.
10102 (stopping_threads): Change type to `enum stopping_threads_kind'.
10103 (handle_extended_wait): If stopping and suspending threads, leave
10104 the new_lwp suspended too.
10105 (linux_wait_for_event): Adjust.
10106 (stop_all_lwps): Set `stopping_threads' to
10107 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10108 whether we're suspending threads or just stopping them. Assert no
10111 2012-04-29 Yao Qi <yao@codesourcery.com>
10113 * server.h: Move some code to ...
10114 * gdbthread.h: ... here. New.
10115 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10116 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10117 (nto-low.o, win32-low.o): Likewise.
10118 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10119 * regcache.c, remote-utils.c, server.c: Likewise.
10120 * target.c, tracepoint.c, win32-low.c: Likewise.
10122 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10124 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10125 (PTRACE_ARG4_TYPE): Likewise.
10126 (PTRACE_XFER_TYPE): Likewise.
10127 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10128 ptrace to PTRACE_ARG3_TYPE.
10129 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10130 (PTRACE_ARG4_TYPE): Likewise.
10131 (PTRACE_XFER_TYPE): Likewise.
10132 (linux_detach_one_lwp): Cast fourth argument of
10133 ptrace to long then PTRACE_ARG4_TYPE.
10134 (regsets_fetch_inferior_registers): Cast third argument of
10135 ptrace to long then PTRACE_ARG3_TYPE.
10136 (regsets_store_inferior_registers): Likewise.
10138 2012-04-20 Pedro Alves <palves@redhat.com>
10140 * configure: Regenerate.
10142 2012-04-19 Pedro Alves <palves@redhat.com>
10144 * Makefile.in (GNULIB_BUILDDIR): New.
10145 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10146 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10147 (all, install-only, uninstall, clean-info, all-lib, clean): No
10148 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10149 (maintainer-clean realclean distclean): Use subdir_do.
10151 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10152 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10153 * acinclude.m4: Include acx_configure_dir.m4.
10154 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10155 calls. Call AC_PROG_RANLIB. Configure gnulib using
10158 (GNULIB_STDINT_H): Adjust.
10159 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10160 * gdbreplay.c: Include build-gnulib/config.h.
10161 * server.h: Likewise.
10162 * aclocal.m4: Regenerate.
10163 * config.in: Regenerate.
10164 * configure: Regenerate.
10166 2012-04-19 Pedro Alves <palves@redhat.com>
10168 * Makefile.in (LIBGNU, INCGNU): Adjust.
10169 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10170 (all, install-only, uninstall, clean-info, all-lib, clean)
10171 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10172 * configure.ac: Adjust AC_OUTPUT output.
10173 * aclocal.m4: Regenerate.
10174 * configure: Regenerate.
10176 2012-04-19 Pedro Alves <palves@redhat.com>
10178 * Makefile.in (generated_files): New.
10179 (server_h): Remove the explicit dependency on config.h, and depend
10180 on $generated_files.
10182 2012-04-19 Pedro Alves <palves@redhat.com>
10184 * Makefile.in (INCGNU): Add -Ignulib.
10186 2012-04-19 Pedro Alves <palves@redhat.com>
10188 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10189 (INCGNU): ... this, and spell out -I here.
10190 (GNULIB_LIB): Rename to ...
10191 (LIBGNU): ... this.
10192 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10194 2012-04-19 Pedro Alves <palves@redhat.com>
10196 * config.in: Regenerate.
10198 2012-04-19 Pedro Alves <palves@redhat.com>
10200 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10201 * server.h (memmem): Remove declaration.
10202 * config.in: Regenerate.
10203 * configure: Regenerate.
10205 2012-04-19 Yao Qi <yao@codesourcery.com>
10207 * Makefile.in (SFILES): Add common/vec.c.
10211 2012-04-19 Yao Qi <yao@codesourcery.com>
10213 * remote-utils.c (prepare_resume_reply): Replace with macro
10214 target_core_of_thread.
10215 * server.c (handle_qxfer_threads_proper): Likewise.
10216 * target.h (traget_core_of_thread): New macro.
10218 2012-04-18 Pedro Alves <palves@redhat.com>
10220 * aclocal.m4: Regenerate.
10221 * configure: Regenerate.
10223 2012-04-16 Yao Qi <yao@codesourcery.com>
10225 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10226 duplicated on address.
10228 2012-04-16 Yao Qi <yao@codesourcery.com>
10230 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10231 (struct tracepoint_action_ops) <send>: New field.
10232 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10233 (agent_expr_send, x_tracepoint_action_send): New.
10234 (l_tracepoint_action_send): New.
10235 (cmd_qtdp): Download and install tracepoint
10236 according to `use_agent'.
10237 (run_inferior_command): Add one more parameter `len'.
10239 (tracepoint_send_agent): New.
10240 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10242 2012-04-16 Yao Qi <yao@codesourcery.com>
10244 * tracepoint.c (download_tracepoints): Moved to ...
10245 (cmd_qtstart): ... here.
10247 2012-04-14 Yao Qi <yao@codesourcery.com>
10249 * tracepoint.c: Include inttypes.h.
10250 (struct collect_memory_action): Use sized types.
10251 (struct tracepoint): Likewise.
10252 (cmd_qtdp, stop_tracing): Update print specifiers.
10253 (cmd_qtp, response_tracepoint): Likewise.
10254 (collect_data_at_tracepoint): Likewise.
10255 (collect_data_at_step): Likewise.
10257 2012-04-14 Yao Qi <yao@codesourcery.com>
10259 Import gnulib module inttypes.
10260 * aclocal.m4, config.in, configure: Regenerated.
10262 2012-04-14 Yao Qi <yao@codesourcery.com>
10264 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10265 Makefile and config.status at last.
10267 2012-04-13 Yao Qi <yao@codesourcery.com>
10269 * tracepoint.c: Include stdint.h unconditionally.
10271 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10273 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10274 on BFD_HAVE_SYS_PROCFS_TYPE.
10275 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10276 * configure: Regenerate.
10277 * config.in: Likewise.
10279 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10281 * Makefile.in (clean): Also remove x32.c x32-linux.c
10282 x32-avx.c x32-avx-linux.c.
10283 (x32.o): New target.
10285 (x32-linux.o): Likewise.
10286 (x32-linux.c): Likewise.
10287 (x32-avx.o): Likewise.
10288 (x32-avx.c): Likewise.
10289 (x32-avx-linux.o): Likewise.
10290 (x32-avx-linux.c): Likewise.
10292 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10293 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10294 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10295 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10296 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10297 i386/x32-avx-linux.xml.
10299 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10300 (init_registers_x32_avx_linux): Likwise.
10301 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10302 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10304 2012-04-13 Pedro Alves <palves@redhat.com>
10306 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10307 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10308 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10309 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10312 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10314 * linux-x86-low.c (compat_x32_clock_t): New.
10315 (compat_x32_siginfo_t): Likewise.
10316 (compat_x32_siginfo_from_siginfo): Likewise.
10317 (siginfo_from_compat_x32_siginfo): Likewise.
10318 (linux_is_elf64): Likewise.
10319 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10320 and siginfo_from_compat_x32_siginfo for x32.
10321 (x86_arch_setup): Set linux_is_elf64.
10323 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10326 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10328 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10329 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10330 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10331 compatible with process.
10333 2012-04-12 Yao Qi <yao@codesourcery.com>
10335 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10336 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10337 (install-only, install-info, clean): Handle sub dir gnulib.
10338 (all-lib, am--refresh): New targets.
10339 (memmem.o): Remove target.
10340 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10341 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10342 (AC_REPLACE_FUNCS): Remove memmem.
10343 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10344 (AC_OUTPUT): Generate Makefile in gnulib/.
10345 * aclocal.m4, config.in, configure: Regenerated.
10347 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10349 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10351 2012-04-05 Pedro Alves <palves@redhat.com>
10353 -Werror=strict-aliasing
10355 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10358 2012-04-04 Pedro Alves <palves@redhat.com>
10360 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10361 (sparc_store_gregset_from_stack, sparc_store_gregset)
10362 (sparc_breakpoint_at): Fix formatting.
10364 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10366 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10368 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10369 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10370 * config.in: Regenerate.
10371 * configure: Likewise.
10373 2012-03-29 Pedro Alves <palves@redhat.com>
10375 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10376 Correct ptrace arguments.
10378 2012-03-28 Pedro Alves <palves@redhat.com>
10380 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10381 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10382 (IA64_FR1_REGNUM): New defines.
10383 (ia64_fetch_register): New.
10384 (the_low_target): Install it.
10385 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10387 * linux-low.c (linux_fetch_registers): Try the
10388 the_low_target.fetch_register hook first.
10390 * linux-arm-low.c (the_low_target): Adjust.
10391 * linux-bfin-low.c (the_low_target): Adjust.
10392 * linux-cris-low.c (the_low_target): Adjust.
10393 * linux-crisv32-low.c (the_low_target): Adjust.
10394 * linux-m32r-low.c (the_low_target): Adjust.
10395 * linux-m68k-low.c (the_low_target): Adjust.
10396 * linux-mips-low.c (the_low_target): Adjust.
10397 * linux-ppc-low.c (the_low_target): Adjust.
10398 * linux-s390-low.c (the_low_target): Adjust.
10399 * linux-sh-low.c (the_low_target): Adjust.
10400 * linux-sparc-low.c (the_low_target): Adjust.
10401 * linux-tic6x-low.c (the_low_target): Adjust.
10402 * linux-x86-low.c (the_low_target): Adjust.
10403 * linux-xtensa-low.c (the_low_target): Adjust.
10405 2012-03-26 Pedro Alves <palves@redhat.com>
10407 * server.c (handle_qxfer_libraries): Don't bail early if
10408 the_target->qxfer_libraries_svr4 is not NULL.
10410 2012-03-26 Pedro Alves <palves@redhat.com>
10412 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10414 2012-03-23 Pedro Alves <palves@redhat.com>
10416 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10417 "library-list-svr4" element's start tag when the the DSO list is
10420 2012-03-23 Pedro Alves <palves@redhat.com>
10422 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10423 a variable whose type size is the same as the inferior's pointer
10426 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10428 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10430 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10431 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10432 * linux-low.h: Include <signal.h>.
10433 (struct siginfo): Remove forward declaration.
10434 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10437 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10439 * .gitignore: Ignore more files.
10441 2012-03-19 Pedro Alves <palves@redhat.com>
10442 Jan Kratochvil <jan.kratochvil@redhat.com>
10444 * server.c (cont_thread, general_thread): Add describing comments.
10445 (start_inferior): Clear `cont_thread'.
10446 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10449 2012-03-15 Yao Qi <yao@codesourcery.com>
10451 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10453 (cmd_qtdp): ... here.
10455 2012-03-15 Yao Qi <yao@codesourcery.com>
10457 * tracepoint.c (struct tracepoint_action_ops): New.
10458 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10459 (m_tracepoint_action_download): New.
10460 (r_tracepoint_action_download): New.
10461 (x_tracepoint_action_download): New.
10462 (l_tracepoint_action_download): New.
10463 (add_tracepoint_action): Install `action->ops' according type.
10464 (download_tracepoint_1): Move code `download' function pointer
10465 of various tracepoint_action_ops.
10467 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10469 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10470 linux_ptrace_attach_warnings.
10472 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10474 * Makefile.in (linux-ptrace.o): New.
10475 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10476 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10477 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10478 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10479 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10481 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10483 2012-03-08 Yao Qi <yao@codesourcery.com>
10484 Pedro Alves <palves@redhat.com>
10486 Fix PR server/13392.
10487 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10488 offset of JMP insn.
10489 * tracepoint.c (remove_tracepoint): New.
10490 (cmd_qtdp): Call remove_tracepoint when failed to install.
10492 2012-03-07 Pedro Alves <palves@redhat.com>
10494 * linux-low.c (get_detach_signal): New.
10495 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10496 Pass on pending signals to PTRACE_DETACH. Check the result of the
10498 * server.c (program_signals, program_signals_p): New.
10499 (handle_general_set): Handle QProgramSignals.
10500 * server.h (program_signals, program_signals_p): Declare.
10502 2012-03-05 Pedro Alves <palves@redhat.com>
10503 Jan Kratochvil <jan.kratochvil@redhat.com>
10505 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10508 2012-03-03 Yao Qi <yao@codesourcery.com>
10510 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10511 agent_look_up_symbols.
10513 2012-03-03 Yao Qi <yao@codesourcery.com>
10515 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10516 (linux-x86-low.o): Likewise.
10517 * server.h: Remove in_process_agent_loaded.
10518 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10522 2012-03-03 Yao Qi <yao@codesourcery.com>
10524 * tracepoint.c (gdb_agent_capability): New global.
10525 (in_process_agent_loaded_ust): Renamed to
10526 `in_process_agent_supports_ust'.
10528 (in_process_agent_supports_ust): Call agent_capability_check.
10529 (clear_installed_tracepoints): Assert that agent supports
10532 2012-03-03 Yao Qi <yao@codesourcery.com>
10534 * linux-low.c (linux_supports_agent): New.
10535 (linux_target_ops): Initialize field `supports_agent' with
10536 linux_supports_agent.
10537 * target.h (struct target_ops) <supports_agent>: New.
10538 (target_supports_agent): New macro.
10539 * server.c (handle_general_set): Handle packet 'QAgent'.
10540 (handle_query): Send `QAgent+'.
10541 * Makefile.in (server.o): Depends on agent.h.
10543 2012-03-03 Yao Qi <yao@codesourcery.com>
10545 * Makefile.in (OBS): Add agent.o.
10546 Add new rule for agent.o.
10547 Track dependence of tracepoint.c on agent.h.
10548 * tracepoint.c (run_inferior_command_1):
10549 (run_inferior_command): Call agent_run_command.
10550 (gdb_ust_connect_sync_socket): Deleted. Move it to
10552 (resume_thread, stop_thread): Likewise.
10553 (gdb_ust_socket_init): Renamed to ...
10554 (gdb_agent_socket_init): ... New.
10555 (gdb_ust_thread): Renamed to ...
10556 (gdb_agent_helper_thread): ... New.
10557 (gdb_ust_init): Move some code to ...
10558 (gdb_agent_init): ... here. New.
10559 [HAVE_UST]: Call gdb_ust_init.
10560 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10561 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10562 * config.in, configure: Regenerated.
10564 2012-03-02 Pedro Alves <palves@redhat.com>
10566 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10567 * linux-low.c (struct simple_pid_list): New.
10568 (stopped_pids): New a struct simple_pid_list pointer.
10569 (add_to_pid_list, pull_pid_from_list): New.
10570 (handle_extended_wait): Don't assume the first signal new children
10571 report is SIGSTOP. Adjust call to pull_pid_from_list.
10572 (linux_wait_for_lwp): Adjust.
10574 2012-03-02 Yao Qi <yao@codesourcery.com>
10576 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10579 2012-03-02 Yao Qi <yao@codesourcery.com>
10581 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10582 `stop_pc' and `tpoint'. Update caller.
10584 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10586 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10587 * linux-low.c (use_linux_regsets): New macro.
10588 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10589 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10590 (linux_register_in_regsets): New function.
10591 (usr_fetch_inferior_registers): Skip registers covered by
10593 (usr_store_inferior_registers): Likewise.
10594 (usr_fetch_inferior_registers): New macro.
10595 (usr_store_inferior_registers): Likewise.
10596 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10597 (linux_store_registers): Likewise.
10598 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10600 (init_registers_mips64_dsp_linux): Likewise.
10601 (init_registers_mips_linux): New macro.
10602 (init_registers_mips_dsp_linux): Likewise.
10603 (mips_dsp_num_regs): Likewise.
10604 (DSP_BASE, DSP_CONTROL): New fallback macros.
10605 (mips_base_regs): New macro.
10606 (mips_regmap): Use it. Fix the size.
10607 (mips_dsp_regmap): New variable.
10608 (mips_dsp_regset_bitmap): Likewise.
10609 (mips_arch_setup): New function.
10610 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10612 (mips_cannot_store_register): Likewise.
10613 (the_low_target): Update .arch_setup, .num_regs and .regmap
10614 initializers. Add .regset_bitmap initializer.
10615 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10617 * linux-bfin-low.c (the_low_target): Likewise.
10618 * linux-cris-low.c (the_low_target): Likewise.
10619 * linux-crisv32-low.c (the_low_target): Likewise.
10620 * linux-ia64-low.c (the_low_target): Likewise.
10621 * linux-m32r-low.c (the_low_target): Likewise.
10622 * linux-m68k-low.c (the_low_target): Likewise.
10623 * linux-ppc-low.c (the_low_target): Likewise.
10624 * linux-s390-low.c (the_low_target): Likewise.
10625 * linux-sh-low.c (the_low_target): Likewise.
10626 * linux-sparc-low.c (the_low_target): Likewise.
10627 * linux-tic6x-low.c (the_low_target): Likewise.
10628 * linux-x86-low.c (the_low_target): Likewise.
10629 * linux-xtensa-low.c (the_low_target): Likewise.
10630 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10631 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10632 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10634 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10635 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10637 2012-02-29 Yao Qi <yao@codesourcery.com>
10638 Pedro Alves <palves@redhat.com>
10640 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10641 `step_over_finished' is true.
10643 2012-02-27 Pedro Alves <palves@redhat.com>
10645 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10646 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10648 2012-02-27 Pedro Alves <palves@redhat.com>
10651 * linux-low.c (pid_is_stopped): New.
10652 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10654 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10656 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10659 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10661 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10663 2012-02-24 Luis Machado <lgustavo@codesourcery>
10665 * server.c (handle_query): Advertise support for target-side
10666 breakpoint condition evaluation.
10667 (process_point_options): New function.
10668 (process_serial_event): When inserting a breakpoint, check for
10669 a target-side condition that should be evaluated.
10671 * mem-break.c: Include regcache.h and ax.h.
10672 (point_cond_list_t): New data structure.
10673 (breakpoint) <cond_list>: New field.
10674 (find_gdb_breakpoint_at): Make non-static.
10675 (delete_gdb_breakpoint_at): Clear any target-side
10677 (clear_gdb_breakpoint_conditions): New function.
10678 (add_condition_to_breakpoint): Likewise.
10679 (add_breakpoint_condition): Likewise.
10680 (gdb_condition_true_at_breakpoint): Likewise.
10681 (gdb_breakpoint_here): Return result directly instead
10682 of going through a local variable.
10684 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10685 (clear_gdb_breakpoint_conditions): Likewise.
10686 (add_breakpoint_condition): Likewise.
10687 (gdb_condition_true_at_breakpoint): Likewise.
10689 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10690 (need_step_over_p): Take target-side breakpoint condition into
10693 2012-02-24 Luis Machado <lgustavo@codesourcery>
10695 * server.h: Include tracepoint.h.
10696 (agent_mem_read, agent_get_trace_state_variable_value,
10697 agent_set_trace_state_variable_value,
10698 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10699 get_set_tsv_func_addr): New prototypes.
10701 * ax.h: New include file.
10702 * ax.c: New source file.
10704 * tracepoint.c: Include ax.h.
10705 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10706 agent_expr, eval_result_type): Move to ax.h.
10707 (parse_agent_expr): Rename to ...
10708 (gdb_parse_agent_expr): ... this, make it non-static and move
10710 (unparse_agent_expr) Rename to ...
10711 (gdb_unparse_agent_expr): ... this, make it non-static and move
10713 (eval_agent_expr): Rename to ...
10714 (eval_tracepoint_agent_expr): ... this.
10715 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10716 forward declarations.
10717 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10718 (agent_get_trace_state_variable_value): New function.
10719 (agent_set_trace_state_variable_value): New function.
10720 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10721 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10722 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10723 (condition_true_at_tracepoint): Likewise.
10724 (parse_agent_expr): Rename to ...
10725 (gdb_parse_agent_expr): ... this and move to ax.c.
10726 (unparse_agent_expr): Rename to ...
10727 (gdb_unparse_agent_expr): ... this and move to ax.c.
10728 (gdb_agent_op_name): Move to ax.c.
10729 (eval_agent_expr): Rename to ...
10730 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10732 (eval_tracepoint_agent_expr): New function.
10733 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10735 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10737 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10738 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10739 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10740 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10741 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10742 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10743 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10744 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10745 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10746 (compile_bytecodes): Remove forward declaration.
10747 (is_goto_target): Move to ax.c.
10748 (compile_bytecodes): Move to ax.c and call
10749 agent_get_trace_state_variable_value (...) and
10750 agent_set_trace_state_variable_value (...).
10752 * Makefile.in: Update ax.c and IPA dependencies.
10754 2012-02-24 Pedro Alves <palves@redhat.com>
10756 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10757 (cmd_bigqtbuffer_circular): ... this. Only handle
10758 'QTBuffer:circular:'.
10759 (handle_tracepoint_general_set): Adjust.
10761 2012-02-16 Yao Qi <yao@codesourcery.com>
10763 * inferiors.c: Move code to ...
10764 * dll.c: .... here. New.
10765 * server.h: Declare clear_dlls.
10766 * Makefile.in (SFILES): Add dll.c.
10770 2012-02-11 Yao Qi <yao@codesourcery.com>
10772 * server.c: (handle_monitor_command): Add a new parameter
10774 (handle_query): Update caller.
10776 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10778 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10779 * configure, config.in: Regenerate.
10780 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10783 2012-02-02 Pedro Alves <palves@redhat.com>
10785 Try SIGKILL first, then PTRACE_KILL.
10786 * linux-low.c (linux_kill_one_lwp): New.
10787 (linux_kill_one_lwp): Rename to ...
10788 (kill_one_lwp_callback): ... this. Use the new
10789 linux_kill_one_lwp.
10791 2012-02-02 Pedro Alves <palves@redhat.com>
10793 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10796 2012-01-27 Pedro Alves <palves@redhat.com>
10798 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10799 (elf_64_file_p): Make static.
10800 (linux_pid_exe_is_elf_64_file): New.
10801 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10802 Delete declarations.
10803 (linux_pid_exe_is_elf_64_file): Declare.
10804 * linux-x86-low.c (x86_arch_setup): Use
10805 linux_pid_exe_is_elf_64_file.
10807 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10809 * linux-low.c (linux_wait_for_event_1): Rename to ...
10810 (linux_wait_for_event): ... here and merge it with former
10811 linux_wait_for_event - new variable wait_ptid, use it.
10812 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10814 2012-01-23 Pedro Alves <palves@redhat.com>
10816 * server.c (main): Avoid yet another case of infinite loop while
10817 detaching/killing after a longjmp.
10819 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10822 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10824 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10826 * hostio.c (handle_readlink): New function.
10827 (handle_vFile): Call it to handle "vFile:readlink" packets.
10829 2012-01-20 Pedro Alves <palves@redhat.com>
10830 Ulrich Weigand <ulrich.weigand@linaro.org>
10832 * server.c (handle_v_requests): Only support vAttach and vRun to
10833 start multiple processes when in extended protocol mode.
10835 2012-01-17 Pedro Alves <palves@redhat.com>
10837 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10838 memalign plus mprotect to allocate the scratch buffer.
10840 2012-01-13 Pedro Alves <palves@redhat.com>
10842 * server.c (attach_inferior): Clear `cont_thread'.
10844 2012-01-13 Pedro Alves <palves@redhat.com>
10846 * server.c (main): Avoid infinite loop while detaching/killing
10849 2012-01-09 Doug Evans <dje@google.com>
10851 * server.c (start_inferior): Set last_ptid in --wrapper case.
10853 2012-01-06 Yao Qi <yao@codesourcery.com>
10855 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10857 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10859 2012-01-04 Yao Qi <yao@codesourcery.com>
10861 * tracepoint.c (cmd_qtdp): Print debug message
10862 for static tracepoint.
10864 2012-01-04 Yao Qi <yao@codesourcery.com>
10866 * tracepoint.c (trace_vdebug): Differentiate debug message
10867 between gdbserver and IPA.
10869 2012-01-03 Yao Qi <yao@codesourcery.com>
10871 * tracepoint.c (tracepoint_was_hit): Don't collect for
10874 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10876 * terminal.h: Reformat copyright header.
10878 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10880 * server.c (gdbserver_version): Update copyright year.
10881 * gdbreplay.c (gdbreplay_version): Likewise.
10883 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10885 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10888 2011-12-18 Hui Zhu <teawater@gmail.com>
10889 * linux-low.c (linux_create_inferior): Save return value to ret.
10891 2011-12-18 Hui Zhu <teawater@gmail.com>
10893 * linux-low.c (linux_create_inferior): Save return value to ret.
10895 2011-12-16 Doug Evans <dje@google.com>
10897 * linux-low.c (linux_create_inferior): If stdio connection,
10898 redirect stdin from /dev/null, stdout to stderr.
10899 * remote-utils.c (remote_is_stdio): New static global.
10900 (remote_connection_is_stdio): New function.
10901 (remote_prepare): Handle stdio connection.
10902 (remote_open): Ditto.
10903 (remote_close): Don't close stdin for stdio connections.
10904 (read_prim,write_prim): New functions. Replace all calls to
10905 read/write to these.
10906 * server.c (main): Watch for "-" argument. Move call to
10907 remote_prepare before start_inferior.
10908 * server.h (STDIO_CONNECTION_NAME): New macro.
10909 (remote_connection_is_stdio): Declare.
10911 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10912 in debugging output.
10914 2011-12-15 Yao Qi <yao@codesourcery.com>
10916 * tracepoint.c: Include sys/syscall.h.
10917 (gdb_ust_thread): Remove preprocessor conditional.
10919 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10921 * linux-low.c (linux_detach_one_lwp): Call
10922 the_low_target.prepare_to_resume before detaching.
10924 2011-12-14 Yao Qi <yao@codesourcery.com>
10926 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10929 2011-12-14 Yao Qi <yao@codesourcery.com>
10931 * i386-low.c (i386_low_stopped_data_address): Initialize local
10932 variable `control'.
10934 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10938 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10939 DR_CONTROL unless necessary. Extend comments.
10940 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10941 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10943 2011-12-13 Yao Qi <yao@codesourcery.com>
10945 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10947 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10949 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10951 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10952 Print new debug message for such case.
10954 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10956 Fix overlapping memcpy.
10957 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10958 the read_inferior_memory transfer.
10959 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10960 write_inferior_memory transfer.
10961 (set_fast_tracepoint_jump): New variable buf. Use it for the
10962 read_inferior_memory and write_inferior_memory transfers.
10963 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10964 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10965 Use it for the write_inferior_memory transfer.
10966 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10969 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10971 * linux-low.c (fetch_register, store_register): Make code
10972 consistent, fix formatting.
10974 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10976 * linux-low.c (usr_store_inferior_registers): Factor out code
10977 to handle individual registers into...
10978 (store_register): ... this new function.
10980 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10982 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10983 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10984 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10985 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10986 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10987 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10988 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10989 (srv_xmlfiles): Add new XML files.
10991 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10993 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10994 (init_registers_s390_linux32v1): Add prototype.
10995 (init_registers_s390_linux32v2): Likewise.
10996 (init_registers_s390_linux64v1): Likewise.
10997 (init_registers_s390_linux64v2): Likewise.
10998 (init_registers_s390x_linux64v1): Likewise.
10999 (init_registers_s390x_linux64v2): Likewise.
11000 (s390_num_regs): Increment to 52.
11001 (s390_regmap): Add orig_r2 register.
11002 (s390_num_regs_3264): Increment to 68.
11003 (s390_regmap_3264): Add orig_r2 register.
11004 (s390_collect_ptrace_register): Handle orig_r2 register.
11005 (s390_supply_ptrace_register): Likewise.
11006 (s390_fill_last_break): New function.
11007 (s390_store_last_break): Likewise.
11008 (s390_fill_system_call): New function.
11009 (s390_store_system_call): Likewise.
11010 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11012 (s390_check_regset): New function.
11013 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11014 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11015 Update target_regsets for available register sets.
11017 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11018 Jan Kratochvil <jan.kratochvil@redhat.com>
11020 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11021 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11023 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11024 * linux-low.h (struct process_info_private): New member r_debug.
11025 * server.c (handle_qxfer_libraries): Call
11026 the_target->qxfer_libraries_svr4.
11027 (handle_qxfer_libraries_svr4): New function.
11028 (qxfer_packets): New entry "libraries-svr4".
11029 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11030 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11031 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11032 PACKET_qXfer_libraries_svr4.
11034 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11036 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11037 PSW address/mask between 8-byte and 16-byte formats.
11038 (s390_supply_ptrace_register): Likewise.
11039 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11040 basic addressing mode bit.
11042 2011-11-24 Stan Shebs <stan@codesourcery.com>
11044 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11046 2011-11-17 Stan Shebs <stan@codesourcery.com>
11048 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11049 (tracing_start_time): New global.
11050 (tracing_stop_time): New global.
11051 (tracing_user_name): New global.
11052 (tracing_notes): New global.
11053 (tracing_stop_note): New global.
11054 (cmd_qtstart): Set traceframe_usage, start_time.
11055 (stop_tracing): Set stop_time.
11056 (cmd_qtstatus): Report additional status.
11057 (cmd_qtp): New function.
11058 (handle_tracepoint_query): Call it.
11059 (cmd_qtnotes): New function.
11060 (handle_tracepoint_general_set): Call it.
11061 (get_timestamp): Rename from tsv_get_timestamp.
11063 2011-11-14 Stan Shebs <stan@codesourcery.com>
11064 Kwok Cheung Yeung <kcy@codesourcery.com>
11066 * linux-x86-low.c (small_jump_insn): New.
11067 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11068 trampoline and error message, build a trampoline and issue a small
11069 jump instruction to it.
11070 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11071 trampoline and error message.
11072 (x86_get_min_fast_tracepoint_insn_len): New.
11073 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11074 * linux-low.h (struct linux_target_ops): Add arguments to
11075 install_fast_tracepoint_jump_pad operation, add new operation.
11076 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11078 (linux_get_min_fast_tracepoint_insn_len): New function.
11079 (linux_target_op): Add new operation.
11080 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11081 (gdb_trampoline_buffer_end): Ditto.
11082 (gdb_trampoline_buffer_error): Ditto.
11083 (struct ipa_sym_addresses): Add fields for new IPA variables.
11084 (symbol_list): Add entries for new IPA variables.
11085 (struct tracepoint): Add fields to hold the address range of the
11086 trampoline used by the tracepoint.
11087 (trampoline_buffer_head): New static variable.
11088 (trampoline_buffer_tail): Ditto.
11089 (claim_trampoline_space): New function.
11090 (have_fast_tracepoint_trampoline_buffer): New function.
11091 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11093 (install_fast_tracepoint): Ditto, also add error buffer argument.
11094 (cmd_qtminftpilen): New function.
11095 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11096 (fast_tracepoint_from_trampoline_address): New function.
11097 (fast_tracepoint_collecting): Handle trampoline as part of jump
11099 (set_trampoline_buffer_space): New function.
11100 (initialize_tracepoint): Initialize new IPA variables.
11101 * target.h (struct target_ops): Add arguments to
11102 install_fast_tracepoint_jump_pad operation, add new
11103 get_min_fast_tracepoint_insn_len operation.
11104 (target_get_min_fast_tracepoint_insn_len): New.
11105 (install_fast_tracepoint_jump_pad): Add arguments.
11106 * server.h (IPA_BUFSIZ): Define.
11107 * linux-i386-ipa.c: Include extra header files.
11108 (initialize_fast_tracepoint_trampoline_buffer): New function.
11109 (initialize_low_tracepoint): Call it.
11110 * server.h (set_trampoline_buffer_space): Declare.
11111 (claim_trampoline_space): Ditto.
11112 (have_fast_tracepoint_trampoline_buffer): Ditto.
11114 2011-11-14 Yao Qi <yao@codesourcery.com>
11116 * server.c (handle_query): Handle InstallInTrace for qSupported.
11117 * tracepoint.c (add_tracepoint): Sort list.
11118 (install_tracepoint, download_tracepoint): New.
11119 (cmd_qtdp): Call them to install and download tracepoints.
11120 (sort_tracepoints): Removed.
11121 (cmd_qtstart): Update.
11123 2011-11-14 Yao Qi <yao@codesourcery.com>
11125 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11126 * mem-break.h: Declare.
11127 * tracepoint.c (cmd_qtstart): Move some code to ...
11128 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11130 (download_tracepoints): Move some code to ...
11131 (download_tracepoint_1): ... here. New.
11133 2011-11-08 Yao Qi <yao@codesourcery.com>
11135 * remote-utils.c (relocate_instruction): A comment fix.
11137 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11139 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11140 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11141 dr_status_mirror and dr_control_mirror from debug_reg_state.
11142 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11143 (i386_initial_stuff): Remove use of deleted globals.
11144 (i386_get_thread_context, i386_set_thread_context,
11145 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11146 from debug_reg_state.
11148 2011-11-05 Yao Qi <yao@codesourcery.com>
11150 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11151 address as TPOINT's.
11153 2011-11-02 Stan Shebs <stan@codesourcery.com>
11155 * tracepoint.c (agent_mem_read_string): New function.
11156 (eval_agent_expr): Call it for tracenz.
11157 * server.c (handle_query): Report support for tracenz.
11159 2011-11-02 Yao Qi <yao@codesourcery.com>
11161 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11163 2011-11-02 Yao Qi <yao@codesourcery.com>
11165 * target.h: Fix a typo in comment.
11167 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11169 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11170 clobber the breakpoints' shadows with fast tracepoint jumps.
11171 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11172 * target.c (write_inferior_memory): Also pass MYADDR down to
11175 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11177 * configure.ac: Check support for personality routine.
11178 * configure: Regenerate.
11179 * config.in: Likewise.
11180 * linux-low.c: Include <sys/personality.h>.
11181 Define ADDR_NO_RANDOMIZE if necessary.
11182 (linux_create_inferior): Disable address space randomization when
11183 forking inferior, if requested.
11184 (linux_supports_disable_randomization): New function.
11185 (linux_target_ops): Install it.
11186 * server.h (disable_randomization): Declare.
11187 * server.c (disable_randomization): New global variable.
11188 (handle_general_set): Handle QDisableRandomization.
11189 (handle_query): Likewise for qSupported.
11190 (main): Support --disable-randomization and --no-disable-randomization
11191 command line arguments.
11192 * target.h (struct target_ops): Add supports_disable_randomization.
11193 (target_supports_disable_randomization): New macro.
11195 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11197 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11199 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11200 [!PT_GETDSBT] (target_loadmap): New definition.
11201 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11202 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11203 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11204 and PT_GETDSBT to LINUX_LOADMAP.
11205 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11206 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11208 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11210 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11211 (arm_linux_hwbp_cap): New static variable.
11212 (arm_linux_get_hwbp_cap): Replace by ...
11213 (arm_linux_init_hwbp_cap): ... this new function.
11214 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11215 (arm_linux_get_hw_watchpoint_count): Likewise.
11216 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11217 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11218 (arm_prepare_to_resume): Use perror_with_name instead of error.
11220 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11222 * linux-arm-low.c: Include <signal.h>.
11223 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11224 (struct arm_linux_hwbp_cap): New data type.
11225 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11226 (struct arm_linux_hw_breakpoint): New data type.
11227 (MAX_BPTS, MAX_WPTS): Define.
11228 (struct arch_process_info, struct arch_lwp_info): New data types.
11229 (arm_linux_get_hwbp_cap): New function.
11230 (arm_linux_get_hw_breakpoint_count): Likewise.
11231 (arm_linux_get_hw_watchpoint_count): Likewise.
11232 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11233 (arm_hwbp_control_initialize): Likewise.
11234 (arm_hwbp_control_is_enabled): Likewise.
11235 (arm_hwbp_control_is_initialized): Likewise.
11236 (arm_hwbp_control_disable): Likewise.
11237 (arm_linux_hw_breakpoint_equal): Likewise.
11238 (arm_linux_hw_point_initialize): Likewise.
11239 (struct update_registers_data): New data structure.
11240 (update_registers_callback: New function.
11241 (arm_insert_point): Likewise.
11242 (arm_remove_point): Likewise.
11243 (arm_stopped_by_watchpoint): Likewise.
11244 (arm_stopped_data_address): Likewise.
11245 (arm_new_process): Likewise.
11246 (arm_new_thread): Likewise.
11247 (arm_prepare_to_resume): Likewise.
11248 (the_low_target): Register arm_insert_point, arm_remove_point,
11249 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11250 arm_new_thread, and arm_prepare_to_resume.
11252 2011-09-15 Stan Shebs <stan@codesourcery.com>
11254 * server.h (struct emit_ops): Add compare-goto fields.
11255 * tracepoint.c (gdb_agent_op_sizes): New table.
11256 (emit_eq_goto): New function.
11257 (emit_ne_goto): New function.
11258 (emit_lt_goto): New function.
11259 (emit_le_goto): New function.
11260 (emit_gt_goto): New function.
11261 (emit_ge_goto): New function.
11262 (is_goto_target): New function.
11263 (compile_bytecodes): Recognize special cases of compare-goto
11264 combinations and call specialized emitters for them.
11265 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11266 (amd64_emit_ne_goto): New function.
11267 (amd64_emit_lt_goto): New function.
11268 (amd64_emit_le_goto): New function.
11269 (amd64_emit_gt_goto): New function.
11270 (amd64_emit_ge_goto): New function.
11271 (amd64_emit_ops): Add the new functions.
11272 (i386_emit_eq_goto): New function.
11273 (i386_emit_ne_goto): New function.
11274 (i386_emit_lt_goto): New function.
11275 (i386_emit_le_goto): New function.
11276 (i386_emit_gt_goto): New function.
11277 (i386_emit_ge_goto): New function.
11278 (i386_emit_ops): Add the new functions.
11280 2011-09-08 Stan Shebs <stan@codesourcery.com>
11282 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11283 (i386_emit_epilogue): Restore %ebx.
11285 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11287 * server.c (step_thread): Remove definition.
11288 (process_serial_event): Don't handle Hs.
11289 * server.h (step_thread): Remove declaration.
11290 * target.c (set_desired_inferior): Remove use of step_thread.
11292 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11294 * linux-low.c: Include linux-procfs.h.
11295 (linux_attach_lwp_1): Update comments.
11296 (linux_attach): Scan for existing threads when attaching to a
11297 process that is the tgid.
11298 * Makefile.in: Update dependencies.
11300 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11302 * configure.srv: Add linux-procfs.o dependencies.
11304 2011-08-14 Yao Qi <yao@codesourcery.com>
11306 * target.h (struct target_ops): Fix indent.
11307 * win32-low.c (win32_target_ops): Fix comment.
11309 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11310 Yao Qi <yao@codesourcery.com>
11312 * Makefile.in (clean): Remove tic6x-*.c files.
11313 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11314 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11315 (tic6x-c64xp-linux.c): Likewise.
11316 * configure.srv: Add support for tic6x-*-uclinux.
11317 * linux-tic6x-low.c: New.
11318 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11320 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11321 Yao Qi <yao@codesourcery.com>
11323 * target.h (struct target_ops): Add read_loadmap.
11324 * linux-low.c (struct target_loadseg): New type.
11325 (struct target_loadmap): New type.
11326 (linux_read_loadmap): New function.
11327 (linux_target_ops): Add linux_read_loadmap.
11328 * server.c (handle_query): Support qXfer:fdpic:read packet.
11329 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11332 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11334 * win32-low.c: Include <stdint.h>.
11336 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11338 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11339 to the inferior here.
11340 (i386_remove_aligned_watchpoint): Ditto.
11341 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11342 fit part of the watchpoint in the debug registers.
11343 (i386_update_inferior_debug_regs): New.
11344 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11345 registers, and only update the inferior on success.
11346 (i386_low_remove_watchpoint): Ditto.
11348 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11350 * linux-low.c (compare_ints, unique, list_threads, show_process,
11351 linux_core_of_thread): Delete.
11352 (linux_target_ops): Change linux_core_of_thread to
11353 linux_common_core_of_thread.
11354 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11355 * utils.c (malloc_failure): Change type of argument.
11356 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11357 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11358 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11359 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11360 (IPA_OBJS): Add common-utils-ipa.o.
11361 (ptid_h, linux_osdata_h): New macros.
11362 (server_h): Add common/common-utils.h, common/xml-utils.h,
11363 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11365 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11366 ptid.o, buffer.o): New rules.
11367 (linux-low.o): Add common/linux-osdata.h as a dependency.
11368 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11369 * configure.ac: Add AC_HEADER_DIRENT check.
11370 * config.in: Regenerate.
11371 * configure: Regenerate.
11372 * remote-utils.c (xml_escape_text): Delete.
11373 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11374 buffer_xml_printf): Move to common/buffer.c.
11375 * server.c (main): Remove call to initialize_inferiors.
11376 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11377 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11378 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11379 internal_error, gdb_assert, gdb_assert_fail): Delete.
11380 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11381 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11383 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11384 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11385 initialize_inferiors): Delete.
11387 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11389 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11392 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11394 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11396 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11398 2011-05-26 Yao Qi <yao@codesourcery.com>
11400 * Makefile.in (thread-db.o): Track dependence to
11401 common/gdb_thread_db.h.
11402 * thread-db.c: include gdb_thread_db.h from right place.
11404 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11406 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11407 __FILE__ and __LINE__ to internal_error.
11409 2011-05-13 Doug Evans <dje@google.com>
11411 * thread-db.c (try_thread_db_load_from_sdir): New function.
11412 (try_thread_db_load_from_dir): New function.
11413 (thread_db_load_search): Handle $sdir, ignore $pdir.
11414 Remove trying of system directories if search of
11415 libthread-db-search-path fails, that is now done via $sdir.
11417 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11419 * server.c (handle_query): Add EnableDisableTracepoints to the list
11420 of supported features.
11421 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11423 (cmd_qtenable_disable): New.
11424 (cmd_qtstart): Install tracepoints even if disabled.
11425 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11426 receiving a QTEnable or QTDisable packet.
11427 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11428 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11430 (gdb_probe): Skip data collection if static tracepoint is disabled.
11432 2011-05-10 Doug Evans <dje@google.com>
11434 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11436 2011-05-04 Doug Evans <dje@google.com>
11438 * linux-low.c (linux_join): Skip process lookup.
11439 * spu-low.c (spu_join): Ditto.
11440 * server.c (join_inferiors_callback): Delete.
11441 (process_serial_event): For 'D' packet (detach) call join_inferior
11444 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11446 * README: Don't mention xscale*-*-linux*.
11447 * configure.srv (xscale*-*-linux*): Don't handle target.
11449 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11451 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11453 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11454 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11455 (i386_emit_void_call_2): Likewise.
11457 2011-04-26 Yao Qi <yao@codesourcery.com>
11459 * linux-low.c: Move common macros to linux-ptrace.h.
11460 Include linux-ptrace.h.
11461 * Makefile.in (linux_ptrace_h): New.
11462 (linux-low.o): Depends on linux-ptrace.h.
11464 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11466 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11467 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11468 (remote_prepare): New function with most of the TCP code from ...
11469 (remote_open): ... here. Detect PORT here unconditionally. Move also
11470 setting transport_is_reliable.
11471 * server.c (run_once): New variable.
11472 (gdbserver_usage): Document it.
11473 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11474 the first run if RUN_ONCE.
11475 * server.h (run_once, remote_prepare): New declarations.
11477 2011-04-19 Tom Tromey <tromey@redhat.com>
11479 * win32-low.c (handle_load_dll): Remove duplicate "the".
11481 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11483 Remove support for old Cygwin 1.5 versions.
11484 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11485 function to avoid warning.
11486 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11489 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11491 * gdbserver/server.h (Macro _): Define it if not available.
11493 2011-03-14 Michael Snyder <msnyder@vmware.com>
11495 * hostio.c (handle_close): Remove unnecessary null test.
11497 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11499 * Makefile.in (maintainer-clean realclean distclean): Remove
11500 "make ... subdir_do" command.
11502 2011-03-10 Michael Snyder <msnyder@vmware.com>
11504 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11506 * server.c (handle_v_run): Free alloced buffer on early return.
11508 2011-03-09 Yao Qi <yao@codesourcery.com>
11511 2011-03-04 Yao Qi <yao@codesourcery.com>
11513 * Makefile.in: Remove GNU make feature --directory.
11515 2011-03-05 Yao Qi <yao@codesourcery.com>
11517 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11518 (subdir_do): New make target. Copied from gdb/Makefile.
11519 (maintainer-clean, realclean, distclean, clean): Call corresponding
11520 make targets in common/Makefile.
11522 2011-02-11 Yao Qi <yao@codesourcery.com>
11524 * configure.ac: Call AC_PROG_RANLIB.
11525 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11526 * configure: Regenerate.
11528 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11530 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11532 2011-03-06 Yao Qi <yao@codesourcery.com>
11534 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11536 2011-03-05 Yao Qi <yao@codesourcery.com>
11538 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11539 (subdir_do): New make target. Copied from gdb/Makefile.
11540 (maintainer-clean, realclean, distclean, clean): Call corresponding
11541 make targets in common/Makefile.
11543 2011-03-04 Yao Qi <yao@codesourcery.com>
11545 * Makefile.in: Remove GNU make feature --directory.
11547 2011-03-04 Michael Snyder <msnyder@vmware.com>
11549 * server.c (queue_stop_reply): Call xmalloc not malloc.
11551 2011-03-02 Michael Snyder <msnyder@vmware.com>
11553 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11555 2011-02-28 Michael Snyder <msnyder@vmware.com>
11557 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11558 (cmd_qtframe): Ditto.
11559 (cmd_qtbuffer): Ditto.
11560 (cmd_bigqtbuffer): Ditto.
11562 * utils.c (decimal2str): Initialize 'width' to nine, then
11563 don't mess with it.
11565 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11567 * hostio.c (require_data): Free *data, not data.
11569 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11571 * hostio.c (require_data): Use free, not xfree.
11573 2011-02-27 Michael Snyder <msnyder@vmware.com>
11575 * server.c (handle_query): Discard unused value.
11577 * hostio.c (require_data): Free malloc memory before returning
11580 2011-02-26 Michael Snyder <msnyder@vmware.com>
11582 * linux-low.c (list_threads): Call closedir for dirent.
11584 2011-02-27 Michael Snyder <msnyder@vmware.com>
11586 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11587 a case statement falls through.
11589 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11591 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11594 2011-02-26 Michael Snyder <msnyder@vmware.com>
11596 * utils.c (decimal2str): Eliminate dead code and dead param.
11597 (pulongest): Drop dead param from call to decimal2str.
11600 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11602 Revert the following patch (not approved yet):
11603 2011-02-21 Hui Zhu <teawater@gmail.com>
11604 * tracepoint.c (tp_printf): New function.
11605 (eval_agent_expr): Handle gdb_agent_op_printf.
11607 2011-02-21 Hui Zhu <teawater@gmail.com>
11609 * tracepoint.c (tp_printf): New function.
11610 (eval_agent_expr): Handle gdb_agent_op_printf.
11612 2011-02-18 Tom Tromey <tromey@redhat.com>
11614 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11615 (tracepoint.o): Likewise.
11616 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11617 (gdb_agent_op_names): Likewise.
11619 2011-02-18 Tom Tromey <tromey@redhat.com>
11621 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11622 gdb_agent_op_rot>: New constants.
11623 (gdb_agent_op_names): Add pick and roll.
11624 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11627 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11629 * aclocal.m4: Regenerated with aclocal-1.11.1.
11631 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11633 * server.c (handle_qxfer_traceframe_info): New.
11634 (qxfer_packets): Register "traceframe-info".
11635 (handle_query): Report support for qXfer:traceframe-info:read+.
11636 * tracepoint.c (match_blocktype): New.
11637 (traceframe_find_block_type): Rename to ...
11638 (traceframe_walk_blocks): ... this. Add callback filter argument,
11640 (traceframe_find_block_type): New, reimplemented on top of
11641 traceframe_walk_blocks.
11642 (build_traceframe_info_xml): New.
11643 (traceframe_read_info): New.
11644 * server.h (traceframe_read_info): Declare.
11646 2011-02-11 Yao Qi <yao@codesourcery.com>
11648 * configure.ac: Call AC_PROG_RANLIB.
11649 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11650 * configure: Regenerate.
11652 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11654 * server.c (gdb_read_memory): Change return semantics to allow
11656 (handle_search_memory_1): Adjust.
11657 (process_serial_event) <'m' packet>: Handle partial transfers.
11658 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11660 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11662 * regcache.c (init_register_cache): Initialize
11663 regcache->register_status.
11664 (free_register_cache): Release regcache->register_status.
11665 (regcache_cpy): Copy register_status.
11666 (registers_to_string): Print 'x's for unavailable registers.
11667 (supply_register): Mark the register's status valid or
11668 unavailable, depending on whether a buffer was passed in or not.
11669 (supply_register_zeroed): New.
11670 (supply_regblock): Mark the registers' status valid or
11671 unavailable, depending on whether a buffer was passed in or not.
11672 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11673 (struct regcache): New `register_status' field.
11674 (supply_register_zeroed): Declare.
11675 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11676 supply_register_zeroed, rather than passing a NULL buffer to
11678 * tracepoint.c (fetch_traceframe_registers): Update comment.
11680 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11682 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11685 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11687 * server.h (decode_xfer_write): Change prototype.
11688 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11689 and don't extract the annex here.
11690 * server.c (decode_xfer_read): Remove `annex' parameter,
11691 and don't extract the annex here.
11692 (decode_xfer): New.
11693 (struct qxfer): New.
11694 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11695 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11696 (handle_qxfer_statictrace): New functions, abstracted out from
11697 handle_query, and made to use the struct qxfer interface.
11698 (handle_threads_qxfer_proper): Rename to ...
11699 (handle_qxfer_threads_proper): ... this.
11700 (handle_threads_qxfer): Rename to ...
11701 (handle_qxfer_threads): ... this. Adjust.
11702 (qxfer_packets): New array.
11703 (handle_qxfer): New function.
11704 (handle_query): Use handle_qxfer.
11706 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11708 * gdbreplay.c: Shorten lines of >= 80 columns.
11709 * linux-low.c: Ditto.
11710 * linux-ppc-low.c: Ditto.
11711 * linux-s390-low.c: Ditto.
11712 * linux-sparc-low.c: Ditto.
11713 * linux-x86-low.c: Ditto.
11714 * linux-xtensa-low.c: Ditto.
11715 * mem-break.c: Ditto.
11716 * nto-low.c: Ditto.
11717 * regcache.h: Ditto.
11718 * remote-utils.c: Ditto.
11721 * thread-db.c: Ditto.
11722 * tracepoint.c: Ditto.
11724 * win32-low.h: Ditto.
11726 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11728 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11731 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11733 * server.c (gdbserver_version): Update copyright year in version
11735 * gdbreplay.c (gdbreplay_version): Ditto.
11737 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11739 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11740 * linux-bfin-low.c: New file.
11741 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11742 PT_DATA_ADDR for BFIN targets.
11743 * Makefile.in (SFILES): Add linux-bfin-low.c.
11744 (clean): Remove reg-bfin.c.
11745 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11746 * README: Mention supported Blackfin targets.
11748 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11750 * .gitignore: New file.
11752 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11754 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11756 2010-10-22 Jie Zhang <jie@codesourcery.com>
11758 * Makefile.in: Add FLAGS_TO_PASS variable.
11759 (install): Remove dependency of install-only and recursively
11760 invoke make for install-only.
11762 2010-10-04 Doug Evans <dje@google.com>
11764 * Makefile.in (uninstall): Use $(DESTDIR).
11766 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11770 * linux-x86-low.c (compat_siginfo_from_siginfo)
11771 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11772 si_code is < 0. Check for si_code == SI_TIMER before checking for
11775 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11777 * lynx-i386-low.c: New file.
11778 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11780 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11782 * lynx-low.c (ptrace_request_to_str): Remove handling for
11783 request values that have been removed in LynxOS 5.x.
11785 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11787 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11790 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11792 * configure.ac: Add --enable-inprocess-agent option.
11793 * configure: Rebuilt.
11795 2010-09-06 Yao Qi <yao@codesourcery.com>
11797 * linux-low.c (linux_kill): Remove unused variable.
11798 (linux_stabilize_threads): Likewise.
11799 * server.c (start_inferior): Likewise.
11800 (queue_stop_reply_callback): Likewise.
11801 * tracepoint.c (do_action_at_tracepoint): Likewise.
11803 2010-09-06 Yao Qi <yao@codesourcery.com>
11805 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11808 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11810 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11812 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11814 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11817 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11819 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11820 gdbserver/lynx-ppc-low.c: New files.
11821 * Makefile.in (lynx_low_h): New variable.
11822 (lynx-low.o, lynx-ppc-low.o): New rules.
11823 * configure.ac: On LynxOS, link with -lnetinet.
11824 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11825 * configure: regenerate.
11827 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11829 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11830 * configure.ac: Add check for vasprintf and vsnprintf.
11831 * configure, config.in: Regenerate.
11832 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11834 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11836 * gdbreplay.c: Move include of alloca.h up, next to include of
11838 * server.h: Add include of malloc.h.
11839 * mem-break.c: Remove include of malloc.h.
11840 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11842 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11844 * Makefile.in (memmem.o): Build with -Wno-error.
11846 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11848 * utils.c (xsnprintf): Make non-static.
11849 * server.h: Add xsnprintf declaration.
11850 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11851 replace calls to snprintf by calls to xsnprintf throughout.
11853 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11855 * configure.ac: Add configure check for alloca.
11856 * configure, config.in: Regenerate.
11857 * server.h: Include alloca.h if it exists.
11858 * gdbreplay.c: Include alloca.h if it exists.
11860 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11862 * linux-low.c (__SIGRTMIN): Define if not already defined.
11863 (linux_create_inferior): Check for __ANDROID__ rather than
11865 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11866 are already deferred.
11867 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11868 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11869 stopped and already has a pending signal to report.
11870 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11871 a pending signal to report or is moving out of a jump pad.
11872 (linux_init_signals): Check for __ANDROID__ rather than
11875 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11877 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11878 debug_threads check. Avoid a linear search when not doing debug
11881 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11883 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11884 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11885 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11886 (process_event): Change local fd's type to gdb_fildes_t.
11887 (create_file_handler): Adjust prototype.
11888 (delete_file_handler): Adjust prototype.
11889 (handle_file_event): Adjust prototype. Use pfildes.
11890 (create_file_event): Adjsut prototype.
11891 * remote-utils.c (remote_desc, listen_desc): Change type to
11893 * server.h: New gdb_fildes_t typedef.
11894 [USE_WIN32API]: Include winsock2.h.
11895 (delete_file_handler, add_file_handler): Adjust prototypes.
11896 (pfildes): Declare.
11897 * utils.c (pfildes): New.
11899 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11901 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11902 * configure: Regenerate.
11904 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11906 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11907 (linux_done_accessing_memory): ... this.
11908 (linux_target_ops): Adjust.
11909 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11910 * nto-low.c (nto_target_ops): Adjust comment.
11911 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11912 * spu-low.c (spu_target_ops): Adjust comment.
11913 * target.h (target_ops): Rename unprepare_to_access_memory field
11914 to done_accessing_memory.
11915 (unprepare_to_access_memory): Rename to ...
11916 (done_accessing_memory): ... this.
11918 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11920 * linux-low.c (linux_prepare_to_access_memory): New.
11921 (linux_unprepare_to_access_memory): New.
11922 (linux_target_ops): Install them.
11923 * server.c (read_memory): Rename to ...
11924 (gdb_read_memory): ... this. Use
11925 prepare_to_access_memory/prepare_to_access_memory.
11926 (write_memory): Rename to ...
11927 (gdb_write_memory): ... this. Use
11928 prepare_to_access_memory/prepare_to_access_memory.
11929 (handle_search_memory_1): Adjust.
11930 (process_serial_event): Adjust.
11931 * target.h (struct target_ops): New fields
11932 prepare_to_access_memory and unprepare_to_access_memory.
11933 (prepare_to_access_memory, unprepare_to_access_memory): New.
11934 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11935 prepare_to_access_memory/prepare_to_access_memory.
11936 * nto-low.c (nto_target_ops): Adjust.
11937 * spu-low.c (spu_target_ops): Adjust.
11938 * win32-low.c (win32_target_ops): Adjust.
11940 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11942 * Makefile.in (WARN_CFLAGS): Get it from configure.
11943 (WERROR_CFLAGS): New.
11944 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11945 * configure.ac: Introduce --enable-werror, which adds -Werror to
11946 the compiler command line. Enabled by default. Disable with
11947 --disable-werror. Add -Wdeclaration-after-statement
11948 Wpointer-arith and -Wformat-nonliteral to warning flags.
11949 * configure: Regenerate.
11951 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11953 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11955 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11957 * gdbreplay.c (remote_error): New.
11959 (expect): Use gdbchar. Check for error reading from GDB.
11960 Clarify sync error output.
11961 (play): Check for errors writing to GDB.
11962 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11963 * remote-utils.c (getpkt): Check for errors writing to the remote
11966 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11968 * linux-low.c (linux_wait_1): Move non-debugging code out of
11969 `debug_threads' control.
11971 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11973 * linux-low.c (linux_wait_1): Don't set last_status here.
11974 * server.c (push_event, queue_stop_reply_callback): Assert we're
11975 not pushing a TARGET_WAITKIND_IGNORE event.
11976 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11977 (myresume, handle_target_event): Set the thread's last_resume_kind
11978 and last_status from the target returned status.
11980 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11984 * linux-x86-low.c (update_debug_registers_callback): New.
11985 (i386_dr_low_set_addr): Use it.
11986 (i386_dr_low_get_addr): New.
11987 (i386_dr_low_set_control): Use update_debug_registers_callback.
11988 (i386_dr_low_get_control): New.
11989 (i386_dr_low_get_status): Adjust.
11990 * linux-low.c (linux_stop_lwp): New.
11991 * linux-low.h (linux_stop_lwp): Declare.
11993 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11994 argument instead of a i386_debug_reg_state.
11995 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11996 a i386_debug_reg_state.
11997 (i386_insert_aligned_watchpoint): Adjust.
11998 (i386_remove_aligned_watchpoint): Adjust.
11999 (i386_low_stopped_data_address): Read the debug registers from the
12000 inferior instead of from the mirrors.
12001 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12002 (i386_dr_low_get_addr): Declare.
12003 (i386_dr_low_get_control): Declare.
12004 (i386_dr_low_get_status): Change prototype.
12006 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12007 (i386_dr_low_get_addr): New.
12008 (i386_dr_low_get_control): New.
12009 (i386_dr_low_get_status): Adjust prototype. Return
12011 (i386_initial_stuff): Clear dr_status_mirror and
12013 (i386_get_thread_context): Adjust.
12014 (i386_set_thread_context): Adjust.
12015 (i386_thread_added): Adjust.
12017 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12019 * linux-low.h (linux_thread_area): Delete declaration.
12021 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12023 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12024 after its termination.
12026 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12028 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12029 (gdb_wants_all_stopped): Delete.
12030 (linux_wait_1): Don't call them.
12031 * server.c (handle_v_cont): Tag all threads as want-stopped.
12032 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12033 stopped as "client-wants-stopped".
12035 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12037 * Makefile.in (signals_h): New.
12038 (server_h): Depend on it.
12039 (server.o): Don't depend on $(signals_def).
12040 (signals.o): Depend on $(signals_def).
12042 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12044 * Makefile.in (signals_def): New.
12045 (server_h): Append include/gdb/signals.h and signals_def.
12046 (server.o): Append signals_def.
12048 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12050 * server.c (handle_target_event): Use target_signal_to_host for
12051 resume_info.sig initialization.
12052 * target.h (struct thread_resume) <sig>: New comment.
12054 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12056 * server.c (handle_query): strcpy() the returned string from paddress()
12057 instead of sprintf().
12058 * utils.c (paddress): Return phex_nz().
12060 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12062 * server.c (handle_v_cont): Call mourn_inferior if process
12064 (myresume): Likewise.
12066 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12068 Static tracepoints, and integration with UST.
12070 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12071 * mem-break.c (uninsert_all_breakpoints)
12072 (reinsert_all_breakpoints): New.
12073 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12074 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12075 (gdb_agent_ust_loaded, helper_thread_id)
12076 (gdb_agent_helper_thread_id): New macros.
12077 (struct ipa_sym_addresses): Add addr_ust_loaded,
12078 addr_helper_thread_id, addr_cmd_buf.
12079 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12080 (in_process_agent_loaded_ust): New.
12081 (write_e_ust_not_loaded): New.
12082 (maybe_write_ipa_ust_not_loaded): New.
12083 (struct collect_static_trace_data_action): New.
12084 (enum tracepoint_type) <static_tracepoint>: New.
12085 (struct tracepoint) <handle>: Mention static tracepoints.
12086 (struct static_tracepoint_ctx): New.
12087 (CMD_BUF_SIZE): New.
12088 (add_tracepoint_action): Handle static tracepoint actions.
12089 (unprobe_marker_at): New.
12090 (clear_installed_tracepoints): Handle static tracepoints.
12091 (cmd_qtdp): Handle static tracepoints.
12092 (probe_marker_at): New.
12093 (cmd_qtstart): Handle static tracepoints.
12094 (response_tracepoint): Handle static tracepoints.
12095 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12096 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12097 (get_context_regcache): Handle static tracepoints.
12098 (do_action_at_tracepoint): Handle static tracepoint actions.
12099 (traceframe_find_block_type): Handle static trace data blocks.
12100 (traceframe_read_sdata): New.
12101 (download_tracepoints): Download static tracepoint actions.
12102 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12103 (GDB_PROBE_NAME): New.
12105 (GET_UST_SYM): New.
12108 (ust_marker_to_static_tracepoint): New.
12110 (collect_ust_data_at_tracepoint): New.
12111 (gdb_ust_probe): New.
12112 (UNIX_PATH_MAX, SOCK_DIR): New.
12113 (gdb_ust_connect_sync_socket): New.
12114 (resume_thread, stop_thread): New.
12115 (run_inferior_command): New.
12116 (init_named_socket): New.
12117 (gdb_ust_socket_init): New.
12118 (cstr_to_hexstr): New.
12120 (first_marker, next_marker): New.
12121 (response_ust_marker): New.
12122 (cmd_qtfstm, cmd_qtsstm): New.
12123 (unprobe_marker_at, probe_marker_at): New.
12124 (cmd_qtstmat, gdb_ust_thread): New.
12125 (gdb_ust_init): New.
12126 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12127 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12128 (ST_REGENTRY): New.
12129 (x86_64_st_collect_regmap): New.
12130 (X86_64_NUM_ST_COLLECT_GREGS): New.
12131 (AMD64_RIP_REGNUM): New.
12132 (supply_static_tracepoint_registers): New.
12133 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12134 (ST_REGENTRY): New.
12135 (i386_st_collect_regmap): New.
12136 (i386_NUM_ST_COLLECT_GREGS): New.
12137 (supply_static_tracepoint_registers): New.
12138 * server.c (handle_query): Handle qXfer:statictrace:read.
12139 <qSupported>: Report support for StaticTracepoints, and
12140 qXfer:statictrace:read features.
12141 * server.h (traceframe_read_sdata)
12142 (supply_static_tracepoint_registers): Declare.
12143 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12144 (unpack_varlen_hex): Include in IPA build.
12145 * Makefile.in (ustlibs, ustinc): New.
12146 (IPA_OBJS): Add remote-utils-ipa.o.
12147 ($(IPA_LIB)): Link -ldl and -lpthread.
12149 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12150 * config.in, configure: Regenerate.
12152 2010-06-20 Ian Lance Taylor <iant@google.com>
12153 Pedro Alves <pedro@codesourcery.com>
12155 * linux-x86-low.c (always_true): Delete.
12156 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12157 trying to fool the compiler with always_true.
12159 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12161 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12162 conditions in gdbserver.
12164 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12166 * spu-low.c (spu_read_memory): Wrap around local store limit.
12167 (spu_write_memory): Likewise.
12169 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12171 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12172 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12174 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12176 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12177 uses with LONGEST uses.
12179 2010-06-14 Stan Shebs <stan@codesourcery.com>
12180 Pedro Alves <pedro@codesourcery.com>
12184 * linux-x86-low.c: Include limits.h.
12186 (always_true): New.
12189 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12190 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12191 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12192 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12193 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12194 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12195 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12196 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12197 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12198 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12199 (amd64_emit_void_call_2): New.
12200 (amd64_emit_ops): New.
12201 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12202 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12203 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12204 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12205 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12206 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12207 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12208 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12209 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12210 (i386_emit_stack_adjust, i386_emit_int_call_1)
12211 (i386_emit_void_call_2): New.
12212 (i386_emit_ops): New.
12213 (x86_emit_ops): New.
12214 (the_low_target): Install x86_emit_ops.
12215 * server.h (struct emit_ops): New.
12216 (get_raw_reg_func_addr): Declare.
12217 (current_insn_ptr, emit_error): Declare.
12218 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12219 (set_trace_state_variable_value): New defines.
12220 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12221 addr_get_trace_state_variable_value and
12222 addr_set_trace_state_variable_value.
12223 (symbol_list): New fields for get_raw_reg,
12224 get_trace_state_variable_value and set_trace_state_variable_value.
12225 (condfn): New typedef.
12226 (struct tracepoint): New field `compiled_cond'.
12227 (do_action_at_tracepoint): Clear compiled_cond.
12228 (get_trace_state_variable_value, set_trace_state_variable_value):
12230 (condition_true_at_tracepoint): If there's a compiled condition,
12232 (current_insn_ptr, emit_error): New globals.
12233 (struct bytecode_address): New.
12234 (get_raw_reg_func_addr): New.
12235 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12236 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12237 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12238 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12239 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12240 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12241 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12242 (compile_tracepoint_condition, compile_bytecodes): New.
12243 * target.h (emit_ops): Forward declare.
12244 (struct target_ops): New field emit_ops.
12245 (target_emit_ops): New.
12246 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12247 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12248 * linux-low.c (linux_emit_ops): New.
12249 (linux_target_ops): Install it.
12250 * linux-low.h (struct linux_target_ops): New field emit_ops.
12252 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12254 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12255 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12257 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12258 Stan Shebs <stan@codesourcery.com>
12260 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12261 (all): Depend on $(extra_libraries).
12262 (install-only): Install the IPA.
12263 (IPA_OBJS, IPA_LIB): New.
12264 (clean): Remove the IPA lib.
12265 (IPAGENT_CFLAGS): New.
12266 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12267 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12268 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12269 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12270 * configure.ac: Check for atomic builtins support in the compiler.
12271 (IPA_DEPFILES, extra_libraries): Define.
12272 * configure.srv (ipa_obj): Add description.
12273 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12274 (i[34567]86-*-linux*): Set ipa_obj.
12275 (x86_64-*-linux*): Set ipa_obj.
12276 * linux-low.c (stabilizing_threads): New.
12277 (supports_fast_tracepoints): New.
12278 (linux_detach): Stabilize threads before detaching.
12279 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12280 the lwp is either not stabilizing, or is moving out of a jump pad.
12281 (linux_fast_tracepoint_collecting): New.
12282 (maybe_move_out_of_jump_pad): New.
12283 (enqueue_one_deferred_signal): New.
12284 (dequeue_one_deferred_signal): New.
12285 (linux_wait_for_event_1): If moving out of a jump pad, defer
12286 pending signals to later.
12287 (linux_stabilize_threads): New.
12288 (linux_wait_1): Check if threads need moving out of jump pads, and
12290 (stuck_in_jump_pad_callback): New.
12291 (move_out_of_jump_pad_callback): New.
12292 (lwp_running): New.
12293 (linux_resume_one_lwp): Handle moving out of jump pads.
12294 (linux_set_resume_request): Dequeue deferred signals.
12295 (need_step_over_p): Also step over fast tracepoint jumps.
12296 (start_step_over): Also uninsert fast tracepoint jumps.
12297 (finish_step_over): Also reinsert fast tracepoint jumps.
12298 (linux_install_fast_tracepoint_jump): New.
12299 (linux_target_ops): Install linux_stabilize_threads and
12300 linux_install_fast_tracepoint_jump_pad.
12301 * linux-low.h (linux_target_ops) <get_thread_area,
12302 install_fast_tracepoint_jump_pad>: New fields.
12303 (struct lwp_info) <collecting_fast_tracepoint,
12304 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12305 (linux_get_thread_area): Declare.
12306 * linux-x86-low.c (jump_insn): New.
12307 (x86_get_thread_area): New.
12308 (append_insns): New.
12309 (push_opcode): New.
12310 (amd64_install_fast_tracepoint_jump_pad): New.
12311 (i386_install_fast_tracepoint_jump_pad): New.
12312 (x86_install_fast_tracepoint_jump_pad): New.
12313 (the_low_target): Install x86_get_thread_area and
12314 x86_install_fast_tracepoint_jump_pad.
12315 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12316 (struct fast_tracepoint_jump): New.
12317 (fast_tracepoint_jump_insn): New.
12318 (fast_tracepoint_jump_shadow): New.
12319 (find_fast_tracepoint_jump_at): New.
12320 (fast_tracepoint_jump_here): New.
12321 (delete_fast_tracepoint_jump): New.
12322 (set_fast_tracepoint_jump): New.
12323 (uninsert_fast_tracepoint_jumps_at): New.
12324 (reinsert_fast_tracepoint_jumps_at): New.
12325 (set_breakpoint_at): Use write_inferior_memory.
12326 (uninsert_raw_breakpoint): Use write_inferior_memory.
12327 (check_mem_read): Mask out fast tracepoint jumps.
12328 (check_mem_write): Mask out fast tracepoint jumps.
12329 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12330 (set_fast_tracepoint_jump): Declare.
12331 (delete_fast_tracepoint_jump)
12332 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12333 (reinsert_fast_tracepoint_jumps_at): Declare.
12334 * regcache.c: Don't compile many functions when building the
12335 in-process agent library.
12336 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12337 the register buffer in the heap.
12338 (free_register_cache): If the register buffer isn't owned by the
12339 regcache, don't free it.
12340 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12341 pre-existing register caches.
12342 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12344 (convert_ascii_to_int): : Constify `from' parameter type.
12345 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12346 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12347 the needed buffer in-place.
12348 (relocate_instruction): New.
12349 * server.c (handle_query) <qSymbols>: If the target supports
12350 tracepoints, give it a chance of looking up symbols. Report
12351 support for fast tracepoints.
12352 (handle_status): Stabilize threads.
12353 (process_serial_event): Adjust.
12354 * server.h (struct fast_tracepoint_jump): Forward declare.
12355 (struct process_info) <fast_tracepoint_jumps>: New field.
12356 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12357 (decode_X_packet, decode_M_packet): Adjust.
12358 (relocate_instruction): Declare.
12359 (in_process_agent_loaded): Declare.
12360 (tracepoint_look_up_symbols): Declare.
12361 (struct fast_tpoint_collect_status): Declare.
12362 (fast_tracepoint_collecting): Declare.
12363 (force_unlock_trace_buffer): Declare.
12364 (handle_tracepoint_bkpts): Declare.
12365 (initialize_low_tracepoint)
12366 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12367 * target.h (struct target_ops) <stabilize_threads,
12368 install_fast_tracepoint_jump_pad>: New fields.
12369 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12370 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12371 [HAVE_STDINT_H]: Include stdint.h.
12372 (trace_debug_1): Rename to ...
12373 (trace_vdebug): ... this.
12374 (trace_debug): Rename to ...
12375 (trace_debug_1): ... this. Add `level' parameter.
12376 (trace_debug): New.
12377 (ATTR_USED, ATTR_NOINLINE): New.
12378 (IP_AGENT_EXPORT): New.
12379 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12380 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12381 (about_to_request_buffer_space, trace_buffer_is_full)
12382 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12383 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12384 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12385 (traceframe_write_count, traceframes_created)
12386 (trace_state_variables)
12387 New renaming defines.
12388 (struct ipa_sym_addresses): New.
12389 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12390 (symbol_list): New.
12391 (ipa_sym_addrs): New.
12392 (all_tracepoint_symbols_looked_up): New.
12393 (in_process_agent_loaded): New.
12394 (write_e_ipa_not_loaded): New.
12395 (maybe_write_ipa_not_loaded): New.
12396 (tracepoint_look_up_symbols): New.
12397 (debug_threads) [IN_PROCESS_AGENT]: New.
12398 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12399 (UNKNOWN_SIDE_EFFECTS): New.
12400 (stop_tracing): New.
12401 (flush_trace_buffer): New.
12402 (stop_tracing_bkpt): New.
12403 (flush_trace_buffer_bkpt): New.
12404 (read_inferior_integer): New.
12405 (read_inferior_uinteger): New.
12406 (read_inferior_data_pointer): New.
12407 (write_inferior_data_pointer): New.
12408 (write_inferior_integer): New.
12409 (write_inferior_uinteger): New.
12410 (struct collect_static_trace_data_action): Delete.
12411 (enum tracepoint_type): New.
12412 (struct tracepoint) <type>: New field `type'.
12413 <actions_str, step_actions, step_actions_str>: Only include in
12415 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12416 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12417 (tracepoints): Use IP_AGENT_EXPORT.
12418 (last_tracepoint): Don't include in the IPA.
12419 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12420 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12421 (alloced_trace_state_variables): New.
12422 (trace_state_variables): Use IP_AGENT_EXPORT.
12423 (traceframe_t): Delete unused variable.
12424 (circular_trace_buffer): Don't include in the IPA.
12425 (trace_buffer_start): Delete.
12426 (struct trace_buffer_control): New.
12427 (trace_buffer_free): Delete.
12428 (struct ipa_trace_buffer_control): New.
12429 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12430 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12432 (trace_buffer_ctrl): New.
12433 (TRACE_BUFFER_CTRL_CURR): New.
12434 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12435 Reimplement as macros.
12436 (trace_buffer_wrap): Delete.
12437 (traceframe_write_count, traceframe_read_count)
12438 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12439 (struct tracepoint_hit_ctx) <type>: New field.
12440 (struct fast_tracepoint_ctx): New.
12441 (memory_barrier): New.
12443 (record_tracepoint_error): Update atomically in the IPA.
12444 (clear_inferior_trace_buffer): New.
12445 (about_to_request_buffer_space): New.
12446 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12447 updating the same buffer.
12448 (add_tracepoint): Default the tracepoint's type to trap
12449 tracepoint, and orig_size to -1.
12450 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12451 internal variables.
12452 (create_trace_state_variable): New parameter `gdb'. Handle it.
12453 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12454 (cmd_qtdp): Handle fast tracepoints.
12455 (cmd_qtdv): Adjust.
12456 (max_jump_pad_size): New.
12457 (gdb_jump_pad_head): New.
12458 (get_jump_space_head): New.
12459 (claim_jump_space): New.
12460 (sort_tracepoints): New.
12461 (MAX_JUMP_SIZE): New.
12462 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12464 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12465 support. Upload fast traceframes, and delete internal IPA
12467 (stop_tracing_handler): New.
12468 (flush_trace_buffer_handler): New.
12469 (cmd_qtstop): Upload fast tracepoints.
12470 (response_tracepoint): Handle fast tracepoints.
12471 (tracepoint_finished_step): Upload fast traceframes. Set the
12472 tracepoint hit context's tracepoint type.
12473 (handle_tracepoint_bkpts): New.
12474 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12475 type. Add comment about fast tracepoints.
12476 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12477 non-existing action_str field.
12478 (get_context_regcache): Handle fast tracepoints.
12479 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12481 (fast_tracepoint_from_jump_pad_address): New.
12482 (fast_tracepoint_from_ipa_tpoint_address): New.
12483 (collecting_t): New.
12484 (force_unlock_trace_buffer): New.
12485 (fast_tracepoint_collecting): New.
12487 (gdb_collect): New.
12488 (write_inferior_data_ptr): New.
12489 (target_tp_heap): New.
12490 (target_malloc): New.
12491 (download_agent_expr): New.
12493 (download_tracepoints): New.
12494 (download_trace_state_variables): New.
12495 (upload_fast_traceframes): New.
12496 (IPA_FIRST_TRACEFRAME): New.
12497 (IPA_NEXT_TRACEFRAME_1): New.
12498 (IPA_NEXT_TRACEFRAME): New.
12499 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12500 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12501 (gdb_jump_pad_buffer_end): New.
12502 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12503 (initialize_tracepoint): Adjust.
12504 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12505 buffer. Initialize the low module.
12506 * utils.c (PREFIX, TOOLNAME): New.
12507 (malloc_failure): Use PREFIX.
12508 (error): In the IPA, an error causes an exit.
12509 (fatal, warning): Use PREFIX.
12510 (internal_error): Use TOOLNAME.
12511 (NUMCELLS): Increase to 10.
12512 * configure, config.in: Regenerate.
12514 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12516 * server.c (handle_query) <qSupported>: Do two passes over the
12517 qSupported string to avoid nesting strtok.
12519 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12521 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12523 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12524 -Wl,--dynamic-list.
12525 * configure: Regenerate.
12526 * proc-service.list: New.
12528 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12530 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12533 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12535 * gdbreplay.c (remote_open): Check error return from socket() call by
12536 its equality to -1 not by it being negative.
12537 * remote-utils.c (remote_open): Likewise.
12539 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12541 * config.h: Regenerate.
12543 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12545 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12546 doesn't provide PTRACE_GET_THREAD_AREA.
12548 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12550 * linux-m68k-low.c: Include <asm/ptrace.h>
12551 (ps_get_thread_area): Implement.
12553 2010-05-03 Doug Evans <dje@google.com>
12555 * event-loop.c (struct callback_event): New struct.
12556 (callback_list): New global.
12557 (append_callback_event, delete_callback_event): New functions.
12558 (process_callback): New function.
12559 (start_event_loop): Call it.
12560 * remote-utils.c (NOT_SCHEDULED): Define.
12561 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12562 moved out of readchar.
12563 (readchar): Rewrite. Call reschedule before returning.
12564 (reset_readchar): New function.
12565 (remote_close): Call it.
12566 (process_remaining, reschedule): New functions.
12567 * server.h (callback_handler_func): New typedef.
12568 (append_callback_event, delete_callback_event): Declare.
12570 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12572 * proc-service.c (ps_pglobal_lookup): Use
12573 thread_db_look_up_one_symbol.
12574 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12575 parameter. Use it instead of all_symbols_looked_up.
12576 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12578 (all_symbols_looked_up): Don't declare.
12579 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12580 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12582 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12583 Set all_symbols_looked_up here.
12584 (thread_db_look_up_one_symbol): New.
12585 (thread_db_get_tls_address): Adjust.
12586 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12587 thread_db object on the heap, and tentatively set it in the
12589 (thread_db_init): Don't set all_symbols_looked_up here.
12590 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12592 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12594 * linux-low.c (linux_kill, linux_detach): Adjust.
12595 (status_pending_p_callback): Remove redundant statement. Check
12596 for !TARGET_WAITIKIND_IGNORE, instead of
12597 TARGET_WAITKIND_STOPPED.
12598 (handle_tracepoints): Make sure LWP is locked. Adjust.
12599 (linux_wait_for_event_1): Adjust.
12600 (linux_cancel_breakpoints): New.
12601 (unsuspend_one_lwp): New.
12602 (unsuspend_all_lwps): New.
12603 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12604 (send_sigstop_callback): Change return type to int, add new
12605 `except' parameter and handle it.
12606 (suspend_and_send_sigstop_callback): New.
12607 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12608 pass them down. If SUSPEND, also increment the lwp's suspend
12610 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12611 (need_step_over_p): Don't consider suspended LWPs.
12612 (start_step_over): Adjust.
12613 (proceed_one_lwp): Change return type to int, add new `except'
12614 parameter and handle it.
12615 (unsuspend_and_proceed_one_lwp): New.
12616 (proceed_all_lwps): Use find_inferior instead of
12618 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12619 also decrement the suspend count of LWPs. Pass `except' down,
12620 instead of hacking its suspend count.
12621 (linux_pause_all): Add `freeze' parameter. Adjust.
12622 (linux_unpause_all): New.
12623 (linux_target_ops): Install linux_unpause_all.
12624 * server.c (handle_status): Adjust.
12625 * target.h (struct target_ops): New fields `unpause_all' and
12626 `cancel_breakpoints'. Add new parameter to `pause_all'.
12627 (pause_all): Add new `freeze' parameter.
12628 (unpause_all): New.
12629 (cancel_breakpoints): New.
12630 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12631 cancel breakpoints.
12632 (cmd_qtstart): Pause threads.
12633 (stop_tracing): Pause threads, and cancel breakpoints.
12634 * win32-low.c (win32_target_ops): Adjust.
12636 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12638 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12639 the inferior right away from here...
12640 (linux_wait_1): ... to here, and adjust to check the thread's
12641 last_resume_kind instead of the lwp's step or stop_expected flags.
12643 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12645 * README: Use consistent `GDB' and `GDBserver' spellings.
12647 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12649 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12650 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12651 (linux_detach_one_lwp): Assume the lwp is stopped.
12652 (any_thread_of): Delete.
12653 (linux_detach): Stop all lwps here. Don't blindly delete all
12655 (delete_lwp_callback): New.
12656 (linux_mourn): Delete all lwps of the process that is gone.
12657 (linux_wait_1): Don't delete the last lwp of the process here.
12658 * mem-break.h (mark_breakpoints_out): Declare.
12659 * mem-break.c (mark_breakpoints_out): New.
12660 (free_all_breakpoints): Use it.
12661 * server.c (handle_target_event): If the process is gone, mark
12663 * thread-db.c (struct thread_db) <create_bp>: New field.
12664 (thread_db_enable_reporting): Fix prototype. Store a thread event
12665 breakpoint reference in the thread_db struct.
12666 (thread_db_load_search): Clear the thread_db object.
12667 (try_thread_db_load_1): Ditto.
12668 (switch_to_process): New.
12669 (disable_thread_event_reporting): Use it.
12670 (remove_thread_event_breakpoints): New.
12671 (thread_db_detach, thread_db_mourn): Use it.
12673 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12675 * linux-low.c (linux_enable_event_reporting): New.
12676 (linux_wait_for_event_1, handle_extended_wait): Use it.
12678 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12680 * linux-low.c (linux_kill_one_lwp, linux_kill)
12681 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12682 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12683 SIGSTOP even if the LWP is stopped.
12684 (send_sigstop_callback): New.
12685 (stop_all_lwps): Use send_sigstop_callback instead.
12686 (linux_resume_one_thread): Adjust.
12687 (proceed_one_lwp): Still proceed an LWP that the client has
12688 requested to stop, if we haven't reported it as stopped yet. Make
12689 sure that LWPs the client want stopped, have a pending SIGSTOP.
12691 2010-04-26 Doug Evans <dje@google.com>
12693 * server.c (handle_general_set): Make static.
12695 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12696 Print received char after testing for error/eof instead of before.
12697 (input_interrupt): Tweak comment.
12699 2010-04-23 Doug Evans <dje@google.com>
12701 * server.c (start_inferior): Print inferior argv if --debug.
12703 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12705 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12706 * nto-x86-low.c: Include server.h
12708 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12710 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12711 be consistent with other sources of this directory.
12712 (init_registers_amd64): Correct name of source file of this function
12715 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12717 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12718 64-bit executables.
12720 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12722 * win32-i386-low.c: Add 64-bit support.
12723 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12724 (init_registers_amd64): Declare.
12725 (mappings): Add 64-bit version of array.
12726 (init_windows_x86): New function.
12727 (the_low_target): Change init_arch field to init_windows_x86.
12729 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12731 * win32-low.c: Adapt to support also 64-bit architecture.
12732 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12733 (get_image_name): Use SIZE_T type for local variable `done'.
12734 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12735 (toolhelp_get_dll_name): Idem.
12736 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12737 Use uintptr_t typecast to avoid warning.
12738 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12739 (handle_exception): Use phex_nz to avoid warning.
12740 (win32_wait): Remove unused local variable `process'.
12742 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12744 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12747 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12749 * configure.ac: Use `ws2_32' library for srv_mingw.
12750 * configure: Regenerate.
12751 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12752 * remote-utils.c: Likewise.
12754 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12756 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12757 if __x86_64__ is defined.
12759 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12761 * configure: Regenerate.
12763 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12765 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12766 * target.h (target_ops): New get_tib_address field.
12767 * win32-low.h (win32_thread_info): Add thread_local_base field.
12768 * win32-low.c (child_add_thread): Add tlb argument.
12769 Set thread_local_base field to TLB.
12770 (get_child_debug_event): Adapt to child_add_thread change.
12771 (win32_get_tib_address): New function.
12772 (win32_target_ops): Set get_tib_address field to
12773 win32_get_tib_address.
12774 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12776 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12778 * linux-low.c (linux_mourn): Also remove the process.
12779 * server.c (handle_target_event): Don't remove the process here.
12780 * nto-low.c (nto_mourn): New.
12781 (nto_target_ops): Install it.
12782 * spu-low.c (spu_mourn): New.
12783 (spu_target_ops): Install it.
12784 * win32-low.c (win32_mourn): New.
12785 (win32_target_ops): Install it.
12787 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12789 * server.h (buffer_xml_printf): Remove redundant `;'.
12791 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12793 * regcache.c (set_register_cache): Invalidate regcaches before
12794 changing the register cache layout.
12795 (regcache_invalidate_one): Allow a NULL regcache.
12796 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12797 regcaches before changing the register cache layout or the target
12800 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12802 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12803 variable warning on Linux/x86-64.
12805 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12807 GDBserver disconnected tracing support.
12809 * linux-low.c (linux_remove_process): Delete.
12810 (add_lwp): Don't set last_resume_kind here.
12811 (linux_kill): Use `mourn'.
12812 (linux_detach): Use `thread_db_detach', and `mourn'.
12813 (linux_mourn): New.
12814 (linux_attach_lwp_1): Adjust comment.
12815 (linux_attach): last_resume_kind moved the thread_info; adjust.
12816 (status_pending_p_callback): Adjust.
12817 (linux_wait_for_event_1): Adjust.
12818 (count_events_callback, select_singlestep_lwp_callback)
12819 (select_event_lwp_callback, cancel_breakpoints_callback)
12820 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12821 (proceed_one_lwp): Adjust.
12822 (linux_async): Add debug output.
12823 (linux_thread_stopped): New.
12824 (linux_pause_all): New.
12825 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12827 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12828 (thread_db_free): Delete declaration.
12829 (thread_db_detach, thread_db_mourn): Declare.
12830 * thread-db.c (thread_db_init): Use thread_db_mourn.
12831 (thread_db_free): Delete, split in two.
12832 (disable_thread_event_reporting): New.
12833 (thread_db_detach): New.
12834 (thread_db_mourn): New.
12836 * server.h (struct thread_info) <last_resume_kind>: New field.
12837 <attached>: Add comment.
12838 <gdb_detached>: New field.
12839 (handler_func): Change return type to int.
12840 (handle_serial_event, handle_target_event): Ditto.
12841 (gdb_connected): Declare.
12843 (disconnected_tracing): Declare.
12844 (stop_tracing): Declare.
12846 * server.c (handle_query) <qSupported>: Report support for
12847 disconnected tracing.
12848 (queue_stop_reply_callback): Account for running threads.
12849 (gdb_wants_thread_stopped): New.
12850 (gdb_wants_all_threads_stopped): New.
12851 (gdb_reattached_process): New.
12852 (handle_status): Clear the `gdb_detached' flag of all processes.
12853 In all-stop, stop all threads.
12854 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12855 (process_serial_event): If the remote connection breaks, or if an
12856 exit was forced with "monitor exit", force an event loop exit.
12857 Handle disconnected tracing on detach.
12858 (handle_serial_event): Adjust.
12859 (handle_target_event): If GDB isn't connected, forward events back
12860 to the inferior, unless the last process exited, in which case,
12861 exit gdbserver. Adjust interface.
12863 * remote-utils.c (remote_open): Don't block in accept. Instead
12864 register an event loop source on the listen socket file
12865 descriptor. Refactor bits into ...
12866 (listen_desc): ... this new global.
12867 (gdb_connected): ... this new function.
12868 (enable_async_notification): ... this new function.
12869 (handle_accept_event): ... this new function.
12870 (remote_close): Clear remote_desc.
12872 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12874 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12876 (mourn_inferior): Define.
12877 (target_process_qsupported): Avoid the dangling else problem.
12878 (thread_stopped): Define.
12879 (pause_all): Define.
12880 (target_waitstatus_to_string): Declare.
12881 * target.c (target_waitstatus_to_string): New.
12883 * tracepoint.c (tracing): Make extern.
12884 (disconnected_tracing): New.
12885 (stop_tracing): Make extern. Handle tracing stops due to GDB
12887 (cmd_qtdisconnected): New.
12888 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12889 (handle_tracepoint_general_set): Handle QTDisconnected.
12891 * event-loop.c (event_handler_func): Change return type to int.
12892 (process_event): Bail out if the event handler wants the event
12894 (handle_file_event): Ditto.
12895 (start_event_loop): Bail out if the event handler wants the event
12898 * nto-low.c (nto_target_ops): Adjust.
12899 * spu-low.c (spu_wait): Don't remove the process here.
12900 (spu_target_ops): Adjust.
12901 * win32-low.c (win32_wait): Don't remove the process here.
12902 (win32_target_ops): Adjust.
12904 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12906 * regcache.c (realloc_register_cache): Invalidate inferior's
12907 regcache before recreating it.
12909 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12911 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12913 2010-04-09 Stan Shebs <stan@codesourcery.com>
12914 Pedro Alves <pedro@codesourcery.com>
12916 * server.h (LONGEST): New.
12917 (struct thread_info) <while_stepping>: New field.
12918 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12920 (initialize_tracepoint, handle_tracepoint_general_set)
12921 (handle_tracepoint_query, tracepoint_finished_step)
12922 (tracepoint_was_hit, release_while_stepping_state_list):
12923 (current_traceframe): Declare.
12924 * server.c (handle_general_set): Handle tracepoint packets.
12925 (read_memory): New.
12926 (write_memory): New.
12927 (handle_search_memory_1): Use read_memory.
12928 (handle_query): Report support for conditional tracepoints, trace
12929 state variables, and tracepoint sources. Handle tracepoint
12931 (main): Initialize the tracepoints module.
12932 (process_serial_event): Handle traceframe reads/writes.
12934 * linux-low.c (handle_tracepoints): New.
12935 (linux_wait_1): Call it.
12936 (linux_resume_one_lwp): Handle while-stepping.
12937 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12938 (linux_target_ops): Install them.
12939 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12941 * linux-x86-low.c (x86_supports_tracepoints): New.
12942 (the_low_target). Install it.
12944 * mem-break.h (delete_breakpoint): Declare.
12945 * mem-break.c (delete_breakpoint): Make external.
12947 * target.h (struct target_ops): Add `supports_tracepoints',
12948 `read_pc', and `write_pc' fields.
12949 (target_supports_tracepoints): Define.
12950 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12953 * regcache.h (struct regcache) <registers_owned>: New field.
12954 (init_register_cache, regcache_cpy): Declare.
12955 (regcache_read_pc, regcache_write_pc): Declare.
12956 (register_cache_size): Declare.
12957 (supply_regblock): Declare.
12958 * regcache.c (init_register_cache): New.
12959 (new_register_cache): Use it.
12960 (regcache_cpy): New.
12961 (register_cache_size): New.
12962 (supply_regblock): New.
12963 (regcache_read_pc, regcache_write_pc): New.
12965 * tracepoint.c: New.
12967 * Makefile.in (OBS): Add tracepoint.o.
12968 (tracepoint.o): New rule.
12970 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12972 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12974 (i386-mmx.c): Likewise.
12975 (i386-mmx-linux.o): Likewise.
12976 (i386-mmx-linux.c): Likewise.
12978 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12979 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12980 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12981 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12983 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12984 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12985 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12987 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12989 * Makefile.in (clean): Updated.
12991 (i386-avx.c): Likewise.
12992 (i386-avx-linux.o): Likewise.
12993 (i386-avx-linux.c): Likewise.
12994 (amd64-avx.o): Likewise.
12995 (amd64-avx.c): Likewise.
12996 (amd64-avx-linux.o): Likewise.
12997 (amd64-avx-linux.c): Likewise.
12999 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13000 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13001 (srv_amd64_regobj): Add amd64-avx.o.
13002 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13003 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13004 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13005 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13006 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13007 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13008 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13010 * i387-fp.c: Include "i386-xstate.h".
13012 (i387_cache_to_xsave): Likewise.
13013 (i387_xsave_to_cache): Likewise.
13014 (x86_xcr0): Likewise.
13016 * i387-fp.h (i387_cache_to_xsave): Likewise.
13017 (i387_xsave_to_cache): Likewise.
13018 (x86_xcr0): Likewise.
13020 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13021 * linux-crisv32-low.c (target_regsets): Likewise.
13022 * linux-m68k-low.c (target_regsets): Likewise.
13023 * linux-mips-low.c (target_regsets): Likewise.
13024 * linux-ppc-low.c (target_regsets): Likewise.
13025 * linux-s390-low.c (target_regsets): Likewise.
13026 * linux-sh-low.c (target_regsets): Likewise.
13027 * linux-sparc-low.c (target_regsets): Likewise.
13028 * linux-xtensa-low.c (target_regsets): Likewise.
13030 * linux-low.c: Include <sys/uio.h>.
13031 (regsets_fetch_inferior_registers): Support nt_type.
13032 (regsets_store_inferior_registers): Likewise.
13033 (linux_process_qsupported): New.
13034 (linux_target_ops): Add linux_process_qsupported.
13036 * linux-low.h (regset_info): Add nt_type.
13037 (linux_target_ops): Add process_qsupported.
13039 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13041 (init_registers_i386_avx_linux): New.
13042 (init_registers_amd64_avx_linux): Likewise.
13043 (xmltarget_i386_linux_no_xml): Likewise.
13044 (xmltarget_amd64_linux_no_xml): Likewise.
13045 (PTRACE_GETREGSET): Likewise.
13046 (PTRACE_SETREGSET): Likewise.
13047 (x86_fill_xstateregset): Likewise.
13048 (x86_store_xstateregset): Likewise.
13049 (use_xml): Likewise.
13050 (x86_linux_update_xmltarget): Likewise.
13051 (x86_linux_process_qsupported): Likewise.
13052 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13053 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13054 init_registers_i386_linux here. Call
13055 x86_linux_update_xmltarget.
13056 (the_low_target): Add x86_linux_process_qsupported.
13058 * server.c (handle_query): Call target_process_qsupported.
13060 * target.h (target_ops): Add process_qsupported.
13061 (target_process_qsupported): New.
13063 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13065 * inferiors.c (add_thread): Set last_status kind to
13066 TARGET_WAITKIND_IGNORE.
13067 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13068 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13069 (linux_wait_1): Move `thread' local definition to block that uses
13070 it. Don't NULL initialize `event_child'.
13071 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13072 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13073 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13075 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13077 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13078 an extended waitstatus, or by a watchpoint.
13079 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13080 thread was stepping or has been stopped by a watchpoint.
13082 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13084 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13085 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13086 of another, then delete the previous, and validate all
13088 (validate_inserted_breakpoint): New.
13089 (delete_disabled_breakpoints): New.
13090 (validate_breakpoints): New.
13091 (check_mem_read): Validate breakpoints before trusting their
13092 shadow. Delete disabled breakpoints.
13093 (check_mem_write): Validate breakpoints before trusting they
13094 should be inserted. Delete disabled breakpoints.
13095 * mem-break.h (validate_breakpoints):
13096 * server.c (handle_query): Validate breakpoints when we see a
13099 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13101 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13102 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13103 if we could tell there's a GDB breakpoint at stop_pc.
13104 (need_step_over_p): Don't do a step over if we find a GDB
13105 breakpoint at the resume PC.
13107 * mem-break.c (struct raw_breakpoint): New.
13108 (enum bkpt_type): New type `gdb_breakpoint'.
13109 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13110 fields. New field `raw'.
13111 (find_raw_breakpoint_at): New.
13112 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13113 breakpoint instead.
13114 (set_breakpoint_at): Adjust.
13115 (delete_raw_breakpoint): New.
13116 (release_breakpoint): New.
13117 (delete_breakpoint): Rename to...
13118 (delete_breakpoint_1): ... this. Add proc parameter. Use
13119 release_breakpoint. Return ENOENT.
13120 (delete_breakpoint): Reimplement.
13121 (find_breakpoint_at): Delete.
13122 (find_gdb_breakpoint_at): New.
13123 (delete_breakpoint_at): Delete.
13124 (set_gdb_breakpoint_at): New.
13125 (delete_gdb_breakpoint_at): New.
13126 (gdb_breakpoint_here): New.
13127 (set_reinsert_breakpoint): Use release_breakpoint.
13128 (uninsert_breakpoint): Rename to ...
13129 (uninsert_raw_breakpoint): ... this.
13130 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13131 (reinsert_raw_breakpoint): Change parameter type to
13133 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13135 (check_breakpoints): Adjust. Use release_breakpoint.
13136 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13137 (breakpoint_inserted_here): Ditto.
13138 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13139 Don't trust the breakpoint's shadow if it is not inserted.
13140 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13141 (delete_all_breakpoints): Adjust.
13142 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13143 use delete_breakpoint_1.
13145 * mem-break.h (breakpoints_supported): Delete declaration.
13146 (set_gdb_breakpoint_at): Declare.
13147 (gdb_breakpoint_here): Declare.
13148 (delete_breakpoint_at): Delete.
13149 (delete_gdb_breakpoint_at): Declare.
13151 * server.h (struct raw_breakpoint): Forward declare.
13152 (struct process_info): New field `raw_breakpoints'.
13154 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13157 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13159 * linux-low.c (status_pending_p_callback): Fix comment.
13160 (linux_wait_for_event_1): Move most of the internal breakpoint
13161 handling from here...
13162 (linux_wait_1): ... to here.
13163 (count_events_callback): New.
13164 (select_singlestep_lwp_callback): New.
13165 (select_event_lwp_callback): New.
13166 (cancel_breakpoints_callback): New.
13167 (select_event_lwp): New.
13168 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13169 priority to all LWPs that have had events that should be reported
13170 to the client. Cancel breakpoints when about to reporting the
13171 event to the client, not while stopping lwps. No longer cancel
13172 finished single-steps here.
13173 (cancel_finished_single_step): Delete.
13174 (cancel_finished_single_steps): Delete.
13176 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13178 * mem-break.c (enum bkpt_type): New.
13179 (struct breakpoint): New field `type'.
13180 (set_breakpoint_at): Change return type to struct breakpoint
13181 pointer. Set type to `other_breakpoint' by default.
13182 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13183 in the breakpoint list.
13184 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13185 (reinsert_breakpoint): Rename to ...
13186 (reinsert_raw_breakpoint): ... this.
13187 (reinsert_breakpoints_at): Adjust.
13188 * mem-break.h (struct breakpoint): Declare.
13189 (set_breakpoint_at): Change return type to struct breakpoint
13192 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13194 * server.c (handle_query): Assign, not compare.
13196 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13198 Teach linux gdbserver to step-over-breakpoints.
13200 * linux-low.c (can_hardware_single_step): New.
13201 (supports_breakpoints): New.
13202 (handle_extended_wait): If stopping threads, read the stop pc of
13203 the new cloned LWP.
13205 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13206 low target doesn't support retrieving the PC.
13207 (add_lwp): Set last_resume_kind to resume_continue.
13208 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13209 (linux_attach): Don't clear stop_expected. Set the lwp's
13210 last_resume_kind to resume_stop.
13211 (linux_detach_one_lwp): Don't check for removed breakpoints.
13212 (check_removed_breakpoint): Delete.
13213 (status_pending_p): Rename to ...
13214 (status_pending_p_callback): ... this. Don't check for removed
13215 breakpoints. Don't consider threads that are stopped from GDB's
13217 (linux_wait_for_lwp): Always read the stop_pc here.
13218 (cancel_breakpoint): New.
13219 (step_over_bkpt): New global.
13220 (linux_wait_for_event_1): Implement stepping over breakpoints.
13221 (gdb_wants_lwp_stopped): New.
13222 (gdb_wants_all_stopped): New.
13223 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13224 single-step traps here. Store the thread's last reported target
13226 (send_sigstop): Don't clear stop_expected. Always set it,
13228 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13229 (cancel_finished_single_step): New.
13230 (cancel_finished_single_steps): New.
13231 (wait_for_sigstop): Don't cancel finished single-step traps here.
13232 (linux_resume_one_lwp): Don't check for removed breakpoints.
13233 Don't set `step' on non-hardware step archs.
13234 (linux_set_resume_request): Ignore resume_stop requests if already
13235 stopping or stopped. Set the lwp's last_resume_kind.
13236 (resume_status_pending_p): Don't check for removed breakpoints.
13237 (need_step_over_p): New.
13238 (start_step_over): New.
13239 (finish_step_over): New.
13240 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13241 requests. Clear the thread's last reported target waitstatus.
13242 Don't use the `suspended' flag. Don't consider pending breakpoints.
13243 (linux_resume): Start a step-over if necessary.
13244 (proceed_one_lwp): New.
13245 (proceed_all_lwps): New.
13246 (unstop_all_lwps): New.
13247 * linux-low.h (struct lwp_info): Rewrite comment for the
13248 `suspended' flag. Add the `stop_pc' field. Delete the
13249 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13250 Add `'last_resume_kind' and `need_step_over' fields.
13251 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13252 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13253 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13254 (set_raw_breakpoint_at): New.
13255 (set_breakpoint_at): Rewrite to use it.
13256 (reinsert_breakpoint_handler): Delete.
13257 (set_reinsert_breakpoint): New.
13258 (reinsert_breakpoint_by_bp): Delete.
13259 (delete_reinsert_breakpoints): New.
13260 (uninsert_breakpoint): Rewrite.
13261 (uninsert_breakpoints_at): New.
13262 (reinsert_breakpoint): Rewrite.
13263 (reinsert_breakpoints_at): New.
13264 (check_breakpoints): Rewrite.
13265 (breakpoint_here): New.
13266 (breakpoint_inserted_here): New.
13267 (check_mem_read): Adjust.
13268 * mem-break.h (breakpoints_supported, breakpoint_here)
13269 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13270 (reinsert_breakpoint_by_bp): Delete declaration.
13271 (delete_reinsert_breakpoints): Declare.
13272 (reinsert_breakpoint): Delete declaration.
13273 (reinsert_breakpoints_at): Declare.
13274 (uninsert_breakpoint): Delete declaration.
13275 (uninsert_breakpoints_at): Declare.
13276 (check_breakpoints): Adjust prototype.
13277 * server.h: Adjust include order.
13278 (struct thread_info): Declare here. Add a `last_status' field.
13280 2010-03-23 Michael Snyder <msnyder@vmware.com>
13282 * server.c (crc32): New function.
13283 (handle_query): Add handling for 'qCRC:' request.
13285 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13287 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13288 lwp had been stopped by a watchpoint.
13290 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13292 * server.h (internal_error): Declare.
13293 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13294 * utils.c (internal_error): New function.
13296 2010-03-15 Andreas Schwab <schwab@redhat.com>
13298 * configure.srv: Fix typo setting srv_regobj.
13300 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13302 * linux-low.c (fetch_register): Avoid passing a non string literal
13304 (usr_store_inferior_registers): Ditto.
13306 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13308 * linux-low.c (linux_write_memory): Bail out early if peeking
13311 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13313 * linux-low.h (struct lwp_info): New fields
13314 `stopped_by_watchpoint' and `stopped_data_address'.
13315 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13316 here, and cache them in the lwp object.
13317 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13319 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13321 (linux_stopped_by_watchpoint): Rewrite.
13322 (linux_stopped_data_address): Rewrite.
13324 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13326 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13327 switching the current inferior, not before.
13329 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13331 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13332 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13333 i386-linux.c and amd64-linux.c.
13334 (reg-i386.o): Removed.
13335 (reg-i386.c): Likewise.
13336 (reg-i386-linux.o): Likewise.
13337 (reg-i386-linux.c): Likewise.
13338 (reg-x86-64.o): Likewise.
13339 (reg-x86-64.c): Likewise.
13340 (reg-x86-64-linux.o): Likewise.
13341 (reg-x86-64-linux.c): Likewise.
13343 (i386.c): Likewise.
13344 (i386-linux.o): Likewise.
13345 (i386-linux.c): Likewise.
13346 (amd64.o): Likewise.
13347 (amd64.c): Likewise.
13348 (amd64-linux.o): Likewise.
13349 (amd64-linux.c): Likewise.
13351 * configure.srv (srv_i386_regobj): New.
13352 (srv_i386_linux_regobj): Likewise.
13353 (srv_amd64_regobj): Likewise.
13354 (srv_amd64_linux_regobj): Likewise.
13355 (srv_i386_32bit_xmlfiles): Likewise.
13356 (srv_i386_64bit_xmlfiles): Likewise.
13357 (srv_i386_xmlfiles): Likewise.
13358 (srv_amd64_xmlfiles): Likewise.
13359 (srv_i386_linux_xmlfiles): Likewise.
13360 (srv_amd64_linux_xmlfiles): Likewise.
13361 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13362 srv_xmlfiles to $srv_i386_xmlfiles.
13363 (i[34567]86-*-mingw32ce*): Likewise.
13364 (i[34567]86-*-mingw*): Likewise.
13365 (i[34567]86-*-nto*): Likewise.
13366 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13367 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13368 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13369 (x86_64-*-linux*): Likewise.
13371 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13372 (init_registers_amd64_linux): New.
13373 (x86_arch_setup): Replace init_registers_x86_64_linux with
13374 init_registers_amd64_linux.
13376 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13378 * configure.ac: Check for libdl. If it is not available link against
13379 static libthread_db.
13380 * configure: Regenerate.
13382 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13386 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13387 handing a read watchpoint.
13388 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13390 2010-02-12 Doug Evans <dje@google.com>
13392 * linux-low.c (linux_supports_tracefork_flag): Document.
13393 (linux_look_up_symbols): Add comment.
13395 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13397 * regcache.c (supply_register): Clear regcache if buf is NULL.
13399 2010-02-02 Nicolas Roche <roche@sourceware.org>
13400 Joel Brobecker <brobecker@adacore.com>
13402 * inferiors.c (find_inferior): Add function documentation.
13403 (unloaded_dll): Handle the case where the unloaded dll has not
13404 been previously registered in the dll list.
13406 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13408 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13409 (thumb2_breakpoint): New.
13410 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13412 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13414 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13415 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13418 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13420 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13422 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13424 * linux-s390-low.c (s390_collect_ptrace_register)
13425 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13427 2010-01-21 Doug Evans <dje@google.com>
13429 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13430 (PTRACE_ARG4_TYPE): New macro.
13431 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13432 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13433 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13434 (usr_store_inferior_registers): Ditto.
13435 (linux_read_memory, linux_write_memory): Ditto.
13436 (linux_test_for_tracefork): Ditto.
13438 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13439 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13441 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13443 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13446 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13448 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13449 prototype to take a regcache. Adjust.
13451 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13453 * regcache.h (struct thread_info): Forward declare.
13454 (struct regcache): New.
13455 (new_register_cache): Adjust prototype.
13456 (get_thread_regcache): Declare.
13457 (free_register_cache): Adjust prototype.
13458 (registers_to_string, registers_from_string): Ditto.
13459 (supply_register, supply_register_by_name, collect_register)
13460 (collect_register_as_string, collect_register_by_name): Ditto.
13461 * regcache.c (struct inferior_regcache_data): Delete.
13462 (get_regcache): Rename to ...
13463 (get_thread_regcache): ... this. Adjust. Switch inferior before
13464 fetching registers.
13465 (regcache_invalidate_one): Adjust.
13466 (regcache_invalidate): Fix prototype.
13467 (new_register_cache): Return the new register cache.
13468 (free_register_cache): Change prototype.
13469 (realloc_register_cache): Adjust.
13470 (registers_to_string): Change prototype to take a regcache. Adjust.
13471 (registers_from_string): Ditto.
13472 (register_data): Ditto.
13473 (supply_register): Ditto.
13474 (supply_register_by_name): Ditto.
13475 (collect_register): Ditto.
13476 (collect_register_as_string): Ditto.
13477 (collect_register_by_name): Ditto.
13478 * server.c (process_serial_event): Adjust.
13479 * linux-low.h (regset_fill_func, regset_store_func): Change
13481 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13483 * linux-low.c (get_stop_pc): Adjust.
13484 (check_removed_breakpoint): Adjust.
13485 (linux_wait_for_event): Adjust.
13486 (linux_resume_one_lwp): Adjust.
13487 (fetch_register): Add regcache parameter. Adjust.
13488 (usr_store_inferior_registers): Ditto.
13489 (regsets_fetch_inferior_registers): Ditto.
13490 (regsets_store_inferior_registers): Ditto.
13491 (linux_fetch_registers, linux_store_registers): Ditto.
13492 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13494 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13496 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13497 prototype to take a regcache.
13498 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13499 * remote-utils.c (convert_ascii_to_int, outreg)
13500 (prepare_resume_reply): Change prototype to take a regcache.
13502 * target.h (struct target_ops) <fetch_registers, store_registers>:
13503 Change prototype to take a regcache.
13504 (fetch_inferior_registers, store_inferior_registers): Change
13505 prototype to take a regcache. Adjust.
13506 * proc-service.c (ps_lgetregs): Adjust.
13507 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13508 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13509 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13510 take a regcache. Adjust.
13511 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13512 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13513 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13514 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13515 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13516 (cris_cannot_fetch_register):
13517 (cris_breakpoint_at): Change prototype to take a regcache.
13519 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13520 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13521 to take a regcache. Adjust.
13522 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13524 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13525 take a regcache. Adjust.
13526 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13527 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13528 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13529 * linux-mips-low.c (mips_get_pc):
13530 (mips_set_pc): Change prototype to take a regcache. Adjust.
13531 (mips_reinsert_addr): Adjust.
13532 (mips_collect_register): Change prototype to take a regcache.
13534 (mips_supply_register):
13535 (mips_collect_register_32bit, mips_supply_register_32bit)
13536 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13537 (mips_store_fpregset): Ditto.
13538 * linux-ppc-low.c (ppc_supply_ptrace_register)
13539 (ppc_supply_ptrace_register): Ditto.
13540 (parse_spufs_run): Adjust.
13541 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13542 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13543 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13544 take a regcache. Adjust.
13545 * linux-s390-low.c (s390_collect_ptrace_register)
13546 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13547 (s390_set_pc): Change prototype to take a regcache. Adjust.
13548 (s390_arch_setup): Adjust.
13549 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13550 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13551 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13552 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13553 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13555 (sparc_breakpoint_at): Adjust.
13556 * linux-xtensa-low.c (xtensa_fill_gregset):
13557 (xtensa_store_gregset):
13558 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13559 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13560 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13561 prototype to take a regcache. Adjust.
13562 * win32-arm-low.c (arm_fetch_inferior_register)
13563 (arm_store_inferior_register): Change prototype to take a
13565 * win32-i386-low.c (i386_fetch_inferior_register)
13566 (i386_store_inferior_register): Change prototype to take a
13568 * win32-low.c (child_fetch_inferior_registers)
13569 (child_store_inferior_registers): Change prototype to take a
13571 (win32_wait): Adjust.
13572 (win32_fetch_inferior_registers): Change prototype to take a
13574 (win32_store_inferior_registers): Adjust.
13575 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13576 store_inferior_register>: Change prototype to take a regcache.
13578 2010-01-20 Doug Evans <dje@google.com>
13580 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13582 (linux_wait_for_event1, linux_init_signals): Ditto.
13583 (W_STOPCODE): Provide definition if missing.
13585 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13587 * linux-low.c (linux_core_of_thread): New.
13588 (compare_ints, show_process, list_threads): New.
13589 (linux_qxfer_osdata): Report threads and cores.
13590 (linux_target_op): Register linux_core_of_thread.
13591 * remote-utils.c (prepare_resume_reply): Report the core.
13592 (buffer_xml_printf): Support %d specifier.
13593 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13595 (handle_query): Handle qXfer:threads. Announce availability
13597 * target.h (struct target_ops): New field core_of_thread.
13599 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13601 * Makefile.in (clean): Remove new generated files.
13602 (reg-s390.o, reg-s390.c): Remove rules.
13603 (reg-s390x.o, reg-s390x.c): Likewise.
13604 (s390-linux32.o, s390-linux32.c): Add rules.
13605 (s390-linux64.o, s390-linux64.c): Likewise.
13606 (s390x-linux64.o, s390x-linux64.c): Likewise.
13607 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13608 * linux-s390-low.c: Include <elf.h>.
13609 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13610 (init_registers_s390): Remove prototype.
13611 (init_registers_s390x): Likewise.
13612 (init_registers_s390_linux32): Add prototype.
13613 (init_registers_s390_linux64): Likewise.
13614 (init_registers_s390x_linux64): Likewise.
13615 (s390_num_regs_3264): New define.
13616 (s390_regmap_3264): New global variable.
13617 (s390_cannot_fetch_register): Remove obsolete check.
13618 (s390_cannot_store_register): Likewise.
13619 (s390_collect_ptrace_register): Handle upper/lower register halves.
13620 (s390_supply_ptrace_register): Likewise.
13621 (s390_fill_gregset): Update to register number changes.
13622 (s390_get_hwcap): New routine.
13623 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13624 Install appropriate regmap and register set.
13626 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13628 * server.c (gdbserver_version): Update copyright year to 2010.
13629 * gdbreplay.c (gdbreplay_version): Likewise.
13631 2009-12-28 Doug Evans <dje@google.com>
13633 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13634 elf/external.h. Include <elf.h> instead but only if necessary.
13636 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13638 * linux-low.c (linux_remove_process): Remove `detaching'
13639 parameter. Don't release/detach from thread_db here.
13640 (linux_kill): Release/detach from thread_db here, ...
13641 (linux_detach): ... and here, before actually detaching.
13642 (linux_wait_1): ... and here, when a process exits.
13643 * thread-db.c (any_thread_of): New.
13644 (thread_db_free): Switch the current inferior to a thread of the
13647 2009-12-21 Doug Evans <dje@google.com>
13649 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13651 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13652 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13653 warning ifndef __NR_tkill. Move setting of errno there too.
13654 Delete unnecessary resetting of errno after syscall.
13655 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13657 * configure.ac: Check for dladdr.
13658 * config.in: Regenerate.
13659 * configure: Regenerate.
13660 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13661 (try_thread_db_load): Update.
13663 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13665 2009-12-18 Doug Evans <dje@google.com>
13667 * event-loop.c: Include unistd.h if it exists.
13669 * linux-low.c (my_waitpid): Move definition away from being in
13670 between linux_tracefork_child/linux_test_for_tracefork.
13672 * gdb_proc_service.h (psaddr_t): Fix type.
13673 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13674 signature to match glibc.
13676 2009-12-16 Doug Evans <dje@google.com>
13678 * linux-low.c (linux_read_memory): Fix argument to read.
13680 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13682 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13683 events, don't leave current_inferior pointing at null.
13685 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13687 * win32-low.c (LOG): Delete.
13688 (OUTMSG): Output to stderr.
13689 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13690 on compile time LOG macro.
13691 (win32_wait): Fix debug output.
13693 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13695 * win32-low.c (win32_add_one_solib): If the dll name is
13696 "ntdll.dll", prepend the system directory to the dll path.
13698 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13700 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13702 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13703 Vladimir Prus <vladimir@codesourcery.com>
13705 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13706 * configure.ac: Check for __mcoldfire__ and set
13707 gdb_cv_m68k_is_coldfire.
13708 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13709 reg-cf.o and reg-m68k.o.
13710 * configure: Regenerated.
13712 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13714 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13715 Pass it to thread_db_free.
13716 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13717 proper `detaching' argument to linux_remove_process.
13718 * linux-low.h (thread_db_free): Add `detaching' parameter.
13719 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13721 (thread_db_free): Add `detaching' parameter. Only
13722 call td_ta_clear_event if detaching from process.
13724 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13726 * thread-db.c (thread_db_free): Fix typo.
13728 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13731 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13733 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13735 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13736 with an i686 compiler.
13737 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13739 * configure: Rebuilt.
13741 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13745 * server.c (handle_search_memory_1): Correct read_addr initialization
13746 in loop for searching subsequent chunks.
13748 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13750 * configure.ac: New --with-libthread-db option.
13751 * thread-db.c: Allow direct dependence on libthread_db.
13752 (thread_db_free): Adjust.
13753 * config.in: Regenerate.
13754 * configure: Likewise.
13756 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13759 * thread-db.c (attach_thread): New function.
13760 (maybe_attach_thread): Return success/failure.
13761 (find_new_threads_callback): Adjust.
13762 (thread_db_find_new_threads): Loop until no new threads.
13764 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13766 * proc-service.c (ps_lgetregs): Formatting.
13768 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13770 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13771 * configure.ac: Adjust.
13772 * linux-low.h (struct process_info_private): Move members to struct
13774 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13775 * linux-low.c (linux_remove_process): Adjust.
13776 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13777 * server.c (handle_query): Move code ...
13778 (handle_monitor_command): ... here. New function.
13779 * target.h (struct target_ops): New member.
13780 * thread-db.c (struct thread_db): New.
13781 (libthread_db_search_path): New variable.
13782 (thread_db_create_event, thread_db_enable_reporting)
13783 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13784 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13785 (try_thread_db_load_1, dladdr_to_soname): New functions.
13786 (try_thread_db_load, thread_db_load_search): New functions.
13787 (thread_db_init): Search for libthread_db.
13788 (thread_db_free): New function.
13789 (thread_db_handle_monitor_command): Likewise.
13790 * config.in: Regenerate.
13791 * configure: Regenerate.
13793 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13795 * spu-low.c (spu_kill): Wait for inferior to terminate.
13796 Call clear_inferiors.
13797 (spu_detach): Call clear_inferiors.
13799 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13801 * aclocal.m4: Regenerate.
13802 * config.in: Likewise.
13803 * configure: Likewise.
13805 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13807 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13808 (parse_spufs_run): New function.
13809 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13810 (ppc_breakpoint_at): Handle SPU breakpoints.
13812 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13814 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13815 (SPUFS_MAGIC): Define.
13816 (spu_enumerate_spu_ids): New function.
13817 (linux_qxfer_spu): New function.
13818 (linux_target_ops): Install linux_qxfer_spu.
13820 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13822 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13823 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13824 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13825 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13826 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13827 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13828 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13829 (init_registers_powerpc_cell32l): Add prototype.
13830 (init_registers_powerpc_cell64l): Likewise.
13831 (ppc_arch_setup): Detect Cell/B.E. architecture.
13833 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13835 * Makefile.in (datarootdir): New variable.
13837 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13839 * linux-low.c (linux_write_memory): Update debugging output.
13840 * Makefile.in (clean): Add new descriptions.
13841 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13842 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13843 * configure.srv: Add new files for arm*-*-linux*.
13844 * linux-arm-low.c: Add new declarations.
13845 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13846 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13847 (HWCAP_VFPv3D16): New.
13848 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13849 instead of __IWMMXT__.
13850 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13851 (arm_arch_setup): New.
13852 (target_regsets): Remove #ifdef. Add VFP regset.
13853 (the_low_target): Use arm_arch_setup.
13855 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13857 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13858 the main thread again.
13860 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13862 Adding Neutrino gdbserver.
13863 * configure: Regenerated.
13864 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13865 * configure.srv (i[34567]86-*-nto*): New target.
13866 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13867 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13868 (nto_comctrl) [__QNX__]: New function.
13869 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13871 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13873 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13876 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13877 Pedro Alves <pedro@codesourcery.com>
13879 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13880 don't support CONTEXT_EXTENDED_REGISTERS.
13881 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13882 (the_low_target): Install them.
13883 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13884 failing with ERROR_PIPE_NOT_CONNECTED.
13886 2009-06-30 Doug Evans <dje@google.com>
13887 Pierre Muller <muller@ics.u-strasbg.fr>
13889 Add h/w watchpoint support to x86-linux, win32-i386.
13890 * Makefile.in (SFILES): Add i386-low.c
13891 (i386_low_h): Define.
13892 (i386-low.o): Add dependencies.
13893 (linux-x86-low.o): Add i386-low.h dependency.
13894 (win32-i386-low.o): Ditto.
13895 * i386-low.c: New file.
13896 * i386-low.h: New file.
13897 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13898 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13899 * linux-low.c (linux_add_process): Initialize arch_private.
13900 (linux_remove_process): Free arch_private.
13901 (add_lwp): Initialize arch_private.
13902 (delete_lwp): Free arch_private.
13903 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13905 * linux-low.h (process_info_private): New member arch_private.
13906 (lwp_info): New member arch_private.
13907 (linux_target_ops): New members new_process, new_thread,
13909 (ptid_of): New macro.
13910 * linux-x86-low.c: Include stddef.h, i386-low.h.
13911 (arch_process_info): New struct.
13912 (arch_lwp_info): New struct.
13913 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13914 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13915 (i386_dr_low_get_status): New function.
13916 (x86_insert_point, x86_remove_point): New functions.
13917 (x86_stopped_by_watchpoint): New function.
13918 (x86_stopped_data_address): New function.
13919 (x86_linux_new_process, x86_linux_new_thread): New functions.
13920 (x86_linux_prepare_to_resume): New function.
13921 (the_low_target): Add entries for insert_point, remove_point,
13922 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13924 * server.c (debug_hw_points): New global.
13925 (monitor_show_help): Document set debug-hw-points.
13926 (handle_query): Process "set debug-hw-points".
13927 * server.h (debug_hw_points): Declare.
13928 (paddress): Declare.
13929 * utils.c (NUMCELLS, CELLSIZE): New macros.
13930 (get_sell, xsnprintf, paddress): New functions.
13931 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13932 remove_point, stopped_by_watchpoint, stopped_data_address.
13933 * win32-i386-low.c: Include i386-low.h.
13934 (debug_reg_state): Replaces dr.
13935 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13936 (i386_dr_low_get_status): New function.
13937 (i386_insert_point, i386_remove_point): New functions.
13938 (i386_stopped_by_watchpoint): New function.
13939 (i386_stopped_data_address): New function.
13940 (i386_initial_stuff): Update.
13941 (get_thread_context,set_thread_context,i386_thread_added): Update.
13942 (the_low_target): Add entries for insert_point,
13943 remove_point, stopped_by_watchpoint, stopped_data_address.
13944 * win32-low.c (win32_insert_watchpoint): New function.
13945 (win32_remove_watchpoint): New function.
13946 (win32_stopped_by_watchpoint): New function.
13947 (win32_stopped_data_address): New function.
13948 (win32_target_ops): Add entries for insert_watchpoint,
13949 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13950 * win32-low.h (win32_target_ops): New members insert_point,
13951 remove_point, stopped_by_watchpoint, stopped_data_address.
13953 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13955 * server.c (process_serial_event): Re-return unsupported, not
13956 error, if the type isn't recognized. Re-allow supporting only
13957 insert or remove packets. Also call require_running for
13958 breakpoints. Add missing break statement to default case. Tidy.
13959 * target.h (struct target_ops): Rename insert_watchpoint to
13960 insert_point, and remove_watchpoint to remove_point.
13962 * linux-low.h (struct linux_target_ops): Likewise.
13963 * linux-low.c (linux_insert_watchpoint): Rename to ...
13964 (linux_insert_point): ... this. Adjust.
13965 (linux_remove_watchpoint): Rename to ...
13966 (linux_remove_point): ... this. Adjust.
13967 (linux_target_ops): Adjust.
13968 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13969 (cris_insert_point): ... this.
13970 (cris_remove_watchpoint): Rename to ...
13971 (cris_remove_point): ... this.
13972 (the_low_target): Adjust.
13974 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13976 * server.c (handle_v_kill): Pass signal_pid to
13977 kill_inferior if multi_process is zero.
13979 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13981 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13982 * target.h (target_ops): Comment for *_watchpoint to make it clear
13983 the functions can get types '0' and '1'.
13985 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13987 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13988 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13989 * regcache.c (get_regcache): Likewise.
13990 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13991 * win32-low.c (child_fetch_inferior_registers): Remove check for
13994 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13995 Pedro Alves <pedro@codesourcery.com>
13997 * target.h (struct target_ops) <supports_multi_process>: New
13999 (target_supports_multi_process): New.
14000 * server.c (handle_query): Even if GDB reports support, only
14001 enable multi-process if the target also supports it. Report
14002 multi-process support only if the target backend supports it.
14003 * linux-low.c (linux_supports_multi_process): New function.
14004 (linux_target_ops): Install it as target_supports_multi_process
14007 2009-05-24 Doug Evans <dje@google.com>
14009 Global renaming of find_thread_pid to find_thread_ptid.
14010 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14011 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14012 All callers updated.
14014 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14015 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14018 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14019 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14020 (linux_resume_one_lwp): Ditto.
14022 2009-05-23 Doug Evans <dje@google.com>
14024 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14025 from struct inferior_list_entry * to struct lwp_info *.
14026 All callers updated.
14028 2009-05-13 Doug Evans <dje@google.com>
14030 * linux-x86-low.c: Don't include assert.h.
14031 (x86_siginfo_fixup): Use fatal, not assert.
14032 (x86_arch_setup): Fix comment.
14034 2009-05-12 Doug Evans <dje@google.com>
14036 Biarch support for i386/amd64 gdbserver.
14037 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14038 Add linux-x86-low.c.
14039 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14040 (linux-x86-low.o): Add.
14041 * linux-x86-64-low.c: Delete.
14042 * linux-i386-low.c: Delete.
14043 * linux-x86-low.c: New file.
14044 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14046 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14048 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14049 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14050 (linux_child_pid_to_exec_file): New function.
14051 (elf_64_header_p, elf_64_file_p): New functions.
14052 (siginfo_fixup): New function.
14053 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14054 give target a chance to convert layout.
14055 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14056 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14058 2009-05-07 Doug Evans <dje@google.com>
14060 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14061 (regsets_store_inferior_registers): Ditto.
14063 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14067 * linux-low.c (must_set_ptrace_flags): Delete.
14068 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14070 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14071 `lwp->must_set_ptrace_flags' instead.
14072 (linux_wait_for_event_1): Set ptrace options here.
14073 (linux_wait_1): ... not here.
14075 2009-04-30 Doug Evans <dje@google.com>
14077 * inferiors.c (started_inferior_callback): New function.
14078 (attached_inferior_callback): New function.
14079 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14080 * server.c (print_started_pid, print_attached_pid): New functions.
14081 (detach_or_kill_for_exit): New function.
14082 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14083 * server.h (have_started_inferiors_p): Declare.
14084 (have_attached_inferiors_p): Declare.
14086 * inferiors.c (remove_process): Fix memory leak, free process.
14087 * linux-low.c (linux_remove_process): New function.
14088 (linux_kill): Call it instead of remove_process.
14089 (linux_detach, linux_wait_1): Ditto.
14091 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14093 * configure.srv: Add x86 Windows CE target.
14095 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14097 * inferiors.c (get_thread_process): Make global.
14098 * server.h (get_thread_process): Add prototype.
14099 * thread-db.c (find_one_thread): Use get_thread_process
14100 instead of current_process.
14101 (thread_db_get_tls_address): Do not crash if called when
14102 thread layer is not yet initialized.
14104 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14106 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14107 * spu-low.c (current_tid): Rename to ...
14108 (current_ptid): ... this.
14109 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14110 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14111 ptid_get_lwp (current_ptid) instead of current_tid.
14112 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14113 instead of current_tid. Use find_process_pid to verify pid
14114 argument is valid. Pass proper argument to remove_process.
14115 (spu_thread_alive): Compare current_ptid instead of current_tid.
14116 (spu_resume): Likewise.
14118 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14120 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14123 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14125 Implement the multiprocess extensions, and add linux multiprocess
14128 * server.h (ULONGEST): Declare.
14129 (struct ptid, ptid_t): New.
14130 (minus_one_ptid, null_ptid): Declare.
14131 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14132 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14133 (struct inferior_list_entry): Change `id' type from unsigned from
14135 (struct sym_cache, struct breakpoint, struct
14136 process_info_private): Forward declare.
14137 (struct process_info): Declare.
14138 (current_process): Declare.
14139 (all_processes): Declare.
14140 (initialize_inferiors): Declare.
14141 (add_thread): Adjust to use ptid_t.
14142 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14143 (add_process, remove_process, find_thread_pid): Declare.
14144 (find_inferior_id): Adjust to use ptid_t.
14145 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14146 (multi_process): Declare.
14147 (push_event): Adjust to use ptid_t.
14148 (read_ptid, write_ptid): Declare.
14149 (prepare_resume_reply): Adjust to use ptid_t.
14150 (clear_symbol_cache): Declare.
14151 * inferiors.c (all_processes): New.
14152 (null_ptid, minus_one_ptid): New.
14153 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14154 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14155 (add_thread): Change unsigned long to ptid. Remove gdb_id
14157 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14158 (gdb_id_to_thread): Rename to ...
14159 (find_thread_pid): ... this. Change unsigned long to ptid.
14160 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14161 (loaded_dll, pull_pid_from_list): Adjust.
14162 (add_process, remove_process, find_process_pid)
14163 (get_thread_process, current_process, initialize_inferiors): New.
14164 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14165 (struct target_waitstatus) <related_pid>: Ditto.
14166 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14167 return type to int.
14168 (struct target_ops) <join>: Add `pid' argument.
14169 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14170 (struct target_ops) <wait>: Add `ptid' field. Change return type
14172 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14173 (mywait): Add `ptid' argument. Change return type to ptid_t.
14174 (target_pid_to_str): Declare.
14175 * target.c (set_desired_inferior): Adjust to use ptids.
14176 (mywait): Add new `ptid' argument. Adjust.
14177 (target_pid_to_str): New.
14178 * mem-break.h (free_all_breakpoints): Declare.
14179 * mem-break.c (breakpoints): Delelete.
14180 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14181 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14182 to use per-process breakpoint list.
14183 (free_all_breakpoints): New.
14184 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14185 (symbol_cache, all_symbols_looked_up): Delete.
14187 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14189 (prepare_resume_reply): Change ptid argument's type from unsigned
14190 long to ptid_t. Adjust. Implement W;process and X;process.
14191 (free_sym_cache, clear_symbol_cache): New.
14192 (look_up_one_symbol): Adjust to per-process symbol cache. *
14193 * server.c (cont_thread, general_thread, step_thread): Change type
14195 (attached): Delete.
14196 (multi_process): New.
14197 (last_ptid): Change type to ptid_t.
14198 (struct vstop_notif) <ptid>: Change type to ptid_t.
14199 (queue_stop_reply, push_event): Change `ptid' argument's type to
14201 (discard_queued_stop_replies): Add `pid' argument.
14202 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14203 changes. Don't reference the `attached' global.
14204 (attach_inferior): Adjust to mywait interface changes.
14205 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14206 features. Handle and report "multiprocess+". Handle
14208 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14210 (handle_v_kill): New.
14211 (handle_v_stopped): Adjust to use target_pid_to_str.
14212 (handle_v_requests): Allow multiple attaches and runs when
14213 multiprocess extensions are in effect. Handle "vKill".
14214 (myresume): Adjust to use ptids.
14215 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14216 (handle_status): Adjust to discard_queued_stop_replies interface
14218 (first_thread_of, kill_inferior_callback)
14219 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14220 (main): Call initialize_inferiors. Adjust to use ptids, killing
14221 and detaching from all inferiors. Handle multiprocess packet
14223 * linux-low.h: Include gdb_proc_service.h.
14224 (struct process_info_private): New.
14225 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14226 <lwpid_of>: Use ptid_get_lwp.
14227 (get_lwp_thread): Adjust.
14228 (struct lwp_info): Add `dead' member.
14229 (find_lwp_pid): Declare.
14230 * linux-low.c (thread_db_active): Delete.
14231 (new_inferior): Adjust comment.
14232 (inferior_pid): Delete.
14233 (linux_add_process): New.
14234 (handle_extended_wait): Adjust.
14235 (add_lwp): Change unsigned long to ptid.
14236 (linux_create_inferior): Add process to processes table. Adjust
14237 to use ptids. Don't set new_inferior here.
14238 (linux_attach_lwp): Rename to ...
14239 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14240 it. Adjust to use ptids.
14241 (linux_attach_lwp): New.
14242 (linux_attach): Add process to processes table. Don't set
14244 (struct counter): New.
14245 (second_thread_of_pid_p, last_thread_of_process_p): New.
14246 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14247 multiple processes.
14248 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14249 processes. Remove process from process table.
14250 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14251 to multiple processes.
14252 (any_thread_of): New.
14253 (linux_detach): Add `pid' argument, and handle it. Remove process
14254 from processes table.
14255 (linux_join): Add `pid' argument. Handle it.
14256 (linux_thread_alive): Change unsighed long argument to ptid_t.
14257 Consider dead lwps as not being alive.
14258 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14259 threads we're not interested in.
14260 (same_lwp, find_lwp_pid): New.
14261 (linux_wait_for_lwp): Change `pid' argument's type from int to
14263 (linux_wait_for_event): Rename to ...
14264 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14265 from int to ptid_t. Adjust.
14266 (linux_wait_for_event): New.
14267 (linux_wait_1): Add `ptid' argument. Change return type to
14268 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14269 that exit from the process table.
14270 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14272 (mark_lwp_dead): New.
14273 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14274 stopping all threads, mark its main lwp as dead.
14275 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14277 (fetch_register, usr_store_inferior_registers)
14278 (regsets_fetch_inferior_registers)
14279 (regsets_store_inferior_registers, linux_read_memory)
14280 (linux_write_memory): Inline `inferior_pid'.
14281 (linux_look_up_symbols): Adjust to use per-process
14282 `thread_db_active'.
14283 (linux_request_interrupt): Adjust to use ptids.
14284 (linux_read_auxv): Inline `inferior_pid'.
14285 (initialize_low): Don't reference thread_db_active.
14286 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14287 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14288 (ps_getpid): Return the pid of the current inferior.
14289 * thread-db.c (proc_handle, thread_agent): Delete.
14290 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14292 (find_one_thread): Change argument type to ptid_t. Adjust to
14294 (maybe_attach_thread): Adjust to per-process data and ptids.
14295 (thread_db_find_new_threads): Ditto.
14296 (thread_db_init): Ditto.
14297 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14298 processes table. Adjust to use ptids.
14299 (spu_kill, spu_detach): Adjust interface. Remove process from
14301 (spu_join, spu_thread_alive): Adjust interface.
14302 (spu_wait): Adjust interface. Remove process from processes
14303 table. Adjust to use ptids.
14304 * win32-low.c (current_inferior_tid): Delete.
14305 (current_inferior_ptid): New.
14306 (debug_event_ptid): New.
14307 (thread_rec): Take a ptid. Adjust.
14308 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14309 (child_delete_thread): Ditto.
14310 (do_initial_child_stuff): Add `attached' argument. Add process to
14312 (child_fetch_inferior_registers, child_store_inferior_registers):
14314 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14315 (win32_attach): Pass 1 to do_initial_child_stuff.
14316 (win32_kill): Adjust interface. Remove process from processes
14318 (win32_detach): Ditto.
14319 (win32_join): Adjust interface.
14320 (win32_thread_alive): Take a ptid.
14321 (win32_resume): Adjust to use ptids.
14322 (get_child_debug_event): Ditto.
14323 (win32_wait): Adjust interface. Remove exiting process from
14326 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14328 Non-stop mode support.
14330 * server.h (non_stop): Declare.
14331 (gdb_client_data, handler_func): Declare.
14332 (delete_file_handler, add_file_handler, start_event_loop):
14334 (handle_serial_event, handle_target_event, push_event)
14335 (putpkt_notif): Declare.
14336 * target.h (enum resume_kind): New.
14337 (struct thread_resume): Replace `step' field by `kind' field.
14338 (TARGET_WNOHANG): Define.
14339 (struct target_ops) <wait>: Add `options' argument.
14340 <supports_non_stop, async, start_non_stop>: New fields.
14341 (target_supports_non_stop, target_async): New.
14342 (start_non_stop): Declare.
14343 (mywait): Add `options' argument.
14344 * target.c (mywait): Add `options' argument. Print child exit
14345 notifications here.
14346 (start_non_stop): New.
14347 * server.c (non_stop, own_buf, mem_buf): New globals.
14348 (struct vstop_notif): New.
14349 (notif_queue): New global.
14350 (queue_stop_reply, push_event, discard_queued_stop_replies)
14351 (send_next_stop_reply): New.
14352 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14354 (attach_inferior): In non-stop mode, don't wait for the target
14356 (handle_general_set): Handle QNonStop.
14357 (handle_query): When handling qC, return the current general
14358 thread, instead of the first thread of the list.
14359 (handle_query): If the backend supports non-stop mode, include
14360 QNonStop+ in the qSupported query response.
14361 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14363 (handle_v_attach, handle_v_run): Handle non-stop mode.
14364 (handle_v_stopped): New.
14365 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14366 (myresume): Adjust to use resume_kind. Handle non-stop.
14367 (queue_stop_reply_callback): New.
14368 (handle_status): Handle non-stop mode.
14369 (main): Clear non_stop flag on reconnection. Use the event-loop.
14370 Refactor serial protocol handling from here ...
14371 (process_serial_event): ... to this new function. When GDB
14372 selects any thread, select one here. In non-stop mode, wait until
14373 GDB acks all pending events before exiting.
14374 (handle_serial_event, handle_target_event): New.
14375 * remote-utils.c (remote_open): Install remote_desc in the event
14377 (remote_close): Remove remote_desc from the event loop.
14378 (putpkt_binary): Rename to...
14379 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14380 (putpkt_binary): New as wrapper around putpkt_binary_1.
14381 (putpkt_notif): New.
14382 (prepare_resume_reply): In non-stop mode, don't change the
14384 * event-loop.c: New.
14385 * Makefile.in (OBJ): Add event-loop.o.
14386 (event-loop.o): New rule.
14388 * linux-low.h (pid_of): Moved here.
14390 (get_lwp_thread): Use lwpid_of.
14391 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14392 * linux-low.c (pid_of): Delete.
14393 (inferior_pid): Use lwpid_of.
14394 (linux_event_pipe): New.
14395 (target_is_async_p): New.
14397 (handle_extended_wait): Use lwpid_of.
14398 (add_lwp): Don't set lwpid field.
14399 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14400 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14401 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14402 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14403 first. Adjust to linux_wait_for_event interface changes. Use
14405 (linux_detach): Don't delete the main lwp here.
14406 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14407 (status_pending_p): Don't consider explicitly suspended lwps.
14408 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14409 pointer. Add OPTIONS argument. Change return type to int. Use
14410 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14411 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14412 pointer. Add status pointer argument. Return a pid instead of a
14413 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14414 changes. In non-stop mode, don't switch to a random thread.
14415 (linux_wait): Rename to...
14416 (linux_wait_1): ... this. Add target_options argument, and handle
14417 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14418 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14419 clean exit and signal exit code. Don't stop all threads in
14420 non-stop mode. In all-stop mode, only stop all threads when
14421 reporting a stop to GDB. Handle explicit thread stop requests.
14422 (async_file_flush, async_file_mark): New.
14424 (send_sigstop): Use lwpid_of.
14425 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14426 interface changes. In non-stop mode, don't switch to a random
14428 (linux_resume_one_lwp): Use lwpid_of.
14429 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14430 (linux_resume_one_thread): ... this. Handle resume_stop. In
14431 non-stop mode, don't look for pending flag in all threads.
14432 (resume_status_pending_p): Don't consider explicitly suspended
14434 (my_waitpid): Reimplement. Emulate __WALL.
14435 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14437 (sigchld_handler, linux_supports_non_stop, linux_async)
14438 (linux_start_non_stop): New.
14439 (linux_target_ops): Register linux_supports_non_stop, linux_async
14440 and linux_start_non_stop.
14441 (initialize_low): Install SIGCHLD handler.
14442 * thread-db.c (thread_db_create_event, find_one_thread)
14443 (thread_db_get_tls_address): Use lwpid_of.
14444 * win32-low.c (win32_detach): Adjust to use resume_kind.
14445 (win32_wait): Add `options' argument.
14446 * spu-low.c (spu_resume): Adjust to use resume_kind.
14447 (spu_wait): Add `options' argument.
14449 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14451 Decouple target code from remote protocol.
14453 * target.h (enum target_waitkind): New.
14454 (struct target_waitstatus): New.
14455 (struct target_ops) <wait>: Return an unsigned long. Take a
14456 target_waitstatus pointer instead of a char pointer.
14457 (mywait): Likewise.
14458 * target.c (mywait): Change prototype to return an unsigned long.
14459 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14460 * server.h (thread_from_wait, old_thread_from_wait): Delete
14462 (prepare_resume_reply): Change prototype to take a
14464 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14465 (last_status, last_ptid): New.
14466 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14467 pid instead of a signal.
14468 (attach_inferior): Remove "status" and "signal" parameters.
14470 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14472 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14473 (handle_v_requests, myresume): Remove "status" and "signal"
14474 parameters. Adjust.
14475 (handle_status): New.
14476 (main): Delete local `status'. Adjust.
14477 * remote-utils.c: Include target.h.
14478 (prepare_resume_reply): Change prototype to take a
14479 target_waitstatus. Adjust.
14481 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14483 * spu-low.c (spu_wait): Adjust.
14484 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14486 (win32_wait): Adjust.
14488 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14490 * target.h (struct thread_resume): Delete leave_stopped member.
14491 (struct target_ops): Add a `n' argument to the `resume' callback.
14492 * server.c (start_inferior): Adjust.
14493 (handle_v_cont, myresume): Adjust.
14494 * linux-low.c (check_removed_breakpoint): Adjust to resume
14495 interface change, and to removed leave_stopped field.
14496 (resume_ptr): Delete.
14497 (struct thread_resume_array): New.
14498 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14499 resume interface change.
14500 (linux_continue_one_thread, linux_queue_one_thread)
14501 (resume_status_pending_p): Check if the resume field is NULL
14502 instead of checking the leave_stopped member.
14503 (linux_resume): Adjust to the target resume interface change.
14504 * spu-low.c (spu_resume): Adjust to the target resume interface
14506 * win32-low.c (win32_detach, win32_resume): Ditto.
14508 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14510 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14512 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14514 (linux_continue_one_thread): Only preserve the stepping flag if
14515 there's a pending breakpoint.
14517 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14519 * server.c (main): After the inferior having exited, call
14520 remote_close before exiting gdbserver.
14522 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14524 Fix size of FPSCR in Power 7 processors.
14525 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14526 (PPC_FEATURE_HAS_DFP): New #define.
14527 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14530 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14532 * server.c (handle_query) Whitespace and formatting.
14534 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14536 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14537 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14538 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14539 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14540 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14541 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14542 Makefile.in, configure.ac: Fix whitespace throughout.
14543 * configure: Regenerate.
14545 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14547 * inferiors.c (find_inferior): Make it safe for the callback
14548 function to delete the currently iterated inferior.
14550 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14552 * Makefile.in (linuw_low_h): Move higher.
14553 (thread-db.o): Depend on $(linux_low_h).
14555 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14557 Rename "process" to "lwp" throughout.
14559 * linux-low.c (all_processes): Rename to...
14560 (all_lwps): ... this.
14561 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14562 (add_process): Rename to ...
14563 (add_lwp): ... this. Adjust.
14564 (linux_create_inferior): Adjust.
14565 (linux_attach_lwp): Adjust.
14566 (linux_attach): Adjust.
14567 (linux_kill_one_process): Rename to ...
14568 (linux_kill_one_lwp): ... this. Adjust.
14569 (linux_kill): Adjust.
14570 (linux_detach_one_process): Rename to ...
14571 (linux_detach_one_lwp): ... this. Adjust.
14572 (linux_detach): Adjust.
14573 (check_removed_breakpoint): Adjust.
14574 (status_pending_p): Adjust.
14575 (linux_wait_for_process): Rename to ...
14576 (linux_wait_for_lwp): ... this. Adjust.
14577 (linux_wait_for_event): Adjust.
14578 (send_sigstop): Adjust.
14579 (wait_for_sigstop): Adjust.
14580 (stop_all_processes): Rename to ...
14581 (stop_all_lwps): ... this.
14582 (linux_resume_one_process): Rename to ...
14583 (linux_resume_one_lwp): ... this. Adjust.
14584 (linux_set_resume_request, linux_continue_one_thread)
14585 (linux_queue_one_thread, resume_status_pending_p)
14586 (usr_store_inferior_registers, regsets_store_inferior_registers)
14587 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14589 * linux-low.h (get_process): Rename to ...
14590 (get_lwp): ... this. Adjust.
14591 (get_thread_process): Rename to ...
14592 (get_thread_lwp): ... this. Adjust.
14593 (get_process_thread): Rename to ...
14594 (get_lwp_thread): ... this. Adjust.
14595 (struct process_info): Rename to ...
14596 (struct lwp_info): ... this.
14597 (all_processes): Rename to ...
14598 (all_lwps): ... this.
14599 * proc-service.c (ps_lgetregs): Adjust.
14600 * thread-db.c (thread_db_create_event, find_one_thread)
14601 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14603 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14605 * server.c (handle_query): Handle "qAttached".
14607 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14609 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14610 GPLv3, update license URL.
14612 2009-03-01 Doug Evans <dje@google.com>
14614 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14615 (server_h): Add gdb_signals.h.
14616 (signals.o): Update.
14617 * server.h (target_signal_from_host,target_signal_to_host_p)
14618 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14620 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14622 * remote-utils.c (getpkt): Also generate remote-debug
14623 information if noack_mode is set.
14625 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14627 * server.c (handle_query): Report qXfer:siginfo:read and
14628 qXfer:siginfo:write as supported and handle them.
14629 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14630 * linux-low.c (linux_xfer_siginfo): New.
14631 (linux_target_ops): Set it.
14633 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14635 * server.c (gdbserver_usage): Mention --remote-debug.
14636 (main): Accept '--remote-debug' switch.
14638 2009-01-18 Doug Evans <dje@google.com>
14640 * regcache.c (new_register_cache): No need to check result of xcalloc.
14641 * server.c (handle_search_memory): Back out calls to xmalloc,
14642 result is checked and error is returned to user upon failure.
14643 (handle_query): Ditto. Add more checks for result of malloc.
14644 (handle_v_cont): Check result of malloc, report error back to
14646 (handle_v_run): Ditto. Call freeargv.
14647 * server.h (freeargv): Declare.
14648 * utils.c (freeargv): New fn.
14650 2009-01-15 Doug Evans <dje@google.com>
14652 * gdbreplay.c (perror_with_name): Make arg const char *.
14653 * server.h (target_signal_to_name): Make return type const char *.
14654 * thread-db.c (thread_db_err_str): Make return type const char *.
14655 * utils.c (perror_with_name): Make arg const char *.
14657 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14659 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14660 when handling a EXIT_PROCESS_DEBUG_EVENT.
14662 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14664 * gdbreplay.c (gdbreplay_version): Update copyright year.
14665 * server.c (gdbserver_version): Likewise.
14667 2009-01-05 Doug Evans <dje@google.com>
14669 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14670 (handle_extended_wait): Improve comment.
14672 2008-12-13 Doug Evans <dje@google.com>
14674 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14675 * server.h (ATTR_MALLOC): New macro.
14676 (xmalloc,xcalloc,xstrdup): Declare.
14677 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14678 * inferiors.c: Ditto.
14679 * linux-low.c: Ditto.
14680 * mem-break.c: Ditto.
14681 * regcache.c: Ditto.
14682 * remote-utils.c: Ditto.
14685 * win32-low.c: Ditto.
14687 2008-12-12 Doug Evans <dje@google.com>
14689 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14690 in debugging printf.
14692 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14694 2008-12-09 Doug Evans <dje@google.com>
14696 * linux-low.h (struct process_info): Delete member tid, unused.
14697 * thread-db.c (find_one_thread): Update.
14698 (maybe_attach_thread): Update.
14700 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14702 * target.h (struct target_ops): Add qxfer_osdata member.
14703 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14705 (linux_qxfer_osdata): New functions.
14706 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14708 * server.c (handle_query): Handle "qXfer:osdata:read:".
14709 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14710 (buffer_xml_printf): New functions.
14711 * server.h (struct buffer): New.
14712 (buffer_grow_str, buffer_grow_str0): New macros.
14713 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14714 (buffer_xml_printf): Declare.
14716 2008-11-24 Doug Evans <dje@google.com>
14718 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14720 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14722 * server.c (handle_v_run): Always use the supplied argument list.
14724 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14726 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14727 (xtensa_regmap_table): Add entry for scompare1.
14729 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14731 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14732 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14733 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14734 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14735 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14736 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14737 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14738 XML target descriptions.
14739 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14740 when inferior is running on an ISA 2.05 or later processor. Add
14741 special case to return offset for full 64-bit slot of FPSCR when
14744 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14746 * Makefile.in (SFILES, clean): Added sparc64 files.
14747 (reg-sparc64.o, reg-sparc64.c): New.
14748 * configure.srv (sparc*-*-linux*): New configuration.
14749 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14750 syscall arguments for SPARC.
14751 (regsets_store_inferior_registers): Likewise.
14752 * linux-sparc-low.c: New file.
14754 2008-10-21 Doug Evans <dje@google.com>
14756 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14757 (READLINE_DIR,READLINE_DEP): Delete.
14758 (INTERNAL_CFLAGS): Update.
14759 (LINTFLAGS): Update.
14761 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14763 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14764 whole argv from the last run, not just argv[0].
14766 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14768 * regcache.c (new_register_cache): Return NULL if the register
14769 cache size isn't known yet.
14770 (free_register_cache): Avoid dereferencing a NULL regcache.
14772 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14774 * configure.srv: Merge MIPS and MIPS64.
14776 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14778 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14780 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14782 * Makefile.in: Add required vsx dependencies.
14784 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14785 Declare init_registers_powerpc_vsx32l.
14786 Declare init_registers_powerpc_vsx64l.
14787 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14788 (ppc_arch_setup): Check for VSX in hwcap.
14789 (ppc_fill_vsxregset): New function.
14790 (ppc_store_vsxregset): New function.
14791 Add new VSX entry in regset_info target_regsets.
14793 * configure.srv: Add new VSX dependencies.
14795 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14797 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14798 (remote_open): Set or clear transport_is_reliable.
14799 (putpkt_binary): Don't expect acks in noack mode.
14800 (getpkt): Don't send ack/nac in noack mode.
14801 * server.c (handle_general_set): Handle QStartNoAckMode.
14802 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14804 (main): Reset noack_mode on every connection.
14805 * server.h (noack_mode): Declare.
14807 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14809 * Makefile.in (GDBREPLAY_OBS): New variable.
14810 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14812 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14813 Daniel Jacobowitz <dan@codesourcery.com>
14815 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14816 (usr_store_inferior_registers): Likewise.
14817 (regsets_store_inferior_registers): Likewise.
14819 2008-07-31 Rolf Jansen <rj@surtec.com>
14820 Pedro Alves <pedro@codesourcery.com>
14822 * configure.ac: Check for memmem declaration.
14823 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14824 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14825 (disable_packet_qfThreadInfo): Unconditionally compile.
14826 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14827 * configure, config.in: Regenerate.
14829 2008-07-28 Doug Kwan <dougkwan@google.com>
14831 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14832 (linux_write_memory): Remove declaration of errno.
14834 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14836 * linux-low.c (handle_extended_wait): Do not use "status"
14837 variable uninitialized.
14839 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14841 * server.c (handle_v_attach): Inhibit reporting dll changes.
14843 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14845 * remote-utils.c (prepare_resume_reply): If requested, don't
14846 output "thread:TID" in the T stop reply.
14848 * server.c (disable_packet_vCont, disable_packet_Tthread)
14849 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14850 (handle_query): If requested, disable support for qC, qfThreadInfo
14852 (handle_v_requests): If requested, disable support for vCont.
14853 (gdbserver_show_disableable): New.
14854 (main): Handle --disable-packet and --disable-packet=LIST.
14856 * server.h (disable_packet_vCont, disable_packet_Tthread)
14857 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14859 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14861 * server.c (gdbserver_usage): Mention --version.
14863 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14865 * Makefile.in (gdbreplay.o): New rule.
14867 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14869 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14870 message, not gdbserver.
14872 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14873 Nathan Sidwell <nathan@codesourcery.com>
14874 Joseph Myers <joseph@codesourcery.com>
14876 * acinclude.m4: Include ../../config/acx.m4.
14877 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14878 * configure, config.in: Regenerate.
14879 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14880 * server.c (gdbserver_version): Print PKGVERSION.
14881 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14882 (main): Adjust gdbserver_usage calls.
14883 * gdbreplay.c (version, host_name): Add declarations.
14884 (gdbreplay_version, gdbreplay_usage): New.
14885 (main): Accept --version and --help options.
14887 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14889 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14890 (arm_breakpoint_at): Handle Thumb.
14891 (the_low_target): Add comment.
14893 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14895 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14897 2008-05-09 Doug Evans <dje@google.com>
14899 * server.h (decode_search_memory_packet): Declare.
14900 * remote-utils.c (decode_search_memory_packet): New fn.
14901 * server.c (handle_search_memory_1): New fn.
14902 (handle_search_memory): New fn.
14903 (handle_query): Process qSearch:memory packets.
14905 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14907 * regcache.c (registers_length): Remove.
14908 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14909 full register packet.
14910 * regcache.h (registers_length): Remove prototype.
14911 * server.h (PBUFSIZ): Define to 16384.
14913 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14915 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14916 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14917 powerpc-64l.o, and powerpc-altivec64l.o.
14918 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14919 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14920 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14921 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14922 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14925 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14926 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14927 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14928 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14929 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14930 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14931 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14932 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14933 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14934 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14937 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14938 (init_registers_powerpc_32l): ... this new prototype.
14939 (init_registers_powerpc_32): Remove, replace by ...
14940 (init_registers_powerpc_altivec32l): ... this new prototype.
14941 (init_registers_powerpc_e500): Remove, replace by ...
14942 (init_registers_powerpc_e500l): ... this new prototype.
14943 (init_registers_ppc64): Remove, replace by ...
14944 (init_registers_powerpc_64l): ... this new prototype.
14945 (init_registers_powerpc_64): Remove, replace by ...
14946 (init_registers_powerpc_altivec64l): ... this new prototype.
14947 (ppc_num_regs): Set to 73.
14948 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14949 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14950 (ppc_cannot_store_register): Handle orig_r3 and trap.
14951 (ppc_arch_setup): Update init_registers_... calls.
14952 (ppc_fill_gregset): Handle orig_r3 and trap.
14954 * inferiors.c (clear_inferiors): Reset current_inferior.
14956 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14958 * acinclude.m4: Add override.m4.
14959 * configure: Regenerate.
14961 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14963 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14964 initial call to init_register_ppc64.
14966 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14968 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14969 single powerpc*-*-linux* case.
14970 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14972 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14974 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14975 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14977 * linux-ppc-low.c: Include <elf.h>.
14978 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14979 (ppc_hwcap): New global variable.
14980 (ppc_regmap): Remove __SPE__ #ifdef sections.
14981 (ppc_regmap_e500): New global variable.
14982 (ppc_cannot_store_register): Update __SPE__ special case.
14983 (ppc_get_hwcap): New function.
14984 (ppc_arch_setup): Use it to determine whether inferior supports
14985 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14986 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14987 Do not access registers if target does not support AltiVec.
14988 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14989 Do not access registers if target does not support SPE.
14990 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14992 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14994 * linux-low.c (disabled_regsets, num_regsets): New.
14995 (use_regsets_p): Delete.
14996 (linux_wait_for_process): Clear disabled_regsets.
14997 (regsets_fetch_inferior_registers): Check and set it.
14998 (regsets_store_inferior_registers): Likewise.
14999 (linux_fetch_registers, linux_store_registers): Do not use
15001 (initialize_low): Allocate disabled_regsets.
15003 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15005 * Makefile.in (LIBOBJS): New.
15006 (OBS): Use LIBOBJS.
15007 (memmem.o): New rule.
15008 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15009 * configure: Regenerated.
15011 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15013 * server.c (handle_query): Never return "unsupported" for
15014 qXfer:features:read queries.
15016 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15018 * server.c (get_features_xml): Fix inverted condition.
15019 (handle_query): Always support qXfer:feature:read.
15021 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15023 * server.c (wrapper_argv): New.
15024 (start_inferior): Handle wrapper_argv. If set, expect an extra
15026 (gdbserver_usage): Document --wrapper.
15027 (main): Parse --wrapper.
15029 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15031 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15032 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15033 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15034 (ppc_set_pc): Likewise.
15035 (ppc_arch_setup): New function.
15036 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15037 of collect_register.
15038 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15040 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15042 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15043 instead of linux-ppc64-low.o.
15044 * linux-ppc64-low.c: Remove file.
15045 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15046 (linux-ppc64-low.o): Remove rule.
15048 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15049 (init_registers_powerpc_64): Likewise.
15050 (ppc_regmap): Conditionally define depending on __powerpc64__.
15051 (ppc_cannot_store_register): Do not special-case "fpscr" when
15052 compiled on __powerpc64__.
15053 (ppc_collect_ptrace_register): New function.
15054 (ppc_supply_ptrace_register): New function.
15055 (ppc_breakpoint): Change type to "unsigned int".
15056 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15057 (the_low_target): Conditionally provide initializers for the
15058 arch_setup member depending on __powerpc64__. Install
15059 collect_ptrace_register and supply_ptrace_register members.
15061 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15063 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15064 * server.c (gdbserver_xmltarget): Define.
15065 (get_features_xml): Use it to replace "target.xml" and arch_string.
15067 * configure.srv: Remove srv_xmltarget. Add XML files that were
15068 mentioned there to srv_xmlfiles instead. Remove conditional tests
15069 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15070 srv_xmlfiles and srv_regobj to include all possible choices.
15071 * configure.ac (srv_xmltarget): Remove.
15072 (srv_xmlfiles): Do not add "target.xml".
15073 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15074 checks for supplementary target information.
15075 * configure: Regenerate.
15076 * Makefile.in (XML_TARGET): Remove.
15077 (target.xml): Remove rule.
15078 (clean): Do not clean up target.xml.
15079 (.PRECIOUS): Do not mention target.xml.
15081 * target.h (struct target_ops): Remove arch_string member.
15082 * linux-low.c (linux_arch_string): Remove.
15083 (linux_target_ops): Remove arch_string initializer.
15084 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15085 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15086 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15087 * spu-low.c (spu_arch_string): Remove.
15088 (spu_target_ops): Remove arch_string initializer.
15089 * win32-low.c (win32_arch_string): Remove.
15090 (win32_target_ops): Remove arch_string initializer.
15091 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15092 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15093 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15095 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15097 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15098 by collect_ptrace_register and supply_ptrace_register hooks.
15099 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15100 instead of checking for the_low_target.left_pad_xfer.
15101 (usr_store_inferior_registers): Use collect_ptrace_register callback
15102 instead of checking for the_low_target.left_pad_xfer.
15104 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15105 (s390_supply_ptrace_register): Likewise.
15106 (s390_fill_gregset): Call s390_collect_ptrace_register.
15107 (the_low_target): Update.
15109 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15110 (ppc_supply_ptrace_register): Likewise.
15111 (the_low_target): Update.
15113 * linux-i386-low.c (the_low_target): Update.
15114 * linux-x86-64-low.c (the_low_target): Update.
15116 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15118 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15119 reg-s390.o and reg-s390x.o.
15121 * linux-low.c (new_inferior): New global variable.
15122 (linux_create_inferior, linux_attach): Set it.
15123 (linux_wait_for_process): Call the_low_target.arch_setup after the
15124 target has stopped for the first time.
15125 (initialize_low): Do not call the_low_target.arch_setup.
15127 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15128 (s390_set_pc): Likewise.
15129 (s390_arch_setup): New function.
15130 (the_low_target): Use s390_arch_setup as arch_setup routine.
15132 * regcache.c (realloc_register_cache): New function.
15133 (set_register_cache): Call it for each existing regcache.
15135 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15137 * server.h (init_registers): Remove prototype.
15139 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15140 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15141 instead of init_registers ().
15142 * linux-arm-low.c (init_registers_arm): Add prototype.
15143 (init_registers_arm_with_iwmmxt): Likewise.
15144 (the_low_target): Add initializer for arch_setup field.
15145 * linux-cris-low.c (init_registers_cris): Add prototype.
15146 (the_low_target): Add initializer for arch_setup field.
15147 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15148 (the_low_target): Add initializer for arch_setup field.
15149 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15150 (the_low_target): Add initializer for arch_setup field.
15151 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15152 (the_low_target): Add initializer for arch_setup field.
15153 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15154 (the_low_target): Add initializer for arch_setup field.
15155 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15156 (the_low_target): Add initializer for arch_setup field.
15157 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15158 (init_registers_mips64_linux): Likewise.
15159 (the_low_target): Add initializer for arch_setup field.
15160 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15161 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15162 (the_low_target): Add initializer for arch_setup field.
15163 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15164 (init_registers_powerpc_64): Likewise.
15165 (the_low_target): Add initializer for arch_setup field.
15166 * linux-s390-low.c (init_registers_s390): Add prototype.
15167 (init_registers_s390x): Likewise.
15168 (the_low_target): Add initializer for arch_setup field.
15169 * linux-sh-low.c (init_registers_sh): Add prototype.
15170 (the_low_target): Add initializer for arch_setup field.
15171 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15172 (the_low_target): Add initializer for arch_setup field.
15173 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15174 (the_low_target): Add initializer for arch_setup field.
15176 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15177 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15178 instead of init_registers ().
15179 * win32-arm-low.c (init_registers_arm): Add prototype.
15180 (the_low_target): Add initializer for arch_setup field.
15181 * win32-i386-low.c (init_registers_i386): Add prototype.
15182 (the_low_target): Add initializer for arch_setup field.
15184 * spu-low.c (init_registers_spu): Add prototype.
15185 (initialize_low): Call initialie_registers_spu () instead of
15186 initialize_registers ().
15188 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15190 * server.c (handle_v_requests): When handling the vRun and vAttach
15191 packets, if already debugging a process, don't kill it. Return an
15194 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15196 * server.c (handle_query): Correct length check.
15198 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15200 * win32-low.c (do_initial_child_stuff): Add process handle
15201 parameter. Set current_process_handle and current_process_id from the
15202 parameters. Clear globals.
15203 (win32_create_inferior): Don't set current_process_handle and
15204 current_process_id here. Instead pass them on the call to
15205 do_initial_child_stuff.
15206 (win32_attach): Likewise.
15207 (win32_clear_inferiors): New.
15208 (win32_kill): Don't close the current process handle or the
15209 current thread handle here. Instead call win32_clear_inferiors.
15210 (win32_detach): Don't open a new handle to the process. Call
15211 win32_clear_inferiors.
15212 (win32_join): Don't rely on current_process_handle; open a new
15213 handle using the process id.
15214 (win32_wait): Call win32_clear_inferiors when the inferior process
15217 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15219 * server.c (monitor_show_help): Add "exit".
15221 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15223 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15224 (clean): Add reg-xtensa.c.
15225 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15226 * configure.srv (xtensa*-*-linux*) New target.
15227 * linux-xtensa-low.c: New.
15228 * xtensa-xtregs.c: New.
15230 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15232 * hostio.c: Don't include errno.h.
15233 (errno_to_fileio_errno): Move to hostio-errno.
15234 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15235 error number outputting to the target->hostio_last_error callback.
15236 (hostio_packet_error): Use FILEIO_EINVAL directly.
15237 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15238 calls to hostio_error.
15239 * hostio-errno.c: New.
15240 * server.h (hostio_last_error_from_errno): Declare.
15241 * target.h (target_ops): Add hostio_last_error member.
15242 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15243 as hostio_last_error handler.
15244 * spu-low.c (spu_target_ops): Likewise.
15245 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15246 (wince_hostio_last_error): New functions.
15247 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15248 as hostio_last_error handler.
15249 (win32_target_ops) [!_WIN32_WCE]: Register
15250 hostio_last_error_from_errno as hostio_last_error handler.
15251 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15252 (hostio-errno.o): New rule.
15253 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15254 * configure.srv (srv_hostio_err_objs): New variable. Default to
15256 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15257 * configure: Regenerate.
15259 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15261 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15262 (linux_kill, linux_detach): Clean up the process list.
15263 * remote-utils.c (remote_open): Improve port number parsing.
15264 (putpkt_binary, input_interrupt): Only send interrupts if the target
15266 * server.c (extended_protocol): Make static.
15267 (attached): Define earlier.
15268 (exit_requested, response_needed, program_argv): New variables.
15269 (target_running): New.
15270 (start_inferior): Clear attached here.
15271 (attach_inferior): Set attached here.
15272 (require_running): Define.
15273 (handle_query): Use require_running and target_running. Implement
15275 (handle_v_attach, handle_v_run): New.
15276 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15277 (gdbserver_usage): Update.
15278 (main): Redo argument parsing. Handle --debug and --multi. Handle
15279 --attach along with other options or after the port. Save
15280 program_argv. Support no initial program. Resynchronize
15281 communication with GDB after an error. Handle "monitor exit".
15282 Use require_running and target_running. Always allow the extended
15283 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15284 restart in extended mode.
15285 * README: Refer to the GDB manual. Update --attach usage.
15287 2007-12-20 Andreas Schwab <schwab@suse.de>
15289 * linux-low.c (STACK_SIZE): Define.
15290 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15291 (linux_test_for_tracefork): Likewise.
15293 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15295 * linux-low.c (linux_wait_for_event): Update messages. Do not
15296 reinsert auto-delete breakpoints.
15297 * mem-break.c (struct breakpoint): Change return type of handler to
15299 (set_breakpoint_at): Update handler type.
15300 (reinsert_breakpoint_handler): Return 1 instead of calling
15302 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15304 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15305 * mem-break.h (set_breakpoint_at): Update handler type.
15306 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15307 * win32-low.c (auto_delete_breakpoint): New.
15308 (get_child_debug_event): Use it.
15310 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15312 * configure.ac: Check for pread and pwrite.
15313 * hostio.c (handle_pread): Fall back to lseek and read.
15314 (handle_pwrite): Fall back to lseek and write.
15315 * config.in, configure: Regenerated.
15317 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15319 * server.c (myresume): Add own_buf argument.
15320 (main): Update calls.
15322 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15324 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15325 * remote-utils.c (remote_open): Do not call disable_async_io.
15326 (block_async_io): Delete.
15327 (unblock_async_io): Make static.
15328 (initialize_async_io): New.
15329 * server.c (handle_v_cont): Handle async I/O here.
15330 (myresume): Likewise. Move other common resume tasks here...
15331 (main): ... from here. Call initialize_async_io. Disable async
15332 I/O before the main loop.
15333 * server.h (initialize_async_io): Declare.
15334 (block_async_io, unblock_async_io): Delete prototypes.
15335 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15337 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15339 * remote-utils.c (readchar): Allow binary data in received messages.
15341 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15343 * win32-low.c (attaching): New global.
15344 (win32_create_inferior): Clear the `attaching' global.
15345 (win32_attach): Set the `attaching' global.
15346 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15347 attaching. Only set a breakpoint at the entry point if not
15350 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15352 * server.c (main): Don't report dll events on the initial
15353 connection on attaches.
15355 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15357 * server.c (main): Relax numerical bases supported for the pid of
15358 the --attach command line argument.
15360 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15362 * win32-low.c (win32_attach): Call OpenProcess before
15363 DebugActiveProcess, not after. Add last error output to error
15366 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15368 * win32-low.c (win32_get_thread_context)
15369 (win32_set_thread_context): New functions.
15370 (thread_rec): Use win32_get_thread_context.
15371 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15372 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15375 2007-12-03 Leo Zayas
15376 Pedro Alves <pedro_alves@portugalmail.pt>
15378 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15380 (child_add_thread): Minor cleanup.
15381 (child_continue): Resume artificially suspended threads before
15382 calling ContinueDebugEvent.
15383 (suspend_one_thread): New.
15384 (fake_breakpoint_event): New.
15385 (get_child_debug_event): Change return type to int. Check here if
15386 gdb sent an interrupt request. If a soft interrupt was requested,
15387 fake a breakpoint event. Return 0 if there is no event to handle,
15389 (win32_wait): Don't check here if gdb sent an interrupt request.
15390 Ensure there is a valid event to handle.
15391 (win32_request_interrupt): Add soft interruption method as last
15394 2007-12-03 Leo Zayas
15395 Pedro Alves <pedro_alves@portugalmail.pt>
15397 * win32-low.h (win32_thread_info): Add descriptions to the
15398 structure members. Replace `suspend_count' counter by a
15400 * win32-low.c (thread_rec): Update condition of when to get the
15401 context from the inferior. Rely on ContextFlags being set if it
15402 has already been retrieved. Only suspend the inferior thread if
15403 we haven't already. Warn if that fails.
15404 (continue_one_thread): s/suspend_count/suspended/. Only call
15405 ResumeThread once. Warn if that fails.
15407 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15409 * win32-low.c (win32_wait): Don't read from the inferior when it
15410 has already exited.
15412 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15414 * Makefile.in (win32_low_h): New variable.
15415 (win32-low.o): Add dependency on $(win32_low_h).
15416 (win32-arm-low.o, win32-i386-low.o): New rules.
15418 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15420 * hostio.c: Correct copyright year.
15422 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15424 * Makefile.in (OBS): Add hostio.o.
15425 (hostio.o): New rule.
15426 * server.h (handle_vFile): Declare.
15427 * hostio.c: New file.
15428 * server.c (handle_v_requests): Take packet_len and new_packet_len
15429 for binary packets. Call handle_vFile.
15430 (main): Update call to handle_v_requests.
15432 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15434 * linux-low.c: Include <sched.h>.
15436 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15438 * linux-low.c (linux_tracefork_grandchild): New.
15439 (linux_tracefork_child): Use clone.
15440 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15442 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15444 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15446 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15448 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15450 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15452 * inferiors.c (change_inferior_id): Delete.
15453 (add_pid_to_list, pull_pid_from_list): New.
15454 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15455 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15456 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15457 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15458 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15459 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15460 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15461 (using_threads): Always set to 1.
15462 (handle_extended_wait): New.
15463 (add_process): Do not set TID.
15464 (linux_create_inferior): Set must_set_ptrace_flags.
15465 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15466 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15467 (linux_thread_alive): Rename TID argument to LWPID.
15468 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15469 (linux_wait_for_event): Do not use TID or check using_threads. Update
15470 call to dead_thread_notify. Call handle_extended_wait.
15471 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15472 (send_sigstop): Delete sigstop_sent.
15473 (wait_for_sigstop): Avoid TID.
15474 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15475 (linux_test_for_tracefork): New.
15476 (linux_lookup_signals): Use thread_db_active and
15477 linux_supports_tracefork_flag.
15478 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15479 * linux-low.h (get_process_thread): Avoid TID.
15480 (struct process_ifo): Move thread_known and tid to the end. Remove
15482 (linux_attach_lwp, thread_db_init): Update prototypes.
15483 * server.h (change_inferior_id): Delete prototype.
15484 (add_pid_to_list, pull_pid_from_list): New prototypes.
15485 * thread-db.c (thread_db_use_events): New.
15486 (find_first_thread): Rename to...
15487 (find_one_thread): ...this. Update callers and messages. Do not
15488 call fatal. Check thread_db_use_events. Do not call
15489 change_inferior_id or new_thread_notify.
15490 (maybe_attach_thread): Update. Do not call new_thread_notify.
15491 (thread_db_init): Set thread_db_use_events. Check use_events.
15492 * utils.c (fatal, warning): Correct message prefix.
15494 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15496 * Makefile.in (clean): Remove new files.
15497 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15498 (powerpc-64.o, powerpc-64.c): New rules.
15499 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15500 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15502 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15504 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15505 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15506 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15507 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15508 (target_regsets): Add AltiVec and SPE register sets.
15509 * configure.ac: Check for AltiVec and SPE.
15510 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15511 (ppc_fill_vrregset, ppc_store_vrregset): New.
15512 (target_regsets): Add AltiVec register set.
15513 * configure: Regenerated.
15515 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15517 * linux-low.c (O_LARGEFILE): Define.
15518 (linux_read_memory): Use /proc/PID/mem.
15519 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15520 * configure, config.in: Regenerated.
15522 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15524 * linux-low.c (linux_wait_for_event): Do not pass signals while
15527 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15529 * win32-low.c (create_process): New.
15530 (win32_create_inferior): Use create_process instead of
15531 CreateProcess. If create_process failed retry appending an ".exe"
15532 suffix. Store the GetLastError result immediatelly after
15533 create_process calls and use it on the call to error.
15535 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15537 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15539 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15541 * configure.ac: Switch license to GPLv3.
15543 2007-08-01 Michael Snyder <msnyder@access-company.com>
15545 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15547 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15549 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15551 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15552 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15553 CloseToolhelp32Snapshot.
15554 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15555 CloseToolhelp32Snapshot.
15557 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15559 * server.c (main): Check for inferior exit before main loop.
15561 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15563 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15564 instead of on tmp_desc.
15566 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15567 Daniel Jacobowitz <dan@codesourcery.com>
15569 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15570 (add_thread): Minor cleanups.
15571 (clear_inferiors): Move lower in the file. Clear the DLL
15573 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15574 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15575 (xml_escape_text): New.
15576 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15578 (handle_v_cont): Report errors.
15579 (gdbserver_version): Update.
15580 (main): Correct size of own_buf. Do not report initial DLL events.
15581 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15582 (unloaded_dll, xml_escape_text): New.
15583 * win32-low.c (enum target_waitkind): Update comments.
15584 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15585 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15586 (win32_EnumProcessModules, win32_GetModuleInformation)
15587 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15588 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15589 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15590 (win32_Module32First, win32_Module32Next, load_toolhelp)
15591 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15592 (get_child_debug_event): Handle DLL events.
15593 (win32_wait): Likewise.
15595 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15597 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15598 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15600 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15602 * win32-low.c (handle_output_debug_string): Ignore event if not
15605 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15607 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15609 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15611 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15613 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15615 * inferiors.c (change_inferior_id): Add comment.
15616 * linux-low.c (check_removed_breakpoint): Add an early
15617 prototype. Improve debug output.
15618 (linux_attach): Doc update.
15619 (linux_detach_one_process, linux_detach): Clean up before releasing
15621 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15622 * linux-low.h (struct process_info): Doc improvement.
15623 * mem-break.c (delete_all_breakpoints): New.
15624 * mem-break.h (delete_all_breakpoints): New prototype.
15625 * thread-db.c (find_first_thread): New.
15626 (thread_db_create_event): Call it instead of
15627 thread_db_find_new_threads. Clean up unused variables.
15628 (maybe_attach_thread): Remove first thread handling.
15629 (thread_db_find_new_threads): Use find_first_thread.
15630 (thread_db_get_tls_address): Likewise.
15632 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15634 * thread-db.c (thread_db_find_new_threads): Add prototype.
15635 (thread_db_create_event): Check for the main thread before adding
15637 (maybe_attach_thread): Only enable event reporting if TID == 0.
15638 (thread_db_get_tls_address): Check for new threads.
15640 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15642 * linux-low.c (linux_create_inferior): Try execv before execvp.
15643 * spu-low.c (spu_create_inferior): Likewise.
15645 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15647 * linux-low.c (linux_create_inferior): Change execv to execvp.
15648 * spu-low.c (spu_create_inferior): Likewies.
15650 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15652 * Makefile.in (clean): Clean new files instead of deleted ones.
15653 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15654 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15656 * configure.srv: Specify XML files and new regformats for MIPS and
15658 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15659 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15660 an entry for the restart register.
15661 (mips_cannot_fetch_register, mips_cannot_store_register)
15662 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15663 register names to match the XML descriptions.
15664 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15665 restart register instead of $0.
15667 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15668 Markus Deuling <deuling@de.ibm.com>
15670 * remote-utils.c (decode_xfer_write): New function.
15671 * server.h (decode_xfer_write): Add prototype.
15672 * server.c (handle_query): Add PACKET_LEN argument. Support
15673 qXfer:spu:read and qXfer:spu:write packets.
15674 (main): Pass packet_len to handle_query.
15675 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15676 * target.h (target_ops): Add qxfer_spu.
15678 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15680 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15681 accessing non-seekable spufs files.
15683 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15685 * server.c (handle_query): Add reply for qC packet.
15687 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15688 Leo Zayas <lerele@champenstudios@com>
15690 * server.h (check_remote_input_interrupt_request): New function.
15691 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15692 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15693 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15694 (check_remote_input_interrupt_request): New function.
15695 * server.h (check_remote_input_interrupt_request): Declare.
15696 * win32-low.c (winapi_DebugBreakProcess,
15697 winapi_GenerateConsoleCtrlEvent): New typedefs.
15698 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15700 (win32_wait): Check for remote interrupt request
15701 with check_remote_input_interrupt_request.
15702 (win32_request_interrupt): New function.
15703 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15705 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15707 * win32-low.c (debug_registers_changed,
15708 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15709 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15710 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15711 (thread_rec): Get context using the low target.
15712 (child_add_thread): Call thread_added on the low target,
15713 which does the same thing.
15715 (do_initial_child_stuff): Remove debug registers references.
15716 Set context using the low target. Resume threads after
15717 setting the contexts.
15718 (child_continue): Remove dead variable. Remove debug
15719 registers references.
15720 (child_fetch_inferior_registers): Go through the low target.
15721 (do_child_store_inferior_registers): Remove.
15722 (child_store_inferior_registers): Go through the low target.
15723 (win32_resume): Remove debug registers references.
15724 Set context using the low target.
15725 (handle_exception): Change return type to void. Don't record
15726 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15727 first chance exception.
15728 (get_child_debug_event): Change return type to void. Remove
15729 goto loop. Always return after waiting for debug event.
15730 (win32_wait): Convert to switch statement. Handle spurious
15733 * win32-i386-low.c (debug_registers_changed,
15734 debug_registers_used): New.
15735 (initial_stuff): Rename to ...
15736 (i386_initial_stuff): ... this. Clear debug registers
15738 (store_debug_registers): Delete.
15739 (i386_get_thread_context): New.
15740 (load_debug_registers): Delete.
15741 (i386_set_thread_context): New.
15742 (i386_thread_added): New.
15743 (single_step): Rename to ...
15744 (i386_single_step): ... this.
15745 (do_fetch_inferior_registers): Rename to ...
15746 (i386_fetch_inferior_register): ... this.
15747 (i386_store_inferior_register): New.
15748 (the_low_target): Adapt to new interface.
15750 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15751 (arm_get_thread_context): New.
15752 (arm_set_thread_context): New.
15754 (do_fetch_inferior_registers): Rename to ...
15755 (arm_fetch_inferior_register): ... this.
15756 (arm_store_inferior_register): New.
15757 (arm_wince_breakpoint): Reimplement as unsigned long.
15758 (arm_wince_breakpoint_len): Define.
15759 (the_low_target): Adapt to new interface.
15761 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15762 load_debug_registers. Add get_thread_context, set_thread_context,
15763 thread_added and store_inferior_register. Rename
15764 fetch_inferior_registers to fetch_inferior_register.
15765 (regptr): Remove declaration.
15767 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15769 * linux-low.c (linux_detach): Change return type to int. Return 0.
15770 * spu-low.c (spu_detach): Likewise.
15772 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15774 * target.h (target_ops): Change return type of detach to int.
15776 (join_inferior): New.
15777 * server.c (main): Don't skip detach support on mingw32.
15778 If the inferior doesn't support detaching return error.
15779 Call join_inferior instead of using waitpid.
15780 * linux-low.c (linux_join): New.
15781 (linux_target_op): Add linux_join.
15782 * spu-low.c (spu_join): New.
15783 (spu_target_ops): Add spu_join.
15784 * win32-low.c (win32_detach): Adapt to new interface.
15785 Reopen current_process_handle before detaching. Issue a child
15786 resume before detaching.
15788 (win32_target_op): Add win32_join.
15790 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15792 * win32-low.c (win32-attach): Fix return value.
15793 * target.h (target_ops): Describe ATTACH return values.
15795 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15797 * win32-low.c (GETPROCADDRESS): Define.
15798 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15799 (winapi_DebugSetProcessKillOnExit): Likewise.
15800 (win32_create_inferior): Force usage of ansi CreateProcessA.
15801 (win32_attach): Use GETPROCADDRESS.
15802 (win32_detach): Likewise.
15804 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15806 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15808 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15810 * win32-low.c: Commit leftover changes from 2007-03-29.
15812 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15814 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15815 fields short instead of int. Add explicit padding.
15816 (i387_cache_to_fsave): Remove unnecessary casts.
15817 (i387_fsave_to_cache): Doc fix.
15818 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15820 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15822 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15823 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15825 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15827 * configure.srv (arm*-*-mingw32ce*): Move near the other
15830 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15832 * configure.ac: Add errno checking.
15833 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15834 sys/file.h and malloc.h.
15835 (AC_CHECK_DECLS): Add perror.
15836 (srv_mingwce): Handle.
15837 * configure.srv (i[34567]86-*-cygwin*): Add
15838 win32-i386-low.o to srv_tgtobj.
15839 (i[34567]86-*-mingw*): Likewise.
15840 (arm*-*-mingw32ce*): Add case.
15841 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15842 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15843 [__MINGW32CE__] (strerror): New function.
15844 [__MINGW32CE__] (errno): Define to GetLastError.
15845 [__MINGW32CE__] (COUNTOF): New macro.
15846 (remote_open): Remove extra close call.
15847 * mem-break.c (delete_breakpoint_at): New function.
15848 * mem-break.h (delete_breakpoint_at): Declare.
15849 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15850 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15851 [USE_WIN32API] (read, write): Add char* casts.
15852 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15853 * server.h: Include wincecompat.h on Windows CE.
15854 [HAVE_ERRNO_H]: Check.
15855 (perror): Declare if not declared.
15856 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15857 (perror_with_name): Remove errno declaration.
15858 * wincecompat.h: New.
15859 * wincecompat.c: New.
15860 * win32-low.h: New.
15861 * win32-arm-low.c: New.
15862 * win32-i386-low.c: New.
15863 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15864 (OUTMSG2): Make it safe.
15866 (COUNTOF): New macro.
15867 (NUM_REGS): Get it from the low target.
15868 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15869 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15870 (thread_rec): Let low target handle debug registers.
15871 (child_add_thread): Likewise.
15872 (child_init_thread_list): Likewise.
15873 (continue_one_thread): Likewise.
15875 (do_child_fetch_inferior_registers): Move to ...
15876 * win32-i386-low.c: ... here, and rename to ...
15877 (do_fetch_inferior_registers): ... this.
15878 * win32-low.c (child_fetch_inferior_registers):
15879 Go through the low target.
15880 (do_child_store_inferior_registers): Use regptr.
15881 (strwinerror): New function.
15882 (win32_create_inferior): Handle Windows CE.
15883 Use strwinerror instead of strerror on Windows error
15884 codes. Add program to the error output.
15885 Don't close the main thread handle on Windows CE.
15886 (win32_attach): Use coredll.dll on Windows CE.
15887 (win32_kill): Close current process and current
15889 (win32_detach): Use coredll.dll on Windows CE.
15890 (win32_resume): Let low target handle debug registers, and
15892 (handle_exception): Add/Remove initial breakpoint. Avoid
15893 non-existant WSTOPSIG on Windows CE.
15894 (win32_read_inferior_memory): Cast to remove warning.
15895 (win32_arch_string): Go through the low target.
15896 (initialize_low): Call set_breakpoint_data with the low
15897 target's breakpoint.
15898 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15899 FOP_REGNUM, mappings): Move to ...
15900 * win32-i386-low.c: ... here.
15901 * win32-low.c (win32_thread_info): Move to ...
15902 * win32-low.h: ... here.
15903 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15904 win32-arm-low.c and wincecompat.c.
15905 (all:): Add $EXEEXT.
15906 (install-only:): Likewise.
15907 (gdbserver:): Likewise.
15908 (gdbreplay:): Likewise.
15909 * config.in: Regenerate.
15910 * configure: Regenerate.
15912 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15914 * win32-low.c: Rename typedef thread_info to
15915 win32_thread_info throughout.
15917 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15919 * win32-i386-low.c: Rename to ...
15920 * win32-low.c: ... this.
15921 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15922 * Makefile.in: Likewise.
15924 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15926 * remote-utils.c (monitor_output): Constify msg parameter.
15927 * server.h (monitor_output): Likewise.
15928 * win32-i386-low.c (handle_output_debug_string): New.
15929 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15930 handle_output_debug_string.
15931 (get_child_debug_event): Likewise.
15933 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15935 * server.c (main): Correct strtoul check.
15937 2007-03-27 Jon Ringle <jon@ringle.org>
15939 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15941 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15943 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15945 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15947 * terminal.h: Check HAVE_SGTTY_H.
15949 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15951 * remote-utils.c (remote_open): Print out the assigned port number.
15953 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15955 * remote-utils.c (monitor_output): New function.
15956 * server.c (debug_threads): Define here.
15957 (monitor_show_help): New function.
15958 (handle_query): Handle qRcmd.
15959 (main): Do not handle 'd' packet.
15960 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15961 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15964 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15966 * Makefile.in (EXEEXT): New.
15967 (clean): Use $(EXEEXT).
15969 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15971 * target.h (target_ops): Rename send_signal to request_interrupt,
15972 and remove enum target_signal parameter.
15973 * linux-low.c (linux_request_interrupt): Rename from
15974 linux_send_signal, and always send SIGINT.
15975 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15976 and always send SIGINT.
15977 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15979 (input_interrupt): Likewise.
15981 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15983 * server.c (get_features_xml): Check if target implemented
15985 * win32-i386-low.c (win32_arch_string): New.
15986 (win32_target_ops): Add win32_arch_string as arch_string member.
15988 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15990 * spu-low.c (spu_arch_string): New.
15991 (spu_target_ops): Add spu_arch_string.
15993 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15995 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15996 * configure.ac: Do not check for terminal.h.
15997 * configure, config.in: Regenerated.
15999 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16001 * Makefile.in (OBS): Add $(XML_BUILTIN).
16002 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16004 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16005 (arm-with-iwmmxt.c): New.
16006 * config.in, configure: Regenerate.
16007 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16008 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16009 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16010 (arm*-*-linux*): Add iWMMXt and regset support.
16011 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16012 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16013 (arm_store_wmmxregset, target_regsets): New.
16014 * server.c (get_features_xml): Take annex argument. Check builtin
16016 (handle_query): Handle multiple annexes.
16018 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16020 * remote-utils.c [USE_WIN32API] (read, write): Define.
16021 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16024 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16026 * linux-i386-low.c (the_low_target): Set arch_string.
16027 * linux-x86-64-low.c (the_low_target): Likewise.
16028 * linux-low.c (linux_arch_string): New.
16029 (linux_target_ops): Add it.
16030 * linux-low.h (struct linux_target_ops): Add arch_string.
16031 * server.c (write_qxfer_response): Use const void * for DATA.
16032 (get_features_xml): New.
16033 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16034 * target.h (struct target_ops): Add arch_string method.
16036 2007-01-03 Denis Pilat <denis.pilat@st.com>
16037 Daniel Jacobowitz <dan@codesourcery.com>
16039 * linux-low.c (linux_kill): Handle being called with no threads.
16040 * win32-i386-low.c (win32_kill): Likewise.
16041 (get_child_debug_event): Clear current_process_handle.
16043 2006-12-30 Denis PILAT <denis.pilat@st.com>
16044 Daniel Jacobowitz <dan@codesourcery.com>
16046 * remote-utils.c (remote_open): Check the type of specified
16047 serial port devices before opening them.
16048 * server.c (main): Kill the inferior if an error occurs during
16049 the first remote_open.
16051 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16053 * README: Update supported targets.
16055 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16057 * Makefile.in (clean): Remove reg-mips64.c.
16058 (reg-mips64.c, reg-mips64.o): New rules.
16059 * configure.srv: Handle mips64. Include regset support for mips.
16060 * linux-mips-low.c (union mips_register): New.
16061 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16062 (mips_breakpoint, mips_breakpoint_at): Use int.
16063 (mips_collect_register, mips_supply_register)
16064 (mips_collect_register_32bit, mips_supply_register_32bit)
16065 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16066 (mips_store_fpregset, target_regsets): New.
16067 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16069 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16071 * configure.srv: Add target "spu*-*-*".
16072 * Makefile.in (clean): Remove reg-spu.c.
16073 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16074 * spu-low.c: New file.
16076 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16078 * configure.ac: Correct td_thr_tls_get_addr test.
16079 * configure: Regenerated.
16081 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16083 * linux-low.c (linux_wait_for_event): Reformat. Use the
16084 pass_signals array.
16085 * remote-utils.c (decode_address_to_semicolon): New.
16086 * server.c (pass_signals, handle_general_set): New.
16087 (handle_query): Mention QPassSignals for qSupported.
16088 (main): Call handle_general_set.
16089 * server.h (pass_signals, decode_address_to_semicolon): New.
16091 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16093 * server.c (handle_query): Correct error handling for read_auxv.
16095 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16097 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16098 and srv_linux_thread_db to yes.
16099 * linux-s390-low.c (s390_fill_gregset): New function.
16100 (target_regsets): Define data structure.
16102 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16104 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16105 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16106 * config.in, configure: Regenerated.
16107 * inferiors.c (gdb_id_to_thread): New function.
16108 (gdb_id_to_thread_id): Use it.
16109 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16110 * linux-low.h (struct process_info): Add th member.
16111 (thread_db_get_tls_address): New prototype.
16112 * remote-utils.c (decode_address): Make non-static.
16113 * server.c (handle_query): Handle qGetTLSAddr.
16114 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16115 * target.h (struct target_ops): Add get_tls_address.
16116 * thread-db.c (maybe_attach_thread): Save the thread handle.
16117 (thread_db_get_tls_address): New.
16119 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16121 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16122 (linux_resume_one_process): Take a siginfo_t *. Update all
16123 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16124 (struct pending_signals): Add a siginfo_t.
16125 (linux_wait_for_process): Always set last_status.
16126 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16127 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16128 * linux-low.h (struct process_info): Add last_status.
16130 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16132 * remote-utils.c (try_rle): New function.
16133 (putpkt_binary): Use it.
16135 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16137 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16138 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16139 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16140 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16141 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16144 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16146 * server.c (terminal_fd): New variable.
16147 (old_foreground_pgrp): Likewise.
16148 (restore_old_foreground_pgrp): New function.
16149 (start_inferior): Record the terminal file descriptor in terminal_fd
16150 and its original foreground group in old_foreground_pgrp. Register
16151 restore_old_foreground_pgrp with atexit().
16153 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16155 * server.c (handle_query): Correct qPart to qXfer.
16157 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16159 * configure.ac: Check for more headers which are missing on
16160 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16161 * configure.srv: Add Cygwin and mingw32.
16162 * remote-utils.c: Don't include headers unconditionally which
16163 are missing on mingw32. Include <winsock.h> for mingw32.
16164 (remote_open): Adjust for mingw32 support. Flush
16165 standard error after writing to it.
16166 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16167 (unblock_async_io, enable_async_io, disable_async_io)
16168 (readchar, getpkt): Update for Winsock support.
16169 (prepare_resume_reply): Expect a protocol signal number.
16170 * server.c: Disable <sys/wait.h> on mingw32.
16171 (start_inferior): Adjust for mingw32 support. Flush
16172 standard error after writing to it.
16173 (attach_inferior): Likewise. Use protocol signal
16175 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16177 * win32-i386-low.c: New file.
16178 * Makefile.in (XM_CLIBS): Set.
16179 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16180 (win32-i386-low.o): New dependency rule.
16181 * linux-low.c (linux_wait): Use target signal numbers.
16182 * target.h (struct target_ops): Doc fix.
16183 * server.h (target_signal_to_name): New prototype.
16184 * gdbreplay.c: Don't include headers unconditionally which
16185 are missing on mingw32. Include <winsock.h> for mingw32.
16186 (remote_close, remote_open): Adjust for Winsock support.
16187 * configure, config.in: Regenerated.
16189 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16191 * server.c (decode_xfer_read, write_qxfer_response): New.
16192 (handle_query): Take a packet length argument. Handle
16193 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16194 the qSupported response.
16195 (main): Update call to handle_query.
16197 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16199 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16200 (putpkt_binary): Renamed from putpkt and adjusted for binary
16202 (putpkt): New wrapper for putpkt_binary.
16203 (readchar): Don't mask off the high bit.
16204 (decode_X_packet): New function.
16205 * server.c (main): Call putpkt_binary if a handler sets the packet
16206 length. Save the length of the incoming packet. Handle 'X'.
16207 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16209 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16211 * server.c (handle_query): Handle qSupported.
16213 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16215 * remote-utils.c (all_symbols_looked_up): New variable.
16216 (look_up_one_symbol): Check it.
16217 * server.h (look_up_one_symbol): New declaration.
16218 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16220 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16222 * Makefile.in (linux-arm-low.o): Update dependencies.
16223 * linux-arm-low.c: Include "gdb_proc_service.h".
16224 (PTRACE_GET_THREAD_AREA): Define.
16225 (ps_get_thread_area): New function.
16227 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16229 * configure.srv (m68k*-*-uclinux*): New target.
16230 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16231 (linux_resume_one_process): Remove extraneous cast.
16232 (linux_read_offsets): New.
16233 (linux_target_op): Add linux_read_offsets on mmuless systems.
16234 * server.c (handle_query): Add qOffsets logic.
16235 * target.h (struct target_ops): Add read_offsets.
16237 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16239 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16240 (PTRACE_GET_THREAD_AREA): Define.
16241 (ps_get_thread_area): New function.
16242 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16243 (linux-x86-64-low.o): Update.
16245 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16247 * configure.ac: Remove checks for prfpregset_t.
16248 * gdb_proc_service.h: New file.
16249 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16250 new "gdb_proc_service.h".
16251 * proc-service.c: Likewise.
16252 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16253 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16254 * Makefile.in (gdb_proc_service_h): Updated.
16255 * configure, config.in: Regenerated.
16257 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16259 * remote-utils.c (prepare_resume_reply): Move declaration
16260 of gdb_id_from_wait to the top of the block.
16262 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16264 * linux-low.c (regsets_store_inferior_registers): Read the regset
16265 from the target before filling it.
16267 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16269 * server.c (attach_inferior): Return SIGTRAP for a successful
16272 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16274 * Makefile.in (OBS): Add version.o.
16275 (STAGESTUFF): Delete.
16276 (version.o): Add dependencies.
16277 (version.c): Replace rule.
16278 (clean): Remove version.c.
16279 * server.c (gdbserver_version): New.
16280 (gdbserver_usage): Use printf.
16281 (main): Handle --version and --help.
16282 * server.h (version, host_name): Add declarations.
16284 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16296 * linux-x86-64-low.c:
16298 * linux-s390-low.c:
16299 * linux-ppc64-low.c:
16301 * linux-mips-low.c:
16302 * linux-m68k-low.c:
16303 * linux-m32r-low.c:
16306 * linux-ia64-low.c:
16307 * linux-i386-low.c:
16308 * linux-crisv32-low.c:
16320 * gdbserver.1: Add (C) after Copyright. Update the FSF
16323 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16325 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16326 (arm_breakpoint_at): Recognize both breakpoints.
16327 (the_low_target): Use the correct breakpoint instruction.
16329 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16331 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16332 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16333 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16334 (the_low_target): Update.
16336 2005-10-25 Andreas Schwab <schwab@suse.de>
16338 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16340 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16341 (ia64_num_regs): Reduce to 462.
16343 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16345 * acinclude.m4: Correct quoting.
16346 * aclocal.m4: Regenerated.
16348 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16349 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16350 (thread_db_init): Call thread_db_err_str.
16351 * configure.ac: Check for TD_VERSION.
16352 * config.in, configure: Regenerated.
16354 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16356 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16358 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16360 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16361 is not available. Define HAVE_PTRACE_GETREGS if it is.
16362 * config.in, configure: Regenerated.
16363 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16364 * linux-i386-low.c, linux-m68k-low.c: Update to use
16365 HAVE_PTRACE_GETREGS.
16366 * linux-low.c (regsets_fetch_inferior_registers)
16367 (regsets_store_inferior_registers): Only return 0 if we processed
16369 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16370 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16372 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16374 * inferiors.c (struct thread_info): Add gdb_id.
16375 (add_thread): Add gdb_id argument.
16376 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16377 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16378 calls to add_thread.
16379 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16380 * server.c (handle_query): Use thread_to_gdb_id.
16381 (handle_v_cont, main): Use gdb_id_to_thread_id.
16382 * server.h (add_thread): Update prototype.
16383 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16386 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16388 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16389 left-padded registers.
16390 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16391 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16393 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16395 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16396 * configure: Regenerate.
16397 * config.in: Regenerate.
16398 * server.h (NEED_DECLARATION_STRERROR):
16399 Replace with !HAVE_DECL_STRERROR.
16401 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16403 * linux-low.c (linux_wait, linux_send_signal): Don't test
16404 an unsigned long variable for > 0 if it could be MAX_ULONG.
16405 * server.c (myresume): Likewise.
16406 * target.c (set_desired_inferior): Likewise.
16408 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16410 * configure.ac: Simplify and improve check for socklen_t.
16411 * configure, config.in: Regenerate.
16413 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16415 * acconfig.h: Remove.
16416 * configure.ac: Add a test for socklen_t. Use three-argument
16417 AC_DEFINE throughout.
16418 * config.in: Regenerated using autoheader 2.59.
16419 * configure: Regenerated.
16421 * gdbreplay.c (socklen_t): Provide a default.
16422 (remote_open): Use socklen_t.
16423 * remote-utils.c (socklen_t): Provide a default.
16424 (remote_open): Use socklen_t.
16425 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16428 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16430 * linux-low.c (linux_read_memory, linux_write_memory)
16431 (linux_read_auxv): Likewise.
16432 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16433 (check_mem_write): Likewise.
16434 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16436 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16437 (registers_from_string, register_data): Likewise.
16438 * server.c (handle_query, main): Likewise.
16439 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16440 (decode_M_packet): Likewise.
16441 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16442 * target.h (struct target_ops): Update read_memory, write_memory,
16444 (read_inferior_memory, write_inferior_memory): Update.
16445 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16446 to unsigned char *.
16447 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16448 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16449 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16450 linux-s390-low.c, linux-sh-low.c: Update for changes in
16451 read_inferior_memory and the_low_target->breakpoint.
16453 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16455 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16456 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16457 * configure.srv: Add powerpc64-*-linux*.
16458 * linux-ppc64-low.c: New file.
16460 2005-05-23 Orjan Friberg <orjanf@axis.com>
16462 * linux-cris-low.c: New file with support for CRIS.
16463 * linux-crisv32-low.c: Ditto for CRISv32.
16464 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16465 (clean): Add reg-cris.c and reg-crisv32.c.
16466 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16467 reg-crisv32.o, and reg-crisv32.c to make rules.
16468 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16469 recognized targets.
16471 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16473 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16474 of sizeof (PTRACE_XFER_TYPE).
16475 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16477 2005-05-12 Orjan Friberg <orjanf@axis.com>
16479 * target.h (struct target_ops): Add insert_watchpoint,
16480 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16481 pointers for hardware watchpoint support.
16482 * linux-low.h (struct linux_target_ops): Ditto.
16483 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16484 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16485 to linux_target_ops.
16486 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16488 * server.c (main): Recognize 'Z' and 'z' packets.
16490 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16492 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16493 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16494 (the_low_target): Add new members.
16496 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16498 * proc-service.c (ps_lgetregs): Search all_processes instead of
16501 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16503 * server.c (start_inferior): Change return type to int.
16504 (attach_inferior): Change sigptr to int *.
16505 (handle_v_cont, handle_v_requests): Change signal to int *.
16506 (main): Change signal to int.
16508 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16510 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16511 * configure.srv: Add m32r*-*-linux*.
16512 * linux-m32r-low.c: New file.
16514 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16516 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16518 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16520 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16521 Take unsigned long arguments for PIDs.
16522 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16523 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16524 (wait_for_sigstop, linux_resume_one_process)
16525 (regsets_fetch_inferior_registers, linux_send_signal)
16526 (linux_read_auxv): Likewise. Update the types of variables holding
16527 PIDs. Update format string specifiers.
16528 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16529 * remote-utils.c (prepare_resume_reply): Likewise.
16530 * server.c (cont_thread, general_thread, step_thread)
16531 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16533 (handle_query): Update format specifiers.
16534 (handle_v_cont, main): Use strtoul for thread IDs.
16535 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16536 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16537 (general_thread, step_thread, thread_from_wait)
16538 (old_thread_from_wait): Update.
16539 * target.h (struct thread_resume): Use unsigned long for THREAD.
16540 (struct target_ops): Use unsigned long for arguments to attach and
16543 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16545 * acinclude.m4: Include bfd/bfd.m4 directly.
16546 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16547 <agriffis@toolchain.org>.
16548 * aclocal.m4, configure: Regenerated.
16550 2005-01-07 Andrew Cagney <cagney@gnu.org>
16552 * configure.ac: Rename configure.in, require autoconf 2.59.
16553 * configure: Re-generate.
16555 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16557 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16558 LIBS when finished.
16559 * aclocal.m4: Regenerated.
16560 * configure: Regenerated.
16562 2004-11-21 Andreas Schwab <schwab@suse.de>
16564 * linux-m68k-low.c (m68k_num_gregs): Define.
16565 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16566 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16567 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16568 (m68k_breakpoint_at): New. Add to the_low_target.
16570 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16571 srv_linux_thread_db to yes.
16573 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16575 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16576 (ARCH_SET_FS): Likewise.
16577 (ARCH_GET_FS): Likewise.
16578 (ARCH_GET_GS): Likewise.
16580 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16582 * linux-i386-low.c (ps_get_thread_area): New.
16583 * linux-x86-64-low.c (ps_get_thread_area): New.
16584 * linux-low.c: Include <sys/syscall.h>.
16585 (linux_kill_one_process): Don't kill the first thread here.
16586 (linux_kill): Kill the first thread here.
16587 (kill_lwp): New function.
16588 (send_sigstop, linux_send_signal): Use it.
16589 * proc-service.c: Clean up #ifdefs.
16590 (fpregset_info): Delete.
16591 (ps_lgetregs): Update and enable implementation.
16592 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16594 * remote-utils.c (struct sym_cache, symbol_cache): New.
16595 (input_interrupt): Print a clearer message.
16596 (async_io_enabled): New variable.
16597 (enable_async_io, disable_async_io): Use it. Update comments.
16598 (look_up_one_symbol): Use the symbol cache.
16599 * thread-db.c (thread_db_look_up_symbols): New function.
16600 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16602 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16604 * configure.in: Test for -rdynamic.
16605 * configure: Regenerated.
16606 * Makefile (INTERNAL_LDFLAGS): New.
16607 (gdbserver, gdbreplay): Use it.
16609 2004-09-02 Andrew Cagney <cagney@gnu.org>
16611 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16613 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16615 * linux-low.c (linux_wait): Clear all_processes list also.
16617 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16619 * linux-low.c: Include <errno.h>. Remove extern declaration of
16622 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16624 * gdbreplay.c, server.h, utils.c: Update copyright years.
16626 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16628 * server.c (main): Print child status or termination signal from
16629 variable 'signal', not 'sig'.
16631 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16633 * linux-low.c (linux_read_memory): Change return type to
16634 int. Check for and return error from ptrace().
16635 * target.c (read_inferior_memory): Change return type to int. Pass
16636 back return status from the_target->read_memory().
16637 * target.h (struct target_ops): Adapt *read_memory() prototype.
16639 (read_inferior_memory): Adapt prototype.
16640 * server.c (main): Return an error packet if
16641 read_inferior_memory() returns an error.
16643 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16645 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16646 Unify with other clean targets.
16648 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16650 * server.c (handle_v_cont): Call set_desired_inferior.
16652 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16654 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16656 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16658 * linux-low.c (linux_wait): Unblock async I/O.
16659 (linux_resume): Block and enable async I/O.
16660 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16661 * server.h (block_async_io, unblock_async_io): Add prototypes.
16663 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16665 * remote-utils.c (remote_open): Print a status notice after
16666 opening a TCP port.
16667 * server.c (attach_inferior): Print a status notice after
16670 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16672 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16674 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16676 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16678 * server.c, target.h: Update copyright years.
16680 2004-02-25 Roland McGrath <roland@redhat.com>
16682 * target.h (struct target_ops): New member `read_auxv'.
16683 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16684 * linux-low.c (linux_read_auxv): New function.
16685 (linux_target_ops): Initialize `read_auxv' member to that.
16687 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16689 Committed by Jim Blandy <jimb@redhat.com>.
16691 * linux-s390-low.c (s390_num_regs): Update.
16692 (s390_regmap): Remove control registers. Use __s390x__ predefine
16693 instead of GPR_SIZE to distiguish s390 and s390x targets.
16695 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16697 * linux-low.c: Update copyright year.
16698 (check_removed_breakpoint): Clear pending_is_breakpoint.
16699 (linux_set_resume_request, linux_queue_one_thread)
16700 (resume_status_pending_p): New functions.
16701 (linux_continue_one_thread): Use process->resume.
16702 (linux_resume): Only resume threads if there are no pending events.
16703 * linux-low.h (struct process_info): Add resume request
16706 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16708 * regcache.c (new_register_cache): Clear the allocated register
16709 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16711 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16713 * linux-low.c (linux_resume): Take a struct thread_resume *
16715 (linux_wait): Update call.
16716 (resume_ptr): New static variable.
16717 (linux_continue_one_thread): Renamed from
16718 linux_continue_one_process. Use resume_ptr.
16719 (linux_resume): Use linux_continue_one_thread.
16720 * server.c (handle_v_cont, handle_v_requests): New functions.
16721 (myresume): New function.
16722 (main): Handle 'v' case.
16723 * target.h (struct thread_resume): New type.
16724 (struct target_ops): Change argument of "resume" to struct
16726 (myresume): Delete macro.
16728 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16730 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16731 (uninstall): Support DESTDIR.
16733 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16735 * configure.srv: Add xscale*linux copy of arm*linux entry.
16737 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16739 * linux-arm-low.c (arm_reinsert_addr): New function.
16740 (the_low_target): Add arm_reinsert_addr.
16742 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16744 * mem-break.c: Remove whitespace at end of file.
16746 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16748 * configure.in: Check whether we need to prototype strerror.
16749 * server.h: Optionally prototype strerror.
16750 * gdbreplay.c (perror_with_name): Use strerror.
16751 * linux-low.c (linux_attach_lwp): Use strerror.
16752 * utils.c (perror_with_name): Use strerror.
16753 * config.in, configure: Regenerated.
16755 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16757 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16758 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16760 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16762 * Makefile.in (SFILES): Update.
16763 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16764 low-sun3.c: Remove files.
16766 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16768 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16769 (linux_detach_one_process, linux_detach): New functions.
16770 (linux_target_ops): Add linux_detach.
16771 * server.c (main): Handle 'D' packet.
16772 * target.h (struct target_ops): Add "detach" member.
16773 (detach_inferior): Define.
16775 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16777 From Kelley Cook <kelleycook@wideopenwest.com>:
16778 * configure.srv: Accept i[34567]86 variants.
16780 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16782 * linux-low.c (linux_wait_for_event): Correct comment typos.
16783 (linux_resume_one_process): Call check_removed_breakpoint.
16784 (linux_send_signal): New function.
16785 (linux_target_ops): Add linux_send_signal.
16786 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16788 * target.h (struct target_ops): Add send_signal.
16790 2003-05-29 Jim Blandy <jimb@redhat.com>
16792 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16793 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16794 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16795 away part of the register's value.
16797 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16799 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16800 (linux_wait_for_event, linux_init_signals): Likewise.
16802 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16804 * configure.in: Check for stdlib.h.
16805 * configure: Regenerated.
16806 * config.in: Regenerated.
16808 2003-01-04 Andreas Schwab <schwab@suse.de>
16810 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16812 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16814 * Makefile.in: Remove obsolete code.
16816 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16818 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16819 defined(PT_FPR0_HI).
16821 2002-11-17 Stuart Hughes <seh@zee2.com>
16823 * linux-arm-low.c (arm_num_regs): Increase.
16824 (arm_regmap): Include status register.
16826 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16828 * linux-low.c (register_addr): Remove incorrect -1 check.
16830 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16832 * linux-low.c (linux_create_inferior): Call setpgid. Return
16834 (unstopped_p, linux_signal_pid): Remove.
16835 (linux_target_ops): Remove linux_signal_pid.
16836 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16837 global instead of target method.
16838 * target.h (struct target_ops): Remove signal_pid. Update comment
16839 for create_inferior.
16840 * server.c (signal_pid): New variable.
16841 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16842 gdbserver. Set the child to be the foreground process group.
16843 (attach_inferior): Set signal_pid.
16845 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16847 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16849 2002-08-20 Jim Blandy <jimb@redhat.com>
16851 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16854 2002-08-01 Andrew Cagney <cagney@redhat.com>
16856 * Makefile.in: Make chill references obsolete.
16858 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16860 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16861 * configure: Regenerate.
16862 * config.in: Regenerate.
16864 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16866 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16867 (perror_with_name, remote_close, remote_open, expect, play): Static.
16869 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16871 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16872 byte offsets instead of an array of indexes.
16873 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16875 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16877 * regcache.c: Add comment.
16879 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16881 * thread-db.c: New file.
16882 * proc-service.c: New file.
16883 * acinclude.m4: New file.
16884 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16885 proc-service.o, and thread-db.o.
16886 (linux-low.o): Add USE_THREAD_DB.
16887 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16888 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16889 * aclocal.m4: Regenerated.
16890 * config.in: Regenerated.
16891 * configure: Regenerated.
16892 * configure.in: Check for proc_service.h, sys/procfs.h,
16893 thread_db.h, and linux/elf.h headrs.
16894 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16895 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16896 Check for -lthread_db and thread support.
16897 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16898 PowerPC, and SuperH.
16899 * i387-fp.c: Constify arguments.
16900 * i387-fp.h: Likewise.
16901 * inferiors.c: (struct thread_info): Renamed from
16902 `struct inferior_info'. Remove PID member. Use generic inferior
16903 list header. All uses updated.
16904 (inferiors, signal_pid): Removed.
16905 (all_threads): New variable.
16906 (get_thread): Define.
16907 (add_inferior_to_list): New function.
16908 (for_each_inferior): New function.
16909 (change_inferior_id): New function.
16910 (add_inferior): Removed.
16911 (remove_inferior): New function.
16912 (add_thread): New function.
16913 (free_one_thread): New function.
16914 (remove_thread): New function.
16915 (clear_inferiors): Use for_each_inferior and free_one_thread.
16916 (find_inferior): New function.
16917 (find_inferior_id): New function.
16918 (inferior_target_data): Update argument type.
16919 (set_inferior_target_data): Likewise.
16920 (inferior_regcache_data): Likewise.
16921 (set_inferior_regcache_data): Likewise.
16922 * linux-low.c (linux_bp_reinsert): Remove.
16923 (all_processes, stopping_threads, using_thrads)
16924 (struct pending_signals, debug_threads, pid_of): New.
16925 (inferior_pid): Replace with macro.
16926 (struct inferior_linux_data): Remove.
16927 (get_stop_pc, add_process): New functions.
16928 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16929 Use add_process and add_thread.
16930 (linux_attach_lwp): New function, based on old linux_attach. Use
16931 add_process and add_thread. Set stop_expected for new threads.
16932 (linux_attach): New function.
16933 (linux_kill_one_process): New function.
16934 (linux_kill): Kill all LWPs.
16935 (linux_thread_alive): Use find_inferior_id.
16936 (check_removed_breakpoints, status_pending_p): New functions.
16937 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16938 Update. Use WNOHANG. Wait for cloned processes also. Update process
16939 struct for the found process.
16940 (linux_wait_for_event): New function.
16941 (linux_wait): Use it. Support LWPs.
16942 (send_sigstop, wait_for_sigstop, stop_all_processes)
16943 (linux_resume_one_process, linux_continue_one_process): New functions.
16944 (linux_resume): Support LWPs.
16945 (REGISTER_RAW_SIZE): Remove.
16946 (fetch_register): Use register_size instead. Call supply_register.
16947 (usr_store_inferior_registers): Likewise. Call collect_register.
16948 Fix recursive case.
16949 (regsets_fetch_inferior_registers): Improve error message.
16950 (regsets_store_inferior_registers): Add debugging.
16951 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16952 (unstopped_p, linux_signal_pid): New functions.
16953 (linux_target_ops): Add linux_signal_pid.
16954 (linux_init_signals): New function.
16955 (initialize_low): Call it. Initialize using_threads.
16956 * regcache.c (inferior_regcache_data): Add valid
16958 (get_regcache): Fetch registers lazily. Add fetch argument
16959 and update all callers.
16960 (regcache_invalidate_one, regcache_invalidate): New
16962 (new_register_cache): Renamed from create_register_cache.
16963 Return the new regcache.
16964 (free_register_cache): Change argument to a void *.
16965 (registers_to_string, registers_from_string): Call get_regcache
16966 with fetch flag set.
16967 (register_data): Make static. Pass fetch flag to get_regcache.
16968 (supply_register): Call get_regcache with fetch flag clear.
16969 (collect_register): Call get_regcache with fetch flag set.
16970 (collect_register_as_string): New function.
16971 * regcache.h: Update.
16972 * remote-utils.c (putpkt): Flush after debug output and use
16974 Handle input interrupts while waiting for an ACK.
16975 (input_interrupt): Use signal_pid method.
16976 (getpkt): Flush after debug output and use stderr.
16977 (outreg): Use collect_register_as_string.
16978 (new_thread_notify, dead_thread_notify): New functions.
16979 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16980 and general_thread.
16981 (look_up_one_symbol): Flush after debug output.
16982 * server.c (step_thread, server_waiting): New variables.
16983 (start_inferior): Don't use signal_pid. Update call to mywait.
16984 (attach_inferior): Update call to mywait.
16985 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16986 (main): Don't fetch/store registers explicitly. Use
16987 set_desired_inferior. Support proposed ``Hs'' packet. Update
16989 * server.h: Update.
16990 (struct inferior_list, struct_inferior_list_entry): New.
16991 * target.c (set_desired_inferior): New.
16992 (write_inferior_memory): Constify.
16993 (mywait): New function.
16994 * target.h: Update.
16995 (struct target_ops): New signal_pid method.
16996 (mywait): Removed macro, added prototype.
16998 * linux-low.h (regset_func): Removed.
16999 (regset_fill_func, regset_store_func): New.
17000 (enum regset_type): New.
17001 (struct regset_info): Add type field. Use new operation types.
17002 (struct linux_target_ops): stop_pc renamed to get_pc.
17003 Add decr_pc_after_break and breakpoint_at.
17004 (get_process, get_thread_proess, get_process_thread)
17005 (strut process_info, all_processes, linux_attach_lwp)
17006 (thread_db_init): New.
17008 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17009 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17010 (the_low_target): Add new members.
17011 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17012 (i386_store_fpxregset): Constify.
17013 (target_regsets): Add new kind identifier.
17014 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17015 (i386_set_pc): Add debugging.
17016 (i386_breakpoint_at): New function.
17017 (the_low_target): Add new members.
17018 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17019 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17020 (mips_breakpoint_at): New.
17021 (the_low_target): Add new members.
17022 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17023 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17024 (the_low_target): Add new members.
17025 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17026 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17027 (the_low_target): Add new members.
17028 * linux-x86-64-low.c (target_regsets): Add new kind
17031 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17033 From Martin Pool <mbp@samba.org>:
17034 * server.c (gdbserver_usage): New function.
17037 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17039 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17040 stop_at -> stop_pc.
17042 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17044 * Makefile.in: Remove obsolete code.
17046 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17048 * linux-low.c (regsets_fetch_inferior_registers),
17049 (regsets_store_inferior_registers): Removed cast to int from
17051 * regcache.h: Added declaration of struct inferior_info.
17053 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17055 * inferiors.c (struct inferior_info): Add regcache_data.
17056 (add_inferior): Call create_register_cache.
17057 (clear_inferiors): Call free_register_cache.
17058 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17059 * regcache.c (struct inferior_regcache_data): New.
17060 (registers): Remove.
17061 (get_regcache): New function.
17062 (create_register_cache, free_register_cache): New functions.
17063 (set_register_cache): Don't initialize the register cache here.
17064 (registers_to_string, registers_from_string, register_data): Call
17066 * regcache.h: Add prototypes.
17067 * server.h: Likewise.
17069 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17071 * mem-break.c: New file.
17072 * mem-break.h: New file.
17073 * Makefile.in: Add mem-break.o rule; update server.h
17075 * inferiors.c (struct inferior_info): Add target_data
17077 (clear_inferiors): Free target_data member if set.
17078 (inferior_target_data, set_inferior_target_data): New functions.
17079 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17080 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17081 * linux-low.c (linux_bp_reinsert): New variable.
17082 (struct inferior_linux_data): New.
17083 (linux_create_inferior): Use set_inferior_target_data.
17084 (linux_attach): Likewise. Call add_inferior.
17085 (linux_wait_for_one_inferior): New function.
17086 (linux_wait): Call it.
17087 (linux_write_memory): Add const.
17088 (initialize_low): Call set_breakpoint_data.
17089 * linux-low.h (struct linux_target_ops): Add breakpoint
17091 * server.c (attach_inferior): Remove extra add_inferior
17093 * server.h: Include mem-break.h. Update inferior.c
17095 * target.c (read_inferior_memory)
17096 (write_inferior_memory): New functions.
17097 * target.h (read_inferior_memory)
17098 (write_inferior_memory): Change macros to prototypes.
17099 (struct target_ops): Update comments. Add const to write_memory
17102 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17104 * linux-low.c (usr_store_inferior_registers): Support
17105 registers which are allowed to fail to store.
17106 * linux-low.h (linux_target_ops): Likewise.
17107 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17108 (ppc_cannot_store_register): FPSCR may not be storable.
17110 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17112 * server.h: Include <string.h> if HAVE_STRING_H.
17113 * ChangeLog: Correct paths in last ChangeLog entry.
17115 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17117 * linux-low.h: Remove obsolete prototypes.
17118 (struct linux_target_ops): New.
17119 (extern the_low_target): New.
17120 * linux-low.c (num_regs, regmap): Remove declarations.
17121 (register_addr): Use the_low_target explicitly.
17122 (fetch_register): Likewise.
17123 (usr_fetch_inferior_registers): Likewise.
17124 (usr_store_inferior_registers): Likewise.
17125 * linux-arm-low.c (num_regs): Remove.
17126 (arm_num_regs): Define.
17127 (arm_regmap): Renamed from regmap, made static.
17128 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17130 (arm_cannot_store_register): Renamed from cannot_store_register,
17132 (the_low_target): New.
17133 * linux-i386-low.c (num_regs): Remove.
17134 (i386_num_regs): Define.
17135 (i386_regmap): Renamed from regmap, made static.
17136 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17138 (i386_cannot_store_register): Renamed from cannot_store_register,
17140 (the_low_target): New.
17141 * linux-ia64-low.c (num_regs): Remove.
17142 (ia64_num_regs): Define.
17143 (ia64_regmap): Renamed from regmap, made static.
17144 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17146 (ia64_cannot_store_register): Renamed from cannot_store_register,
17148 (the_low_target): New.
17149 * linux-m68k-low.c (num_regs): Remove.
17150 (m68k_num_regs): Define.
17151 (m68k_regmap): Renamed from regmap, made static.
17152 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17154 (m68k_cannot_store_register): Renamed from cannot_store_register,
17156 (the_low_target): New.
17157 * linux-mips-low.c (num_regs): Remove.
17158 (mips_num_regs): Define.
17159 (mips_regmap): Renamed from regmap, made static.
17160 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17162 (mips_cannot_store_register): Renamed from cannot_store_register,
17164 (the_low_target): New.
17165 * linux-ppc-low.c (num_regs): Remove.
17166 (ppc_num_regs): Define.
17167 (ppc_regmap): Renamed from regmap, made static.
17168 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17170 (ppc_cannot_store_register): Renamed from cannot_store_register,
17172 (the_low_target): New.
17173 * linux-s390-low.c (num_regs): Remove.
17174 (s390_num_regs): Define.
17175 (s390_regmap): Renamed from regmap, made static.
17176 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17178 (s390_cannot_store_register): Renamed from cannot_store_register,
17180 (the_low_target): New.
17181 * linux-sh-low.c (num_regs): Remove.
17182 (sh_num_regs): Define.
17183 (sh_regmap): Renamed from regmap, made static.
17184 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17186 (sh_cannot_store_register): Renamed from cannot_store_register,
17188 (the_low_target): New.
17189 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17190 (the_low_target): New.
17192 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17194 * Makefile.in: Add stamp-h target.
17195 * configure.in: Create stamp-h.
17196 * configure: Regenerated.
17198 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17200 * inferiors.c: New file.
17201 * target.c: New file.
17202 * target.h: New file.
17203 * Makefile.in: Add target.o and inferiors.o. Update
17205 * linux-low.c (inferior_pid): New static variable,
17206 moved from server.c.
17207 (linux_create_inferior): Renamed from create_inferior.
17208 Call add_inferior. Return 0 on success instead of a PID.
17209 (linux_attach): Renamed from myattach.
17210 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17211 (linux_thread_alive): Renamed from mythread_alive.
17212 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17214 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17215 (regsets_store_inferior_registers): Correct error message.
17216 Add missing ``return 0''.
17217 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17218 (linux_store_registers): Renamed from store_inferior_registers.
17219 (linux_read_memory): Renamed from read_inferior_memory.
17220 (linux_write_memory): Renamed from write_inferior_memory.
17221 (linux_target_ops): New structure.
17222 (initialize_low): Call set_target_ops ().
17223 * remote-utils.c (unhexify): New function.
17224 (hexify): New function.
17225 (input_interrupt): Send signals to ``signal_pid''.
17226 * server.c (inferior_pid): Remove.
17227 (start_inferior): Update create_inferior call.
17228 (attach_inferior): Call add_inferior.
17229 (handle_query): New function.
17230 (main): Call handle_query for `q' packets.
17231 * server.h: Include "target.h". Remove obsolete prototypes.
17232 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17234 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17236 * Makefile.in: Add WARN_CFLAGS. Update configury
17238 * configure.in: Check for <string.h>
17239 * configure: Regenerate.
17240 * config.in: Regenerate.
17241 * gdbreplay.c: Include needed system headers.
17242 (remote_open): Remove strchr prototype.
17243 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17244 * regcache.c (supply_register): Change buf argument to const void *.
17245 (supply_register_by_name): Likewise.
17246 (collect_register): Change buf argument to void *.
17247 (collect_register_by_name): Likewise.
17248 * regcache.h: Add missing prototypes.
17249 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17250 * server.c (handle_query): New function.
17251 (attached): New static variable, moved out of main.
17252 (main): Quiet longjmp clobber warnings.
17253 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17254 * utils.c (error): Remove NORETURN.