1 2019-01-25 Tom Tromey <tom@tromey.com>
3 * win32-low.c: Fix common/ includes.
4 * win32-i386-low.c: Fix common/ includes.
5 * tracepoint.c: Fix common/ includes.
6 * thread-db.c: Fix common/ includes.
7 * target.h: Fix common/ includes.
8 * symbol.c: Fix common/ includes.
9 * spu-low.c: Fix common/ includes.
10 * server.h: Fix common/ includes.
11 * server.c: Fix common/ includes.
12 * remote-utils.c: Fix common/ includes.
13 * regcache.h: Fix common/ includes.
14 * regcache.c: Fix common/ includes.
15 * nto-x86-low.c: Fix common/ includes.
16 * notif.h: Fix common/ includes.
17 * mem-break.h: Fix common/ includes.
18 * lynx-low.c: Fix common/ includes.
19 * lynx-i386-low.c: Fix common/ includes.
20 * linux-x86-tdesc-selftest.c: Fix common/ includes.
21 * linux-x86-low.c: Fix common/ includes.
22 * linux-low.c: Fix common/ includes.
23 * inferiors.h: Fix common/ includes.
24 * i387-fp.c: Fix common/ includes.
25 * hostio.c: Fix common/ includes.
26 * hostio-errno.c: Fix common/ includes.
27 * gdbthread.h: Fix common/ includes.
28 * gdbreplay.c: Fix common/ includes.
29 * fork-child.c: Fix common/ includes.
30 * event-loop.c: Fix common/ includes.
32 (enum gdb_agent_op): Fix common/ includes.
34 2019-01-21 Tom Tromey <tom@tromey.com>
36 * tracepoint.c: Fix includes.
37 * remote-utils.c: Fix includes.
38 * linux-x86-low.c: Fix includes.
40 2019-01-01 Joel Brobecker <brobecker@adacore.com>
42 * gdbreplay.c (gdbreplay_version): Update copyright year in
44 * server.c (gdbserver_version): Likewise.
46 2018-12-05 Alan Hayward <alan.hayward@arm.com>
48 * linux-low.c (add_lwp): Switch ordering.
50 2018-11-29 Tom Tromey <tom@tromey.com>
52 * win32-low.c (win32_join): Take pid, not process.
53 * target.h (struct target_ops) <join>: Change argument type.
54 (join_inferior): Change argument name.
55 * spu-low.c (spu_join): Take pid, not process.
56 * server.c (handle_detach): Preserve pid before destroying
58 * lynx-low.c (lynx_join): Take pid, not process.
59 * linux-low.c (linux_join): Take pid, not process.
61 2018-11-23 Alan Hayward <alan.hayward@arm.com>
63 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
64 (aarch64_cannot_fetch_register): Likewise.
65 (struct linux_target_ops): Update references.
67 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
69 * linux-ppc-low.c: Include nat/linux-ptrace.h.
71 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
73 * configure.srv (ipa_ppc_linux_regobj): Add
74 powerpc-isa207-htm-vsx32l-ipa.o and
75 powerpc-isa207-htm-vsx64l-ipa.o.
76 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
77 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
78 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
79 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
80 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
81 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
82 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
83 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
84 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
85 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
86 (init_registers_powerpc_isa207_htm_vsx32l)
87 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
88 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
89 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
90 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
91 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
92 (ppc_store_tm_ctarregset): New functions.
93 (ppc_regsets): Add entries for HTM regsets.
94 (ppc_arch_setup): Set htm in features struct when needed. Set
95 sizes for the HTM regsets.
96 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
97 (initialize_low_arch): Call
98 init_registers_powerpc_isa207_htm_vsx32l and
99 init_registers_powerpc_isa207_htm_vsx64l.
100 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
101 PPC_TDESC_ISA207_HTM_VSX.
102 (initialize_low_tracepoint): Call
103 init_registers_powerpc_isa207_htm_vsx32l and
104 init_registers_powerpc_isa207_htm_vsx64l.
106 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
108 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
109 rs6000/power-linux-pmu.xml to srv_xmlfiles.
110 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
111 (ppc_store_pmuregset): New functions.
112 (ppc_regsets): Add entries for ebb and pmu regsets.
113 (ppc_arch_setup): Set isa207 in features struct if the ebb and
114 pmu regsets are available. Set sizes for these regsets.
116 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
118 * configure.srv (ipa_ppc_linux_regobj): Add
119 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
120 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
121 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
122 rs6000/powerpc-isa207-vsx32l.xml, and
123 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
124 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
125 <PPC_TDESC_ISA207_VSX>: New enum value.
126 (init_registers_powerpc_isa207_vsx32l): Declare.
127 (init_registers_powerpc_isa207_vsx64l): Declare.
128 * linux-ppc-low.c (ppc_fill_tarregset): New function.
129 (ppc_store_tarregset): New function.
130 (ppc_regsets): Add entry for the TAR regset.
131 (ppc_arch_setup): Set isa207 in features struct when needed. Set
132 size for the TAR regsets.
133 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
134 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
135 and init_registers_powerpc_isa207_vsx64l.
136 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
137 (initialize_low_tracepoint): Call
138 init_registers_powerpc_isa207_vsx32l and
139 init_registers_powerpc_isa207_vsx64l.
141 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
142 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
144 * configure.srv (ipa_ppc_linux_regobj): Add
145 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
146 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
147 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
148 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
149 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
150 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
151 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
152 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
153 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
154 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
155 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
156 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
157 (ppc_hwcap): Add comment.
158 (ppc_hwcap2): New global.
159 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
160 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
161 (ppc_regsets): Add entries for the DSCR and PPR regsets.
162 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
163 when needed. Set sizes for the the DSCR and PPR regsets.
164 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
165 (initialize_low_arch): Call
166 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
167 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
168 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
169 PPC_TDESC_ISA205_PPR_DSCR_VSX.
170 (initialize_low_tracepoint): Call
171 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
172 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
174 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
176 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
178 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
179 Simon Marchi <simark@simark.ca>
181 * acinclude.m4: Include "../selftest.m4".
182 * configure: Regenerate.
183 * configure.ac: Use "GDB_AC_SELFTEST".
184 * configure.srv: Use "$enable_unittests" instead of
185 "$development" when checking whether unit tests have been
187 * server.c (captured_main): Update message informing that
188 selftests have been disabled.
190 2018-10-04 Tom Tromey <tom@tromey.com>
192 * configure: Rebuild.
194 2018-10-04 Tom Tromey <tom@tromey.com>
196 * server.c (handle_status): Rename inner "thread".
197 (process_serial_event): Declare "res" in 'm' case.
198 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
199 (iterate_over_lwps): Rename inner "thread".
200 (linux_qxfer_libraries_svr4): Rename inner "len".
201 * gdbthread.h (find_thread_in_random): Rename inner "thread".
203 2018-10-01 Gary Benson <gbenson@redhat.com>
205 * gdb_proc_service.h: Moved common code to
206 common/gdb_proc_service.h.
208 2018-10-01 Gary Benson <gbenson@redhat.com>
210 * gdb_proc_service.h: Synchronize comments and whitespace with
211 GDB's version of this file.
213 2018-09-25 Tom Tromey <tom@tromey.com>
215 * configure: Rebuild.
216 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
218 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
220 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
221 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
222 ($(IPA_LIB)): Sort IPA_OBJS.
224 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
226 * Makefile.in: Remove references to $(ADD_DEPS).
228 2018-09-16 Tom Tromey <tom@tromey.com>
230 * remote-utils.c (remote_open): Use GNU style for metasyntactic
232 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
235 2018-09-05 Tom Tromey <tom@tromey.com>
237 * configure: Rebuild.
239 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
242 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
244 2018-08-27 Tom Tromey <tom@tromey.com>
247 * configure: Rebuild.
249 2018-08-27 Tom Tromey <tom@tromey.com>
251 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
252 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
253 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
254 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
255 (s390x_emit_stack_adjust): Add casts to unsigned char.
257 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
261 * server.h (struct client_state) <disable_randomization>:
264 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
266 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
268 (mips_supply_ptrace_register): Likewise.
270 2018-07-22 Tom Tromey <tom@tromey.com>
272 * configure: Rebuild.
274 2018-07-22 Tom Tromey <tom@tromey.com>
276 * win32-low.c (win32_create_inferior): Remove unused variables.
277 * gdbreplay.c (remote_open): Remove unused variable.
278 * remote-utils.c (remote_prepare): Remove unused variable.
279 * x86-tdesc.h (X86_TDESC_H): Define.
280 (amd64_expedite_regs): Define conditionally.
281 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
282 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
283 * remote-utils.c (readchar): Remove unused variable.
285 2018-07-13 Pedro Alves <palves@redhat.com>
287 * linux-low.c (linux_kill): Change parameter to process_info
288 pointer instead of pid. Adjust.
289 * lynx-low.c (lynx_kill): Likewise.
290 * nto-low.c (nto_kill): Likewise.
291 * spu-low.c (spu_kill): Likewise.
292 * win32-low.c (win32_kill): Likewise.
293 * server.c (handle_v_kill, kill_inferior_callback)
294 (detach_or_kill_for_exit): Adjust.
295 * target.c (kill_inferior): Change parameter to process_info
296 pointer instead of pid. Adjust.
297 * target.h (struct target_ops) <kill>: Change parameter to
298 process_info pointer instead of pid. Adjust all implementations
300 (kill_inferior): Likewise.
302 2018-07-13 Pedro Alves <palves@redhat.com>
304 * linux-low.c (linux_detach, linux_join): Change parameter to
305 process_info pointer instead of pid. Adjust.
306 * lynx-low.c (lynx_detach, lynx_join): Likewise.
307 * nto-low.c (nto_detach): Likewise.
308 * spu-low.c (spu_detach, spu_join): Likewise.
309 * win32-low.c (win32_detach, win32_join): Likewise.
310 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
311 * target.h (struct target_ops) <detach, join>: Change parameter to
312 process_info pointer instead of pid. Adjust all implementations
314 (detach_inferior, join_inferior): Rename 'pid' parameter to
317 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
318 Jan Kratochvil <jan.kratochvil@redhat.com>
319 Paul Fertser <fercerpav@gmail.com>
320 Tsutomu Seki <sekiriki@gmail.com>
322 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
323 (OBS): Add 'common/netstuff.o'.
324 (GDBREPLAY_OBS): Likewise.
325 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
326 (remote_open): Implement support for IPv6
328 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
330 (handle_accept_event): Accept connections from IPv6 sources.
331 (remote_prepare): Handle IPv6-style hostnames; implement
332 support for IPv6 connections.
333 (remote_open): Implement support for printing connections from
336 2018-07-11 Pedro Alves <palves@redhat.com>
339 * mem-break.c (any_persistent_commands): Add process_info
340 parameter and use it instead of relying on the current process.
341 Change return type to bool.
342 * mem-break.h (any_persistent_commands): Add process_info
343 parameter and change return type to bool.
344 * server.c (handle_detach): Remove require_running_or_return call.
345 Look up the process_info for the process we're about to detach.
346 If not found, return back error to GDB. Adjust
347 any_persistent_commands call to pass down a process pointer.
349 2018-07-11 Pedro Alves <palves@redhat.com>
351 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
352 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
353 instead of collect_register_by_name.
354 * regcache.c (regcache_raw_get_unsigned_by_name): New.
355 * regcache.h (regcache_raw_get_unsigned_by_name): New.
357 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
358 Pedro Alves <palves@redhat.com>
360 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
362 2018-07-03 Tom Tromey <tom@tromey.com>
364 * linux-low.c: Update.
365 * lynx-low.c: Update.
366 * mem-break.c: Update.
368 * remote-utils.c: Update.
372 * win32-low.c: Update.
374 2018-07-03 Tom Tromey <tom@tromey.com>
378 2018-07-03 Tom Tromey <tom@tromey.com>
380 * linux-low.c: Update.
382 2018-07-03 Tom Tromey <tom@tromey.com>
386 2018-07-03 Tom Tromey <tom@tromey.com>
388 * linux-low.c: Update.
389 * linux-mips-low.c: Update.
390 * lynx-low.c: Update.
392 * remote-utils.c: Update.
396 * thread-db.c: Update.
398 2018-07-03 Tom Tromey <tom@tromey.com>
400 * linux-low.c: Update.
401 * linux-mips-low.c: Update.
402 * lynx-low.c: Update.
403 * mem-break.c: Update.
405 * remote-utils.c: Update.
409 * tracepoint.c: Update.
411 2018-07-03 Tom Tromey <tom@tromey.com>
413 * linux-low.c: Update.
414 * linux-ppc-low.c: Update.
415 * linux-x86-low.c: Update.
416 * proc-service.c: Update.
419 * thread-db.c: Update.
420 * win32-low.c: Update.
422 2018-07-03 Tom Tromey <tom@tromey.com>
424 * linux-low.c: Update.
425 * lynx-low.c: Update.
427 * remote-utils.c: Update.
429 * thread-db.c: Update.
430 * win32-low.c: Update.
432 2018-06-29 Joel Brobecker <brobecker@adacore.com>
434 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
435 parameter in call to 'amd64_create_target_description'.
437 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
439 * x86-tdesc.h: Remove executable permission flag.
441 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
443 * configure.ac: Remove AC_PREREQ, add missing quoting.
444 * configure: Re-generate.
445 * config.in: Re-generate.
446 * aclocal.m4: Re-generate.
448 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
450 * tracepoint.h (current_traceframe): Remove declaration.
452 2018-06-18 Alan Hayward <alan.hayward@arm.com>
454 * linux-aarch64-low.c (is_sve_tdesc): New function.
455 (aarch64_sve_regs_copy_to_regcache): Likewise.
456 (aarch64_sve_regs_copy_from_regcache): Likewise.
457 (aarch64_regs_info): Add SVE checks.
458 (initialize_low_arch): Initialize SVE.
460 2018-06-18 Alan Hayward <alan.hayward@arm.com>
462 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
464 2018-06-11 Alan Hayward <alan.hayward@arm.com>
466 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
467 (initialize_low_tracepoint): Likewise
468 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
469 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
471 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
473 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
475 2018-06-11 Alan Hayward <alan.hayward@arm.com>
477 * server.h (PBUFSIZ): Increase size
479 2018-06-11 Alan Hayward <alan.hayward@arm.com>
481 * regcache.c (regcache::raw_compare): New function.
482 * regcache.h (regcache::raw_compare): New declaration.
484 2018-06-11 Alan Hayward <alan.hayward@arm.com>
486 * regcache.c (new_register_cache): Use new.
487 (free_register_cache): Use delete.
488 (register_data): Use const.
489 (supply_register): Move body inside regcache.
490 (regcache::raw_supply): New override function.
491 (collect_register): Move body inside regcache.
492 (regcache::raw_collect): New override function.
493 (regcache::get_register_status): New override function.
494 * regcache.h (struct regcache): Inherit from reg_buffer_common.
496 2018-06-09 Tom Tromey <tom@tromey.com>
498 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
500 (event_queue): Use std::queue.
501 (gdb_event_xfree): Remove.
502 (initialize_event_loop, process_event, wait_for_event): Update.
504 2018-06-08 Stan Cox <scox@redhat.com>
506 * win32-low.c (win32_create_inferior): last_ptid and last_status
507 moved to client_state.
509 2018-06-08 Pedro Alves <palves@redhat.com>
511 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
512 common/common-exceptions.o, common/common-utils.o,
513 common/errors.o, common/print-utils.o and utils.o.
514 * gdbreplay.c: Include "common-defs.h" instead of the two
515 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
516 string.h or alloca.h.
517 (perror_with_name): Delete.
518 (remote_open): Use xstrdup instead of strdup.
519 (main): Rename to ...
520 (captured_main): ... this.
523 2018-06-08 Tom Tromey <tom@tromey.com>
525 * linux-low.c (linux_low_read_btrace): Update.
527 2018-06-04 Stan Cox <scox@redhat.com>
529 * server.h (struct client_state): New.
530 * server.c (cont_thread, general_thread, multi_process)
531 (report_fork_events, report_vfork_events, report_exec_events)
532 (report_thread_events, swbreak_feature, hwbreak_feature)
533 (vCont_supported, disable_randomization, pass_signals)
534 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
535 Moved to client_state.
536 * remote-utils.c (remote_debug, noack_mode)
537 (transport_is_reliable): Moved to client_state.
538 * tracepoint.c (current_traceframe): Moved to client_state.
541 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
542 linux-low.c, remote-utils.h, target.c: Use client_state.
544 2018-05-31 Alan Hayward <alan.hayward@arm.com>
546 * configure.srv: Add new c/h file.
548 2018-05-31 Alan Hayward <alan.hayward@arm.com>
550 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
553 2018-05-25 Maciej W. Rozycki <macro@mips.com>
555 * gdb.arch/mips-fpregset-core.exp: New test.
556 * gdb.arch/mips-fpregset-core.c: New test source.
558 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
561 * hostio.c (require_int): Do not report overflow for integers
562 between 0xfffffff and 0x7fffffff.
564 2018-05-22 Maciej W. Rozycki <macro@mips.com>
566 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
567 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
568 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
570 (the_low_target): Wire them.
572 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
574 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
575 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
576 mode. Call collect_register_by_name with vscr using
577 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
578 (ppc_store_vrregset): Add and set vscr_offset variable as in
579 ppc_fill_vrregset. Call supply_register_by_name with vscr using
582 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
584 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
585 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
586 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
588 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
590 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
591 (ppc_store_vsxregset): Likewise.
592 (ppc_fill_vrregset): Likewise.
593 (ppc_store_vrregset): Likewise.
594 (ppc_fill_evrregset): Likewise.
595 (ppc_store_evrregset): Likewise.
596 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
597 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
600 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
602 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
603 wordsize of the inferior. Call ppc_linux_target_wordsize.
605 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
607 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
608 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
609 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
610 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
611 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
612 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
613 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
614 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
615 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
616 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
617 (tdesc_powerpc_e500l): Remove.
618 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
619 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
620 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
621 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
623 (ppc_arch_setup): Remove target description matching code. Fill a
624 ppc_linux_features struct and call ppc_linux_match_description
627 2018-05-22 Maciej W. Rozycki <macro@mips.com>
629 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
630 width of the requested register exceeds the width of the
632 (mips_cannot_store_register): Likewise.
634 2018-05-21 Maciej W. Rozycki <macro@mips.com>
636 * linux-mips-low.c (mips_fetch_register): New function. Update
638 (mips_store_gregset): Supply 0 rather than $restart for $zero.
639 (the_low_target): Wire `mips_fetch_register'.
641 2018-05-10 Joel Brobecker <brobecker@adacore.com>
643 * lynx-i386-low.c (LYNXOS_178): New macro.
644 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
645 the layout on LynxOS-178.
646 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
647 handle floating point registers that are not supported by
650 2018-05-10 Tom Tromey <tom@tromey.com>
652 * configure: Rebuild.
654 2018-05-10 Joel Brobecker <brobecker@adacore.com>
657 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
658 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
659 Use it to set the expedite_regs field in the given tdesc.
660 * x86-tdesc.h: New file.
661 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
662 Adjust following the addition of the new expedite_regs parameter
664 * linux-tic6x-low.c (tic6x_read_description): Likewise.
665 * linux-x86-tdesc.c: #include "x86-tdesc.h".
666 (i386_linux_read_description, amd64_linux_read_description):
667 Adjust following the addition of the new expedite_regs parameter
669 * lynx-i386-low.c: #include "x86-tdesc.h".
670 (lynx_i386_arch_setup): Adjust following the addition of the new
671 expedite_regs parameter to init_target_desc.
672 * nto-x86-low.c: #include "x86-tdesc.h".
673 (nto_x86_arch_setup): Adjust following the addition of the new
674 expedite_regs parameter to init_target_desc.
675 * win32-i386-low.c: #include "x86-tdesc.h".
676 (i386_arch_setup): Adjust following the addition of the new
677 expedite_regs parameter to init_target_desc.
679 2018-05-10 Joel Brobecker <brobecker@adacore.com>
682 * win32-low.c (win32_create_inferior): Add call to my_wait
683 setting last_status global.
685 2018-05-10 Joel Brobecker <brobecker@adacore.com>
688 * win32-low.c (create_process): Only call gdb_tilde_expand if
689 inferior_cwd is not NULL.
691 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
693 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
694 registers to the cache if their values have changed.
695 (i387_xsave_to_cache): Provide default values for x87 control
696 registers when these features are available, but disabled.
697 * regcache.c (supply_register_by_name_zeroed): New function.
698 * regcache.h (supply_register_by_name_zeroed): Declare new
701 2018-05-07 Tom Tromey <tom@tromey.com>
703 * configure: Rebuild.
705 2018-05-04 Tom Tromey <tom@tromey.com>
707 * configure: Rebuild.
709 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
710 Pedro Alves <palves@redhat.com>
712 * linux-aarch64-low.c (aarch64_stopped_data_address):
715 2018-04-27 Tom Tromey <tom@tromey.com>
717 * configure: Rebuild.
719 2018-04-23 Tom Tromey <tom@tromey.com>
721 * configure: Rebuild.
723 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
725 * Makefile.in (depcomp): Add "..".
726 (all_deps_files): New and use it.
728 2018-04-18 Alan Hayward <alan.hayward@arm.com>
730 * configure.srv (aarch64*-*-linux*): Don't include xml.
731 (i[34567]86-*-cygwin*): Likewise.
732 (i[34567]86-*-linux*): Likewise.
733 (i[34567]86-*-lynxos*): Likewise.
734 (i[34567]86-*-mingw32ce*): Likewise.
735 (i[34567]86-*-mingw*): Likewise.
736 (i[34567]86-*-nto*): Likewise.
737 (tic6x-*-uclinux): Likewise.
738 (x86_64-*-linux*): Likewise.
739 (x86_64-*-mingw*): Likewise.
740 (x86_64-*-cygwin*): Likewise.
742 2018-04-18 Alan Hayward <alan.hayward@arm.com>
744 * tdesc.c: Remove xml parameter.
746 2018-04-18 Alan Hayward <alan.hayward@arm.com>
748 * server.c (get_features_xml): Remove cast.
749 * tdesc.c (void target_desc::accept): Fill in function.
750 (tdesc_get_features_xml): Remove old xml creation.
751 (print_xml_feature::visit_pre): Add xml vistor.
752 * tdesc.h (struct target_desc): Make xmltarget mutable.
753 (tdesc_get_features_xml): Remove declaration.
755 2018-04-18 Alan Hayward <alan.hayward@arm.com>
757 * tdesc.c (tdesc_architecture_name): Add new function.
758 (tdesc_osabi_name): Likewise.
759 (tdesc_get_features_xml): Use new functions.
761 2018-04-18 Alan Hayward <alan.hayward@arm.com>
763 * tdesc.c (tdesc_create_flags): Remove.
764 (tdesc_add_flag): Likewise.
765 (tdesc_named_type): Likewise.
766 (tdesc_create_union): Likewise.
767 (tdesc_create_struct): Likewise.
768 (tdesc_create_vector): Likewise.
769 (tdesc_add_bitfield): Likewise.
770 (tdesc_add_field): Likewise.
771 (tdesc_set_struct_size): Likewise.
773 2018-04-18 Alan Hayward <alan.hayward@arm.com>
775 * tdesc.c (~target_desc): Remove implictly deleted items.
776 (init_target_desc): Iterate all features.
777 (tdesc_get_features_xml): Use vector.
778 (tdesc_create_feature): Create feature.
779 * tdesc.h (tdesc_feature) Remove
780 (target_desc): Add features.
782 2018-04-18 Alan Hayward <alan.hayward@arm.com>
784 * Makefile.in: Add common/tdesc.c
785 * tdesc.c (init_target_desc): init all reg_defs from register
787 (tdesc_create_reg): Create tdesc_reg.
788 * tdesc.h (tdesc_feature): Add register vector.
790 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
792 * tdesc.h (struct target_desc) <features>: Change type to
793 std::vector<std::string>.
794 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
796 (tdesc_get_features_xml): Likewise.
797 (tdesc_create_feature): Likewise.
799 2018-03-26 Alan Hayward <alan.hayward@arm.com>
801 * regcache.c (find_register_by_number): Return a ref.
802 (find_regno): Use references.
803 (register_size): Likewise.
804 (register_data): Likewise.
805 * tdesc.c (target_desc::~target_desc): Remove free calls.
806 (target_desc::operator==): Use std::vector compare.
807 (init_target_desc): Use reference.
808 (tdesc_create_reg): Use reg constructors.
809 * tdesc.h (struct target_desc): Replace pointer with object.
811 2018-03-23 Alan Hayward <alan.hayward@arm.com>
813 * regcache.c (find_register_by_number): Make static.
814 (find_regno): Use find_register_by_number
815 * regcache.h (struct reg): Remove declaration.
817 2018-03-23 Alan Hayward <alan.hayward@arm.com>
819 * tdesc.c (target_desc::~target_desc): Move to here.
820 (target_desc::operator==): Likewise.
821 * tdesc.h (target_desc::~target_desc): Move from here.
822 (target_desc::operator==): Likewise.
824 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
826 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
828 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
830 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
832 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
833 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
834 and init_registers_s390_gs_linux64.
836 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
838 * linux-s390-low.c (s390_fill_gs): Remove function.
839 (s390_fill_gsbc): Remove function.
840 (s390_regsets): Set fill functions for the guarded storage regsets
843 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
845 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
846 the word size. Add comment.
847 (s390_get_wordsize): New function.
848 (s390_arch_setup): No longer select a temporary tdesc to fetch the
849 pswm with it. Instead, use s390_get_wordsize to determine the
850 word size first and derive the correct tdesc from that directly.
852 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
854 * Makefile.in: Include silent-rules.mk.
855 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
856 (COMPILE): Add ECHO_CXX.
857 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
858 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
859 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
860 (version-generated.c): Add ECHO_GEN.
861 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
862 (IPAGENT_COMPILE): Add ECHO_CXX.
863 (%-generated.c): Add ECHO_REGDAT.
865 2018-03-14 Tom Tromey <tom@tromey.com>
868 * ax.c (ax_printf): Special case for NULL.
870 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
872 * linux-low.c (linux_qxfer_libraries_svr4): Use
873 xml_escape_text_append.
875 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
877 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
879 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
881 * server.c (handle_general_set): Remove unnecessary xstrdup.
883 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
885 * server.c (parse_debug_format_options): Adjust to
886 delim_string_to_char_ptr_vec changes.
887 * thread-db.c (thread_db_load_search): Adjust to
888 dirnames_to_char_ptr_vec changes.
890 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
892 * target.h (target_enable_btrace, target_disable_btrace)
893 (target_read_btrace, target_read_btrace_conf): Turn macro into
894 inline function. Throw error if target method is not defined.
895 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
896 check for btrace target method. Be prepared to handle exceptions
897 from btrace target methods.
899 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
901 * server.c (captured_main): Change order of error message printed
902 when the current working directory cannot be found.
904 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
906 * server.c: Include "filenames.h" and "pathstuff.h".
907 (program_name): Delete variable.
908 (program_path): New anonymous class.
909 (get_exec_wrapper): Use "program_path" instead of
911 (handle_v_run): Likewise.
912 (captured_main): Likewise.
913 (process_serial_event): Likewise.
915 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
917 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
918 (OBJS): Add "pathstuff.o".
919 * server.c (current_directory): New global variable.
920 (captured_main): Initialize "current_directory".
922 2018-02-26 Alan Hayward <alan.hayward@arm.com>
924 * tdesc.c: Use common/tdesc.h.
927 2018-02-20 Alan Hayward <alan.hayward@arm.com>
928 Simon Marchi <simon.marchi@ericsson.com>
930 * Makefile.in: Switch order of make rules.
932 2018-02-19 Alan Hayward <alan.hayward@arm.com>
934 * Makefile.in: Add common directory in build.
935 * configure.ac: Add common reference.
936 * configure: Regenerate.
938 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
940 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
941 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
942 * spu-low.c (spu_target_ops): Likewise.
943 * win32-low.c (win32_target_ops): Likewise.
944 * server.c (supported_btrace_packets): Report packets unconditionally.
945 * target.h (target_ops) <supports_btrace>: Remove.
946 (target_supports_btrace): Remove.
948 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
950 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
951 (handle_btrace_disable): Change return type to void. Use exceptions
953 (handle_btrace_general_set): Catch exception and copy message to
956 2018-02-08 Tom Tromey <tom@tromey.com>
958 * linux-low.c (install_software_single_step_breakpoints): Use
960 * inferiors.c (make_cleanup_restore_current_thread): Remove.
961 (do_restore_current_thread_cleanup): Remove.
962 * gdbthread.h (make_cleanup_restore_current_thread): Don't
965 2018-02-08 Tom Tromey <tom@tromey.com>
967 * mem-break.c (set_raw_breakpoint_at): Use
968 gdb::unique_xmalloc_ptr.
970 2018-01-30 Pedro Alves <palves@redhat.com>
973 * target.c (target_terminal::terminal_state): Rename to ...
974 (target_terminal::m_terminal_state): ... this.
976 2018-01-19 James Clarke <jrtc27@jrtc27.com>
978 * linux-low.c (handle_extended_wait): Surround call to
979 thread_db_notice_clone with #ifdef USE_THREAD_DB.
981 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
983 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
984 linux_ptrace_attach_fail_reason_string now returning an
986 (linux_attach): Likewise.
987 * thread-db.c (attach_thread): Likewise.
989 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
992 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
993 checking for fs_base/gs_base fields in struct user_regs_struct.
994 * configure: Regenerate.
996 2018-01-16 Yao Qi <yao.qi@linaro.org>
999 * linux-low.c (fetch_register): Call supply_register instead of
1002 2018-01-08 Yao Qi <yao.qi@linaro.org>
1003 Simon Marchi <simon.marchi@ericsson.com>
1005 * Makefile.in (OBS): Remove selftest.o.
1006 * configure.ac: Set srv_selftest_objs if $development is true.
1007 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1008 * configure: Re-generated.
1009 * server.c (captured_main): Wrap variable selftest_filter with
1012 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1014 * server.c (parse_debug_format_options): Return std::string.
1015 (handle_monitor_command, captured_main): Adjust.
1017 2018-01-05 Pedro Alves <palves@redhat.com>
1020 * server.c (captured_main): Pass quiet=false to
1021 save_original_signals_state.
1023 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1025 * gdbreplay.c (gdbreplay_version): Update copyright year in
1027 * server.c (gdbserver_version): Likewise.
1029 2017-12-08 Tom Tromey <tom@tromey.com>
1031 * ax.c (ax_printf): Update.
1033 2017-12-07 Yao Qi <yao.qi@linaro.org>
1035 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1036 aarch64_linux_read_description.
1037 * linux-amd64-ipa.c (idx2mask): New array.
1038 (get_ipa_tdesc): Move idx2mask out.
1039 (initialize_low_tracepoint): Initialize target descriptions.
1040 * linux-i386-ipa.c (idx2mask): New array.
1041 (get_ipa_tdesc): Move idx2mask out.
1042 (initialize_low_tracepoint): Initialize target descriptions.
1044 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1046 * tdesc.c (struct tdesc_type): Change return type.
1047 (tdesc_add_flag): Change parameter type.
1048 (tdesc_add_bitfield): Likewise.
1049 (tdesc_add_field): Likewise.
1050 (tdesc_set_struct_size): Likewise.
1052 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1054 * regcache.c (registers_to_string): Remove unused variable.
1056 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1058 * inferiors.c (for_each_inferior_with_data): Remove.
1059 * inferiors.h (for_each_inferior_with_data): Remove.
1060 * server.c (handle_qxfer_threads_worker): Change parameter type.
1061 (handle_qxfer_threads_proper): Use for_each_thread.
1063 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1065 * inferiors.c (for_each_inferior): Remove.
1066 (clear_inferiors): Use for_each_thread.
1067 * inferiors.h (for_each_inferior): Remove.
1068 * linux-low.c (linux_wait_for_event_filtered): Use
1070 (linux_stabilize_threads): Likewise.
1071 * regcache.c (regcache_release): Likewise.
1072 * server.c (gdb_wants_all_threads_stopped): Likewise.
1073 (clear_pending_status_callback): Remove.
1074 (handle_status): Use for_each_thread.
1075 (captured_main): Likewise.
1076 * win32-low.c (child_init_thread_list): Likewise.
1077 (win32_clear_inferiors): Likewise.
1078 (fake_breakpoint_event): Likewise.
1080 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1082 * inferiors.h (find_inferior): Remove.
1083 * inferiors.c (find_inferior): Remove.
1085 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1087 * linux-low.c (resume_status_pending_p): Update comment.
1088 (need_step_over_p): Update comment.
1090 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1092 * linux-low.c (proceed_one_lwp): Return void, change parameter
1094 (unsuspend_and_proceed_one_lwp): Likewise.
1095 (proceed_all_lwps): Use for_each_thread.
1096 (unstop_all_lwps): Likewise.
1098 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1100 * linux-low.c (linux_resume_one_thread): Return void, take
1102 (linux_resume): Use for_each_thread.
1104 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1106 * linux-low.c (send_sigstop_callback): Return void, change
1107 parameter type. Rename to...
1108 (send_sigstop): ... this.
1109 (suspend_and_send_sigstop_callback): Return void, change parameter
1111 (suspend_and_send_sigstop): ... this.
1112 (stop_all_lwps): Use for_each_thread.
1114 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1116 * linux-low.c (lwp_running): Return bool, remove unused
1118 (linux_stabilize_threads): Use find_thread.
1120 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1122 * linux-low.c (select_singlestep_lwp_callback): Remove.
1123 (count_events_callback): Remove.
1124 (select_event_lwp_callback): Remove.
1125 (select_event_lwp): Use find_thread/for_each_thread.
1127 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1129 * linux-low.c (not_stopped_callback): Return bool, take filter
1131 (linux_wait_for_event_filtered): Use find_thread.
1132 (linux_wait_1): Likewise.
1134 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1136 * linux-low.c (same_lwp): Remove.
1137 (find_lwp_pid): Use find_thread.
1139 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1141 * linux-low.c (delete_lwp_callback): Remove.
1142 (linux_mourn): Use for_each_thread.
1144 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1146 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1147 args parameter, don't check for pid.
1148 (linux_detach): Use for_each_thread.
1150 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1152 * linux-low.c (struct counter): Remove.
1153 (second_thread_of_pid_p): Remove.
1154 (last_thread_of_process_p): Use find_thread.
1156 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1158 * inferiors.c (find_inferior_in_random): Remove.
1159 * inferiors.h (find_inferior_in_random): Remove.
1160 * linux-low.c (status_pending_p_callback): Return bool, accept
1161 parameter ptid directly.
1162 (linux_wait_for_event_filtered): Use find_thread_in_random.
1163 (linux_wait_1): Likewise.
1165 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1167 * inferiors.c (find_inferior_id): Remove.
1168 (find_thread_ptid): Move implemention from find_inferior_id to
1170 * inferiors.h (find_inferior_id): Remove.
1171 * server.c (handle_status): Use find_thread_ptid.
1172 (process_serial_event): Likewise.
1173 * thread-db.c (find_one_thread): Likewise.
1174 (thread_db_thread_handle): Likewise.
1175 * win32-low.c (thread_rec): Likewise.
1176 (child_delete_thread): Likewise.
1177 (win32_thread_alive): Likewise.
1178 (get_child_debug_event): Likewise.
1180 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1182 * linux-mips-low.c (update_watch_registers_callback): Return
1183 void, remove pid_p parameter, don't check for pid.
1184 (mips_insert_point, mips_remove_point): Use for_each_thread.
1186 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1188 * lynx.low (lynx_delete_thread_callback): Remove.
1189 (lynx_mourn): Use for_each_thread.
1191 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1193 * regcache.c (regcache_invalidate_one): Remove.
1194 (regcache_invalidate_pid): use for_each_thread.
1196 2017-11-26 Tom Tromey <tom@tromey.com>
1198 * linux-low.c (linux_create_inferior): Update.
1200 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1202 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1204 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1206 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1207 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1208 * linux-aarch64-tdesc-selftest.c: New file.
1209 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1211 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1213 * configure.srv: Add new file.
1214 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1215 * linux-aarch64-tdesc-selftest.c: New file.
1216 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1218 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1220 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1221 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1222 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1224 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1226 * configure.srv: Add new files.
1227 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1228 aarch64_linux_read_description.
1229 * linux-aarch64-low.c (aarch64_linux_read_description):
1230 Merge with aarch64_arch_setup.
1231 (aarch64_arch_setup): Call aarch64_linux_read_description.
1232 * linux-aarch64-tdesc.c: New file.
1233 * linux-aarch64-tdesc.h: New file.
1235 2017-11-24 Yao Qi <yao.qi@linaro.org>
1237 * configure.srv: Set $srv_regobj for tic6x-linux.
1238 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1239 (tic6x_read_description): Move some code to tic6x_arch_setup.
1240 (tic6x_tdesc_test): New function.
1241 (initialize_low_arch): Call selftests::register_test.
1243 2017-11-22 Yao Qi <yao.qi@linaro.org>
1245 * remote-utils.c (prepare_resume_reply): Use memcpy.
1247 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1249 * linux-low.c (kill_one_lwp_callback): Return void, take
1250 argument directly, don't filter on pid.
1251 (linux_kill): Use for_each_thread.
1253 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1255 * linux-low.c (need_step_over_p): Return bool, remove dummy
1257 (linux_resume, proceed_all_lwps): Use find_thread.
1259 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1261 * linux-low.c (resume_status_pending_p): Return bool, remove
1263 (linux_resume): Use find_thread.
1265 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1267 * linux-low.c (struct thread_resume_array): Remove.
1268 (linux_set_resume_request): Return void, take arguments
1270 (linux_resume): Use for_each_thread.
1272 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1274 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1275 return bool, remove data argument.
1276 (linux_stabilize_threads): Use find_thread.
1278 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1280 * linux-low.c (unsuspend_one_lwp): Remove.
1281 (unsuspend_all_lwps): Use for_each_thread, inline code from
1284 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1286 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1287 * linux-low.c (struct iterate_over_lwps_args): Remove.
1288 (iterate_over_lwps_filter): Remove.
1289 (iterate_over_lwps): Use find_thread.
1291 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1293 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1294 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1295 code from reset_lwp_ptrace_options_callback.
1297 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1299 * linux-arm-low.c (struct update_registers_data): Remove.
1300 (update_registers_callback): Return void, take arguments
1301 directly, don't check thread's pid.
1302 (arm_insert_point, arm_remove_point): Use for_each_thread.
1304 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1306 * win32-low.c (continue_one_thread): Return void, take argument
1308 (child_continue): Use for_each_thread.
1310 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1312 * win32-i386-low.c (update_debug_registers_callback): Rename
1314 (update_debug_registers): ... this, return void, remove pid_p arg.
1315 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1317 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1319 * inferiors.h (struct process_info): Add constructor, initialize
1321 <syscalls_to_catch>: Change type to std::vector<int>.
1322 * inferiors.c (add_process): Allocate process_info with new.
1323 (remove_process): Free process_info with delete.
1324 * linux-low.c (handle_extended_wait): Adjust.
1325 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1326 * server.c (handle_general_set): Adjust.
1328 2017-11-16 Pedro Alves <palves@redhat.com>
1330 * remote-utils.c (remote_close): Block SIGIO signals instead of
1331 uninstalling the SIGIO handler.
1333 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1335 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1337 2017-11-16 Yao Qi <yao.qi@linaro.org>
1339 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1340 (tic6x_store_gregset): Likewise.
1341 (tic6x_usrregs_info): Move it up.
1343 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1345 * Makefile.in: Update arch rules.
1346 * configure.srv: Explicitly mark arch/ files.
1348 2017-11-13 Andreas Schwab <schwab@suse.de>
1350 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1352 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1354 2017-11-06 Pedro Alves <palves@redhat.com>
1356 * config.in, configure: Regenerate.
1358 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1360 * target.c (struct thread_search): Remove.
1361 (thread_search_callback): Remove.
1362 (prepare_to_access_memory): Use for_each_thread instead of
1363 find_inferior. Inline code from thread_search_callback.
1365 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1367 * server.c (struct visit_actioned_threads_data): Remove.
1368 (visit_actioned_threads): Change prototype to take arguments
1370 (resume): Use find_thread instead of find_inferior.
1372 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1374 * server.c (queue_stop_reply_callback): Change prototype, return
1376 (find_status_pending_thread_callback): Remove.
1377 (handle_status): Replace find_inferior with find_thread and
1380 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1382 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1384 (aarch64_store_gregset): Likewise.
1385 (aarch64_fill_fpregset): Likewise.
1386 (aarch64_store_fpregset): Likewise.
1388 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1390 * gdbthread.h (find_thread, for_each_thread): New functions.
1391 * inferiors.c (thread_of_pid): Remove.
1392 (find_any_thread_of_pid): Use find_thread.
1393 * linux-low.c (num_lwps): Use for_each_thread.
1395 2017-10-17 Yao Qi <yao.qi@linaro.org>
1397 * Makefile.in: Remove one rule.
1398 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1400 2017-10-17 Yao Qi <yao.qi@linaro.org>
1402 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1403 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1405 2017-10-17 Yao Qi <yao.qi@linaro.org>
1407 * configure.srv: Rename arm.o with arch/arm.o.
1409 2017-10-17 Yao Qi <yao.qi@linaro.org>
1411 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1412 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1413 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1414 (arch-i386.o, arch-amd64.o): Remove rules.
1415 (arch/%.o): New rule.
1416 Update POSTCOMPILE and COMPILE.pre.
1417 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1418 * configure: Re-generated.
1419 * configure.srv: Replace arch-i386.o with arch/i386.o.
1420 Replace arch-amd64.o with arch/amd64.o.
1422 2017-10-16 Yao Qi <yao.qi@linaro.org>
1424 * configure: Regenerated.
1426 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1428 * inferiors.h: (struct inferior_list): Remove.
1429 (struct inferior_list_entry); Remove.
1430 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1431 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1432 get_first_inferior): Remove.
1433 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1434 find_inferior_id, find_inferior_in_random): Change signature.
1435 * inferiors.c (all_threads): Change type to
1436 std::list<thread_info *>.
1437 (get_thread): Remove macro.
1438 (find_inferior, find_inferior_id): Change signature, implement
1440 (find_inferior_in_random): Change signature, implement using
1441 find_thread_in_random.
1442 (for_each_inferior, for_each_inferior_with_data): Change
1443 signature, implement using for_each_thread.
1444 (add_inferior_to_list, remove_inferior): Remove.
1445 (add_thread, get_first_thread, thread_of_pid,
1446 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1447 (get_first_inferior, one_inferior_p, clear_inferior_list):
1449 (clear_inferiors, get_thread_process): Update.
1450 * gdbthread.h: Include <list>.
1451 (struct thread_info) <entry>: Remove field.
1453 (all_threads): Change type to std::list<thread_info *>.
1454 (get_first_inferior): Add doc.
1455 (find_thread, for_each_thread, find_thread_in_random): New
1457 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1458 * linux-arm-low.c (update_registers_callback): Update.
1459 * linux-low.c (second_thread_of_pid_p): Update.
1460 (kill_one_lwp_callback, linux_detach_lwp_callback,
1461 delete_lwp_callback, status_pending_p_callback, same_lwp,
1462 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1463 iterate_over_lwps, not_stopped_callback,
1464 resume_stopped_resumed_lwps, count_events_callback,
1465 select_singlestep_lwp_callback, select_event_lwp_callback,
1466 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1467 suspend_and_send_sigstop_callback, wait_for_sigstop,
1468 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1469 lwp_running, linux_set_resume_request, resume_status_pending_p,
1470 need_step_over_p, start_step_over, linux_resume_one_thread,
1471 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1472 reset_lwp_ptrace_options_callback): Update.
1473 * linux-mips-low.c (update_watch_registers_callback): Update.
1474 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1476 (free_register_cache_thread_one): Remove.
1477 (regcache_release): Update.
1478 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1479 handle_qxfer_threads_worker): Update.
1480 (handle_query): Update, use list iterator.
1481 (visit_actioned_threads, handle_pending_status,
1482 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1483 clear_pending_status_callback, set_pending_status_callback,
1484 find_status_pending_thread_callback, handle_status,
1485 process_serial_event): Update.
1486 * target.c (thread_search_callback): Update.
1487 * thread-db.c (thread_db_get_tls_address): Update.
1488 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1490 * win32-i386-low.c (update_debug_registers_callback): Update.
1491 * win32-low.c (delete_thread_info, child_delete_thread,
1492 continue_one_thread, suspend_one_thread,
1493 get_child_debug_event): Adjust.
1495 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1497 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1498 * inferiors.h: Include <list>.
1499 (struct process_info) <entry>: Remove field.
1501 (pid_of): Change macro to function.
1502 (ptid_of, lwpid_of): Remove macro.
1503 (all_processes): Change type to std::list<process_info *>.
1504 (ALL_PROCESSES): Remove macro.
1505 (for_each_process, find_process): New function.
1506 * inferiors.c (all_processes): Change type to
1507 std::list<process_info *>.
1508 (find_thread_process): Adjust.
1509 (add_process): Likewise.
1510 (remove_process): Likewise.
1511 (find_process_pid): Likewise.
1512 (get_first_process): Likewise.
1513 (started_inferior_callback): Remove.
1514 (have_started_inferiors_p): Adjust.
1515 (attached_inferior_callback): Remove.
1516 (have_attached_inferiors_p): Adjust.
1517 * linux-low.c (check_zombie_leaders): Likewise.
1518 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1519 (x86_linux_update_xmltarget): Adjust.
1520 * server.c (handle_query): Likewise.
1521 (gdb_reattached_process): Remove.
1522 (handle_status): Adjust.
1523 (kill_inferior_callback): Likewise.
1524 (detach_or_kill_inferior): Remove.
1525 (print_started_pid): Likewise.
1526 (print_attached_pid): Likewise.
1527 (detach_or_kill_for_exit): Update.
1528 (process_serial_event): Likewise.
1529 * linux-arm-low.c (arm_new_fork): Likewise.
1531 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1533 * dll.h: Include <list>.
1534 (struct dll_info): Add constructor.
1535 <entry>: Remove field.
1536 (all_dlls): Change type to std::list<dll_info>.
1537 * dll.c: Include <algorithm>.
1538 (get_dll): Remove macro.
1539 (all_dlls): Change type to std::list<dll_info *>.
1540 (free_one_dll): Remove.
1541 (match_dll): Likewise.
1542 (loaded_dll): Adjust.
1543 (unloaded_dll): Adjust to all_dlls type change, use
1544 std::find_if. Inline code from match_dll.
1545 (clear_dlls): Adjust to all_dlls type change.
1546 * server.c (emit_dll_description): Remove.
1547 (handle_qxfer_libraries): Adjust to all_dlls type change,
1548 integrate emit_dll_description's functionality.
1550 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1552 * linux-low.h (struct linux_target_ops) <delete_process>: New
1554 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1555 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1556 (struct linux_target_ops): Add delete_process callback.
1557 * linux-arm-low.c (arm_delete_process): New.
1558 (struct linux_target_ops): Add delete_process callback.
1559 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1560 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1561 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1562 * linux-mips-low.c (mips_linux_delete_process): New.
1563 (struct linux_target_ops): Add delete_process callback.
1564 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1565 * linux-s390-low.c (struct linux_target_ops): Likewise.
1566 * linux-sh-low.c (struct linux_target_ops): Likewise.
1567 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1568 * linux-tile-low.c (struct linux_target_ops): Likewise.
1569 * linux-x86-low.c (x86_linux_delete_process): New.
1570 (struct linux_target_ops): Add delete_process callback.
1571 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1573 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1575 * linux-aarch64-low.c (the_low_target): Add thread delete
1577 * linux-arm-low.c (arm_delete_thread): New function.
1578 (the_low_target): Add thread delete callback.
1579 * linux-bfin-low.c (the_low_target): Likewise.
1580 * linux-crisv32-low.c (the_low_target): Likewise.
1581 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1583 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1585 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1586 * linux-mips-low.c (mips_linux_delete_thread): New function.
1587 (the_low_target): Add thread delete callback.
1588 * linux-ppc-low.c (the_low_target): Likewise.
1589 * linux-s390-low.c (the_low_target): Likewise.
1590 * linux-sh-low.c (the_low_target): Likewise.
1591 * linux-tic6x-low.c (the_low_target): Likewise.
1592 * linux-tile-low.c (the_low_target): Likewise.
1593 * linux-x86-low.c (the_low_target): Likewise.
1594 * linux-xtensa-low.c (the_low_target): Likewise.
1596 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1598 * win32-low.c: Include "common-inferior.h".
1600 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1602 * inferiors.c (set_inferior_cwd): New function.
1603 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1604 (handle_query): Inform that QSetWorkingDir is supported.
1605 * win32-low.c (create_process): Pass the inferior's cwd to
1608 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1610 * inferiors.c (current_inferior_cwd): New global variable.
1611 (get_inferior_cwd): New function.
1612 * inferiors.h (struct process_info) <cwd>: New field.
1614 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1616 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1617 (OBS): Add gdb_tilde_expand.o.
1619 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1621 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1622 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1624 2017-09-29 Pedro Alves <palves@redhat.com>
1626 * ax.c (gdb_parse_agent_expr): Constify.
1627 * ax.h (gdb_parse_agent_expr): Constify.
1628 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1630 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1631 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1632 * remote-utils.h (read_ptid): Constify.
1633 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1634 (process_point_options, process_serial_event): Constify.
1635 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1636 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1637 (cmd_qtbuffer): Constify.
1639 2017-09-29 Pedro Alves <palves@redhat.com>
1641 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1644 2017-09-29 Pedro Alves <palves@redhat.com>
1646 * linux-low.c (handle_extended_wait): Pass parent thread instead
1647 of process to thread_db_notice_clone.
1648 * linux-low.h (thread_db_notice_clone): Replace parent process
1649 parameter with parent thread parameter.
1650 * thread-db.c (find_one_thread): Add comment.
1651 (thread_db_notice_clone): Replace parent process parameter with
1652 parent thread parameter. Temporarily switch to the parent thread.
1654 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1656 * gdbthread.h: Include "common-gdbthread.h".
1657 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1658 "if" when validating the ptid.
1659 * remote-utils.c: Include "gdbthread.h".
1660 (prepare_resume_reply): Use "switch_to_thread".
1661 * target.c (done_accessing_memory): Likewise.
1663 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1665 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1666 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1667 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1668 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1669 s390x-gs-linux64-ipa.o to ipa_obj.
1670 * linux-s390-low.c (HWCAP_S390_GS): New define.
1671 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1673 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1674 (s390_arch_setup): Check for guarded-storage support and choose
1676 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1677 init_registers_s390x_gs_linux64.
1678 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1680 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1681 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1683 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1685 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1687 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1689 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1690 (thread_db_thread_handle): Declare.
1691 * linux-low.c (linux_target_ops): Initialize thread_handle.
1692 * server.c (handle_qxfer_threads_worker): Add support for
1694 * target.h (struct target_ops): Add new function pointer,
1696 (target_thread_handle): Define.
1697 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1699 (thread_db_thread_handle): New function.
1701 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1703 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1704 * linux-low.h (thread_db_notice_clone): Declare.
1705 * thread-db.c (thread_db_notice_clone): New function.
1707 2017-09-21 Pedro Alves <palves@redhat.com>
1709 * server.c (gdb_read_memory, handle_status, process_serial_event)
1710 (handle_serial_event, handle_target_event): Adjust to
1711 set_desired_thread prototype change.
1712 * target.c (set_desired_thread): Remove 'use_general' parameter
1714 * target.h (set_desired_thread): Remove 'use_general' parameter.
1716 2017-09-20 Tom Tromey <tom@tromey.com>
1718 * target.c (target_terminal::terminal_state): Define.
1719 (target_terminal::init): Rename from target_terminal_init.
1720 (target_terminal::inferior): Rename from
1721 target_terminal_inferior.
1722 (target_terminal::ours): Rename from target_terminal_ours.
1723 (target_terminal::ours_for_output, target_terminal::info): New.
1725 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1727 * server.c (accumulate_file_name_length): Remove.
1728 (emit_dll_description): Adjust to std::string change.
1729 (handle_qxfer_libraries): Use std::string to hold document.
1731 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1733 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1734 return type of xml_escape_text.
1735 * server.c (emit_dll_description): Likewise.
1737 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1739 * server.c (captured_main): Accept argument for --selftest.
1740 Update run_tests call.
1741 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1742 when registering selftests.
1744 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1746 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1747 instead of "VEC" for "target_desc.reg_defs".
1748 (regcache_cpy): Likewise.
1749 (registers_to_string): Likewise.
1750 (registers_from_string): Likewise.
1751 (find_regno): Likewise.
1752 (supply_regblock): Likewise.
1753 (regcache_raw_read_unsigned): Likewise.
1754 * tdesc.c (init_target_desc): Likewise.
1755 (tdesc_create_reg): Likewise.
1756 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1757 (struct target_desc) <reg_defs>: Convert to "std::vector".
1758 (target_desc): Do not initialize "reg_defs".
1759 (~target_desc): Update code to use "std::vector" instead of "VEC"
1760 for "target_desc.reg_defs".
1761 (operator==): Likewise.
1763 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1765 * inferiors.h (thread_to_gdb_id): Remove.
1766 * inferiors.c (thread_to_gdb_id): Remove.
1767 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1768 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1769 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1771 * nto-low.c (nto_fetch_registers, nto_store_registers,
1772 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1774 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1776 * inferiors.h (gdb_id_to_thread_id): Remove.
1777 * inferiors.c (gdb_id_to_thread_id): Remove.
1778 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1779 removal. Move pid declaration closer to where it's used.
1781 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1783 * server.c (handle_detach): New function.
1784 (process_serial_event): Move code out, call handle_detach.
1786 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1788 * server.c (require_running): Rename to ...
1789 (require_running_or_return): ... this ...
1790 (require_running_or_break): ... and this.
1791 (handle_query, process_serial_event): Adjust.
1793 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1795 * linux-low.c (linux_set_resume_request): Remove unused
1798 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1800 * server.c (first_thread_of): Remove.
1801 (process_serial_event): Replace usage of first_thread_of with
1802 find_any_thread_of_pid.
1803 * tracepoint.c (same_process_p): Remove.
1804 (gdb_agent_about_to_close): Replace usage of same_process_p with
1805 find_any_thread_of_pid.
1806 * linux-x86-low.c (same_process_callback): Remove.
1807 (x86_arch_setup_process_callback): Replace usage of
1808 same_process_callback with find_any_thread_of_pid.
1809 * thread-db.c (any_thread_of): Remove.
1810 (switch_to_process): Replace usage of any_thread_of with
1811 find_any_thread_of_pid.
1812 * inferiors.c (thread_pid_matches_callback): Remove.
1813 (find_thread_process): Adjust to use find_any_thread_of_pid.
1815 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1817 * regcache.c (get_thread_regcache): Guard calls to "memset"
1820 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1822 * linux-low.c (handle_extended_wait): Use
1823 "allocate_target_description" instead of "XNEW".
1824 * linux-x86-low.c (initialize_low_arch): Likewise.
1826 2017-09-05 Yao Qi <yao.qi@linaro.org>
1828 * configure.srv (srv_i386_regobj): Remove.
1829 (srv_amd64_regobj): Remove.
1830 (srv_regobj): Set it to "" for x86 non-linux targets.
1831 * linux-x86-tdesc.c (i386_linux_read_description):
1832 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1833 (init_registers_i386): Remove the declaration.
1834 (tdesc_i386): Remove the declaration.
1835 (lynx_i386_arch_setup): Call i386_create_target_description.
1836 * nto-x86-low.c: Likewise.
1837 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1838 [!__x86_64__]: include arch/i386.h.
1839 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1841 2017-09-05 Yao Qi <yao.qi@linaro.org>
1843 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1844 i386/amd64-XXX-linux from it.
1846 2017-09-05 Yao Qi <yao.qi@linaro.org>
1848 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1850 (ipa_amd64_linux_regobj): Remove.
1851 (ipa_x32_linux_regobj): Remove.
1853 2017-09-05 Yao Qi <yao.qi@linaro.org>
1855 * Makefile.in (arch-amd64.o): New rule.
1856 * configure.srv: Append arch-amd64.o.
1857 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1858 (get_ipa_tdesc): Call amd64_linux_read_description.
1859 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1860 and init_registers_amd64_XXX.
1861 * linux-x86-low.c (x86_linux_read_description): Call
1862 amd64_linux_read_description.
1863 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1864 (initialize_low_arch): Don't call init_registers_x32_XXX and
1865 init_registers_amd64_XXX.
1866 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1867 and tdesc_amd64_XXX.
1868 [__x86_64__] (amd64_tdesc_test): New function.
1869 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1870 and init_registers_amd64_XXX.
1871 * linux-x86-tdesc.c: Include arch/amd64.h.
1872 (xcr0_to_tdesc_idx): New function.
1873 (i386_linux_read_description): New function.
1874 (amd64_get_ipa_tdesc_idx): New function.
1875 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1876 (amd64_get_ipa_tdesc): Declare.
1878 2017-09-05 Yao Qi <yao.qi@linaro.org>
1880 * configure.srv (srv_i386_linux_xmlfiles): Remove
1881 i386/i386-XXX-linux.xml from it.
1883 2017-09-05 Yao Qi <yao.qi@linaro.org>
1885 * configure.srv: Set srv_i386_linux_regobj empty if $development
1887 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1888 initialize_low_tdesc.
1889 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1890 with #if initialize_low_tdesc.
1891 * linux-x86-tdesc-selftest.c: New file.
1892 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1894 2017-09-05 Yao Qi <yao.qi@linaro.org>
1896 * Makefile.in (arch-i386.o): New rule.
1897 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1898 (x86_64-*-linux*): Likewise.
1899 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1900 include arch/i386.h.
1901 (i386_linux_read_description): Remove code and call
1902 i386_create_target_description.
1903 * tdesc.c (allocate_target_description): New function.
1904 * tdesc.h (set_tdesc_architecture): Remove declaration.
1905 (set_tdesc_osabi): Likewise.
1907 2017-09-05 Yao Qi <yao.qi@linaro.org>
1909 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1910 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1911 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1913 * server.c (get_features_xml): Call tdesc_get_features_xml.
1914 * tdesc.c (set_tdesc_architecture): New function.
1915 (set_tdesc_osabi): New function.
1916 (tdesc_get_features_xml): New function.
1917 (tdesc_create_feature): Add an argument.
1918 * tdesc.h (struct target_desc) <features>: New field.
1919 <arch, osabi>: New field.
1920 (~target_desc): xfree features, arch, and osabi.
1921 (target_desc::oerator==): Don't compare .xmltarget.
1922 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1923 (set_tdesc_osabi): Likewise.
1924 (tdesc_get_features_xml): Likewise.
1926 2017-09-05 Yao Qi <yao.qi@linaro.org>
1928 * linux-x86-tdesc.c: Include selftest.h.
1929 (i386_tdesc_test): New function.
1930 (initialize_low_tdesc): Call selftests::register_test.
1931 * tdesc.h: Include regdef.h.
1932 (target_desc): Override operator == and !=.
1934 2017-09-05 Yao Qi <yao.qi@linaro.org>
1936 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1937 (ipa_obj): Likewise.
1938 * linux-i386-ipa.c: Include common/x86-xstate.h
1939 (get_ipa_tdesc): Call i386_linux_read_description.
1940 (initialize_low_tracepoint): Don't call init_registers_XXX
1941 functions, call initialize_low_tdesc instead.
1942 * linux-x86-low.c (x86_linux_read_description): Call
1943 i386_linux_read_description.
1944 (initialize_low_arch): Don't call init_registers_i386_XXX
1945 functions, call initialize_low_tdesc.
1946 * linux-x86-tdesc.c: New file.
1947 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1948 (i386_get_ipa_tdesc_idx): Declare.
1949 (i386_get_ipa_tdesc): Declare.
1950 (initialize_low_tdesc): Declare.
1952 2017-09-05 Yao Qi <yao.qi@linaro.org>
1954 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1957 2017-09-05 Yao Qi <yao.qi@linaro.org>
1959 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1960 * regcache.c (get_thread_regcache): Use VEC_length.
1961 (init_register_cache): Likewise.
1962 (regcache_cpy): Likewise.
1963 (registers_to_string): Iterate reg_defs via VEC_iterate.
1964 (find_regno): Likewise.
1965 (find_register_by_number): Use VEC_index.
1966 (register_size): Call find_register_by_number.
1967 (register_data): Call find_register_by_number.
1968 (supply_regblock): Use VEC_length.
1969 (regcache_raw_read_unsigned): Likewise.
1970 * tdesc.c (init_target_desc): Iterate reg_defs via
1972 (default_description): Update initializer.
1973 (copy_target_description): Don't update field num_registers.
1974 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1975 <num_registers>: Remove.
1977 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1979 * Makefile.in (.SECONDARY): Define target.
1981 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1983 * linux-low.c (linux_wait_1): Adjust.
1984 * server.c (queue_stop_reply_callback): Adjust.
1986 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1988 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1989 QEnvironmentUnset and QEnvironmentReset packets.
1990 (handle_query): Inform remote that QEnvironmentHexEncoded,
1991 QEnvironmentUnset and QEnvironmentReset are supported.
1993 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1995 * inferiors.h (inferior_target_data): Rename to ...
1996 (thread_target_data): ... this.
1997 (inferior_regcache_data): Rename to ...
1998 (thread_regcache_data): ... this.
1999 (set_inferior_regcache_data): Rename to ...
2000 (set_thread_regcache_data): ... this.
2001 * inferiors.c (inferior_target_data): Rename to ...
2002 (thread_target_data): ... this.
2003 (inferior_regcache_data): Rename to ...
2004 (thread_regcache_data): ... this.
2005 (set_inferior_regcache_data): Rename to ...
2006 (set_thread_regcache_data): ... this.
2007 (free_one_thread): Update.
2008 * linux-low.h (get_thread_lwp): Update.
2009 * regcache.c (get_thread_regcache): Update.
2010 (regcache_invalidate_thread): Update.
2011 (free_register_cache_thread): Update.
2012 * win32-i386-low.c (update_debug_registers_callback): Update.
2013 (win32_get_current_dr): Update.
2014 * win32-low.c (thread_rec): Update.
2015 (delete_thread_info): Update.
2016 (continue_one_thread): Update.
2017 (suspend_one_thread): Update.
2019 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2021 * inferiors.c (set_inferior_target_data): Remove.
2022 * inferiors.h (set_inferior_target_data): Remove.
2024 2017-08-18 Yao Qi <yao.qi@linaro.org>
2026 * Makefile.in (OBS): Add selftest.o.
2027 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2028 * configure, config.in: Re-generated.
2029 * server.c: Include common/sefltest.h.
2030 (captured_main): Handle option --selftest.
2032 2017-08-09 Yao Qi <yao.qi@linaro.org>
2034 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2035 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2036 i386-avx-mpx.o and i386-mmx.o.
2037 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2038 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2039 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2040 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2041 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2042 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2043 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2044 i386/amd64-avx-mpx.xml.
2046 2017-08-09 Yao Qi <yao.qi@linaro.org>
2048 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2049 and x32-avx-avx512.o.
2050 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2051 i386/x32-avx-avx512.xml.
2053 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2055 * tracepoint.h (enum class fast_tpoint_collect_result): New
2057 (fast_tracepoint_collecting): Change return type to
2058 fast_tpoint_collect_result.
2059 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2060 * linux-low.h: Include tracepoint.h.
2061 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2062 fast_tpoint_collect_result.
2063 * linux-low.c (handle_tracepoints): Adjust.
2064 (linux_fast_tracepoint_collecting): Change return type to
2065 fast_tpoint_collect_result.
2066 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2067 linux_wait_1, stuck_in_jump_pad_callback,
2068 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2069 proceed_one_lwp): Adjust to type change.
2071 2017-07-10 Yao Qi <yao.qi@linaro.org>
2073 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2075 2017-06-29 Yao Qi <yao.qi@linaro.org>
2077 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2079 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2081 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2083 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2085 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2087 * linux-low.c (linux_create_inferior): Adjust code to access the
2088 environment information via 'gdb_environ' class.
2089 * lynx-low.c (lynx_create_inferior): Likewise.
2090 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2091 (get_environ): Return a pointer to 'our_environ'.
2092 (captured_main): Initialize 'our_environ'.
2093 * server.h (get_environ): Adjust prototype.
2094 * spu-low.c (spu_create_inferior): Adjust code to access the
2095 environment information via 'gdb_environ' class.
2097 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2099 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2100 usage of "register" keyword.
2102 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2104 * configure: Re-generate.
2106 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2108 * configure: Re-generate.
2110 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2112 * Makefile.in (COMPILE.pre): Add "-x c++".
2114 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2116 * fork-child.c: Conditionally include <signal.h>.
2118 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2120 * server.c (handle_general_set): Handle new packet
2121 "QStartupWithShell".
2122 (handle_query): Add "QStartupWithShell" to the list of supported
2124 (gdbserver_usage): Add help text explaining the
2125 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2127 (captured_main): Recognize and act upon the presence of the new
2130 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2131 Pedro Alves <palves@redhat.com>
2133 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2134 * configure: Regenerate.
2135 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2137 (i[34567]86-*-lynxos*): Likewise.
2138 (spu*-*-*): Likewise.
2139 * fork-child.c: New file.
2140 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2142 (linux_ptrace_fun): New function.
2143 (linux_create_inferior): Adjust function prototype to reflect
2144 change on "target.h". Adjust function code to use
2146 (linux_request_interrupt): Delete "signal_pid".
2147 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2148 (lynx_ptrace_fun): New function.
2149 (lynx_create_inferior): Adjust function prototype to reflect
2150 change on "target.h". Adjust function code to use
2152 * nto-low.c (nto_create_inferior): Adjust function prototype and
2153 code to reflect change on "target.h". Update comments.
2154 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2155 "common-terminal.h" and "environ.h".
2156 (terminal_fd): Moved to fork-child.c.
2157 (old_foreground_pgrp): Likewise.
2158 (restore_old_foreground_pgrp): Likewise.
2159 (last_status): Make it global.
2160 (last_ptid): Likewise.
2161 (our_environ): New variable.
2162 (startup_with_shell): Likewise.
2163 (program_name): Likewise.
2164 (program_argv): Rename to...
2165 (program_args): ...this.
2166 (wrapper_argv): New variable.
2167 (start_inferior): Delete function.
2168 (get_exec_wrapper): New function.
2169 (get_exec_file): Likewise.
2170 (get_environ): Likewise.
2171 (prefork_hook): Likewise.
2172 (post_fork_inferior): Likewise.
2173 (postfork_hook): Likewise.
2174 (postfork_child_hook): Likewise.
2175 (handle_v_run): Update code to deal with arguments coming from the
2176 remote host. Update calls from "start_inferior" to
2178 (captured_main): Likewise. Initialize environment variable. Call
2180 * server.h (post_fork_inferior): New prototype.
2181 (get_environ): Likewise.
2182 (last_status): Declare.
2183 (last_ptid): Likewise.
2184 (signal_pid): Likewise.
2185 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2186 (spu_ptrace_fun): New function.
2187 (spu_create_inferior): Adjust function prototype to reflect change
2188 on "target.h". Adjust function code to use "fork_inferior".
2189 * target.c (target_terminal_init): New function.
2190 (target_terminal_inferior): Likewise.
2191 (target_terminal_ours): Likewise.
2192 * target.h: Include <vector>.
2193 (struct target_ops) <create_inferior>: Update prototype.
2194 (create_inferior): Update macro.
2195 * utils.c (gdb_flush_out_err): New function.
2196 * win32-low.c (win32_create_inferior): Adjust function prototype
2197 and code to reflect change on "target.h".
2199 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2201 * inferiors.c (switch_to_thread): New function.
2203 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2205 * Makefile.in (SFILE): Add "common/job-control.c".
2206 (OBS): Add "job-control.o".
2208 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2210 * Makefile: Remove "@host_makefile_frag@".
2212 2017-05-05 Pedro Alves <palves@redhat.com>
2214 * configure: Regenerate.
2216 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2218 * configure: Regenerate.
2220 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2222 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2223 software_single_step change of return type to
2224 std::vector<CORE_ADDR>.
2225 * linux-low.c (install_software_single_step_breakpoints):
2227 * linux-low.h (install_software_single_step_breakpoints):
2230 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2232 * remote-utils.c: Include "gdb_termios.h" instead of
2234 * terminal.h: Delete file.
2236 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2238 * server.c: Include <vector>.
2239 <program_argv, wrapper_argv>: Convert to std::vector.
2240 (start_inferior): Rewrite function to use C++.
2241 (handle_v_run): Likewise. Update code that calculates the argv
2242 based on the vRun packet; use C++.
2243 (captured_main): Likewise.
2245 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2247 * server.c (handle_v_cont): Initialize thread_resume::thread
2250 2017-04-05 Pedro Alves <palves@redhat.com>
2252 * configure: Regenerate.
2254 2017-04-05 Pedro Alves <palves@redhat.com>
2256 * gdbreplay.c (sync_error): Constify.
2257 * linux-x86-low.c (push_opcode): Constify.
2259 2017-04-05 Pedro Alves <palves@redhat.com>
2261 * win32-low.c (get_child_debug_event)
2262 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2263 Report TARGET_WAITKIND_SPURIOUS instead.
2265 2017-04-05 Pedro Alves <palves@redhat.com>
2267 * remote-utils.c (remote_prepare, remote_open): Constify.
2268 * remote-utils.h (remote_prepare, remote_open): Constify.
2269 * server.c (captured_main): Constify 'port' handling.
2271 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2273 * Makefile.in (clean): Clear .deps.
2275 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2277 * .gitignore: Remove generated files, replace with wildcard.
2278 * (clean): Replace removal of generated files with wildcard.
2279 (version.c): Replace with...
2280 (version-generated.c): ...this.
2281 (xml-builtin.c): Replace with...
2282 (xml-builtin-generated.c): ...this.
2283 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2284 (%.c: *regformats*): Replace with...
2285 (%-generated.c: *regformats*): ...this.
2287 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2289 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2290 (xtensa_fill_gregset): Call collect_register_by_name for
2292 (xtensa_store_gregset): Call supply_register_by_name for
2295 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2297 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2298 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2299 (xtensa_store_gregset): Call supply_register for all registers in
2300 a0_regnum..a0_regnum + C0_NREGS range.
2302 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2304 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2305 (ax-ipa.o: ax.c): Remove.
2306 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2307 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2308 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2309 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2310 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2312 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2314 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2315 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2316 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2317 (errors-ipa.o: ../common/errors.c): Remove.
2318 (format-ipa.o: ../common/format.c): Remove.
2319 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2321 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2323 * Makefile.in (%-ipa.o: %.c): New rule.
2324 (tracepoint-ipa.o: tracepoint.c): Remove.
2325 (utils-ipa.o: utils.c): Remove.
2326 (remote-utils-ipa.o: remote-utils.c): Remove.
2327 (regcache-ipa.o: regcache.c): Remove.
2328 (i386-linux-ipa.o: i386-linux.c): Remove.
2329 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2330 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2331 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2332 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2333 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2334 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2335 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2336 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2337 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2338 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2339 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2340 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2341 (aarch64-ipa.o: aarch64.c): Remove.
2342 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2343 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2344 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2345 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2346 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2347 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2348 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2349 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2350 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2351 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2352 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2353 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2354 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2355 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2356 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2357 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2358 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2359 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2360 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2361 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2362 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2363 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2364 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2365 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2366 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2367 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2368 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2369 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2370 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2371 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2372 (tdesc-ipa.o: tdesc.c): Remove.
2373 (x32-linux-ipa.o: x32-linux.c): Remove.
2374 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2375 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2377 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2379 * Makefile.in (%.o: ../arch/%.c): New rule.
2380 (arm.o: ../arch/arm.c): Remove.
2381 (arm-linux.o: ../arch/arm-linux.c): Remove.
2382 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2383 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2385 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2387 * Makefile.in (%.o: ../nat/%.c): New rule.
2388 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2389 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2390 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2391 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2392 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2393 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2394 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2395 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2396 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2397 (linux-personality.o: ../nat/linux-personality.c): Remove.
2398 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2399 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2400 (x86-linux.o: ../nat/x86-linux.c): Remove.
2401 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2402 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2404 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2406 * Makefile.in (%.o: ../common/%.c): New rule.
2407 (signals.o: ../common/signals.c): Remove.
2408 (print-utils.o: ../common/print-utils.c): Remove.
2409 (rsp-low.o: ../common/rsp-low.c): Remove.
2410 (common-utils.o: ../common/common-utils.c): Remove.
2411 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2412 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2413 (vec.o: ../common/vec.c): Remove.
2414 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2415 (xml-utils.o: ../common/xml-utils.c): Remove.
2416 (ptid.o: ../common/ptid.c): Remove.
2417 (buffer.o: ../common/buffer.c): Remove.
2418 (format.o: ../common/format.c): Remove.
2419 (filestuff.o: ../common/filestuff.c): Remove.
2420 (agent.o: ../common/agent.c): Remove.
2421 (errors.o: ../common/errors.c): Remove.
2422 (environ.o: ../common/environ.c): Remove.
2423 (common-debug.o: ../common/common-debug.c): Remove.
2424 (cleanups.o: ../common/cleanups.c): Remove.
2425 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2426 (fileio.o: ../common/fileio.c): Remove.
2427 (common-regcache.o: ../common/common-regcache.c): Remove.
2428 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2429 (new-op.o: ../common/new-op.c): Remove.
2430 (btrace-common.o: ../common/btrace-common.c): Remove.
2432 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2434 * Makefile.in (%.o: ../target/%.c): New rule.
2435 (waitstatus.o: ../target/waitstatus.c): Remove.
2437 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2440 (%.c: ../regformats/%.dat,
2441 (%.c: ../regformats/arm/%.dat,
2442 (%.c: ../regformats/i386/%.dat,
2443 (%.c: ../regformats/rs6000/%.dat): New rules.
2444 (aarch64.c): Remove.
2445 (reg-arm.c): Remove.
2446 (arm-with-iwmmxt.c): Remove.
2447 (arm-with-vfpv2.c): Remove.
2448 (arm-with-vfpv3.c): Remove.
2449 (arm-with-neon.c): Remove.
2450 (reg-bfin.c): Remove.
2451 (reg-cris.c): Remove.
2452 (reg-crisv32.c): Remove.
2454 (i386-linux.c): Remove.
2455 (i386-avx.c): Remove.
2456 (i386-avx-linux.c): Remove.
2457 (i386-avx-avx512.c): Remove.
2458 (i386-avx-avx512-linux.c): Remove.
2459 (i386-mpx.c): Remove.
2460 (i386-mpx-linux.c): Remove.
2461 (i386-avx-mpx-avx512-pku.c): Remove.
2462 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2463 (i386-avx-mpx.c): Remove.
2464 (i386-avx-mpx-linux.c): Remove.
2465 (i386-mmx.c): Remove.
2466 (i386-mmx-linux.c): Remove.
2467 (reg-ia64.c): Remove.
2468 (reg-m32r.c): Remove.
2469 (reg-m68k.c): Remove.
2471 (mips-linux.c): Remove.
2472 (mips-dsp-linux.c): Remove.
2473 (mips64-linux.c): Remove.
2474 (mips64-dsp-linux.c): Remove.
2475 (nios2-linux.c): Remove.
2476 (powerpc-32.c): Remove.
2477 (powerpc-32l.c): Remove.
2478 (powerpc-altivec32l.c): Remove.
2479 (powerpc-cell32l.c): Remove.
2480 (powerpc-vsx32l.c): Remove.
2481 (powerpc-isa205-32l.c): Remove.
2482 (powerpc-isa205-altivec32l.c): Remove.
2483 (powerpc-isa205-vsx32l.c): Remove.
2484 (powerpc-e500l.c): Remove.
2485 (powerpc-64l.c): Remove.
2486 (powerpc-altivec64l.c): Remove.
2487 (powerpc-cell64l.c): Remove.
2488 (powerpc-vsx64l.c): Remove.
2489 (powerpc-isa205-64l.c): Remove.
2490 (powerpc-isa205-altivec64l.c): Remove.
2491 (powerpc-isa205-vsx64l.c): Remove.
2492 (s390-linux32.c): Remove.
2493 (s390-linux32v1.c): Remove.
2494 (s390-linux32v2.c): Remove.
2495 (s390-linux64.c): Remove.
2496 (s390-linux64v1.c): Remove.
2497 (s390-linux64v2.c): Remove.
2498 (s390-te-linux64.c): Remove.
2499 (s390-vx-linux64.c): Remove.
2500 (s390-tevx-linux64.c): Remove.
2501 (s390x-linux64.c): Remove.
2502 (s390x-linux64v1.c): Remove.
2503 (s390x-linux64v2.c): Remove.
2504 (s390x-te-linux64.c): Remove.
2505 (s390x-vx-linux64.c): Remove.
2506 (s390x-tevx-linux64.c): Remove.
2507 (tic6x-c64xp-linux.c): Remove.
2508 (tic6x-c64x-linux.c): Remove.
2509 (tic6x-c62x-linux.c): Remove.
2511 (reg-sparc64.c): Remove.
2512 (reg-spu.c): Remove.
2514 (amd64-linux.c): Remove.
2515 (amd64-avx.c): Remove.
2516 (amd64-avx-linux.c): Remove.
2517 (amd64-avx-avx512.c): Remove.
2518 (amd64-avx-avx512-linux.c): Remove.
2519 (amd64-mpx.c): Remove.
2520 (amd64-mpx-linux.c): Remove.
2521 (amd64-avx-mpx-avx512-pku.c): Remove.
2522 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2523 (amd64-avx-mpx.c): Remove.
2524 (amd64-avx-mpx-linux.c): Remove.
2526 (x32-linux.c): Remove.
2527 (x32-avx.c): Remove.
2528 (x32-avx-linux.c): Remove.
2529 (x32-avx-avx512.c): Remove.
2530 (x32-avx-avx512-linux.c): Remove.
2531 (reg-xtensa.c): Remove.
2532 (reg-tilegx.c): Remove.
2533 (reg-tilegx32.c): Remove.
2535 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2537 * Makefile.in (SFILES): Add "common/environ.c".
2538 (OBJS): Add "common/environ.h".
2540 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2542 * configure.ac: Check if the fs_base and gs_base members of
2543 `struct user_regs_struct' exist.
2544 * config.in: Regenerated.
2545 * configure: Likewise.
2547 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2549 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2551 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2552 (get_next_pcs_syscall_next_pc): Likewise.
2554 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2556 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2557 * nto-x86-low.c: Likewise.
2559 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2561 * Makefile.in: Include disable-implicit-rules.mk.
2563 2016-11-23 Pedro Alves <palves@redhat.com>
2565 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2566 (debug_vprintf): Use std::chrono::steady_clock instead of
2567 gettimeofday. Use '.' instead of ':'.
2568 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2569 (get_timestamp): Use std::chrono::steady_clock instead of
2572 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2574 * Makefile.in: Fix whitespace formatting.
2576 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2578 * Makefile.in (SFILES, OBS): Flatten list and order
2581 2016-11-23 Pedro Alves <palves@redhat.com>
2583 * event-loop.c (handle_file_event): Use warning.
2584 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2585 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2588 2016-11-23 Pedro Alves <palves@redhat.com>
2590 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2592 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2593 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2594 debug_printf and debug_flush for debug output.
2595 * server.c (handle_general_set): Likewise.
2596 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2599 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2601 * Makefile.in (.c.o): Replace rule with ...
2602 (%.o: %.c): ... this one.
2604 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2606 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2607 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2609 * configure.ac: Remove checks for the make program.
2610 * configure: Re-generate.
2612 2016-10-28 Pedro Alves <palves@redhat.com>
2614 * Makefile.in (CXX_DIALECT): Get from configure.
2615 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2616 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2617 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2618 * config.in: Regenerate.
2619 * configure: Regenerate.
2621 2016-10-27 Yao Qi <yao.qi@linaro.org>
2623 * linux-low.c (linux_supports_range_stepping): Return true if
2624 can_software_single_step return true.
2626 2016-10-27 Yao Qi <yao.qi@linaro.org>
2628 * inferiors.c (find_inferior_in_random): New function.
2629 * inferiors.h (find_inferior_in_random): Declare.
2630 * linux-low.c (linux_wait_for_event_filtered): Call
2631 find_inferior_in_random instead of find_inferior.
2633 2016-10-27 Yao Qi <yao.qi@linaro.org>
2635 * linux-low.c (linux_wait_1): If single-step breakpoints are
2636 inserted, remove them.
2638 2016-10-26 Pedro Alves <palves@redhat.com>
2640 * linux-low.c (handle_extended_wait): Link parent/child fork
2642 (linux_wait_1): Unlink them.
2643 (linux_set_resume_request): Ignore resume requests for
2644 already-resumed and unhandled fork child threads.
2645 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2646 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2648 (handle_v_requests) <vCont>: Don't call require_running.
2649 * server.h (in_queued_stop_replies): New declaration.
2651 2016-10-24 Yao Qi <yao.qi@linaro.org>
2654 * linux-aarch64-low.c (append_insns): Cast the return value to
2657 2016-10-10 Yao Qi <yao.qi@linaro.org>
2659 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2661 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2663 * target.c (target_supports_multi_process): New function, moved
2665 * target.h (target_supports_multi_process): ... here. Remove
2668 2016-10-05 Tom Tromey <tom@tromey.com>
2671 * tracepoint.c (handle_tracepoint_bkpts): Check
2672 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2674 2016-10-05 Yao Qi <yao.qi@linaro.org>
2676 * configure.srv: Update the path of arm-*.xml files.
2678 2016-10-05 Terry Guo <terry.guo@arm.com>
2679 Yao Qi <yao.qi@linaro.org>
2681 * Makefile.in: Adjust the path of rules.
2682 * configure.srv: Update the path of xml files.
2683 * regformats/arm-with-iwmmxt.dat: Regenerated.
2684 * regformats/arm-with-neon.dat: Likewise.
2685 * regformats/arm-with-vfpv2.dat: Likewise.
2686 * regformats/arm-with-vfpv3.dat Likewise.
2688 2016-09-30 Yao Qi <yao.qi@linaro.org>
2691 * target.c (target_stop_and_wait): Don't call
2692 target_continue_no_signal, use resume_stop instead.
2694 2016-09-26 Yao Qi <yao.qi@linaro.org>
2696 * linux-low.c (linux_wait_1): Call debug_exit.
2698 2016-09-23 Pedro Alves <palves@redhat.com>
2700 * Makefile.in (SFILES): Add common/new-op.c.
2701 (OBS): Add common/new-op.o.
2702 (new-op.o): New rule.
2704 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2706 * .gitinore: Ignore more files.
2708 2016-09-21 Yao Qi <yao.qi@linaro.org>
2710 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2713 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2715 * server.c (start_inferior): Call target_mourn_inferior instead of
2716 mourn_inferior; pass ptid_t argument to it.
2718 (handle_target_event): Likewise.
2719 * target.c (target_mourn_inferior): New function.
2720 * target.h (mourn_inferior): Delete macro.
2722 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2724 * linux-low.c (lwp_is_stepping): New function.
2726 2016-09-06 Carl Love <cel@us.ibm.com>
2728 * server.c (start_inferior): Fixed comment, requested comment change
2729 didn't get updated correctly. Removed reference to ptrace () call as
2730 it is only true on Linux systems.
2732 2016-09-06 Carl Love <cel@us.ibm.com>
2734 * server.c (start_inferior): Do not call
2735 function target_post_create_inferior () if the
2736 inferior process has already exited.
2738 2016-09-05 Pedro Alves <palves@redhat.com>
2740 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2741 (COMPILE.pre, CC_LD): Use CXX directly.
2742 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2743 * acinclude.m4: Don't include build-with-cxx.m4.
2744 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2745 * configure: Regenerate.
2747 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2750 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2751 call writing data to own_buf.
2753 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2755 * target.c (mywait): Call target_wait instead of
2757 (target_wait): New function.
2759 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2761 * server.c (start_inferior): New variable 'ptid'. Replace calls
2762 to the_target->resume by target_continue{,_no_signal}, depending
2764 * target.c (target_stop_and_wait): Call target_continue_no_signal
2765 instead of the_target->resume.
2766 (target_continue): New function.
2768 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2770 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2772 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2775 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2777 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2778 * linux-arm-low.c (ps_get_thread_area): Likewise.
2779 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2780 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2781 * linux-mips-low.c (ps_get_thread_area): Likewise.
2782 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2783 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2784 * linux-x86-low.c (ps_get_thread_area): Likewise.
2785 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2787 2016-08-19 Pedro Alves <palves@redhat.com>
2789 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2791 2016-08-19 Pedro Alves <palves@redhat.com>
2793 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2794 comment. Use memcpy instead of casting through unsigned long.
2796 2016-08-19 Pedro Alves <palves@redhat.com>
2798 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2799 allocating around 0x80000000.
2801 2016-08-19 Pedro Alves <palves@redhat.com>
2804 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2805 (x32-avx512-linux-ipa.o): New rules.
2806 * configure.ac (x86_64-*-linux*): New x32 check.
2807 * configure.srv (ipa_x32_linux_regobj): New.
2808 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2809 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2811 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2813 * configure: Regenerate.
2815 2016-08-09 Pedro Alves <palves@redhat.com>
2818 * Makefile.in (OBS): Add signals-state-save-restore.o.
2819 (signals-state-save-restore.o): New rule.
2820 * config.in: Regenerate.
2821 * configure: Regenerate.
2822 * linux-low.c: Include "signals-state-save-restore.h".
2823 (linux_create_inferior): Call
2824 restore_original_signals_state.
2825 * server.c: Include "dispositions-save-restore.h".
2826 (captured_main): Call save_original_signals_state.
2828 2016-08-05 Pedro Alves <palves@redhat.com>
2830 * configure: Regenerate.
2832 2016-08-04 Yao Qi <yao.qi@linaro.org>
2834 * linux-low.c (regsets_fetch_inferior_registers): Check
2835 errno is ESRCH or not.
2837 2016-08-02 Yao Qi <yao.qi@linaro.org>
2839 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2840 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2841 (thread_db_load_search): Update.
2842 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2843 td_ta_set_event and td_ta_event_getmsg.
2845 2016-07-26 Pedro Alves <palves@redhat.com>
2848 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2849 of unsigned long for 64-bit registers and use uint32_t instead of
2850 unsigned int for 32-bit registers.
2852 2016-07-26 Pedro Alves <palves@redhat.com>
2854 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2857 2016-07-21 Tom Tromey <tom@tromey.com>
2859 * configure: Rebuild.
2861 2016-07-21 Yao Qi <yao.qi@linaro.org>
2863 * mem-break.c (find_gdb_breakpoint): Cast bp to
2864 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2866 2016-07-21 Yao Qi <yao.qi@linaro.org>
2868 * server.c (handle_v_requests): Support s and S actions
2869 if target_supports_software_single_step return true.
2871 2016-07-21 Yao Qi <yao.qi@linaro.org>
2873 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2874 is resume_step, call maybe_hw_step.
2875 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2877 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2879 (proceed_one_lwp): If resume request is resume_step, install
2880 reinsert breakpoints and call maybe_hw_step.
2882 2016-07-21 Yao Qi <yao.qi@linaro.org>
2884 * linux-low.c (proceed_one_lwp): Declare.
2885 (linux_resume_one_thread): Remove local variable 'step'.
2886 Lift code enqueue signal. Call proceed_one_lwp instead of
2887 linux_resume_one_lwp.
2889 2016-07-21 Yao Qi <yao.qi@linaro.org>
2891 * linux-low.c (linux_resume_one_thread): Call
2892 enqueue_pending_signal.
2894 2016-07-21 Yao Qi <yao.qi@linaro.org>
2896 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2897 * inferiors.c (do_restore_current_thread_cleanup): New function.
2898 (make_cleanup_restore_current_thread): Likewise.
2899 * linux-low.c (install_software_single_step_breakpoints): Call
2900 make_cleanup_restore_current_thread. Switch current_thread to
2903 2016-07-21 Yao Qi <yao.qi@linaro.org>
2905 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2906 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2907 (clone_one_breakpoint): Likewise.
2908 (delete_reinsert_breakpoints): Change parameter to thread.
2910 (has_reinsert_breakpoints): Likewise.
2911 (uninsert_reinsert_breakpoints): Likewise.
2912 (reinsert_reinsert_breakpoints): Likewise.
2913 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2914 (delete_reinsert_breakpoints): Likewise.
2915 (reinsert_reinsert_breakpoints): Likewise.
2916 (uninsert_reinsert_breakpoints): Likewise.
2917 (has_reinsert_breakpoints): Likewise.
2919 2016-07-21 Yao Qi <yao.qi@linaro.org>
2921 * inferiors.c (get_thread_process): Make parameter const.
2922 * inferiors.h (get_thread_process): Update declaration.
2923 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2924 Add new parameters child_thread and parent_thread. Callers
2926 * mem-break.h (clone_all_breakpoints): Update declaration.
2928 2016-07-21 Yao Qi <yao.qi@linaro.org>
2930 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2931 <command_list, handler>: Remove.
2932 (struct gdb_breakpoint): New.
2933 (struct other_breakpoint): New.
2934 (struct reinsert_breakpoint): New.
2935 (is_gdb_breakpoint): New function.
2936 (any_persistent_commands): Update command_list if
2937 is_gdb_breakpoint returns true.
2938 (set_breakpoint): Create breakpoints according to their types.
2939 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2940 (set_gdb_breakpoint_1): Likewise.
2941 (set_gdb_breakpoint): Likewise.
2942 (clear_breakpoint_conditions): Change parameter type to
2943 'struct gdb_breakpoint *'.
2944 (clear_breakpoint_commands): Likewise.
2945 (clear_breakpoint_conditions_and_commands): Likewise.
2946 (add_condition_to_breakpoint): Likewise.
2947 (add_breakpoint_condition): Likewise.
2948 (add_commands_to_breakpoint): Likewise.
2949 (check_breakpoints): Check other_breakpoint.
2950 (clone_one_breakpoint): Clone breakpopint according to its type.
2951 * mem-break.h (struct gdb_breakpoint): Declare.
2952 (set_gdb_breakpoint): Update declaration.
2953 (clear_breakpoint_conditions_and_commands): Likewise.
2954 (add_breakpoint_condition): Likewise.
2955 (add_breakpoint_commands): Likewise.
2956 * server.c (process_point_options): Change parameter type to
2957 'struct gdb_breakpoint *'.
2959 2016-07-21 Yao Qi <yao.qi@linaro.org>
2961 * mem-break.c (set_breakpoint_at): Rename it to ...
2962 (set_breakpoint_type_at): ... it.
2963 (set_breakpoint_at): Call set_breakpoint_type_at.
2964 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2965 * mem-break.h (set_breakpoint_at): Update comments.
2967 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2969 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2971 (nios2_store_gregset): Likewise.
2973 2016-07-01 Pedro Alves <palves@redhat.com>
2974 Antoine Tremblay <antoine.tremblay@ericsson.com>
2976 * linux-low.c: Change interface to take the target lwp_info
2977 pointer directly and return void. Handle detaching from a zombie
2979 (linux_detach_lwp_callback): New function.
2980 (linux_detach): Detach from the leader thread after detaching from
2983 2016-06-28 Yao Qi <yao.qi@linaro.org>
2985 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2986 for variable new_offset.
2987 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2988 (aarch64_ftrace_insn_reloc_cb): Likewise.
2989 (aarch64_ftrace_insn_reloc_tb): Likewise.
2990 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2991 PRIx64 instead of PRIx32.
2993 2016-06-28 Yao Qi <yao.qi@linaro.org>
2995 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2996 (the_low_target): Install arm_get_syscall_trapinfo.
2998 2016-06-28 Yao Qi <yao.qi@linaro.org>
3000 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3002 (the_low_target): Install aarch64_get_syscall_trapinfo.
3004 2016-06-28 Yao Qi <yao.qi@linaro.org>
3006 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3008 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3009 Remove parameter sysno.
3010 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3013 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3015 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3016 (s390_emit_ne_goto): Likewise.
3017 (s390_emit_lt_goto): Likewise.
3018 (s390_emit_le_goto): Likewise.
3019 (s390_emit_gt_goto): Likewise.
3020 (s390_emit_ge_goto): Likewise.
3021 (s390x_emit_eq_goto): Likewise.
3022 (s390x_emit_ne_goto): Likewise.
3023 (s390x_emit_lt_goto): Likewise.
3024 (s390x_emit_le_goto): Likewise.
3025 (s390x_emit_gt_goto): Likewise.
3026 (s390x_emit_ge_goto): Likewise.
3027 (s390_emit_ops_impl): Mark variable static.
3028 (s390x_emit_ops): Likewise.
3030 2016-06-17 Yao Qi <yao.qi@linaro.org>
3032 * linux-low.c (handle_extended_wait): Call
3033 uninsert_reinsert_breakpoints for the parent process. Remove
3034 reinsert breakpoints from the child process. Reinsert them to
3035 the parent process when vfork is done.
3036 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3037 (reinsert_reinsert_breakpoints): New function.
3038 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3039 (reinsert_reinsert_breakpoints): Declare.
3041 2016-06-17 Yao Qi <yao.qi@linaro.org>
3043 * linux-low.c (handle_extended_wait): If the parent is doing
3044 step-over, remove the reinsert breakpoints from the forked child.
3046 2016-06-17 Yao Qi <yao.qi@linaro.org>
3048 * linux-low.c (unsuspend_all_lwps): Declare.
3049 (linux_low_filter_event): If thread exited, call finish_step_over.
3050 If step-over is finished, unsuspend other threads.
3052 2016-06-17 Yao Qi <yao.qi@linaro.org>
3054 * linux-low.c (linux_resume_one_lwp_throw): Assert
3055 has_reinsert_breakpoints returns false.
3056 * mem-break.c (delete_disabled_breakpoints): Assert
3057 bp type isn't reinsert_breakpoint.
3059 2016-06-17 Yao Qi <yao.qi@linaro.org>
3061 * linux-low.c (maybe_hw_step): New function.
3062 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3063 (finish_step_over): Switch current_thread to lwp temporarily,
3064 and assert has_reinsert_breakpoints returns true.
3065 (proceed_one_lwp): Call maybe_hw_step.
3066 * mem-break.c (has_reinsert_breakpoints): New function.
3067 * mem-break.h (has_reinsert_breakpoints): Declare.
3069 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3071 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3073 2016-05-17 Yao Qi <yao.qi@linaro.org>
3075 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3076 instead of find_inferior.
3078 2016-05-05 Yao Qi <yao.qi@linaro.org>
3080 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3081 Initialize res to zero.
3083 2016-05-05 Yao Qi <yao.qi@linaro.org>
3085 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3088 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3090 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3091 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3092 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3094 2016-04-28 Par Olsson <par.olsson@windriver.com>
3095 Simon Marchi <simon.marchi@ericsson.com>
3097 * tracepoint.c (write_inferior_int8): New function.
3098 (cmd_qtenable_disable): Write enable flag using
3099 write_inferior_int8.
3101 2016-04-25 Yao Qi <yao.qi@linaro.org>
3103 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3104 (need_step_over_p): Return zero if the LWP has pending signals
3105 can be delivered on software single step target.
3107 2016-04-25 Yao Qi <yao.qi@linaro.org>
3109 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3110 return instead of error.
3112 2016-04-22 Yao Qi <yao.qi@linaro.org>
3114 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3117 2016-04-22 Yao Qi <yao.qi@linaro.org>
3119 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3120 signal when stepping over breakpoint with software single
3123 2016-04-21 Pedro Alves <palves@redhat.com>
3125 * linux-s390-low.c (s390_collect_ptrace_register)
3126 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3128 (s390_check_regset): Use void * instead of gdb_byte *.
3130 2016-04-20 Pedro Alves <palves@redhat.com>
3132 * configure: Renegerate.
3134 2016-04-20 Yao Qi <yao.qi@linaro.org>
3136 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3137 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3139 (arm_store_gregset): Likewise.
3141 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3143 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3144 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3145 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3146 (amd64-avx-mpx-linux.c): New rules.
3147 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3148 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3149 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3150 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3151 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3152 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3153 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3154 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3155 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3156 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3157 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3158 * linux-x86-low.c (x86_linux_read_description): Add case for
3159 X86_XSTATE_AVX_MPX_MASK.
3160 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3161 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3162 init_registers_i386_avx_mpx_linux.
3163 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3164 (initialize_low_tracepoint): Call
3165 init_registers_i386_avx_mpx_linux.
3166 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3167 (initialize_low_tracepoint): Call
3168 init_registers_amd64_avx_mpx_linux.
3169 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3170 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3171 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3174 2016-04-18 Pedro Alves <palves@redhat.com>
3176 * configure: Regenerate.
3178 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3180 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3181 (aarch64_emit_sub): Likewise.
3183 2016-04-12 Pedro Alves <palves@redhat.com>
3185 * utils.c (prepare_to_throw_exception): Delete.
3187 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3189 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3191 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3193 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3195 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3197 * linux-aarch64-ipa.c: Add <elf.h> include.
3198 * linux-ppc-ipa.c: Add <elf.h> include.
3199 * linux-s390-ipa.c: Add <elf.h> include.
3201 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3203 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3204 (get_raw_reg_ptr): Likewise.
3205 (get_trace_state_variable_value_ptr): Likewise.
3206 (set_trace_state_variable_value_ptr): Likewise.
3207 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3210 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3211 Marcin Kościelnicki <koriakin@0x04.net>
3214 * linux-ppc-low.c (emit_insns): New function.
3215 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3216 (ppc_emit_prologue): New function.
3217 (ppc_emit_epilogue): New function.
3218 (ppc_emit_add): New function.
3219 (ppc_emit_sub): New function.
3220 (ppc_emit_mul): New function.
3221 (ppc_emit_lsh): New function.
3222 (ppc_emit_rsh_signed): New function.
3223 (ppc_emit_rsh_unsigned): New function.
3224 (ppc_emit_ext): New function.
3225 (ppc_emit_zero_ext): New function.
3226 (ppc_emit_log_not): New function.
3227 (ppc_emit_bit_and): New function.
3228 (ppc_emit_bit_or): New function.
3229 (ppc_emit_bit_xor): New function.
3230 (ppc_emit_bit_not): New function.
3231 (ppc_emit_equal): New function.
3232 (ppc_emit_less_signed): New function.
3233 (ppc_emit_less_unsigned): New function.
3234 (ppc_emit_ref): New function.
3235 (ppc_emit_const): New function.
3236 (ppc_emit_reg): New function.
3237 (ppc_emit_pop): New function.
3238 (ppc_emit_stack_flush): New function.
3239 (ppc_emit_swap): New function.
3240 (ppc_emit_stack_adjust): New function.
3241 (ppc_emit_call): New function.
3242 (ppc_emit_int_call_1): New function.
3243 (ppc_emit_void_call_2): New function.
3244 (ppc_emit_if_goto): New function.
3245 (ppc_emit_goto): New function.
3246 (ppc_emit_eq_goto): New function.
3247 (ppc_emit_ne_goto): New function.
3248 (ppc_emit_lt_goto): New function.
3249 (ppc_emit_le_goto): New function.
3250 (ppc_emit_gt_goto): New function.
3251 (ppc_emit_ge_goto): New function.
3252 (ppc_write_goto_address): New function.
3253 (ppc_emit_ops_impl): New static variable.
3254 (ppc64v1_emit_prologue): New function.
3255 (ppc64v2_emit_prologue): New function.
3256 (ppc64_emit_epilogue): New function.
3257 (ppc64_emit_add): New function.
3258 (ppc64_emit_sub): New function.
3259 (ppc64_emit_mul): New function.
3260 (ppc64_emit_lsh): New function.
3261 (ppc64_emit_rsh_signed): New function.
3262 (ppc64_emit_rsh_unsigned): New function.
3263 (ppc64_emit_ext): New function.
3264 (ppc64_emit_zero_ext): New function.
3265 (ppc64_emit_log_not): New function.
3266 (ppc64_emit_bit_and): New function.
3267 (ppc64_emit_bit_or): New function.
3268 (ppc64_emit_bit_xor): New function.
3269 (ppc64_emit_bit_not): New function.
3270 (ppc64_emit_equal): New function.
3271 (ppc64_emit_less_signed): New function.
3272 (ppc64_emit_less_unsigned): New function.
3273 (ppc64_emit_ref): New function.
3274 (ppc64_emit_const): New function.
3275 (ppc64v1_emit_reg): New function.
3276 (ppc64v2_emit_reg): New function.
3277 (ppc64_emit_pop): New function.
3278 (ppc64_emit_stack_flush): New function.
3279 (ppc64_emit_swap): New function.
3280 (ppc64v1_emit_call): New function.
3281 (ppc64v2_emit_call): New function.
3282 (ppc64v1_emit_int_call_1): New function.
3283 (ppc64v2_emit_int_call_1): New function.
3284 (ppc64v1_emit_void_call_2): New function.
3285 (ppc64v2_emit_void_call_2): New function.
3286 (ppc64_emit_if_goto): New function.
3287 (ppc64_emit_eq_goto): New function.
3288 (ppc64_emit_ne_goto): New function.
3289 (ppc64_emit_lt_goto): New function.
3290 (ppc64_emit_le_goto): New function.
3291 (ppc64_emit_gt_goto): New function.
3292 (ppc64_emit_ge_goto): New function.
3293 (ppc64v1_emit_ops_impl): New static variable.
3294 (ppc64v2_emit_ops_impl): New static variable.
3295 (ppc_emit_ops): New function.
3296 (linux_low_target): Wire in ppc_emit_ops.
3298 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3299 Marcin Kościelnicki <koriakin@0x04.net>
3302 * Makefile.in: Add powerpc-*-ipa.o
3303 * configure.srv: Add ipa_obj for powerpc*-linux.
3304 * linux-ppc-ipa.c: New file.
3305 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3307 (PPC_FIELD): New macro.
3308 (PPC_SEXT): New macro.
3309 (PPC_OP6): New macro.
3310 (PPC_BO): New macro.
3311 (PPC_LI): New macro.
3312 (PPC_BD): New macro.
3313 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3314 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3315 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3316 (ppc_get_thread_area): New function.
3317 (is_elfv2_inferior): New function.
3318 (gen_ds_form): New function.
3319 (GEN_STD): New macro.
3320 (GEN_STDU): New macro.
3321 (GEN_LD): New macro.
3322 (GEN_LDU): New macro.
3323 (gen_d_form): New function.
3324 (GEN_ADDI): New macro.
3325 (GEN_ADDIS): New macro.
3326 (GEN_LI): New macro.
3327 (GEN_LIS): New macro.
3328 (GEN_ORI): New macro.
3329 (GEN_ORIS): New macro.
3330 (GEN_LWZ): New macro.
3331 (GEN_STW): New macro.
3332 (GEN_STWU): New macro.
3333 (gen_xfx_form): New function.
3334 (GEN_MFSPR): New macro.
3335 (GEN_MTSPR): New macro.
3336 (GEN_MFCR): New macro.
3337 (GEN_MTCR): New macro.
3338 (GEN_SYNC): New macro.
3339 (GEN_LWSYNC): New macro.
3340 (gen_x_form): New function.
3341 (GEN_OR): New macro.
3342 (GEN_MR): New macro.
3343 (GEN_LWARX): New macro.
3344 (GEN_STWCX): New macro.
3345 (GEN_CMPW): New macro.
3346 (gen_md_form): New function.
3347 (GEN_RLDICL): New macro.
3348 (GEN_RLDICR): New macro.
3349 (gen_i_form): New function.
3351 (GEN_BL): New macro.
3352 (gen_b_form): New function.
3353 (GEN_BNE): New macro.
3354 (GEN_LOAD): New macro.
3355 (GEN_STORE): New macro.
3356 (gen_limm): New function.
3357 (gen_atomic_xchg): New function.
3358 (gen_call): New function.
3359 (ppc_relocate_instruction): New function.
3360 (ppc_install_fast_tracepoint_jump_pad): New function.
3361 (ppc_get_min_fast_tracepoint_insn_len): New function.
3362 (ppc_get_ipa_tdesc_idx): New function.
3363 (the_low_target): Wire in the new functions.
3364 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3366 * linux-ppc-tdesc.h: New file.
3368 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3370 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3371 (alloc_jump_pad_buffer): New function.
3372 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3373 (alloc_jump_pad_buffer): New function.
3374 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3375 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3376 (alloc_jump_pad_buffer): New function.
3377 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3378 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3379 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3380 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3382 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3384 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3385 * linux-amd64-ipa.c: Likewise.
3386 * linux-i386-ipa.c: Likewise.
3387 * linux-s390-ipa.c: Likewise.
3388 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3389 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3390 set_trace_state_variable_value_ptr.
3391 (struct ipa_sym_addresses): Likewise.
3392 (symbol_list): Likewise.
3393 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3394 accessing gdb_collect directly.
3395 (gdb_collect_ptr_type): New typedef.
3396 (get_raw_reg_ptr_type): New typedef.
3397 (get_trace_state_variable_value_ptr_type): New typedef.
3398 (set_trace_state_variable_value_ptr_type): New typedef.
3399 (gdb_collect_ptr): New global.
3400 (get_raw_reg_ptr): New global.
3401 (get_trace_state_variable_value_ptr): New global.
3402 (set_trace_state_variable_value_ptr): New global.
3403 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3404 accessing get_raw_reg directly.
3405 (get_get_tsv_func_addr): Likewise for
3406 get_trace_state_variable_value_ptr.
3407 (get_set_tsv_func_addr): Likewise for
3408 set_trace_state_variable_value_ptr.
3409 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3411 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3413 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3415 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3417 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3419 (relocate_instruction): Remove own_buf.
3420 * server.c (own_buf): Make global.
3421 (handle_v_requests): Make global.
3422 * server.h (own_buf): New declaration.
3423 (handle_v_requests): New prototype.
3425 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3428 * linux-s390-low.c (add_insns): New function.
3429 (s390_emit_prologue): New function.
3430 (s390_emit_epilogue): New function.
3431 (s390_emit_add): New function.
3432 (s390_emit_sub): New function.
3433 (s390_emit_mul): New function.
3434 (s390_emit_lsh): New function.
3435 (s390_emit_rsh_signed): New function.
3436 (s390_emit_rsh_unsigned): New function.
3437 (s390_emit_ext): New function.
3438 (s390_emit_log_not): New function.
3439 (s390_emit_bit_and): New function.
3440 (s390_emit_bit_or): New function.
3441 (s390_emit_bit_xor): New function.
3442 (s390_emit_bit_not): New function.
3443 (s390_emit_equal): New function.
3444 (s390_emit_less_signed): New function.
3445 (s390_emit_less_unsigned): New function.
3446 (s390_emit_ref): New function.
3447 (s390_emit_if_goto): New function.
3448 (s390_emit_goto): New function.
3449 (s390_write_goto_address): New function.
3450 (s390_emit_litpool): New function.
3451 (s390_emit_const): New function.
3452 (s390_emit_call): New function.
3453 (s390_emit_reg): New function.
3454 (s390_emit_pop): New function.
3455 (s390_emit_stack_flush): New function.
3456 (s390_emit_zero_ext): New function.
3457 (s390_emit_swap): New function.
3458 (s390_emit_stack_adjust): New function.
3459 (s390_emit_set_r2): New function.
3460 (s390_emit_int_call_1): New function.
3461 (s390_emit_void_call_2): New function.
3462 (s390_emit_eq_goto): New function.
3463 (s390_emit_ne_goto): New function.
3464 (s390_emit_lt_goto): New function.
3465 (s390_emit_le_goto): New function.
3466 (s390_emit_gt_goto): New function.
3467 (s390_emit_ge_goto): New function.
3468 (s390x_emit_prologue): New function.
3469 (s390x_emit_epilogue): New function.
3470 (s390x_emit_add): New function.
3471 (s390x_emit_sub): New function.
3472 (s390x_emit_mul): New function.
3473 (s390x_emit_lsh): New function.
3474 (s390x_emit_rsh_signed): New function.
3475 (s390x_emit_rsh_unsigned): New function.
3476 (s390x_emit_ext): New function.
3477 (s390x_emit_log_not): New function.
3478 (s390x_emit_bit_and): New function.
3479 (s390x_emit_bit_or): New function.
3480 (s390x_emit_bit_xor): New function.
3481 (s390x_emit_bit_not): New function.
3482 (s390x_emit_equal): New function.
3483 (s390x_emit_less_signed): New function.
3484 (s390x_emit_less_unsigned): New function.
3485 (s390x_emit_ref): New function.
3486 (s390x_emit_if_goto): New function.
3487 (s390x_emit_const): New function.
3488 (s390x_emit_call): New function.
3489 (s390x_emit_reg): New function.
3490 (s390x_emit_pop): New function.
3491 (s390x_emit_stack_flush): New function.
3492 (s390x_emit_zero_ext): New function.
3493 (s390x_emit_swap): New function.
3494 (s390x_emit_stack_adjust): New function.
3495 (s390x_emit_int_call_1): New function.
3496 (s390x_emit_void_call_2): New function.
3497 (s390x_emit_eq_goto): New function.
3498 (s390x_emit_ne_goto): New function.
3499 (s390x_emit_lt_goto): New function.
3500 (s390x_emit_le_goto): New function.
3501 (s390x_emit_gt_goto): New function.
3502 (s390x_emit_ge_goto): New function.
3503 (s390_emit_ops): New function.
3504 (struct linux_target_ops): Fill in emit_ops hook.
3506 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3509 * Makefile.in: Add s390 IPA files.
3510 * configure.srv: Build IPA for s390.
3511 * linux-s390-ipa.c: New file.
3512 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3513 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3514 (tdesc_s390_linux32): Likewise.
3515 (init_registers_s390_linux32v1): Likewise.
3516 (tdesc_s390_linux32v1): Likewise.
3517 (init_registers_s390_linux32v2): Likewise.
3518 (tdesc_s390_linux32v2): Likewise.
3519 (init_registers_s390_linux64): Likewise.
3520 (tdesc_s390_linux64): Likewise.
3521 (init_registers_s390_linux64v1): Likewise.
3522 (tdesc_s390_linux64v1): Likewise.
3523 (init_registers_s390_linux64v2): Likewise.
3524 (tdesc_s390_linux64v2): Likewise.
3525 (init_registers_s390_te_linux64): Likewise.
3526 (tdesc_s390_te_linux64): Likewise.
3527 (init_registers_s390_vx_linux64): Likewise.
3528 (tdesc_s390_vx_linux64): Likewise.
3529 (init_registers_s390_tevx_linux64): Likewise.
3530 (tdesc_s390_tevx_linux64): Likewise.
3531 (init_registers_s390x_linux64): Likewise.
3532 (tdesc_s390x_linux64): Likewise.
3533 (init_registers_s390x_linux64v1): Likewise.
3534 (tdesc_s390x_linux64v1): Likewise.
3535 (init_registers_s390x_linux64v2): Likewise.
3536 (tdesc_s390x_linux64v2): Likewise.
3537 (init_registers_s390x_te_linux64): Likewise.
3538 (tdesc_s390x_te_linux64): Likewise.
3539 (init_registers_s390x_vx_linux64): Likewise.
3540 (tdesc_s390x_vx_linux64): Likewise.
3541 (init_registers_s390x_tevx_linux64): Likewise.
3542 (tdesc_s390x_tevx_linux64): Likewise.
3543 (have_hwcap_s390_vx): New static variable.
3544 (s390_arch_setup): Fill have_hwcap_s390_vx.
3545 (s390_get_thread_area): New function.
3546 (s390_ft_entry_gpr_esa): New const.
3547 (s390_ft_entry_gpr_zarch): New const.
3548 (s390_ft_entry_misc): New const.
3549 (s390_ft_entry_fr): New const.
3550 (s390_ft_entry_vr): New const.
3551 (s390_ft_main_31): New const.
3552 (s390_ft_main_64): New const.
3553 (s390_ft_exit_fr): New const.
3554 (s390_ft_exit_vr): New const.
3555 (s390_ft_exit_misc): New const.
3556 (s390_ft_exit_gpr_esa): New const.
3557 (s390_ft_exit_gpr_zarch): New const.
3558 (append_insns): New function.
3559 (s390_relocate_instruction): New function.
3560 (s390_install_fast_tracepoint_jump_pad): New function.
3561 (s390_get_min_fast_tracepoint_insn_len): New function.
3562 (s390_get_ipa_tdesc_idx): New function.
3563 (struct linux_target_ops): Wire in the above functions.
3564 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3565 * linux-s390-tdesc.h: New file.
3567 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3569 * linux-s390-low.c (s390_supports_tracepoints): New function.
3570 (struct linux_target_ops): Fill supports_tracepoints hook.
3572 2016-03-18 Yao Qi <yao.qi@linaro.org>
3574 * linux-low.c (lwp_signal_can_be_delivered): New function.
3575 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3577 2016-03-18 Yao Qi <yao.qi@linaro.org>
3579 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3580 0 if signal is enqueued. Remove 'signal' from one debugging
3581 message. Move one debugging message to some lines below.
3582 Remove code setting 'signal' to 0.
3584 2016-03-18 Yao Qi <yao.qi@linaro.org>
3586 * linux-low.c (linux_low_filter_event): Remove redundant
3587 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3589 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3591 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3592 (struct linux_target_ops): Wire in the above.
3594 2016-03-03 Yao Qi <yao.qi@linaro.org>
3596 * linux-low.c: Update comments to start_step_over.
3598 2016-03-03 Yao Qi <yao.qi@linaro.org>
3601 * linux-low.c (handle_extended_wait): Set child suspended
3602 if event_lwp->bp_reinsert isn't zero.
3604 2016-03-02 Yao Qi <yao.qi@linaro.org>
3606 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3607 enqueue_pending_signal.
3609 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3611 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3614 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3616 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3617 (s390_regmap_3264) [!__s390x__]: New global.
3618 (s390_collect_ptrace_register): Skip map entries containing -1.
3619 (s390_supply_ptrace_register): Ditto.
3620 (s390_fill_gprs_high): New function.
3621 (s390_store_gprs_high): New function.
3622 (s390_regsets): Add NT_S390_HIGH_GPRS.
3623 (s390_get_hwcap): Enable on 31-bit.
3624 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3625 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3626 Detect NT_S390_HIGH_GPRS.
3627 (s390_usrregs_info_3264): Enable on 31-bit.
3628 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3629 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3631 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3634 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3635 * configure.srv: Ditto.
3636 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3637 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3638 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3639 (init_registers_amd64_linux): Remove prototype.
3640 (tdesc_amd64_linux): Remove declaration.
3641 (get_ipa_tdesc): New function.
3642 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3643 initialize remaining tdescs.
3644 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3645 (init_registers_i386_linux): Remove prototype.
3646 (tdesc_i386_linux): Remove declaration.
3647 (get_ipa_tdesc): New function.
3648 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3649 initialize remaining tdescs.
3650 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3651 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3652 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3653 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3654 (x86_get_ipa_tdesc_idx): New function.
3655 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3656 * linux-x86-tdesc.h: New file.
3657 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3658 (target_get_ipa_tdesc_idx): New macro.
3659 * tracepoint.c (ipa_tdesc_idx): New macro.
3660 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3661 (symbol_list): Add ipa_tdesc_idx.
3662 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3663 (ipa_tdesc): Remove.
3664 (ipa_tdesc_idx): New variable.
3665 (get_context_regcache): Use get_ipa_tdesc.
3666 (gdb_collect): Ditto.
3668 * tracepoint.h (get_ipa_tdesc): New prototype.
3669 (ipa_tdesc): Remove.
3671 2016-02-24 Pedro Alves <palves@redhat.com>
3673 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3674 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3675 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3676 Factor out common code between the USE_SIGTRAP_SIGINFO and
3677 !USE_SIGTRAP_SIGINFO blocks.
3678 (linux_low_filter_event): Call save_stop_reason instead of
3679 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3681 (linux_wait_1): Update comments.
3683 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3685 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3686 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3687 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3688 ppc_insert_point, ppc_remove_point.
3690 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3692 * linux-s390-low.c (s390_supports_z_point_type): New function.
3693 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3695 2016-02-16 Yao Qi <yao.qi@linaro.org>
3697 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3698 PC. Get pc from regcache_read_pc.
3700 2016-02-12 Yao Qi <yao.qi@linaro.org>
3702 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3703 or linux_get_pc_32bit.
3704 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3706 2016-02-12 Yao Qi <yao.qi@linaro.org>
3708 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3709 arm_linux_get_next_pcs_fixup.
3711 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3713 * tracepoint.c (x_tracepoint_action_download): Change
3714 write_inferior_data_ptr to write_inferior_data_pointer.
3715 (cmd_qtstart): Likewise.
3716 (write_inferior_data_ptr): Remove.
3717 (download_agent_expr): Change write_inferior_data_ptr to
3718 write_inferior_data_pointer.
3719 (download_tracepoint_1): Likewise.
3720 (download_tracepoint): Likewise.
3721 (download_trace_state_variables): Likewise.
3723 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3724 Marcin Kościelnicki <koriakin@0x04.net>
3726 * tracepoint.c (struct tracepoint_action_ops): Remove.
3727 (struct tracepoint_action): Remove ops.
3728 (m_tracepoint_action_download, r_tracepoint_action_download)
3729 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3730 size and offset accordingly.
3731 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3732 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3733 (tracepoint_action_send, tracepoint_action_download): New functions.
3734 Helpers for trace action handlers.
3735 (add_tracepoint_action): Remove setup actions ops.
3736 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3738 2016-02-10 Yao Qi <yao.qi@linaro.org>
3740 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3742 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3744 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3746 * configure: Regenerate.
3748 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3750 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3751 void * to gdb_byte *.
3752 * linux-low.c (siginfo_fixup): Likewise.
3753 (linux_xfer_siginfo): Likewise.
3754 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3756 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3758 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3760 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3762 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3764 * linux-x86-low.c [__x86_64__]: Include
3765 "nat/amd64-linux-siginfo.h".
3766 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3767 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3768 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3769 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3770 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3771 (cpt_si_fd, si_timerid, si_overrun): Move from
3772 nat/amd64-linux-siginfo.c.
3773 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3775 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3777 * server.c (skip_to_semicolon): Remove.
3778 (process_point_options): Use strchrnul instead of
3781 2016-01-26 Yao Qi <yao.qi@linaro.org>
3783 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3784 * linux-low.c (install_software_single_step_breakpoints): Don't
3785 call regcache_read_pc.
3786 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3789 2016-01-26 Yao Qi <yao.qi@linaro.org>
3791 * linux-low.c (install_software_single_step_breakpoints): Call
3792 regcache_read_pc instead of get_pc.
3794 2016-01-26 Yao Qi <yao.qi@linaro.org>
3796 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3797 (unblock_async_io): Rename to ...
3798 (block_unblock_async_io): ... it. New function.
3799 (enable_async_io): Don't install SIGIO handler. Unblock it
3801 (disable_async_io): Don't ignore SIGIO. Block it instead.
3802 (initialize_async_io): Install SIGIO handler. Don't call
3805 2016-01-26 Yao Qi <yao.qi@linaro.org>
3807 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3808 first character is '\003', call *the_target->request_interrupt.
3810 2016-01-25 Yao Qi <yao.qi@linaro.org>
3812 * remote-utils.c (new_thread_notify): Remove.
3813 (dead_thread_notify): Likewise.
3814 * remote-utils.h (new_thread_notify): Remove declaration.
3815 (dead_thread_notify): Likewise.
3817 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3819 * gdb.trace/pending.exp: Fix expected message on continue.
3821 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3823 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3824 it works properly on big-endian machines where sizeof (CORE_ADDR)
3827 2016-01-21 Pedro Alves <palves@redhat.com>
3829 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3830 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3831 * configure: Regenerate.
3833 2016-01-21 Yao Qi <yao.qi@linaro.org>
3835 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3836 is_thumb and set it according to CPSR saved on the stack.
3837 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3838 arm_sigreturn_next_pc.
3840 2016-01-18 Yao Qi <yao.qi@linaro.org>
3842 * linux-low.c (linux_set_pc_64bit): New function.
3843 (linux_get_pc_64bit): New function.
3844 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3846 * linux-sparc-low.c (debug_threads): Remove declaration.
3847 (sparc_get_pc): Remove.
3848 (the_low_target): Use linux_get_pc_64bit instead of
3850 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3851 (the_low_target): Use linux_get_pc_64bit and
3854 2016-01-18 Yao Qi <yao.qi@linaro.org>
3856 * linux-arm-low.c (debug_threads): Remove declaration.
3857 (arm_get_pc, arm_set_pc): Remove.
3858 (the_low_target): Use linux_get_pc_32bit and
3860 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3861 (the_low_target): Use linux_get_pc_32bit and
3863 * linux-cris-low.c (debug_threads): Remove declaration.
3864 (cris_get_pc, cris_set_pc,): Remove.
3865 (the_low_target): Use linux_get_pc_32bit and
3867 * linux-crisv32-low.c (debug_threads): Remove declaration.
3868 (cris_get_pc, cris_set_pc): Remove.
3869 (the_low_target): Use linux_get_pc_32bit and
3871 * linux-low.c: Include inttypes.h.
3872 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3873 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3874 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3875 (the_low_target): Use linux_get_pc_32bit and
3877 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3878 (the_low_target): Use linux_get_pc_32bit and
3880 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3881 (the_low_target): Use linux_get_pc_32bit and
3883 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3884 (the_low_target): Use linux_get_pc_32bit and
3886 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3887 (the_low_target): Use linux_get_pc_32bit and
3890 2016-01-18 Gary Benson <gbenson@redhat.com>
3892 * configure.ac (AC_FUNC_FORK): New check.
3893 * config.in: Regenerate.
3894 * configure: Likewise.
3896 2016-01-14 Yao Qi <yao.qi@linaro.org>
3898 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3899 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3900 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3901 arm_get_next_pcs_ctor.
3903 2016-01-12 Josh Stone <jistone@redhat.com>
3904 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3906 * inferiors.h: Include "gdb_vecs.h".
3907 (struct process_info): Add syscalls_to_catch.
3908 * inferiors.c (remove_process): Free syscalls_to_catch.
3909 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3910 syscall_return stops.
3911 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3912 * server.c (handle_general_set): Handle QCatchSyscalls.
3913 (handle_query): Report support for QCatchSyscalls.
3914 * target.h (struct target_ops): Add supports_catch_syscall.
3915 (target_supports_catch_syscall): New macro.
3916 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3917 (struct lwp_info): Add syscall_state.
3918 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3919 Maintain syscall_state and syscalls_to_catch across exec.
3920 (get_syscall_trapinfo): New function, proxy to the_low_target.
3921 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3922 (linux_low_filter_event): Toggle syscall_state entry/return for
3923 syscall traps, and set it ignored for all others.
3924 (gdb_catching_syscalls_p): New function.
3925 (gdb_catch_this_syscall_p): New function.
3926 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3927 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3928 (linux_supports_catch_syscall): New function.
3929 (linux_target_ops): Install it.
3930 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3931 (the_low_target): Install it.
3933 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3935 * acinclude.m4: Include new ../warning.m4 file.
3936 * configure: Regenerated.
3937 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3939 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3941 * ax.c (is_goto_target): Mark static.
3942 * linux-low.c (register_addr): Likewise.
3943 (linux_fetch_registers, linux_store_registers): Likewise.
3944 * mem-break.c (any_persistent_commands): Fix old prototype.
3945 (add_commands_to_breakpoint): Mark static.
3946 * regcache.c (find_register_by_name): Delete unused func.
3947 * remote-utils.c (hex_or_minus_one): Mark static.
3948 * server.c (monitor_show_help): Mark static.
3949 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3950 handle_v_requests): Likewise.
3952 2016-01-12 Pedro Alves <palves@redhat.com>
3954 Remove use of the registered trademark symbol throughout.
3956 2016-01-08 Yao Qi <yao.qi@linaro.org>
3958 * remote-utils.c (getpkt): If c is '\003', call target hook
3961 2016-01-06 Yao Qi <yao.qi@linaro.org>
3963 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3964 linux-aarch32-low.c.
3965 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3966 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3967 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3968 (thumb2_breakpoint): Declare.
3969 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3970 linux-aarch32-low.h.
3971 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3972 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3973 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3975 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3977 * gdbreplay.c (gdbreplay_version): Change copyright year in
3979 * server.c (gdbserver_version): Likewise.
3981 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3983 * server.c (crc32_table): Delete.
3984 (crc32): Use libiberty's xcrc32 function.
3986 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3988 * lynx-low.c (lynx_delete_thread_callback): New function.
3989 (lynx_mourn): Properly delete our process and all of its
3990 threads. Remove call to clear_inferiors.
3992 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3994 * target.c (thread_search_callback): Add check that
3995 the thread_stopped target callback is not NULL before
3998 2015-12-21 Yao Qi <yao.qi@linaro.org>
4000 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4003 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4005 * server.c (handle_query): Call target_supports_software_single_step.
4007 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4009 * linux-low.c (single_step): New function.
4010 (linux_resume_one_lwp_throw): Call single_step.
4011 (start_step_over): Likewise.
4013 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4015 * Makefile.in (SFILES): Append arch/arm-linux.c,
4016 arch/arm-get-next-pcs.c.
4017 (arm-linux.o): New rule.
4018 (arm-get-next-pcs.o): New rule.
4019 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4021 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4022 to linux-aarch32-low.c.
4023 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4024 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4025 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4026 (thumb2_breakpoint_len): Likewise.
4027 (arm_is_thumb_mode): Make non-static.
4028 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4029 from linux-aarch32-low.c.
4030 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4031 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4032 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4033 (thumb2_breakpoint_len): Likewise.
4034 (arm_is_thumb_mode): New declaration.
4035 * linux-arm-low.c: Include arch/arm-linux.h
4036 aarch/arm-get-next-pcs.h, sys/syscall.h.
4037 (get_next_pcs_ops): New struct.
4038 (get_next_pcs_addr_bits_remove): New function.
4039 (get_next_pcs_is_thumb): New function.
4040 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4041 (arm_sigreturn_next_pc): Likewise.
4042 (get_next_pcs_syscall_next_pc): Likewise.
4043 (arm_gdbserver_get_next_pcs): Likewise.
4044 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4046 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4047 * server.h: Include gdb_vecs.h.
4049 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4051 * Makefile.in (SFILES): Append common/common-regcache.c.
4052 (OBS): Append common-regcache.o.
4053 (common-regcache.o): New rule.
4054 * regcache.c (init_register_cache): Initialize cache to
4056 (regcache_raw_read_unsigned): New function.
4057 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4058 register_status enum.
4060 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4062 * linux-aarch64-low.c (the_low_targets): Rename
4063 breakpoint_reinsert_addr to get_next_pcs.
4064 * linux-arm-low.c (the_low_targets): Likewise.
4065 * linux-bfin-low.c (the_low_targets): Likewise.
4066 * linux-cris-low.c (the_low_targets): Likewise.
4067 * linux-crisv32-low.c (the_low_targets): Likewise.
4068 * linux-low.c (can_software_single_step): Likewise.
4069 (install_software_single_step_breakpoints): New function.
4070 (start_step_over): Use install_software_single_step_breakpoints.
4071 * linux-low.h: New CORE_ADDR vector.
4072 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4074 * linux-mips-low.c (the_low_targets): Likewise.
4075 * linux-nios2-low.c (the_low_targets): Likewise.
4076 * linux-sparc-low.c (the_low_targets): Likewise.
4078 2015-12-17 Pedro Alves <palves@redhat.com>
4080 * linux-low.c (linux_kill_one_lwp): Remove references to
4082 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4084 (linux_init_signals): Delete.
4085 (initialize_low): Adjust.
4086 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4088 2015-12-16 Pedro Alves <palves@redhat.com>
4090 * configure.ac (compiler warning flags): When testing a
4091 -Wno-foo option, check whether -Wfoo works instead.
4092 * configure: Regenerate.
4094 2015-12-11 Don Breazeal <donb@codesourcery.com>
4096 * server.c (process_serial_event): Don't exit from gdbserver
4097 in remote mode if there are still active inferiors.
4099 2015-12-11 Yao Qi <yao.qi@linaro.org>
4101 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4102 arm_breakpoint_at if the process is 32-bit.
4104 2015-12-11 Yao Qi <yao.qi@linaro.org>
4106 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4109 2015-12-07 Yao Qi <yao.qi@linaro.org>
4111 * configure.srv: Append arm.o to srv_tgtobj for
4112 aarch64*-*-linux* target.
4113 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4114 from linux-arm-low.c.
4115 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4116 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4117 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4118 (thumb2_breakpoint_len): Likewise.
4119 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4120 (arm_breakpoint_kinds): Likewise.
4121 (arm_breakpoint_kind_from_pc): Likewise.
4122 (arm_sw_breakpoint_from_kind): Likewise.
4123 (arm_breakpoint_kind_from_current_state): Likewise.
4124 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4125 (arm_sw_breakpoint_from_kind): Declare.
4126 (arm_breakpoint_kind_from_current_state): Declare.
4127 (arm_breakpoint_at): Declare.
4128 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4129 arm_sw_breakpoint_from_kind if process is 32-bit.
4130 (aarch64_breakpoint_kind_from_pc): New function.
4131 (aarch64_breakpoint_kind_from_current_state): New function.
4132 (the_low_target): Initialize fields breakpoint_kind_from_pc
4133 and breakpoint_kind_from_current_state.
4134 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4135 linux-aarch32-low.c.
4136 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4137 (arm_breakpoint, arm_breakpoint_len): Likewise.
4138 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4139 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4140 (arm_is_thumb_mode): Likewise.
4141 (arm_breakpoint_at): Likewise.
4142 (arm_breakpoint_kind_from_pc): Likewise.
4143 (arm_sw_breakpoint_from_kind): Likewise.
4144 (arm_breakpoint_kind_from_current_state): Likewise.
4147 2015-08-04 Yao Qi <yao.qi@linaro.org>
4149 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4150 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4151 * server.c (extended_protocol): Remove "static".
4152 * server.h (extended_protocol): Declare it.
4154 2015-12-04 Josh Stone <jistone@redhat.com>
4156 * target.h (struct target_ops) <arch_setup>: Rename to ...
4157 (struct target_ops) <post_create_inferior>: ... this.
4158 (target_arch_setup): Rename to ...
4159 (target_post_create_inferior): ... this, calling post_create_inferior.
4160 * server.c (start_inferior): Update target_arch_setup calls to
4161 target_post_create_inferior.
4162 * linux-low.c (linux_low_ptrace_options): Forward declare.
4163 (linux_arch_setup): Update its comment for general use.
4164 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4165 (struct linux_target_ops): Use linux_post_create_inferior.
4166 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4167 to post_create_inferior.
4168 * nto-low.c (struct nto_target_ops): Likewise.
4169 * spu-low.c (struct spu_target_ops): Likewise.
4170 * win32-low.c (struct win32_target_ops): Likewise.
4172 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4174 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4176 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4178 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4179 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4180 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4181 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4182 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4183 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4184 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4185 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4186 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4187 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4188 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4189 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4191 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4193 * linux-low.c (linux_look_up_symbols): Don't call
4194 linux_supports_traceclone.
4195 * linux-low.h (thread_db_init): Remove use_events argument.
4196 * thread-db.c (thread_db_use_event): Remove global variable.
4197 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4198 (struct thread_db) <td_create_bp>: Remove field.
4199 (thread_db_create_event): Remove function.
4200 (thread_db_enable_reporting): Likewise.
4201 (find_one_thread): Don't check for thread_db_use_events.
4202 (attach_thread): Likewise.
4203 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4204 (try_thread_db_load_1): Don't check for thread_db_use_events.
4205 (thread_db_init): Remove use_events argument and thread events
4207 (remove_thread_event_breakpoints): Remove function.
4208 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4210 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4212 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4214 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4215 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4216 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4217 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4218 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4220 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4222 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4223 * linux-low.c (can_hardware_single_step): Use
4224 supports_hardware_single_step.
4225 (can_software_single_step): New function.
4226 (start_step_over): Call can_software_single_step.
4227 (linux_supports_hardware_single_step): New function.
4228 (struct target_ops) <supports_software_single_step>: Initialize.
4229 * linux-low.h (struct linux_target_ops)
4230 <supports_hardware_single_step>: Initialize.
4231 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4232 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4233 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4234 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4235 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4236 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4237 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4238 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4239 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4240 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4242 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4243 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4245 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4246 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4247 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4249 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4250 * target.h (struct target_ops): <supports_software_single_step>:
4252 (target_supports_software_single_step): New macro.
4254 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4256 * linux-low.c (linux_wait_1): Fix pc advance condition.
4257 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4258 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4260 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4262 * linux-arm-low.c (arm_is_thumb_mode): New function.
4263 (arm_breakpoint_at): Use arm_is_thumb_mode.
4264 (arm_breakpoint_kind_from_current_state): New function.
4265 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4267 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4268 (linux_breakpoint_kind_from_current_state): New function.
4269 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4270 * linux-low.h (struct linux_target_ops)
4271 <breakpoint_kind_from_current_state>: New field.
4272 * target.h (struct target_ops): Likewise.
4273 (target_breakpoint_kind_from_current_state): New macro.
4275 2015-11-30 Pedro Alves <palves@redhat.com>
4277 * linux-low.c (linux_resume): Wake up the event loop before
4280 2015-11-30 Pedro Alves <palves@redhat.com>
4282 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4284 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4286 * target.c (struct thread_search): New structure.
4287 (thread_search_callback): New function.
4288 (prev_general_thread): New global.
4289 (prepare_to_access_memory, done_accessing_memory): New functions.
4290 * target.h (prepare_to_access_memory, done_accessing_memory):
4291 Replace macros with function declarations.
4293 2015-11-30 Pedro Alves <palves@redhat.com>
4296 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4297 report TARGET_WAITKIND_NO_RESUMED.
4298 * remote-utils.c (prepare_resume_reply): Handle
4299 TARGET_WAITKIND_NO_RESUMED.
4300 * server.c (report_no_resumed): New global.
4301 (handle_query) <qSupported>: Handle "no-resumed+". Report
4302 "no-resumed+" support.
4303 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4304 return error if the client doesn't support no-resumed events.
4305 (push_stop_notification): New function.
4306 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4307 events if the client supports them.
4309 2015-11-30 Pedro Alves <palves@redhat.com>
4311 * linux-low.c (thread_still_has_status_pending_p): Don't check
4313 (lwp_resumed): New function.
4314 (status_pending_p_callback): Return early if the LWP is not
4315 supposed to be resumed.
4317 2015-11-30 Pedro Alves <palves@redhat.com>
4319 * linux-low.c (handle_extended_wait): Assert that the LWP's
4320 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4321 thread create events, leave the new child's status pending.
4322 (linux_low_filter_event): If GDB wants to hear about thread exit
4323 events, leave the LWP marked dead and don't delete it.
4324 (linux_wait_for_event_filtered): Don't check for thread exit.
4325 (filter_exit_event): New function.
4326 (linux_wait_1): Use it, when returning an exit event.
4327 (linux_resume_one_lwp_throw): Assert that the LWP's
4328 waitstatus is TARGET_WAITKIND_IGNORE.
4329 * remote-utils.c (prepare_resume_reply): Handle
4330 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4331 * server.c (report_thread_events): New global.
4332 (handle_general_set): Handle QThreadEvents.
4333 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4334 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4335 TARGET_WAITKIND_THREAD_EXITED.
4336 * server.h (report_thread_events): Declare.
4338 2015-11-30 Pedro Alves <palves@redhat.com>
4340 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4341 the thread's last_resume_kind was resume_stop.
4343 2015-11-30 Pedro Alves <palves@redhat.com>
4345 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4348 2015-11-30 Pedro Alves <palves@redhat.com>
4350 * server.c (handle_v_requests): Handle vCtrlC.
4352 2015-11-30 Pedro Alves <palves@redhat.com>
4354 * gdbthread.h (find_any_thread_of_pid): Declare.
4355 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4357 * server.c (handle_query): If current_thread is NULL, look for
4358 another thread of the selected process.
4360 2015-11-26 Daniel Colascione <dancol@dancol.org>
4361 Simon Marchi <simon.marchi@ericsson.com>
4363 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4364 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4366 * target.h (struct target_ops) <thread_name>: New field.
4367 (target_thread_name): New macro.
4369 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4371 * regcache.h (regcache_invalidate_pid): Add declaration.
4372 * regcache.c (regcache_invalidate_pid): New function, extracted
4373 from regcache_invalidate.
4374 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4375 Add trivial documentation comment.
4376 * lynx-low.c: Use regcache_invalidate_pid instead of
4377 regcache_invalidate.
4379 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4381 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4382 and Elf64_auxv_t if the target is Android.
4384 2015-11-22 Doug Evans <xdje42@gmail.com>
4386 * target.h: #include <sys/types.h>.
4388 2015-11-19 Pedro Alves <palves@redhat.com>
4390 * linux-low.c (linux_process_qsupported): Change prototype.
4392 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4394 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4395 and adjust to loop over all features.
4396 * server.c (handle_query) <qSupported>: Adjust to call
4397 target_process_qsupported once, passing it a vector of unprocessed
4399 * target.h (struct target_ops) <process_qsupported>: Change
4401 (target_process_qsupported): Adjust.
4403 2015-11-19 Pedro Alves <palves@redhat.com>
4405 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4407 * configure: Regenerate.
4409 2015-11-19 Pedro Alves <palves@redhat.com>
4411 * configure: Regenerate.
4413 2015-11-19 Yao Qi <yao.qi@linaro.org>
4415 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4418 2015-11-19 Yao Qi <yao.qi@linaro.org>
4420 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4421 (struct aarch64_operand): Move enum out.
4423 2015-11-19 Yao Qi <yao.qi@linaro.org>
4425 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4426 struct user_fpsimd_state *.
4427 (aarch64_store_fpregset): Likewise.
4429 2015-11-19 Yao Qi <yao.qi@linaro.org>
4431 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4432 struct user_pt_regs *.
4433 (aarch64_store_gregset): Likewise.
4435 2015-11-18 Pedro Alves <palves@redhat.com>
4437 * Makefile.in (all_object_files): Add $IPA_OBJS.
4439 2015-11-17 Pedro Alves <palves@redhat.com>
4441 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4442 GDB_SIGNAL_0 and gdb_signal_to_string.
4444 2015-11-17 Pedro Alves <palves@redhat.com>
4446 * win32-low.c (handle_output_debug_string): Remove parameter.
4447 (win32_kill): Remove our_status local and adjust call to
4448 handle_output_debug_string.
4449 (get_child_debug_event): Adjust call to
4450 handle_output_debug_string.
4452 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4454 * linux-mips-low.c (mips_fill_gregset): Add cast.
4455 (mips_store_gregset): Likewise.
4456 (mips_fill_fpregset): Likewise.
4457 (mips_store_fpregset): Likewise.
4459 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4461 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4464 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4466 * linux-mips-low.c (mips_linux_new_thread): Change type of
4467 watch_type to enum target_hw_bp_type.
4469 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4471 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4472 Change return type to arm_hwbp_type.
4474 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4476 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4477 (arm_store_gregset): Likewise.
4478 * linux-arm-low.c (arm_get_hwcap): Likewise.
4479 (arm_read_description): Likewise.
4481 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4483 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4485 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4487 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4488 (ppc_fill_vsxregset): Likewise.
4489 (ppc_store_vsxregset): Likewise.
4490 (ppc_fill_vrregset): Likewise.
4491 (ppc_store_vrregset): Likewise.
4492 (ppc_fill_evrregset): Likewise.
4493 (ppc_store_evrregset): Likewise.
4495 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4497 * linux-ppc-low.c (ppc_usrregs_info): Remove
4498 forward-declaration.
4499 (ppc_arch_setup): Move lower in file.
4501 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4503 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4504 (ps_pdwrite): Likewise.
4506 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4508 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4509 to after assert checks.
4511 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4513 * proc-service.c (ps_pdread): Add/adjust casts.
4514 (ps_pdwrite): Add/adjust casts.
4516 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4518 * server.c (handle_search_memory_1): Cast return value of
4521 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4523 * server.c (write_qxfer_response): Change type of data to
4526 2015-10-29 Pedro Alves <palves@redhat.com>
4528 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4530 2015-10-29 Pedro Alves <palves@redhat.com>
4532 * tracepoint.c (clear_installed_tracepoints): Add casts.
4534 2015-10-29 Pedro Alves <palves@redhat.com>
4536 * server.c (handle_v_cont, process_serial_event): Add enum
4537 gdb_signal casts to signal parsing code.
4539 2015-10-29 Pedro Alves <palves@redhat.com>
4541 * linux-low.h (NULL_REGSET): Define.
4542 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4543 * linux-arm-low.c (arm_regsets): Likewise.
4544 * linux-crisv32-low.c (cris_regsets): Likewise.
4545 * linux-m68k-low.c (m68k_regsets): Likewise.
4546 * linux-mips-low.c (mips_regsets): Likewise.
4547 * linux-nios2-low.c (nios2_regsets): Likewise.
4548 * linux-ppc-low.c (ppc_regsets): Likewise.
4549 * linux-s390-low.c (s390_regsets): Likewise.
4550 * linux-sh-low.c (sh_regsets): Likewise.
4551 * linux-sparc-low.c (sparc_regsets): Likewise.
4552 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4553 * linux-tile-low.c (tile_regsets): Likewise.
4554 * linux-x86-low.c (x86_regsets): Likewise.
4555 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4557 2015-10-29 Pedro Alves <palves@redhat.com>
4559 * linux-low.h (NULL_REGSET): Define.
4560 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4561 * linux-arm-low.c (arm_regsets): Likewise.
4562 * linux-crisv32-low.c (cris_regsets): Likewise.
4563 * linux-m68k-low.c (m68k_regsets): Likewise.
4564 * linux-mips-low.c (mips_regsets): Likewise.
4565 * linux-nios2-low.c (nios2_regsets): Likewise.
4566 * linux-ppc-low.c (ppc_regsets): Likewise.
4567 * linux-s390-low.c (s390_regsets): Likewise.
4568 * linux-sh-low.c (sh_regsets): Likewise.
4569 * linux-sparc-low.c (sparc_regsets): Likewise.
4570 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4571 * linux-tile-low.c (tile_regsets): Likewise.
4572 * linux-x86-low.c (x86_regsets): Likewise.
4573 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4575 2015-10-26 Doug Evans <dje@google.com>
4577 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4579 2015-10-26 Doug Evans <dje@google.com>
4581 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4583 2015-10-26 Doug Evans <dje@google.com>
4585 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4587 (attach_thread, find_new_threads_callback): Ditto.
4589 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4591 * mem-break.h (set_breakpoint_data): Remove.
4593 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4595 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4596 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4597 (initialize_low): Remove set_breakpoint_data call.
4598 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4599 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4600 (initialize_low): Remove set_breakpoint_data call.
4601 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4602 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4603 (initialize_low): Remove set_breakpoint_data call.
4605 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4607 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4608 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4609 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4610 * target.h (target_breakpoint_kind_from_pc): New macro.
4612 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4614 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4615 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4616 the default breakpoint kind.
4618 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4620 * linux-arm-low.c (arm_supports_z_point_type): Add software
4623 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4625 * linux-arm-low.c: Refactor breakpoint definitions.
4626 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4627 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4629 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4631 * Makefile.in: Add arm.c/o.
4632 * configure.srv: Likewise.
4633 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4634 (arm_breakpoint_kind_from_pc): New function.
4635 (arm_sw_breakpoint_from_kind): Return proper kind.
4636 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4638 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4640 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4642 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4643 (struct raw_breakpoint) <size>: Remove.
4644 (struct raw_breakpoint) <kind>: Add.
4645 (bp_size): New function.
4646 (bp_opcode): Likewise.
4647 (find_raw_breakpoint_at): Adjust for kind.
4648 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4649 (remove_memory_breakpoint): Adjust for kind call bp_size.
4650 (set_raw_breakpoint_at): Adjust for kind.
4651 (set_breakpoint): Likewise.
4652 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4653 (delete_raw_breakpoint): Adjust for kind.
4654 (delete_breakpoint): Likewise.
4655 (find_gdb_breakpoint): Likewise.
4656 (set_gdb_breakpoint_1): Likewise.
4657 (set_gdb_breakpoint): Likewise.
4658 (delete_gdb_breakpoint_1): Likewise.
4659 (delete_gdb_breakpoint): Likewise.
4660 (uninsert_raw_breakpoint): Likewise.
4661 (reinsert_raw_breakpoint): Likewise.
4662 (set_breakpoint_data): Remove.
4663 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4664 (check_mem_read): Adjust for kind call bp_size.
4665 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4666 (clone_one_breakpoint): Adjust for kind.
4667 * mem-break.h (set_gdb_breakpoint): Likewise.
4668 (delete_gdb_breakpoint): Likewise.
4669 * server.c (process_serial_event): Likewise.
4671 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4673 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4674 (struct linux_target_ops) <breakpoint>: Remove.
4675 (struct linux_target_ops) <breakpoint_len>: Remove.
4676 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4677 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4678 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4679 (arm_sw_breakpoint_from_kind): New function.
4680 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4681 (struct linux_target_ops) <breakpoint>: Remove.
4682 (struct linux_target_ops) <breakpoint_len>: Remove.
4683 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4684 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4685 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4686 (struct linux_target_ops) <breakpoint>: Remove.
4687 (struct linux_target_ops) <breakpoint_len>: Remove.
4688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4689 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4690 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4691 (struct linux_target_ops) <breakpoint>: Remove.
4692 (struct linux_target_ops) <breakpoint_len>: Remove.
4693 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4694 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4695 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4696 and sw_breakpoint_from_kind to increment the pc.
4697 (linux_breakpoint_kind_from_pc): New function.
4698 (linux_sw_breakpoint_from_kind): New function.
4699 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4700 (initialize_low): Call breakpoint_kind_from_pc and
4701 sw_breakpoint_from_kind to replace breakpoint_data/len.
4702 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4704 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4705 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4706 (struct linux_target_ops) <breakpoint>: Remove.
4707 (struct linux_target_ops) <breakpoint_len>: Remove.
4708 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4709 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4710 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4711 (struct linux_target_ops) <breakpoint>: Remove.
4712 (struct linux_target_ops) <breakpoint_len>: Remove.
4713 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4714 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4715 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4716 (struct linux_target_ops) <breakpoint>: Remove.
4717 (struct linux_target_ops) <breakpoint_len>: Remove.
4718 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4719 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4720 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4721 (struct linux_target_ops) <breakpoint>: Remove.
4722 (struct linux_target_ops) <breakpoint_len>: Remove.
4723 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4724 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4725 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4726 (struct linux_target_ops) <breakpoint>: Remove.
4727 (struct linux_target_ops) <breakpoint_len>: Remove.
4728 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4730 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4731 (struct linux_target_ops) <breakpoint>: Remove.
4732 (struct linux_target_ops) <breakpoint_len>: Remove.
4733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4734 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4735 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4736 (struct linux_target_ops) <breakpoint>: Remove.
4737 (struct linux_target_ops) <breakpoint_len>: Remove.
4738 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4739 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4740 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4741 (struct linux_target_ops) <breakpoint>: Remove.
4742 (struct linux_target_ops) <breakpoint_len>: Remove.
4743 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4744 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4745 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4746 (struct linux_target_ops) <breakpoint>: Remove.
4747 (struct linux_target_ops) <breakpoint_len>: Remove.
4748 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4749 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4750 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4751 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4752 (struct linux_target_ops) <breakpoint>: Remove.
4753 (struct linux_target_ops) <breakpoint_len>: Remove.
4754 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4755 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4756 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4757 (struct linux_target_ops) <breakpoint>: Remove.
4758 (struct linux_target_ops) <breakpoint_len>: Remove.
4759 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4760 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4762 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4764 * linux-cris-low.c (cris_get_pc): Remove void arg.
4766 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4768 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4771 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4773 * inferiors.c (thread_pid_matches_callback): New function.
4774 (find_thread_process): New function.
4775 (remove_thread): Reset current_thread.
4776 (remove_process): Assert threads have been removed first.
4778 2015-10-15 Yao Qi <yao.qi@linaro.org>
4780 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4782 (aarch64_remove_point): Likewise.
4783 * regcache.c (regcache_register_size): New function.
4785 2015-10-12 Yao Qi <yao.qi@linaro.org>
4787 * linux-aarch64-low.c: Update all callers as emit_load_store
4788 is renamed to aarch64_emit_load_store.
4790 2015-10-12 Yao Qi <yao.qi@linaro.org>
4792 * linux-aarch64-low.c: Update all callers of function renaming
4793 from emit_insn to aarch64_emit_insn.
4795 2015-10-12 Yao Qi <yao.qi@linaro.org>
4797 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4798 arch/aarch64-insn.h.
4799 (struct aarch64_memory_operand): Likewise.
4801 (emit_insn): Move to arch/aarch64-insn.c.
4802 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4803 (emit_load_store): Move to arch/aarch64-insn.c.
4804 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4805 (can_encode_int32): Remove.
4807 2015-10-12 Yao Qi <yao.qi@linaro.org>
4809 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4810 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4811 (aarch64_relocate_instruction): Likewise.
4812 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4813 (struct aarch64_insn_visitor): Likewise.
4815 2015-10-12 Yao Qi <yao.qi@linaro.org>
4817 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4818 (struct aarch64_insn_visitor): New.
4819 (struct aarch64_insn_relocation_data): New.
4820 (aarch64_ftrace_insn_reloc_b): New function.
4821 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4822 (aarch64_ftrace_insn_reloc_cb): Likewise.
4823 (aarch64_ftrace_insn_reloc_tb): Likewise.
4824 (aarch64_ftrace_insn_reloc_adr): Likewise.
4825 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4826 (aarch64_ftrace_insn_reloc_others): Likewise.
4828 (aarch64_relocate_instruction): Use visitor.
4830 2015-10-12 Yao Qi <yao.qi@linaro.org>
4832 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4833 int. Add argument buf.
4834 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4835 aarch64_relocate_instruction.
4837 2015-10-12 Yao Qi <yao.qi@linaro.org>
4839 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4840 argument insn. Remove local variable insn. Don't call
4842 (aarch64_install_fast_tracepoint_jump_pad): Call
4845 2015-09-30 Yao Qi <yao.qi@linaro.org>
4847 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4848 (emit_load_store_pair): Likewise.
4850 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4852 * dll.c (match_dll): Add cast(s).
4853 (unloaded_dll): Likewise.
4854 * linux-low.c (second_thread_of_pid_p): Likewise.
4855 (delete_lwp_callback): Likewise.
4856 (count_events_callback): Likewise.
4857 (select_event_lwp_callback): Likewise.
4858 (linux_set_resume_request): Likewise.
4859 * server.c (accumulate_file_name_length): Likewise.
4860 (emit_dll_description): Likewise.
4861 (handle_qxfer_threads_worker): Likewise.
4862 (visit_actioned_threads): Likewise.
4863 * thread-db.c (any_thread_of): Likewise.
4864 * tracepoint.c (same_process_p): Likewise.
4865 (match_blocktype): Likewise.
4866 (build_traceframe_info_xml): Likewise.
4868 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4870 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4872 (gdb_unparse_agent_expr): Likewise.
4873 * hostio.c (require_data): Likewise.
4874 (handle_pread): Likewise.
4875 * linux-low.c (disable_regset): Likewise.
4876 (fetch_register): Likewise.
4877 (store_register): Likewise.
4878 (get_dynamic): Likewise.
4879 (linux_qxfer_libraries_svr4): Likewise.
4880 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4881 (set_fast_tracepoint_jump): Likewise.
4882 (uninsert_fast_tracepoint_jumps_at): Likewise.
4883 (reinsert_fast_tracepoint_jumps_at): Likewise.
4884 (validate_inserted_breakpoint): Likewise.
4885 (clone_agent_expr): Likewise.
4886 * regcache.c (init_register_cache): Likewise.
4887 * remote-utils.c (putpkt_binary_1): Likewise.
4888 (decode_M_packet): Likewise.
4889 (decode_X_packet): Likewise.
4890 (look_up_one_symbol): Likewise.
4891 (relocate_instruction): Likewise.
4892 (monitor_output): Likewise.
4893 * server.c (handle_search_memory): Likewise.
4894 (handle_qxfer_exec_file): Likewise.
4895 (handle_qxfer_libraries): Likewise.
4896 (handle_qxfer): Likewise.
4897 (handle_query): Likewise.
4898 (handle_v_cont): Likewise.
4899 (handle_v_run): Likewise.
4900 (captured_main): Likewise.
4901 * target.c (write_inferior_memory): Likewise.
4902 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4903 * tracepoint.c (init_trace_buffer): Likewise.
4904 (add_tracepoint_action): Likewise.
4905 (add_traceframe): Likewise.
4906 (add_traceframe_block): Likewise.
4907 (cmd_qtdpsrc): Likewise.
4908 (cmd_qtdv): Likewise.
4909 (cmd_qtstatus): Likewise.
4910 (response_source): Likewise.
4911 (response_tsv): Likewise.
4912 (cmd_qtnotes): Likewise.
4913 (gdb_collect): Likewise.
4914 (initialize_tracepoint): Likewise.
4916 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4918 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4919 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4920 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4922 (enum aarch64_condition_codes): New enum.
4923 (w0): New static global.
4926 (struct aarch64_memory_operand) <type>: New
4927 MEMORY_OPERAND_POSTINDEX type.
4928 (postindex_memory_operand): New helper function.
4929 (emit_ret): New function.
4930 (emit_load_store_pair): New function, factored out of emit_stp
4931 with support for MEMORY_OPERAND_POSTINDEX.
4932 (emit_stp): Rewrite using emit_load_store_pair.
4933 (emit_ldp): New function.
4934 (emit_load_store): Likewise.
4935 (emit_ldr): Mention post-index instruction in comment.
4936 (emit_ldrh): New function.
4937 (emit_ldrb): New function.
4938 (emit_ldrsw): Mention post-index instruction in comment.
4939 (emit_str): Likewise.
4940 (emit_subs): New function.
4941 (emit_cmp): Likewise.
4942 (emit_and): Likewise.
4943 (emit_orr): Likewise.
4944 (emit_orn): Likewise.
4945 (emit_eor): Likewise.
4946 (emit_mvn): Likewise.
4947 (emit_lslv): Likewise.
4948 (emit_lsrv): Likewise.
4949 (emit_asrv): Likewise.
4950 (emit_mul): Likewise.
4951 (emit_sbfm): Likewise.
4952 (emit_sbfx): Likewise.
4953 (emit_ubfm): Likewise.
4954 (emit_ubfx): Likewise.
4955 (emit_csinc): Likewise.
4956 (emit_cset): Likewise.
4957 (emit_nop): Likewise.
4958 (emit_ops_insns): New helper function.
4959 (emit_pop): Likewise.
4960 (emit_push): Likewise.
4961 (aarch64_emit_prologue): New function.
4962 (aarch64_emit_epilogue): Likewise.
4963 (aarch64_emit_add): Likewise.
4964 (aarch64_emit_sub): Likewise.
4965 (aarch64_emit_mul): Likewise.
4966 (aarch64_emit_lsh): Likewise.
4967 (aarch64_emit_rsh_signed): Likewise.
4968 (aarch64_emit_rsh_unsigned): Likewise.
4969 (aarch64_emit_ext): Likewise.
4970 (aarch64_emit_log_not): Likewise.
4971 (aarch64_emit_bit_and): Likewise.
4972 (aarch64_emit_bit_or): Likewise.
4973 (aarch64_emit_bit_xor): Likewise.
4974 (aarch64_emit_bit_not): Likewise.
4975 (aarch64_emit_equal): Likewise.
4976 (aarch64_emit_less_signed): Likewise.
4977 (aarch64_emit_less_unsigned): Likewise.
4978 (aarch64_emit_ref): Likewise.
4979 (aarch64_emit_if_goto): Likewise.
4980 (aarch64_emit_goto): Likewise.
4981 (aarch64_write_goto_address): Likewise.
4982 (aarch64_emit_const): Likewise.
4983 (aarch64_emit_call): Likewise.
4984 (aarch64_emit_reg): Likewise.
4985 (aarch64_emit_pop): Likewise.
4986 (aarch64_emit_stack_flush): Likewise.
4987 (aarch64_emit_zero_ext): Likewise.
4988 (aarch64_emit_swap): Likewise.
4989 (aarch64_emit_stack_adjust): Likewise.
4990 (aarch64_emit_int_call_1): Likewise.
4991 (aarch64_emit_void_call_2): Likewise.
4992 (aarch64_emit_eq_goto): Likewise.
4993 (aarch64_emit_ne_goto): Likewise.
4994 (aarch64_emit_lt_goto): Likewise.
4995 (aarch64_emit_le_goto): Likewise.
4996 (aarch64_emit_gt_goto): Likewise.
4997 (aarch64_emit_ge_got): Likewise.
4998 (aarch64_emit_ops_impl): New static global variable.
4999 (aarch64_emit_ops): New target function, return
5000 &aarch64_emit_ops_impl.
5001 (struct linux_target_ops): Install it.
5003 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5005 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5006 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5008 * linux-aarch64-ipa.c: New file.
5009 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5011 (aarch64_get_thread_area): New target method.
5012 (extract_signed_bitfield): New helper function.
5013 (aarch64_decode_ldr_literal): New function.
5014 (enum aarch64_opcodes): New enum.
5015 (struct aarch64_register): New struct.
5016 (struct aarch64_operand): New struct.
5017 (x0): New static global.
5026 (aarch64_register): New helper function.
5027 (register_operand): Likewise.
5028 (immediate_operand): Likewise.
5029 (struct aarch64_memory_operand): New struct.
5030 (offset_memory_operand): New helper function.
5031 (preindex_memory_operand): Likewise.
5032 (enum aarch64_system_control_registers): New enum.
5033 (ENCODE): New macro.
5034 (emit_insn): New helper function.
5035 (emit_b): New function.
5036 (emit_bcond): Likewise.
5037 (emit_cb): Likewise.
5038 (emit_tb): Likewise.
5039 (emit_blr): Likewise.
5040 (emit_stp): Likewise.
5041 (emit_ldp_q_offset): Likewise.
5042 (emit_stp_q_offset): Likewise.
5043 (emit_load_store): Likewise.
5044 (emit_ldr): Likewise.
5045 (emit_ldrsw): Likewise.
5046 (emit_str): Likewise.
5047 (emit_ldaxr): Likewise.
5048 (emit_stxr): Likewise.
5049 (emit_stlr): Likewise.
5050 (emit_data_processing_reg): Likewise.
5051 (emit_data_processing): Likewise.
5052 (emit_add): Likewise.
5053 (emit_sub): Likewise.
5054 (emit_mov): Likewise.
5055 (emit_movk): Likewise.
5056 (emit_mov_addr): Likewise.
5057 (emit_mrs): Likewise.
5058 (emit_msr): Likewise.
5059 (emit_sevl): Likewise.
5060 (emit_wfe): Likewise.
5061 (append_insns): Likewise.
5062 (can_encode_int32_in): New helper function.
5063 (aarch64_relocate_instruction): New function.
5064 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5065 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5066 (struct linux_target_ops): Install aarch64_get_thread_area,
5067 aarch64_install_fast_tracepoint_jump_pad and
5068 aarch64_get_min_fast_tracepoint_insn_len.
5070 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5072 * Makefile.in (aarch64-insn.o): New rule.
5073 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5075 2015-09-21 Yao Qi <yao.qi@linaro.org>
5077 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5079 2015-09-21 Yao Qi <yao.qi@linaro.org>
5081 * tracepoint.c (max_jump_pad_size): Remove.
5083 2015-09-18 Yao Qi <yao.qi@linaro.org>
5085 * linux-aarch64-low.c: Don't include sys/uio.h.
5086 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5088 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5090 * tracepoint.c (eval_result_type): Change prototype.
5091 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5093 2015-09-15 Pedro Alves <palves@redhat.com>
5095 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5096 Check whether to report exec events instead of checking whether
5097 multiprocess is enabled.
5099 2015-09-15 Pedro Alves <palves@redhat.com>
5102 * remote-utils.c (prepare_resume_reply): Merge
5103 TARGET_WAITKIND_VFORK_DONE switch case with the
5104 TARGET_WAITKIND_FORKED case.
5106 2015-09-15 Yao Qi <yao.qi@linaro.org>
5108 * server.c (handle_query): Check string comparison using
5109 "else if" instead of "if".
5111 2015-09-15 Yao Qi <yao.qi@linaro.org>
5113 * server.c (vCont_supported): New global variable.
5114 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5115 matches. Append ";vContSupported+" to own_buf.
5116 (handle_v_requests): Append ";s;S" to own_buf if target supports
5117 hardware single step or vCont_supported is false.
5118 (capture_main): Set vCont_supported to zero.
5120 2015-09-15 Yao Qi <yao.qi@linaro.org>
5122 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5124 (linux_supports_hardware_single_step): ... New function.
5125 (linux_target_ops): Update.
5126 * lynx-low.c (lynx_target_ops): Set field
5127 supports_hardware_single_step to target_can_do_hardware_single_step.
5128 * nto-low.c (nto_target_ops): Likewise.
5129 * spu-low.c (spu_target_ops): Likewise.
5130 * win32-low.c (win32_target_ops): Likewise.
5131 * target.c (target_can_do_hardware_single_step): New function.
5132 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5133 Remove. <supports_hardware_single_step>: New field.
5134 (target_supports_conditional_breakpoints): Remove.
5135 (target_supports_hardware_single_step): New macro.
5136 (target_can_do_hardware_single_step): Declare.
5137 * server.c (handle_query): Use target_supports_hardware_single_step
5138 instead of target_supports_conditional_breakpoints.
5140 2015-09-15 Yao Qi <yao.qi@linaro.org>
5142 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5144 (struct linux_target_ops the_low_target): Install
5145 aarch64_linux_siginfo_fixup.
5147 2015-09-11 Don Breazeal <donb@codesourcery.com>
5148 Luis Machado <lgustavo@codesourcery.com>
5150 * linux-low.c (linux_mourn): Static declaration.
5151 (linux_arch_setup): Move in front of
5152 handle_extended_wait.
5153 (linux_arch_setup_thread): New function.
5154 (handle_extended_wait): Handle exec events. Call
5155 linux_arch_setup_thread. Make event_lwp argument a
5156 pointer-to-a-pointer.
5157 (check_zombie_leaders): Do not check stopped threads.
5158 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5159 (linux_low_filter_event): Add lwp and thread for exec'ing
5160 non-leader thread if leader thread has been deleted.
5161 Refactor code into linux_arch_setup_thread and call it.
5162 Pass child lwp pointer by reference to handle_extended_wait.
5163 (linux_wait_for_event_filtered): Update comment.
5164 (linux_wait_1): Prevent clobbering exec event status.
5165 (linux_supports_exec_events): New function.
5166 (linux_target_ops) <supports_exec_events>: Initialize new member.
5167 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5169 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5170 * server.c (report_exec_events): New global variable.
5171 (handle_query): Handle qSupported query for exec-events feature.
5172 (captured_main): Initialize report_exec_events.
5173 * server.h (report_exec_events): Declare new global variable.
5174 * target.h (struct target_ops) <supports_exec_events>: New
5176 (target_supports_exec_events): New macro.
5177 * win32-low.c (win32_target_ops) <supports_exec_events>:
5178 Initialize new member.
5180 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5182 * linux-low.c (linux_low_enable_btrace): Remove.
5183 (linux_target_ops): Replace linux_low_enable_btrace with
5184 linux_enable_btrace.
5186 2015-09-03 Yao Qi <yao.qi@linaro.org>
5188 * linux-aarch64-low.c (aarch64_insert_point): Call
5189 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5192 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5194 * linux-low.c (check_stopped_by_breakpoint): Use
5195 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5197 2015-08-27 Pedro Alves <palves@redhat.com>
5199 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5201 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5203 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5204 the XNEW-family equivalent.
5205 (compile_bytecodes): Likewise.
5206 * dll.c (loaded_dll): Likewise.
5207 * event-loop.c (append_callback_event): Likewise.
5208 (create_file_handler): Likewise.
5209 (create_file_event): Likewise.
5210 * hostio.c (handle_open): Likewise.
5211 * inferiors.c (add_thread): Likewise.
5212 (add_process): Likewise.
5213 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5214 * linux-arm-low.c (arm_new_process): Likewise.
5215 (arm_new_thread): Likewise.
5216 * linux-low.c (add_to_pid_list): Likewise.
5217 (linux_add_process): Likewise.
5218 (handle_extended_wait): Likewise.
5219 (add_lwp): Likewise.
5220 (enqueue_one_deferred_signal): Likewise.
5221 (enqueue_pending_signal): Likewise.
5222 (linux_resume_one_lwp_throw): Likewise.
5223 (linux_resume_one_thread): Likewise.
5224 (linux_read_memory): Likewise.
5225 (linux_write_memory): Likewise.
5226 * linux-mips-low.c (mips_linux_new_process): Likewise.
5227 (mips_linux_new_thread): Likewise.
5228 (mips_add_watchpoint): Likewise.
5229 * linux-x86-low.c (initialize_low_arch): Likewise.
5230 * lynx-low.c (lynx_add_process): Likewise.
5231 * mem-break.c (set_raw_breakpoint_at): Likewise.
5232 (set_breakpoint): Likewise.
5233 (add_condition_to_breakpoint): Likewise.
5234 (add_commands_to_breakpoint): Likewise.
5235 (clone_agent_expr): Likewise.
5236 (clone_one_breakpoint): Likewise.
5237 * regcache.c (new_register_cache): Likewise.
5238 * remote-utils.c (look_up_one_symbol): Likewise.
5239 * server.c (queue_stop_reply): Likewise.
5240 (start_inferior): Likewise.
5241 (queue_stop_reply_callback): Likewise.
5242 (handle_target_event): Likewise.
5243 * spu-low.c (fetch_ppc_memory): Likewise.
5244 (store_ppc_memory): Likewise.
5245 * target.c (set_target_ops): Likewise.
5246 * thread-db.c (thread_db_load_search): Likewise.
5247 (try_thread_db_load_1): Likewise.
5248 * tracepoint.c (add_tracepoint): Likewise.
5249 (add_tracepoint_action): Likewise.
5250 (create_trace_state_variable): Likewise.
5251 (cmd_qtdpsrc): Likewise.
5252 (cmd_qtro): Likewise.
5253 (add_while_stepping_state): Likewise.
5254 * win32-low.c (child_add_thread): Likewise.
5255 (get_image_name): Likewise.
5257 2015-08-25 Yao Qi <yao.qi@linaro.org>
5259 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5261 2015-08-25 Yao Qi <yao.qi@linaro.org>
5263 * Makefile.in (aarch64-linux.o): New rule.
5264 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5266 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5267 (aarch64_init_debug_reg_state): Make it extern.
5268 (aarch64_linux_prepare_to_resume): Remove.
5270 2015-08-25 Yao Qi <yao.qi@linaro.org>
5272 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5273 lwp_arch_private_info and ptid_of_lwp.
5275 2015-08-25 Yao Qi <yao.qi@linaro.org>
5277 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5278 Find proc_info by find_process_pid. All callers updated.
5280 2015-08-25 Yao Qi <yao.qi@linaro.org>
5282 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5284 (debug_reg_change_callback): Remove.
5285 (aarch64_notify_debug_reg_change): Remove.
5287 2015-08-25 Yao Qi <yao.qi@linaro.org>
5289 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5290 Call current_lwp_ptid.
5292 2015-08-25 Yao Qi <yao.qi@linaro.org>
5294 * linux-aarch64-low.c (debug_reg_change_callback): Use
5297 2015-08-25 Yao Qi <yao.qi@linaro.org>
5299 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5301 2015-08-25 Yao Qi <yao.qi@linaro.org>
5303 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5305 2015-08-25 Yao Qi <yao.qi@linaro.org>
5307 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5310 2015-08-25 Yao Qi <yao.qi@linaro.org>
5312 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5314 (debug_reg_change_callback): Remove argument entry and add argument
5315 lwp. Remove local variable thread. Don't print thread id in the
5316 debugging output. Don't check whether pid of thread equals to pid.
5317 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5318 iterate_over_lwps instead find_inferior.
5320 2015-08-24 Pedro Alves <palves@redhat.com>
5322 * inferiors.c (get_first_process): New function.
5323 * inferiors.h (get_first_process): New declaration.
5324 * remote-utils.c (read_ptid): Default to the first process in the
5325 list, instead of to the current thread's process.
5327 2015-08-24 Pedro Alves <palves@redhat.com>
5329 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5330 * event-loop.c: Likewise.
5331 * remote-utils.c: Likewise.
5332 * tracepoint.c: Likewise.
5334 2015-08-24 Pedro Alves <palves@redhat.com>
5336 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5339 2015-08-21 Pedro Alves <palves@redhat.com>
5341 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5342 instead of literal 1.
5344 2015-08-21 Pedro Alves <palves@redhat.com>
5346 * tdesc.c (default_description): Explicitly zero-initialize.
5348 2015-08-21 Pedro Alves <palves@redhat.com>
5351 * inferiors.c (remove_thread): Discard any pending stop reply for
5353 * server.c (remove_all_on_match_pid): Rename to ...
5354 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5356 (discard_queued_stop_replies): Change parameter to a ptid. Now
5358 (handle_v_kill, kill_inferior_callback, captured_main)
5359 (process_serial_event): Adjust.
5360 * server.h (discard_queued_stop_replies): Declare.
5362 2015-08-21 Pedro Alves <palves@redhat.com>
5364 * linux-low.c (wait_for_sigstop): Always switch to no thread
5365 selected if the previously current thread dies.
5366 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5367 process instead of the current thread's.
5368 * remote-utils.c (input_interrupt): Don't check if there's no
5370 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5371 current thread to the general thread fails, error out.
5372 (handle_qxfer_auxv, handle_qxfer_libraries)
5373 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5374 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5375 (handle_query): Check if there's a thread selected instead of
5376 checking whether there's any thread in the thread list.
5377 (handle_qxfer_threads, handle_qxfer_btrace)
5378 (handle_qxfer_btrace_conf): Don't error out early if there's no
5379 thread in the thread list.
5380 (handle_v_cont, myresume): Don't set the current thread to the
5382 (process_serial_event) <Hg handling>: Also set thread_id if the
5383 previous general thread is still alive.
5384 (process_serial_event) <g/G handling>: If setting the current
5385 thread to the general thread fails, error out.
5386 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5387 thread's lwp instead of the current thread's.
5388 * target.c (set_desired_thread): If the desired thread was not
5389 found, leave the current thread pointing to NULL. Return an int
5390 (boolean) indicating success.
5391 * target.h (set_desired_thread): Change return type to int.
5393 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5395 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5396 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5398 (ps_get_thread_area): New function.
5400 2015-08-19 Gary Benson <gbenson@redhat.com>
5402 * hostio.c (handle_pread): Do not attempt to read more data
5403 than hostio_reply_with_data can fit in a packet.
5405 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5407 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5409 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5411 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5413 2015-08-06 Pedro Alves <palves@redhat.com>
5415 * tracepoint.c (expr_eval_result): Now an int.
5417 2015-08-06 Pedro Alves <palves@redhat.com>
5419 * gdbthread.h (struct regcache): Forward declare.
5420 (struct thread_info) <regcache_data>: Now a struct regcache
5422 * inferiors.c (inferior_regcache_data)
5423 (set_inferior_regcache_data): Now work with struct regcache
5425 * inferiors.h (struct regcache): Forward declare.
5426 (inferior_regcache_data, set_inferior_regcache_data): Now work
5427 with struct regcache pointers.
5428 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5429 (free_register_cache_thread): Remove struct regcache pointer
5432 2015-08-06 Pedro Alves <palves@redhat.com>
5434 * server.c (captured_main): On error, print the exception message
5435 to stderr, and if run_once is set, throw a quit.
5437 2015-08-06 Pedro Alves <palves@redhat.com>
5439 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5442 2015-08-06 Pedro Alves <palves@redhat.com>
5444 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5445 reading beyond the passed in buffer length.
5447 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5449 * tracepoint.c (symbol_list) <required>: Remove.
5451 2015-08-06 Pedro Alves <palves@redhat.com>
5453 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5454 count if stopping and suspending threads.
5455 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5456 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5457 (linux_detach): Complete an ongoing step-over.
5458 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5460 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5461 (linux_wait_1): If passing a signal to the inferior after
5462 finishing a step-over, unsuspend and re-resume all lwps. If we
5463 see a single-step event but the thread should be continuing, don't
5464 pass the trap to gdb.
5465 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5466 internal_error instead of gdb_assert.
5467 (enqueue_pending_signal): New function.
5468 (check_ptrace_stopped_lwp_gone): Add debug output.
5469 (start_step_over): Use internal_error instead of gdb_assert.
5470 (complete_ongoing_step_over): New function.
5471 (linux_resume_one_thread): Don't resume a suspended thread.
5472 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5475 2015-08-06 Pedro Alves <palves@redhat.com>
5477 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5478 (linux_thread_alive): Use lwp_is_marked_dead.
5479 (extended_event_reported): Delete.
5480 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5481 instead of extended_event_reported.
5482 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5484 (lwp_is_marked_dead): New function.
5485 (lwp_running): Use lwp_is_marked_dead.
5486 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5489 2015-08-06 Pedro Alves <palves@redhat.com>
5491 * linux-low.c (linux_wait_1): Move fork event output out of the
5492 !report_to_gdb check. Pass event_child->waitstatus to
5493 target_waitstatus_to_string instead of ourstatus.
5495 2015-08-04 Yao Qi <yao.qi@linaro.org>
5497 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5498 if current_thread is 32 bit.
5500 2015-08-04 Yao Qi <yao.qi@linaro.org>
5502 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5503 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5504 * server.c (extended_protocol): Remove "static".
5505 * server.h (extended_protocol): Declare it.
5507 2015-08-04 Yao Qi <yao.qi@linaro.org>
5509 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5510 both aarch64 and aarch32.
5511 (aarch64_set_pc): Likewise.
5513 2015-08-04 Yao Qi <yao.qi@linaro.org>
5515 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5516 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5517 arm-with-neon.xml to srv_xmlfiles.
5518 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5519 (is_64bit_tdesc): New function.
5520 (aarch64_linux_read_description): New function.
5521 (aarch64_arch_setup): Call aarch64_linux_read_description.
5522 (regs_info): Rename to regs_info_aarch64.
5523 (aarch64_regs_info): Return right regs_info.
5524 (initialize_low_arch): Call initialize_low_arch_aarch32.
5526 2015-08-04 Yao Qi <yao.qi@linaro.org>
5528 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5529 * linux-aarch32-low.c: New file.
5530 * linux-aarch32-low.h: New file.
5531 * linux-arm-low.c (arm_fill_gregset): Move it to
5532 linux-aarch32-low.c.
5533 (arm_store_gregset): Likewise.
5534 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5535 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5536 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5537 (regs_info): Rename to regs_info_arm.
5538 (arm_regs_info): Return regs_info_aarch32 if
5539 have_ptrace_getregset is 1 and target description is
5540 arm_with_neon or arm_with_vfpv3.
5541 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5542 Call initialize_low_arch_aarch32 instead.
5544 2015-08-04 Yao Qi <yao.qi@linaro.org>
5546 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5547 * linux-low.c: ... here.
5548 * linux-low.h (have_ptrace_getregset): Declare it.
5550 2015-08-04 Pedro Alves <palves@redhat.com>
5552 * thread-db.c (struct thread_db): Use new typedefs.
5553 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5555 (disable_thread_event_reporting): Cast result of dlsym to
5556 destination function pointer type.
5557 (thread_db_mourn): Use td_ta_delete_ftype.
5559 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5561 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5563 (CDX_BREAKPOINT): Define for R2.
5564 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5565 (the_low_target): Add comments.
5567 2015-07-30 Yao Qi <yao.qi@linaro.org>
5569 * linux-arm-low.c (arm_hwcap): Remove it.
5570 (arm_read_description): New local variable arm_hwcap. Don't
5571 set arm_hwcap to zero.
5573 2015-07-30 Yao Qi <yao.qi@linaro.org>
5575 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5576 Use regcache->tdesc instead.
5577 (arm_store_wmmxregset): Likewise.
5578 (arm_fill_vfpregset): Likewise.
5579 (arm_store_vfpregset): Likewise.
5581 2015-07-30 Yao Qi <yao.qi@linaro.org>
5583 * linux-arm-low.c: Include arch/arm.h.
5584 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5585 (arm_store_gregset): Likewise.
5587 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5589 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5590 ptrace's 4th parameter.
5592 2015-07-27 Yao Qi <yao.qi@linaro.org>
5594 * configure.srv (case aarch64*-*-linux*): Don't set
5597 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5599 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5601 * linux-arm-low.c: Likewise.
5602 * linux-cris-low.c: Likewise.
5603 * linux-crisv32-low.c: Likewise.
5604 * linux-low.c: Likewise.
5605 * linux-m68k-low.c: Likewise.
5606 * linux-mips-low.c: Likewise.
5607 * linux-nios2-low.c: Likewise.
5608 * linux-s390-low.c: Likewise.
5609 * linux-sparc-low.c: Likewise.
5610 * linux-tic6x-low.c: Likewise.
5611 * linux-tile-low.c: Likewise.
5612 * linux-x86-low.c: Likewise.
5614 2015-07-24 Pedro Alves <palves@redhat.com>
5616 * config.in: Regenerate.
5617 * configure: Regenerate.
5619 2015-07-24 Pedro Alves <palves@redhat.com>
5621 * acinclude.m4: Include ../ptrace.m4.
5622 * configure.ac: Call GDB_AC_PTRACE.
5623 * config.in, configure: Regenerate.
5625 2015-07-24 Yao Qi <yao.qi@linaro.org>
5627 * linux-low.c (linux_create_inferior): Remove setting to
5628 proc->priv->new_inferior.
5629 (linux_attach): Likewise.
5630 (linux_low_filter_event): Likewise.
5631 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5633 2015-07-24 Yao Qi <yao.qi@linaro.org>
5635 * linux-low.c (linux_arch_setup): New function.
5636 (linux_low_filter_event): If proc->tdesc is NULL and
5637 proc->attached is true, call the_low_target.arch_setup.
5638 Otherwise, keep status pending, and return.
5639 (linux_resume_one_lwp_throw): Don't call get_pc if
5640 thread->while_stepping isn't NULL. Don't call
5641 get_thread_regcache if proc->tdesc is NULL.
5642 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5643 (linux_target_ops): Install arch_setup.
5644 * server.c (start_inferior): Call the_target->arch_setup.
5645 * target.h (struct target_ops) <arch_setup>: New field.
5646 (target_arch_setup): New marco.
5647 * lynx-low.c (lynx_target_ops): Update.
5648 * nto-low.c (nto_target_ops): Update.
5649 * spu-low.c (spu_target_ops): Update.
5650 * win32-low.c (win32_target_ops): Update.
5652 2015-07-24 Yao Qi <yao.qi@linaro.org>
5654 * linux-low.c (linux_add_process): Don't set
5655 proc->priv->new_inferior.
5656 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5657 (linux_attach): Likewise.
5659 2015-07-24 Yao Qi <yao.qi@linaro.org>
5661 * server.c (start_inferior): Code refactor.
5663 2015-07-24 Yao Qi <yao.qi@linaro.org>
5665 * server.c (process_serial_event): Set general_thread.
5667 2015-07-21 Yao Qi <yao.qi@linaro.org>
5669 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5670 aarch64_linux_get_debug_reg_capacity.
5672 2015-07-17 Yao Qi <yao.qi@linaro.org>
5674 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5675 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5676 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5677 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5678 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5679 (AARCH64_HWP_ALIGNMENT): Likewise.
5680 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5681 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5682 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5683 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5684 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5685 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5686 (struct aarch64_debug_reg_state): Likewise.
5687 (struct arch_lwp_info): Likewise.
5688 (aarch64_align_watchpoint): Likewise.
5689 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5690 (aarch64_watchpoint_length): Likewise.
5691 (aarch64_point_encode_ctrl_reg): Likewise
5692 (aarch64_point_is_aligned): Likewise.
5693 (aarch64_align_watchpoint): Likewise.
5694 (aarch64_linux_set_debug_regs):
5695 (aarch64_dr_state_insert_one_point): Likewise.
5696 (aarch64_dr_state_remove_one_point): Likewise.
5697 (aarch64_handle_breakpoint): Likewise.
5698 (aarch64_handle_aligned_watchpoint): Likewise.
5699 (aarch64_handle_unaligned_watchpoint): Likewise.
5700 (aarch64_handle_watchpoint): Likewise.
5702 2015-07-17 Yao Qi <yao.qi@linaro.org>
5704 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5705 and don't aarch64_get_debug_reg_state. All callers update.
5706 (aarch64_handle_aligned_watchpoint): Likewise.
5707 (aarch64_handle_unaligned_watchpoint): Likewise.
5708 (aarch64_handle_watchpoint): Likewise.
5709 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5710 (aarch64_remove_point): Likewise.
5712 2015-07-17 Yao Qi <yao.qi@linaro.org>
5714 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5716 (aarch64_handle_unaligned_watchpoint): Likewise.
5718 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5720 Revert the previous 3 commits:
5721 Move gdb_regex* to common/
5722 Move linux_find_memory_regions_full & co.
5723 gdbserver build-id attribute generator
5725 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5726 Jan Kratochvil <jan.kratochvil@redhat.com>
5728 gdbserver build-id attribute generator.
5729 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5730 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5731 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5733 (get_dynamic): Use find_pdhr to traverse program headers.
5734 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5735 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5736 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5737 (get_hex_build_id): New.
5738 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5739 to reply XML document.
5741 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5742 Jan Kratochvil <jan.kratochvil@redhat.com>
5744 * target.c: Include target/target-utils.h and fcntl.h.
5745 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5746 (target_fileio_read_stralloc): New functions.
5748 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5750 * Makefile.in (OBS): Add gdb_regex.o.
5752 * config.in: Rebuilt.
5753 * configure: Rebuilt.
5755 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5756 Jan Kratochvil <jan.kratochvil@redhat.com>
5758 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5759 * Makefile.in (OBS): Add target-utils.o.
5760 (linux-maps.o, target-utils.o): New.
5761 * configure.srv (srv_linux_obj): Add linux-maps.o.
5763 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5765 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5767 (the_low_target): Install it.
5769 2015-07-14 Pedro Alves <palves@redhat.com>
5771 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5772 Instead, ignore ECHILD, and throw an error for other errnos.
5774 2015-07-10 Pedro Alves <palves@redhat.com>
5776 * event-loop.c (struct callback_event) <data>: Change type to
5777 gdb_client_data instance instead of gdb_client_data pointer.
5778 (append_callback_event): Adjust.
5780 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5782 * linux-aarch64-low.c: Add comments for each linux_target_ops
5783 method. Remove comments already covered in target_ops and
5784 linux_target_ops definitions.
5785 (the_low_target): Add comments for each unimplemented method.
5787 2015-07-09 Yao Qi <yao.qi@linaro.org>
5789 * linux-aarch64-low.c (aarch64_regmap): Remove.
5790 (aarch64_usrregs_info): Remove.
5791 (regs_info): Set field usrregs to NULL.
5793 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5795 * linux-low.c: Include "rsp-low.h"
5796 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5797 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5798 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5799 (handle_btrace_enable_pt): New.
5800 (handle_btrace_general_set): Support "pt".
5801 (handle_btrace_conf_general_set): Support "pt:size".
5803 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5805 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5808 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5810 * linux-aarch64-low.c: Remove comment about endianness.
5811 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5812 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5815 2015-06-24 Gary Benson <gbenson@redhat.com>
5817 * linux-i386-ipa.c (stdint.h): Do not include.
5818 * lynx-i386-low.c (stdint.h): Likewise.
5819 * lynx-ppc-low.c (stdint.h): Likewise.
5820 * mem-break.c (stdint.h): Likewise.
5821 * thread-db.c (stdint.h): Likewise.
5822 * tracepoint.c (stdint.h): Likewise.
5823 * win32-low.c (stdint.h): Likewise.
5825 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5827 * server.c (write_qxfer_response): Update call to
5828 remote_escape_output.
5830 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5831 Jan Kratochvil <jan.kratochvil@redhat.com>
5833 Merge multiple hex conversions.
5834 * gdbreplay.c (tohex): Rename to 'fromhex'.
5835 (logchar): Use fromhex.
5837 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5839 * server.c (handle_qxfer_libraries): Set `version' attribute for
5842 2015-06-10 Gary Benson <gbenson@redhat.com>
5844 * target.h (struct target_ops) <multifs_open>: New field.
5845 <multifs_unlink>: Likewise.
5846 <multifs_readlink>: Likewise.
5847 * linux-low.c (nat/linux-namespaces.h): New include.
5848 (linux_target_ops): Initialize the_target->multifs_open,
5849 the_target->multifs_unlink and the_target->multifs_readlink.
5850 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5851 * hostio.c (hostio_fs_pid): New static variable.
5852 (hostio_handle_new_gdb_connection): New function.
5853 (handle_setfs): Likewise.
5854 (handle_open): Use the_target->multifs_open as appropriate.
5855 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5856 (handle_readlink): Use the_target->multifs_readlink as
5858 (handle_vFile): Handle vFile:setfs packets.
5859 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5860 after target_handle_new_gdb_connection.
5862 2015-06-10 Gary Benson <gbenson@redhat.com>
5864 * configure.ac (AC_CHECK_FUNCS): Add setns.
5865 * config.in: Regenerate.
5866 * configure: Likewise.
5867 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5868 (linux-namespaces.o): New rule.
5869 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5871 2015-06-09 Gary Benson <gbenson@redhat.com>
5873 * hostio.c (handle_open): Process mode argument with
5874 fileio_to_host_mode.
5876 2015-06-01 Yao Qi <yao.qi@linaro.org>
5878 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5879 * linux-x86-low.c: Likewise.
5881 2015-05-28 Don Breazeal <donb@codesourcery.com>
5883 * linux-low.c (handle_extended_wait): Initialize
5884 thread_info.last_resume_kind for new fork children.
5886 2015-05-15 Pedro Alves <palves@redhat.com>
5888 * target.h (target_handle_new_gdb_connection): Rewrite using if
5889 wrapped in do/while.
5891 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5893 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5894 * configure, config.in: Regenerate.
5895 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5898 2015-05-12 Don Breazeal <donb@codesourcery.com>
5900 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5901 PTRACE_EVENT_VFORK_DONE.
5902 (linux_low_ptrace_options, extended_event_reported): Add vfork
5904 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5905 and "vforkdone" for RSP 'T' Stop Reply Packet.
5906 * server.h (report_vfork_events): Declare
5909 2015-05-12 Don Breazeal <donb@codesourcery.com>
5911 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5912 (the_low_target) <new_fork>: Initialize new member.
5913 * linux-arm-low.c (arm_new_fork): New function.
5914 (the_low_target) <new_fork>: Initialize new member.
5915 * linux-low.c (handle_extended_wait): Call new target function
5917 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5918 * linux-mips-low.c (mips_add_watchpoint): New function
5919 extracted from mips_insert_point.
5920 (the_low_target) <new_fork>: Initialize new member.
5921 (mips_linux_new_fork): New function.
5922 (mips_insert_point): Call mips_add_watchpoint.
5923 * linux-x86-low.c (x86_linux_new_fork): New function.
5924 (the_low_target) <new_fork>: Initialize new member.
5926 2015-05-12 Don Breazeal <donb@codesourcery.com>
5928 * linux-low.c (handle_extended_wait): Implement return value,
5929 rename argument 'event_child' to 'event_lwp', handle
5930 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5931 (linux_low_ptrace_options): New function.
5932 (linux_low_filter_event): Call linux_low_ptrace_options,
5933 use different argument fo linux_enable_event_reporting,
5934 use return value from handle_extended_wait.
5935 (extended_event_reported): New function.
5936 (linux_wait_1): Call extended_event_reported and set
5937 status to report fork events.
5938 (linux_write_memory): Add pid to debug message.
5939 (reset_lwp_ptrace_options_callback): New function.
5940 (linux_handle_new_gdb_connection): New function.
5941 (linux_target_ops): Initialize new structure member.
5942 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5943 * lynx-low.c: Initialize new structure member.
5944 * remote-utils.c (prepare_resume_reply): Implement stop reason
5945 "fork" for "T" stop message.
5946 * server.c (handle_query): Call handle_new_gdb_connection.
5947 * server.h (report_fork_events): Declare global flag.
5948 * target.h (struct target_ops) <handle_new_gdb_connection>:
5950 (target_handle_new_gdb_connection): New macro.
5951 * win32-low.c: Initialize new structure member.
5953 2015-05-12 Don Breazeal <donb@codesourcery.com>
5955 * mem-break.c (APPEND_TO_LIST): Define macro.
5956 (clone_agent_expr): New function.
5957 (clone_one_breakpoint): New function.
5958 (clone_all_breakpoints): New function.
5959 * mem-break.h: Declare new functions.
5961 2015-05-12 Don Breazeal <donb@codesourcery.com>
5963 * linux-low.c (linux_supports_fork_events): New function.
5964 (linux_supports_vfork_events): New function.
5965 (linux_target_ops): Initialize new structure members.
5966 (initialize_low): Call linux_check_ptrace_features.
5967 * lynx-low.c (lynx_target_ops): Initialize new structure
5969 * server.c (report_fork_events, report_vfork_events):
5971 (handle_query): Add new features to qSupported packet and
5973 (captured_main): Initialize new global variables.
5974 * target.h (struct target_ops) <supports_fork_events>:
5976 <supports_vfork_events>: New member.
5977 (target_supports_fork_events): New macro.
5978 (target_supports_vfork_events): New macro.
5979 * win32-low.c (win32_target_ops): Initialize new structure
5982 2015-05-12 Gary Benson <gbenson@redhat.com>
5984 * server.c (handle_qxfer_exec_file): Use current process
5987 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5989 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5990 Remove HAVE_PTRACE_GETREGS conditionals.
5991 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5992 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5994 2015-05-08 Yao Qi <yao.qi@linaro.org>
5996 * linux-low.c (linux_supports_conditional_breakpoints): New
5998 (linux_target_ops): Install new target method.
5999 * lynx-low.c (lynx_target_ops): Install NULL hook for
6000 supports_conditional_breakpoints.
6001 * nto-low.c (nto_target_ops): Likewise.
6002 * spu-low.c (spu_target_ops): Likewise.
6003 * win32-low.c (win32_target_ops): Likewise.
6004 * server.c (handle_query): Check
6005 target_supports_conditional_breakpoints.
6006 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6008 (target_supports_conditional_breakpoints): New macro.
6010 2015-05-06 Pedro Alves <palves@redhat.com>
6013 * server.c (start_inferior): If the process exits, mourn it.
6015 2015-04-21 Gary Benson <gbenson@redhat.com>
6017 * hostio.c (fileio_open_flags_to_host): Factored out to
6018 fileio_to_host_openflags in common/fileio.c. Single use
6021 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6023 * linux-xtensa-low.c (xtensa_fill_gregset)
6024 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6027 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6029 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6030 (regs_info): Replace usrregs pointer with NULL.
6032 2015-04-17 Gary Benson <gbenson@redhat.com>
6034 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6035 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6036 * server.c (handle_qxfer_exec_file): New function.
6037 (qxfer_packets): Add exec-file entry.
6038 (handle_query): Report qXfer:exec-file:read as supported packet.
6040 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6042 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6044 2015-04-09 Gary Benson <gbenson@redhat.com>
6046 * hostio-errno.c (errno_to_fileio_error): Remove function.
6047 Update caller to use remote_fileio_to_fio_error.
6049 2015-04-09 Yao Qi <yao.qi@linaro.org>
6051 * linux-low.c (linux_insert_point): Call
6052 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6053 (linux_remove_point): Call remove_memory_breakpoint if type is
6055 * linux-x86-low.c (x86_insert_point): Don't call
6056 insert_memory_breakpoint.
6057 (x86_remove_point): Don't call remove_memory_breakpoint.
6059 2015-04-01 Pedro Alves <palves@redhat.com>
6060 Cleber Rosa <crosa@redhat.com>
6062 * server.c (gdbserver_usage): Reorganize and extend the usage
6065 2015-03-24 Pedro Alves <palves@redhat.com>
6067 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6068 output. Also dump TRAP_TRACE.
6069 (linux_low_filter_event): In debug output, distinguish a
6070 resume_stop SIGSTOP from a delayed SIGSTOP.
6072 2015-03-24 Gary Benson <gbenson@redhat.com>
6074 * linux-x86-low.c (x86_linux_new_thread): Moved to
6076 (x86_linux_prepare_to_resume): Likewise.
6078 2015-03-24 Gary Benson <gbenson@redhat.com>
6080 * Makefile.in (x86-linux-dregs.o): New rule.
6081 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6082 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6083 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6084 (x86_linux_dr_get): Likewise.
6085 (x86_linux_dr_set): Likewise.
6086 (update_debug_registers_callback): Likewise.
6087 (x86_linux_dr_set_addr): Likewise.
6088 (x86_linux_dr_get_addr): Likewise.
6089 (x86_linux_dr_set_control): Likewise.
6090 (x86_linux_dr_get_control): Likewise.
6091 (x86_linux_dr_get_status): Likewise.
6092 (x86_linux_update_debug_registers): Likewise.
6094 2015-03-24 Gary Benson <gbenson@redhat.com>
6096 * linux-x86-low.c (x86_linux_update_debug_registers):
6097 New function, factored out from...
6098 (x86_linux_prepare_to_resume): ...this.
6100 2015-03-24 Gary Benson <gbenson@redhat.com>
6102 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6103 (x86_linux_dr_set): Likewise.
6104 (update_debug_registers_callback): Likewise.
6105 (x86_linux_dr_set_addr): Likewise.
6106 (x86_linux_dr_get_addr): Likewise.
6107 (x86_linux_dr_set_control): Likewise.
6108 (x86_linux_dr_get_control): Likewise.
6109 (x86_linux_dr_get_status): Likewise.
6110 (x86_linux_prepare_to_resume): Likewise.
6112 2015-03-24 Gary Benson <gbenson@redhat.com>
6114 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6115 Use perror_with_name. Pass string through gettext.
6116 (x86_linux_dr_set): Likewise.
6118 2015-03-24 Gary Benson <gbenson@redhat.com>
6120 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6121 (x86_linux_dr_set_addr): ...this.
6122 (x86_dr_low_get_addr): Rename to...
6123 (x86_linux_dr_get_addr): ...this.
6124 (x86_dr_low_set_control): Rename to...
6125 (x86_linux_dr_set_control): ...this.
6126 (x86_dr_low_get_control): Rename to...
6127 (x86_linux_dr_get_control): ...this.
6128 (x86_dr_low_get_status): Rename to...
6129 (x86_linux_dr_get_status): ...this.
6130 (x86_dr_low): Update with new function names.
6132 2015-03-24 Gary Benson <gbenson@redhat.com>
6134 * Makefile.in (x86-linux.o): New rule.
6135 * configure.srv: Add x86-linux.o to relevant targets.
6136 * linux-low.c (lwp_set_arch_private_info): New function.
6137 (lwp_arch_private_info): Likewise.
6138 * linux-x86-low.c: Include nat/x86-linux.h.
6139 (arch_lwp_info): Removed structure.
6140 (update_debug_registers_callback):
6141 Use lwp_set_debug_registers_changed.
6142 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6143 and lwp_set_debug_registers_changed.
6144 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6146 2015-03-24 Gary Benson <gbenson@redhat.com>
6148 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6149 * linux-arm-low.c (arm_new_thread): Likewise.
6150 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6151 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6152 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6153 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6155 2015-03-24 Gary Benson <gbenson@redhat.com>
6157 * linux-low.c (ptid_of_lwp): New function.
6158 (lwp_is_stopped): Likewise.
6159 (lwp_stop_reason): Likewise.
6160 * linux-x86-low.c (update_debug_registers_callback):
6162 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6165 2015-03-24 Gary Benson <gbenson@redhat.com>
6167 * linux-low.h (linux_stop_lwp): Remove declaration.
6169 2015-03-24 Gary Benson <gbenson@redhat.com>
6171 * linux-low.h: Include nat/linux-nat.h.
6172 * linux-low.c (iterate_over_lwps_args): New structure.
6173 (iterate_over_lwps_filter): New function.
6174 (iterate_over_lwps): Likewise.
6175 * linux-x86-low.c (update_debug_registers_callback):
6176 Update signature to what iterate_over_lwps expects.
6177 Remove PID check that iterate_over_lwps now performs.
6178 (x86_dr_low_set_addr): Use iterate_over_lwps.
6179 (x86_dr_low_set_control): Likewise.
6181 2015-03-24 Gary Benson <gbenson@redhat.com>
6183 * linux-x86-low.c (x86_debug_reg_state): New function.
6184 (x86_linux_prepare_to_resume): Use the above.
6186 2015-03-24 Gary Benson <gbenson@redhat.com>
6188 * linux-low.c (current_lwp_ptid): New function.
6189 * linux-x86-low.c: Include nat/linux-nat.h.
6190 (x86_dr_low_get_addr): Use current_lwp_ptid.
6191 (x86_dr_low_get_control): Likewise.
6192 (x86_dr_low_get_status): Likewise.
6194 2015-03-20 Pedro Alves <palves@redhat.com>
6196 * tracepoint.c (cmd_qtstatus): Make "str" const.
6198 2015-03-20 Pedro Alves <palves@redhat.com>
6200 * server.c (handle_general_set): Make "req_str" const.
6202 2015-03-19 Pedro Alves <palves@redhat.com>
6204 * linux-low.c (linux_resume_one_lwp): Rename to ...
6205 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6206 instead call perror_with_name.
6207 (check_ptrace_stopped_lwp_gone): New function.
6208 (linux_resume_one_lwp): Reimplement as wrapper around
6209 linux_resume_one_lwp_throw that swallows errors if the LWP is
6212 2015-03-19 Pedro Alves <palves@redhat.com>
6214 * linux-low.c (count_events_callback, select_event_lwp_callback):
6215 No longer check whether the thread has resume_stop as last resume
6218 2015-03-19 Pedro Alves <palves@redhat.com>
6220 * linux-low.c (count_events_callback, select_event_lwp_callback):
6221 Use the lwp's status_pending_p field, not the thread's.
6223 2015-03-19 Pedro Alves <palves@redhat.com>
6225 * linux-low.c (select_event_lwp_callback): Update comments to
6226 no longer mention SIGTRAP.
6228 2015-03-18 Gary Benson <gbenson@redhat.com>
6230 * server.c (handle_query): Do not report vFile:fstat as supported.
6232 2015-03-11 Gary Benson <gbenson@redhat.com>
6234 * hostio.c (sys/types.h): New include.
6235 (sys/stat.h): Likewise.
6236 (common-remote-fileio.h): Likewise.
6237 (handle_fstat): New function.
6238 (handle_vFile): Handle vFile:fstat packets.
6240 2015-03-11 Gary Benson <gbenson@redhat.com>
6242 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6243 struct stat.st_blocks and struct stat.st_blksize.
6244 * configure: Regenerate.
6245 * config.in: Likewise.
6246 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6247 (OBS): Add common-remote-fileio.o.
6248 (common-remote-fileio.o): New rule.
6250 2015-03-09 Pedro Alves <palves@redhat.com>
6252 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6253 'struct sockaddr' pointer in 'accept' call.
6255 2015-03-09 Pedro Alves <palves@redhat.com>
6258 2015-03-07 Pedro Alves <palves@redhat.com>
6259 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6260 or <winsock2.h> here. Instead include "gdb_socket.h".
6261 (remote_open): Use union gdb_sockaddr_u.
6262 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6263 or <winsock2.h> here. Instead include "gdb_socket.h".
6264 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6265 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6267 (init_named_socket, gdb_agent_helper_thread): Use union
6270 2015-03-07 Pedro Alves <palves@redhat.com>
6272 * configure.ac (build_warnings): Move
6273 -Wdeclaration-after-statement to the C-specific set.
6274 * configure: Regenerate.
6276 2015-03-07 Pedro Alves <palves@redhat.com>
6278 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6279 or <winsock2.h> here. Instead include "gdb_socket.h".
6280 (remote_open): Use union gdb_sockaddr_u.
6281 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6282 or <winsock2.h> here. Instead include "gdb_socket.h".
6283 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6284 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6286 (init_named_socket, gdb_agent_helper_thread): Use union
6289 2015-03-07 Pedro Alves <palves@redhat.com>
6291 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6294 2015-03-06 Yao Qi <yao.qi@linaro.org>
6296 * linux-aarch64-low.c (aarch64_insert_point): Use
6297 show_debug_regs as a boolean.
6298 (aarch64_remove_point): Likewise.
6300 2015-03-05 Pedro Alves <palves@redhat.com>
6302 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6303 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6304 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6305 * nto-low.c (nto_target_ops): Likewise.
6306 * spu-low.c (spu_target_ops): Likewise.
6307 * win32-low.c (win32_target_ops): Likewise.
6309 2015-03-04 Pedro Alves <palves@redhat.com>
6311 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6312 Decide whether a breakpoint triggered based on the SIGTRAP's
6314 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6315 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6316 (linux_low_filter_event): Check for breakpoints before checking
6318 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6320 (linux_stopped_by_sw_breakpoint)
6321 (linux_supports_stopped_by_sw_breakpoint)
6322 (linux_stopped_by_hw_breakpoint)
6323 (linux_supports_stopped_by_hw_breakpoint): New functions.
6324 (linux_target_ops): Install new target methods.
6326 2015-03-04 Pedro Alves <palves@redhat.com>
6328 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6329 * server.c (swbreak_feature, hwbreak_feature): New globals.
6330 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6331 (captured_main): Clear swbreak_feature and hwbreak_feature.
6332 * server.h (swbreak_feature, hwbreak_feature): Declare.
6333 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6334 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6335 supports_stopped_by_hw_breakpoint>: New fields.
6336 (target_supports_stopped_by_sw_breakpoint)
6337 (target_stopped_by_sw_breakpoint)
6338 (target_supports_stopped_by_hw_breakpoint)
6339 (target_stopped_by_hw_breakpoint): Declare.
6341 2015-03-04 Pedro Alves <palves@redhat.com>
6343 enum lwp_stop_reason -> enum target_stop_reason
6344 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6345 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6346 (linux_wait_1, stuck_in_jump_pad_callback)
6347 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6348 (linux_stopped_by_watchpoint):
6349 * linux-low.h (enum lwp_stop_reason): Delete.
6350 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6351 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6353 2015-03-04 Yao Qi <yao.qi@linaro.org>
6355 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6357 2015-03-03 Gary Benson <gbenson@redhat.com>
6359 * hostio.c (handle_vFile): Fix prefix lengths.
6361 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6363 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6366 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6368 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6369 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6370 (clean): Add "rm -f" for above C files.
6371 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6372 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6373 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6374 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6375 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6376 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6377 (init_registers_s390x_vx_linux64)
6378 (init_registers_s390x_tevx_linux64)
6379 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6380 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6382 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6383 (s390_store_vxrs_high): New functions.
6384 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6386 (s390_arch_setup): Add logic for selecting one of the new target
6387 descriptions. Activate the new vector regsets if applicable.
6388 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6389 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6390 and init_registers_s390x_tevx_linux64.
6392 2015-03-01 Pedro Alves <palves@redhat.com>
6394 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6397 2015-02-27 Pedro Alves <palves@redhat.com>
6399 * linux-x86-low.c (u_debugreg_offset): New function.
6400 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6402 2015-02-27 Pedro Alves <palves@redhat.com>
6404 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6405 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6406 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6407 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6408 (ps_lsetfpregs, ps_getpid)
6409 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6410 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6411 (ps_lsetxregs, ps_plog): Declare.
6413 2015-02-27 Pedro Alves <palves@redhat.com>
6415 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6416 IP_AGENT_EXPORT_FUNC.
6417 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6418 IP_AGENT_EXPORT_FUNC.
6419 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6420 (IP_AGENT_EXPORT): Delete.
6421 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6422 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6423 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6424 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6425 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6426 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6427 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6428 (traceframe_read_count, traceframe_write_count)
6429 (traceframes_created, trace_state_variables, get_raw_reg)
6430 (get_trace_state_variable_value, set_trace_state_variable_value)
6431 (ust_loaded, helper_thread_id, cmd_buf): Use
6432 IPA_SYM_EXPORTED_NAME.
6433 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6434 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6435 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6436 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6437 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6438 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6439 EXTERN_C_PUSH/EXTERN_C_POP.
6440 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6441 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6442 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6443 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6444 (traceframe_write_count, traceframe_read_count)
6445 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6446 (about_to_request_buffer_space, get_trace_state_variable_value)
6447 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6448 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6449 EXTERN_C_PUSH/EXTERN_C_POP.
6450 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6451 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6452 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6453 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6454 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6455 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6456 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6457 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6459 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6460 (IP_AGENT_EXPORT_VAR_DECL): Define.
6462 (gdb_agent_get_raw_reg): Declare.
6464 2015-02-27 Tom Tromey <tromey@redhat.com>
6465 Pedro Alves <palves@redhat.com>
6467 Rename symbols whose names are reserved C++ keywords throughout.
6469 2015-02-27 Pedro Alves <palves@redhat.com>
6471 * Makefile.in (COMPILER): New, get it from autoconf.
6472 (CXX): Get from autoconf instead.
6473 (COMPILE.pre): Use COMPILER.
6474 (CC-LD): Rename to ...
6475 (CC_LD): ... this. Use COMPILER.
6476 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6477 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6478 * acinclude.m4: Include build-with-cxx.m4.
6479 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6480 Disable -Werror by default if building in C++ mode.
6481 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6482 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6483 the C++ compiler. Save/restore CXXFLAGS too.
6484 * configure: Regenerate.
6486 2015-02-27 Pedro Alves <palves@redhat.com>
6488 * acinclude.m4: Include libiberty.m4.
6489 * configure.ac: Call libiberty_INIT.
6490 * config.in, configure: Regenerate.
6492 2015-02-26 Pedro Alves <palves@redhat.com>
6494 * linux-low.c (linux_wait_1): When incrementing the PC past a
6495 program breakpoint always use the_low_target.breakpoint_len as
6496 increment, rather than the maximum between that and
6497 the_low_target.decr_pc_after_break.
6499 2015-02-23 Pedro Alves <palves@redhat.com>
6501 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6502 thread was doing a step-over; always adjust the PC if
6503 we stepped over a permanent breakpoint.
6504 (linux_wait_1): If we stepped over breakpoint that was on top of a
6505 permanent breakpoint, manually advance the PC past it.
6507 2015-02-23 Pedro Alves <palves@redhat.com>
6509 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6511 (x86_fill_gregset, x86_store_gregset): Use it when handling
6514 2015-02-20 Pedro Alves <palves@redhat.com>
6516 * thread-db.c: Include "nat/linux-procfs.h".
6517 (thread_db_init): Skip listing new threads if the kernel supports
6518 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6520 2015-02-20 Pedro Alves <palves@redhat.com>
6522 * linux-low.c (status_pending_p_callback): Use ptid_match.
6524 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6526 PR breakpoints/16812
6527 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6528 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6529 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6531 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6533 PR breakpoints/15956
6534 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6536 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6538 * linux-low.c (linux_low_btrace_conf): Print size.
6539 * server.c (handle_btrace_conf_general_set): New.
6540 (hanle_general_set): Call handle_btrace_conf_general_set.
6541 (handle_query): Report Qbtrace-conf:bts:size as supported.
6543 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6545 * linux-low.c (linux_low_enable_btrace): Update parameters.
6546 (linux_low_btrace_conf): New.
6547 (linux_target_ops)<to_btrace_conf>: Initialize.
6548 * server.c (current_btrace_conf): New.
6549 (handle_btrace_enable): Rename to ...
6550 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6551 to target_enable_btrace. Update comment. Update users.
6552 (handle_qxfer_btrace_conf): New.
6553 (qxfer_packets): Add btrace-conf entry.
6554 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6555 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6556 (target_ops)<read_btrace_conf>: New.
6557 (target_enable_btrace): Update parameters.
6558 (target_read_btrace_conf): New.
6560 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6562 * server.c (handle_btrace_general_set): Remove call to
6563 target_supports_btrace.
6564 (supported_btrace_packets): New.
6565 (handle_query): Call supported_btrace_packets.
6566 * target.h: include btrace-common.h.
6567 (btrace_target_info): Removed.
6568 (supports_btrace, target_supports_btrace): Update parameters.
6570 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6572 * Makefile.in (SFILES): Add common/btrace-common.c.
6573 (OBS): Add common/btrace-common.o.
6574 (btrace-common.o): Add build rules.
6575 * linux-low: Include btrace-common.h.
6576 (linux_low_read_btrace): Use struct btrace_data. Call
6577 btrace_data_init and btrace_data_fini.
6579 2015-02-06 Pedro Alves <palves@redhat.com>
6581 * thread-db.c (find_new_threads_callback): Add debug output.
6583 2015-02-04 Pedro Alves <palves@redhat.com>
6585 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6586 (resume_stopped_resumed_lwps): New function.
6587 (linux_wait_for_event_filtered): Use it.
6589 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6591 * Makefile.in (SFILES): Add linux-personality.c.
6592 (linux-personality.o): New rule.
6593 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6594 list of objects to be built.
6595 * linux-low.c: Include nat/linux-personality.h.
6596 (linux_create_inferior): Remove code to disable address space
6597 randomization (moved to ../nat/linux-personality.c). Create
6598 cleanup to disable address space randomization.
6600 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6602 * Makefile.in (posix-strerror.o): New rule.
6603 (mingw-strerror.o): Likewise.
6604 * configure: Regenerated.
6605 * configure.ac: Source file ../common/common.host. Initialize new
6606 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6608 2015-01-14 Yao Qi <yao@codesourcery.com>
6610 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6611 (ppc-linux.o): New rule.
6612 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6613 * configure.ac: AC_CHECK_FUNCS(getauxval).
6614 * config.in: Re-generated.
6615 * configure: Re-generated.
6616 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6617 ppc64_64bit_inferior_p
6619 2015-01-14 Yao Qi <yao@codesourcery.com>
6621 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6622 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6623 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6624 (PT_ORIG_R3, PT_TRAP): Likewise.
6625 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6626 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6627 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6629 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6631 * i387-fp.c (i387_cache_to_xsave): In look over
6632 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6633 zmmh_low_space field by use of zmmh_high_space.
6635 2015-01-09 Pedro Alves <palves@redhat.com>
6637 * linux-low.c (step_over_bkpt): Move higher up in the file.
6638 (handle_extended_wait): Don't store the stop_pc here.
6639 (get_stop_pc): Adjust comments and rename to ...
6640 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6641 stopped for a software breakpoint or hardware breakpoint.
6642 (thread_still_has_status_pending_p): New function.
6643 (status_pending_p_callback): Use
6644 thread_still_has_status_pending_p. If the event is no longer
6645 interesting, resume the LWP.
6646 (handle_tracepoints): Add assert.
6647 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6648 (wstatus_maybe_breakpoint): New function.
6649 (cancel_breakpoint): Delete function.
6650 (check_stopped_by_watchpoint): New function, factored out from
6651 linux_low_filter_event.
6652 (lp_status_maybe_breakpoint): Delete function.
6653 (linux_low_filter_event): Remove filter_ptid argument.
6654 Leave thread group exits pending here. Store the LWP's stop PC.
6655 Always leave events pending.
6656 (linux_wait_for_event_filtered): Pull all events out of the
6657 kernel, and leave them all pending.
6658 (count_events_callback, select_event_lwp_callback): Consider all
6660 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6661 (select_event_lwp): Only give preference to the stepping LWP in
6662 all-stop mode. Adjust comments.
6663 (ignore_event): New function.
6664 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6665 references to cancel_breakpoints. Adjust to renames. Also give
6666 equal priority to all LWPs that have had events in non-stop mode.
6667 If reporting a software breakpoint event, unadjust the LWP's PC.
6668 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6669 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6671 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6672 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6673 (linux_stopped_by_watchpoint): Adjust.
6674 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6675 * linux-low.h (enum lwp_stop_reason): New.
6676 (struct lwp_info) <stop_pc>: Adjust comment.
6677 <stopped_by_watchpoint>: Delete field.
6678 <stop_reason>: New field.
6679 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6680 * mem-break.c (software_breakpoint_inserted_here)
6681 (hardware_breakpoint_inserted_here): New function.
6682 * mem-break.h (software_breakpoint_inserted_here)
6683 (hardware_breakpoint_inserted_here): Declare.
6684 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6685 (cancel_breakpoints): Delete.
6686 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6687 (upload_fast_traceframes): Remove references to
6690 2015-01-09 Pedro Alves <palves@redhat.com>
6692 * thread-db.c (find_new_threads_callback): Ignore thread if the
6693 kernel thread ID is -1.
6695 2015-01-09 Pedro Alves <palves@redhat.com>
6697 * linux-low.c (linux_attach_fail_reason_string): Move to
6698 nat/linux-ptrace.c, and rename.
6699 (linux_attach_lwp): Update comment.
6700 (attach_proc_task_lwp_callback): New function.
6701 (linux_attach): Adjust to rename and use
6702 linux_proc_attach_tgid_threads.
6703 (linux_attach_fail_reason_string): Delete declaration.
6705 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6707 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6708 * server.c (gdbserver_version): Likewise.
6710 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6712 * remote-utils.c: Include ctype.h.
6713 (input_interrupt): Explicitly handle the case when the char
6714 received is the NUL byte. Improve the printing of non-ASCII
6717 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6719 * linux-low.c (linux_low_filter_event): Update call to
6720 linux_enable_event_reporting following the addition of
6721 a new parameter to that function.
6723 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6726 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6727 (AARCH64_FPCR_REGNO): Likewise.
6728 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6729 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6730 (aarch64_store_fpregset): Likewise.
6732 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6734 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6735 Remove FIXME comment about assumption about N.
6737 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6739 * configure.ac: If large-file support is disabled in GDBserver,
6740 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6741 * configure: Regenerate.
6743 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6745 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6746 warning upon ENODATA from ptrace.
6747 * linux-s390-low.c (s390_store_tdb): New.
6748 (s390_regsets): Add regset for NT_S390_TDB.
6750 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6752 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6753 without a fill_function.
6754 * linux-s390-low.c (s390_fill_last_break): Remove.
6755 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6756 (s390_arch_setup): Use regset's size instead of fill_function for
6759 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6761 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6762 the regset's store function when ptrace returned an error.
6763 * regcache.c (get_thread_regcache): Invalidate register cache
6764 before fetching inferior's registers.
6766 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6768 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6769 while-loop as for-loop.
6770 (regsets_store_inferior_registers): Likewise.
6772 2014-11-28 Yao Qi <yao@codesourcery.com>
6774 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6775 * config.in, configure: Re-generate.
6776 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6779 2014-11-21 Yao Qi <yao@codesourcery.com>
6781 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6782 (AC_CHECK_HEADERS): Remove malloc.h.
6783 * configure: Re-generated.
6784 * config.in: Re-generated.
6785 * server.h: Don't include alloca.h and malloc.h.
6786 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6787 Don't include malloc.h.
6789 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6791 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6792 corresponding ERRNO check in same block.
6794 2014-11-12 Pedro Alves <palves@redhat.com>
6796 * server.c (cont_thread): Update comment.
6797 (start_inferior, attach_inferior): No longer clear cont_thread.
6798 (handle_v_cont): No longer set cont_thread.
6799 (captured_main): Clear cont_thread each time a GDB connects.
6801 2014-11-12 Pedro Alves <palves@redhat.com>
6803 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6804 thread, and don't resume all threads if the Hc thread has exited.
6806 2014-11-12 Pedro Alves <palves@redhat.com>
6808 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6809 the process group instead of to a specific LWP.
6811 2014-10-15 Pedro Alves <palves@redhat.com>
6814 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6816 (arm_set_thread_context): Delete.
6817 (the_low_target): Adjust.
6818 * win32-i386-low.c (debug_registers_changed)
6819 (debug_registers_used): Delete.
6820 (update_debug_registers_callback): New function.
6821 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6822 needing to update their debug registers.
6823 (win32_get_current_dr): New function.
6824 (x86_dr_low_get_addr, x86_dr_low_get_control)
6825 (x86_dr_low_get_status): Fetch the debug register from the thread
6827 (i386_initial_stuff): Adjust.
6828 (i386_get_thread_context): Remove current_event parameter. Don't
6829 clear debug_registers_changed nor copy DR values to
6831 (i386_set_thread_context): Delete.
6832 (i386_prepare_to_resume): New function.
6833 (i386_thread_added): Mark the thread as needing to update irs
6835 (the_low_target): Remove i386_set_thread_context and install
6836 i386_prepare_to_resume.
6837 * win32-low.c (win32_get_thread_context): Adjust.
6838 (win32_set_thread_context): Use SetThreadContext
6840 (win32_prepare_to_resume): New function.
6841 (win32_require_context): New function, factored out from ...
6842 (thread_rec): ... this.
6843 (continue_one_thread): Call win32_prepare_to_resume on each thread
6844 we're about to continue.
6845 (win32_resume): Call win32_prepare_to_resume on the event thread.
6846 * win32-low.h (struct win32_thread_info)
6847 <debug_registers_changed>: New field.
6848 (struct win32_target_ops): Change prototype of set_thread_context,
6849 delete set_thread_context and add prepare_to_resume.
6850 (win32_require_context): New declaration.
6852 2014-10-08 Gary Benson <gbenson@redhat.com>
6854 * server.h: Do not include common-exceptions.h.
6856 2014-10-08 Gary Benson <gbenson@redhat.com>
6858 * server.h: Do not include cleanups.h.
6860 2014-09-30 James Hogan <james.hogan@imgtec.com>
6862 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6865 2014-09-23 Yao Qi <yao@codesourcery.com>
6867 * linux-low.c (lp_status_maybe_breakpoint): New function.
6868 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6869 (count_events_callback): Likewise.
6870 (select_event_lwp_callback): Likewise.
6871 (cancel_breakpoints_callback): Likewise.
6873 2014-09-19 Don Breazeal <donb@codesourcery.com>
6875 * linux-low.c (handle_extended_wait): Call
6876 linux_ptrace_get_extended_event.
6877 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6878 linux_is_extended_waitstatus.
6880 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6882 * Makefile.in (CPPFLAGS): Define.
6883 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6884 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6886 2014-09-16 Gary Benson <gbenson@redhat.com>
6888 * inferiors.h (current_inferior): Renamed as...
6889 (current_thread): New variable. All uses updated.
6890 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6891 (maybe_move_out_of_jump_pad): Likewise.
6892 (cancel_breakpoint): Likewise.
6893 (linux_low_filter_event): Likewise.
6894 (wait_for_sigstop): Likewise.
6895 (linux_resume_one_lwp): Likewise.
6896 (need_step_over_p): Likewise.
6897 (start_step_over): Likewise.
6898 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6899 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6900 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6901 and save_inferior as saved_thread.
6902 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6904 (regcache_invalidate_thread): Likewise.
6905 * remote-utils.c (prepare_resume_reply): Likewise.
6906 * thread-db.c (thread_db_get_tls_address): Likewise.
6907 (disable_thread_event_reporting): Likewise.
6908 (remove_thread_event_breakpoints): Likewise.
6909 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6911 * target.h (set_desired_inferior): Renamed as...
6912 (set_desired_thread): New declaration. All uses updated.
6913 * server.c (myresume): Updated comment to reference thread instead
6915 (handle_serial_event): Likewise.
6916 (handle_target_event): Likewise.
6918 2014-09-12 Tom Tromey <tromey@redhat.com>
6919 Gary Benson <gbenson@redhat.com>
6921 * regcache.h: Include common-regcache.h.
6922 (regcache_read_pc): Don't declare.
6923 * regcache.c (get_thread_regcache_for_ptid): New function.
6925 2014-09-11 Tom Tromey <tromey@redhat.com>
6926 Gary Benson <gbenson@redhat.com>
6928 * symbol.c: New file.
6929 * Makefile.in (SFILES): Add symbol.c.
6930 (OBS): Add symbol.o.
6932 2014-09-11 Gary Benson <gbenson@redhat.com>
6934 * target.c (target_stop_ptid, target_continue_ptid): New
6937 2014-09-11 Tom Tromey <tromey@redhat.com>
6938 Gary Benson <gbenson@redhat.com>
6940 * target.h: Include target/target.h.
6941 * target.c (target_read_memory, target_read_uint32)
6942 (target_write_memory): New functions.
6944 2014-09-11 Gary Benson <gbenson@redhat.com>
6946 * server.h (debug_hw_points): Don't declare.
6947 * server.c (debug_hw_points): Don't define. Replace all uses
6948 with show_debug_regs.
6949 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6950 all uses with show_debug_regs.
6952 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6954 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6955 endianness into account.
6956 (ppc_supply_ptrace_register): Likewise.
6958 2014-09-03 James Hogan <james.hogan@imgtec.com>
6960 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6961 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6963 2014-09-03 Gary Benson <gbenson@redhat.com>
6965 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6966 ALL_DEBUG_ADDRESS_REGISTERS.
6968 2014-09-02 Gary Benson <gbenson@redhat.com>
6970 * i386-low.h: Renamed as...
6971 * x86-low.h: New file. All type, function and variable name
6972 prefixes changed from "i386_" to "x86_". All references updated.
6973 * i386-low.c: Renamed as...
6974 * x86-low.c: New file. All type, function and variable name
6975 prefixes changed from "i386_" to "x86_". All references updated.
6977 2014-09-02 Gary Benson <gbenson@redhat.com>
6979 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6980 (x86_linux_new_thread): Likewise.
6982 2014-08-29 Gary Benson <gbenson@redhat.com>
6984 * server.h (setjmp.h): Do not include.
6985 (toplevel): Do not declare.
6986 (common-exceptions.h): Include.
6987 (cleanups.h): Likewise.
6988 * server.c (toplevel): Do not define.
6989 (exit_code): New static global.
6990 (detach_or_kill_for_exit_cleanup): New function.
6991 (main): New function. Original main renamed to...
6992 (captured_main): New function.
6993 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6995 2014-08-29 Gary Benson <gbenson@redhat.com>
6997 * Makefile.in (SFILES): Add common/common-exceptions.c.
6998 (OBS): Add common-exceptions.o.
6999 (common-exceptions.o): New rule.
7000 * utils.c (prepare_to_throw_exception): New function.
7002 2014-08-29 Gary Benson <gbenson@redhat.com>
7004 * config.in: Regenerate.
7005 * configure: Likewise.
7007 2014-08-29 Gary Benson <gbenson@redhat.com>
7009 * Makefile.in (SFILES): Add common/cleanups.c.
7011 (cleanups.o): New rule.
7013 2014-08-29 Gary Benson <gbenson@redhat.com>
7015 * utils.c (internal_vwarning): New function.
7017 2014-08-28 Gary Benson <gbenson@redhat.com>
7019 * utils.h (fatal): Remove declaration.
7020 * utils.c (fatal): Remove function.
7022 2014-08-28 Gary Benson <gbenson@redhat.com>
7024 * tracepoint.c (gdb_agent_init): Replace fatal with
7026 (initialize_tracepoint): Likewise.
7028 2014-08-28 Gary Benson <gbenson@redhat.com>
7030 * remote-utils.c (remote_prepare): Replace fatal with error.
7032 2014-08-28 Gary Benson <gbenson@redhat.com>
7034 * linux-low.c (linux_async): Replace fatal with warning.
7036 (linux_start_non_stop): Return -1 if linux_async failed.
7038 2014-08-28 Gary Benson <gbenson@redhat.com>
7040 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7042 (i386_dr_low_get_addr): Remove vague comment.
7043 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7046 2014-08-28 Gary Benson <gbenson@redhat.com>
7048 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7049 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7051 (linux_resume_one_lwp): Likewise.
7052 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7054 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7055 with internal_error.
7056 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7057 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7058 (find_register_by_name): Replace fatal with internal_error.
7059 (find_regno): Likewise.
7060 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7061 * thread-db.c (thread_db_create_event): Likewise.
7062 (thread_db_load_search): Likewise.
7063 (try_thread_db_load_1): Likewise.
7064 * tracepoint.c (get_jump_space_head): Replace fatal with
7066 (claim_trampoline_space): Likewise.
7067 (have_fast_tracepoint_trampoline_buffer): Likewise.
7068 (cmd_qtstart): Likewise.
7069 (stop_tracing): Likewise.
7070 (fast_tracepoint_collecting): Likewise.
7071 (target_malloc): Likewise.
7072 (download_tracepoint): Likewise.
7073 (download_trace_state_variables): Replace check with gdb_assert.
7074 (upload_fast_traceframes): Replace fatal with internal_error.
7076 2014-08-19 Tom Tromey <tromey@redhat.com>
7077 Gary Benson <gbenson@redhat.com>
7079 * Makefile.in (SFILES): Add common/common-debug.c.
7080 (OBS): Add common-debug.o.
7081 (common-debug.o): New rule.
7082 * debug.h (debug_printf): Don't declare.
7083 * debug.c (debug_printf): Renamed and rewritten as...
7084 (debug_vprintf): New function.
7086 2014-08-19 Gary Benson <gbenson@redhat.com>
7088 * utils.h: Do not include print-utils.h.
7090 2014-08-19 Tom Tromey <tromey@redhat.com>
7091 Gary Benson <gbenson@redhat.com>
7093 * server.h: Add static assertion.
7094 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7096 2014-08-19 Tom Tromey <tromey@redhat.com>
7097 Gary Benson <gbenson@redhat.com>
7099 * Makefile.in (SFILES): Add common/errors.c.
7100 (OBS): Add errors.o.
7101 (IPA_OBS): Add errors-ipa.o.
7102 (errors.o): New rule.
7103 (errors-ipa.o): Likewise.
7104 * utils.h (perror_with_name, error, warning): Don't declare.
7105 * utils.c (warning): Renamed and rewritten as...
7106 (vwarning): New function.
7107 (error): Renamed and rewritten as...
7108 (verror): New function.
7109 (internal_error): Renamed and rewritten as...
7110 (internal_verror): New function.
7112 2014-08-07 Gary Benson <gbenson@redhat.com>
7114 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7115 * configure: Regenerate.
7116 * config.in: Likewise.
7117 * server.h: Do not include errno.h.
7118 * event-loop.c: Likewise.
7119 * hostio-errno.c: Likewise.
7120 * linux-low.c: Likewise.
7121 * remote-utils.c: Likewise.
7122 * spu-low.c: Likewise.
7123 * utils.c: Likewise.
7124 * gdbreplay.c: Unconditionally include errno.h.
7126 2014-08-07 Gary Benson <gbenson@redhat.com>
7128 * server.h: Do not include string.h.
7129 * event-loop.c: Likewise.
7130 * linux-low.c: Likewise.
7131 * regcache.c: Likewise.
7132 * remote-utils.c: Likewise.
7133 * spu-low.c: Likewise.
7134 * utils.c: Likewise.
7136 2014-08-07 Gary Benson <gbenson@redhat.com>
7138 * server.h: Do not include gdb_assert.h.
7140 2014-08-07 Gary Benson <gbenson@redhat.com>
7142 * server.h: Do not include common-utils.h.
7144 2014-08-07 Gary Benson <gbenson@redhat.com>
7146 * server.h: Do not include ptid.h.
7147 * notif.h: Likewise.
7149 2014-08-07 Gary Benson <gbenson@redhat.com>
7151 * server.h: Do not include gdb_locale.h.
7153 2014-08-07 Gary Benson <gbenson@redhat.com>
7155 * server.h: Do not include gdb/signals.h.
7156 * win32-low.c: Likewise.
7158 2014-08-07 Gary Benson <gbenson@redhat.com>
7160 * server.h: Do not include pathmax.h.
7162 2014-08-07 Gary Benson <gbenson@redhat.com>
7164 * server.h: Do not include libiberty.h.
7165 * linux-bfin-low.c: Likewise.
7167 2014-08-07 Gary Benson <gbenson@redhat.com>
7169 * server.h: Do not include ansidecl.h.
7171 2014-08-07 Gary Benson <gbenson@redhat.com>
7173 * linux-x86-low.c: Do not include stddef.h.
7174 * lynx-ppc-low.c: Likewise.
7175 * tracepoint.c: Likewise.
7177 2014-08-07 Gary Benson <gbenson@redhat.com>
7179 * server.h: Do not include stdarg.h.
7180 * nto-low.c: Likewise.
7182 2014-08-07 Gary Benson <gbenson@redhat.com>
7184 * server.h: Do not include stdlib.h.
7185 * inferiors.c: Likewise.
7186 * linux-low.c: Likewise.
7187 * regcache.c: Likewise.
7188 * spu-low.c: Likewise.
7189 * tracepoint.c: Likewise.
7190 * utils.c: Likewise.
7192 2014-08-07 Gary Benson <gbenson@redhat.com>
7194 * server.h: Do not include stdio.h.
7195 * linux-low.c: Likewise.
7196 * remote-utils.c: Likewise.
7197 * spu-low.c: Likewise.
7198 * utils.c: Likewise.
7199 * wincecompat.c: Likewise.
7201 2014-08-06 Gary Benson <gbenson@redhat.com>
7203 * regcache.c (init_register_cache): Move conditionals inside if.
7205 2014-08-06 Gary Benson <gbenson@redhat.com>
7207 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7209 2014-07-31 Gary Benson <gbenson@redhat.com>
7211 * ax.h: Do not include server.h.
7212 * gdbthread.h: Likewise.
7213 * lynx-low.h: Likewise.
7214 * notif.h: Likewise.
7216 2014-07-30 Gary Benson <gbenson@redhat.com>
7218 * server.h: Include common-defs.h.
7219 Do not include config.h or build-gnulib-gdbserver/config.h.
7221 2014-07-30 Gary Benson <gbenson@redhat.com>
7223 * hostio-errno.c: Move server.h to top of includes list.
7224 * inferiors.c: Likewise.
7225 * linux-x86-low.c: Likewise.
7226 * notif.c: Include server.h.
7228 2014-07-24 Tom Tromey <tromey@redhat.com>
7229 Gary Benson <gbenson@redhat.com>
7231 * server.h (CORE_ADDR): Now unsigned.
7233 2014-07-16 Pedro Alves <palves@redhat.com>
7235 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7237 2014-07-15 Pedro Alves <palves@redhat.com>
7239 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7242 2014-07-11 Pedro Alves <palves@redhat.com>
7244 * linux-low.c (kill_wait_lwp): New function, based on
7245 kill_one_lwp_callback, but use my_waitpid directly.
7246 (kill_one_lwp_callback, linux_kill): Use it.
7248 2014-06-23 Pedro Alves <palves@redhat.com>
7250 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7251 before setting DR0..DR3.
7253 2014-06-20 Gary Benson <gbenson@redhat.com>
7255 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7256 * configure: Regenerated.
7257 * config.in: Likewise.
7259 2014-06-20 Gary Benson <gbenson@redhat.com>
7261 * Makefile.in (SFILES): Update locations for files moved
7263 (object file files): Reordered.
7265 2014-06-20 Gary Benson <gbenson@redhat.com>
7267 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7268 (i386_dr_low_set_addr): Likewise.
7269 (i386_dr_low_get_addr): Likewise.
7270 (i386_dr_low_can_set_control): Likewise.
7271 (i386_dr_low_set_control): Likewise.
7272 (i386_dr_low_get_control): Likewise.
7273 (i386_dr_low_get_status): Likewise.
7274 (i386_get_debug_register_length): Likewise.
7275 * linux-x86-low.c (i386_dr_low_set_addr):
7276 Changed signature. Made static.
7277 (i386_dr_low_get_addr): Likewise.
7278 (i386_dr_low_set_control): Likewise.
7279 (i386_dr_low_get_control): Likewise.
7280 (i386_dr_low_get_status): Likewise.
7281 (i386_dr_low): New global variable.
7282 * win32-i386-low.c (i386_dr_low_set_addr):
7283 Changed signature. Made static.
7284 (i386_dr_low_get_addr): Likewise.
7285 (i386_dr_low_set_control): Likewise.
7286 (i386_dr_low_get_control): Likewise.
7287 (i386_dr_low_get_status): Likewise.
7288 (i386_dr_low): New global variable.
7290 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7292 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7293 * Makefile.in (AR, AR_FLAGS): Define.
7294 * configure: Regenerate.
7296 2014-06-19 Gary Benson <gbenson@redhat.com>
7298 * Makefile.in (i386-dregs.o): New rule.
7299 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7300 * i386-low.c (target.h): Remove include.
7301 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7302 (DR_CONTROL_SHIFT): Likewise.
7303 (DR_CONTROL_SIZE): Likewise.
7304 (DR_RW_EXECUTE): Likewise.
7305 (DR_RW_WRITE): Likewise.
7306 (DR_RW_READ): Likewise.
7307 (DR_RW_IORW): Likewise.
7308 (DR_LEN_1): Likewise.
7309 (DR_LEN_2): Likewise.
7310 (DR_LEN_4): Likewise.
7311 (DR_LEN_8): Likewise.
7312 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7313 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7314 (DR_ENABLE_SIZE): Likewise.
7315 (DR_LOCAL_SLOWDOWN): Likewise.
7316 (DR_GLOBAL_SLOWDOWN): Likewise.
7317 (DR_CONTROL_RESERVED): Likewise.
7318 (I386_DR_CONTROL_MASK): Likewise.
7319 (I386_DR_VACANT): Likewise.
7320 (I386_DR_LOCAL_ENABLE): Likewise.
7321 (I386_DR_GLOBAL_ENABLE): Likewise.
7322 (I386_DR_DISABLE): Likewise.
7323 (I386_DR_SET_RW_LEN): Likewise.
7324 (I386_DR_GET_RW_LEN): Likewise.
7325 (I386_DR_WATCH_HIT): Likewise.
7326 (i386_wp_op_t): Likewise.
7327 (i386_show_dr): Likewise.
7328 (i386_length_and_rw_bits): Likewise.
7329 (i386_insert_aligned_watchpoint): Likewise.
7330 (i386_remove_aligned_watchpoint): Likewise.
7331 (i386_handle_nonaligned_watchpoint): Likewise.
7332 i386_update_inferior_debug_regs(): Likewise.
7333 (i386_dr_insert_watchpoint): Likewise.
7334 (i386_dr_remove_watchpoint): Likewise.
7335 (i386_dr_region_ok_for_watchpoint): Likewise.
7336 (i386_dr_stopped_data_address): Likewise.
7337 (i386_dr_stopped_by_watchpoint): Likewise.
7339 2014-06-19 Gary Benson <gbenson@redhat.com>
7341 * i386-low.c (i386_dr_show): Renamed to
7342 i386_show_dr and made static. All uses updated.
7343 (i386_dr_length_and_rw_bits): Renamed to
7344 i386_length_and_rw_bits and made static.
7346 (i386_dr_insert_aligned_watchpoint): Renamed to
7347 i386_insert_aligned_watchpoint and made static.
7349 (i386_dr_remove_aligned_watchpoint): Renamed to
7350 i386_remove_aligned_watchpoint and made static.
7352 (i386_dr_update_inferior_debug_regs): Renamed to
7353 i386_update_inferior_debug_regs and made static.
7356 2014-06-18 Gary Benson <gbenson@redhat.com>
7358 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7359 (i386_dr_low_can_set_control): Likewise.
7360 (i386_get_debug_register_length): Likewise.
7361 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7362 (i386_dr_low_can_set_control): Likewise.
7363 (i386_get_debug_register_length): Likewise.
7365 2014-06-17 Gary Benson <gbenson@redhat.com>
7367 * i386-low.h (i386-dregs.h): New include.
7368 (DR_FIRSTADDR): Now in i386-dregs.h.
7369 (DR_LASTADDR): Likewise.
7370 (DR_NADDR): Likewise.
7371 (DR_STATUS): Likewise.
7372 (DR_CONTROL): Likewise.
7373 (i386_debug_reg_state): Likewise.
7374 (i386_dr_insert_watchpoint): Likewise.
7375 (i386_dr_remove_watchpoint): Likewise.
7376 (i386_dr_region_ok_for_watchpoint): Likewise.
7377 (i386_dr_stopped_data_address): Likewise.
7378 (i386_dr_stopped_by_watchpoint): Likewise.
7379 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7381 2014-06-18 Gary Benson <gbenson@redhat.com>
7383 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7384 i386_dr_insert_watchpoint.
7385 (i386_low_remove_watchpoint): Renamed to
7386 i386_dr_remove_watchpoint.
7387 (i386_low_region_ok_for_watchpoint): Renamed to
7388 i386_dr_region_ok_for_watchpoint.
7389 (i386_low_stopped_data_address): Renamed to
7390 i386_dr_stopped_data_address.
7391 (i386_low_stopped_by_watchpoint): Renamed to
7392 i386_dr_stopped_by_watchpoint.
7393 * i386-low.c (i386_show_dr): Renamed to
7394 i386_dr_show and made nonstatic. All uses updated.
7395 (i386_length_and_rw_bits): Renamed to
7396 i386_dr_length_and_rw_bits and made nonstatic.
7398 (i386_insert_aligned_watchpoint): Renamed to
7399 i386_dr_insert_aligned_watchpoint and made nonstatic.
7401 (i386_remove_aligned_watchpoint): Renamed to
7402 i386_dr_remove_aligned_watchpoint and made nonstatic.
7404 (i386_update_inferior_debug_regs): Renamed to
7405 i386_dr_update_inferior_debug_regs and made nonstatic.
7407 (i386_low_insert_watchpoint): Renamed to
7408 i386_dr_insert_watchpoint. All uses updated.
7409 (i386_low_remove_watchpoint): Renamed to
7410 i386_dr_remove_watchpoint. All uses updated.
7411 (i386_low_region_ok_for_watchpoint): Renamed to
7412 i386_dr_region_ok_for_watchpoint. All uses updated.
7413 (i386_low_stopped_data_address): Renamed to
7414 i386_dr_stopped_data_address. All uses updated.
7415 (i386_low_stopped_by_watchpoint): Renamed to
7416 i386_dr_stopped_by_watchpoint. All uses updated.
7418 2014-06-18 Gary Benson <gbenson@redhat.com>
7420 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7421 (i386_dr_low_can_set_control): Likewise.
7422 (i386_insert_aligned_watchpoint): New check.
7424 2014-06-18 Gary Benson <gbenson@redhat.com>
7426 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7429 2014-06-18 Gary Benson <gbenson@redhat.com>
7431 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7432 instead of fatal and error.
7433 (i386_handle_nonaligned_watchpoint): Likewise.
7435 2014-06-18 Gary Benson <gbenson@redhat.com>
7437 * i386-low.c (i386_get_debug_register_length): New macro.
7438 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7439 (i386_show_dr): Use debug_printf instead of fprintf. Use
7440 phex to format values.
7442 2014-06-18 Gary Benson <gbenson@redhat.com>
7444 * i386-low.h: Comment changes.
7445 * i386-low.c: Likewise.
7447 2014-06-18 Gary Benson <gbenson@redhat.com>
7449 * i386-low.c: Whitespace changes.
7451 2014-06-12 Tom Tromey <tromey@redhat.com>
7453 * utils.c (freeargv): Remove.
7455 2014-06-12 Tom Tromey <tromey@redhat.com>
7457 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7458 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7459 (parse_debug_format_options): Likewise.
7460 (gdbserver_usage): Likewise.
7461 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7462 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7463 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7465 ($(LIBGNU)): Depend on libiberty.
7466 (all-lib): Recurse into all subdirs.
7467 (install-only): Invoke "install" target in subdirs.
7468 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7470 * configure: Rebuild.
7471 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7472 for vasprintf, vsnprintf, or gettimeofday.
7473 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7476 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7478 * development.sh: Delete.
7479 * Makefile.in (config.status): Adjust dependency on development.sh.
7480 * configure.ac: Adjust development.sh source call.
7481 * configure: Regenerate.
7483 2014-06-02 Pedro Alves <palves@redhat.com>
7485 * ax.c (gdb_free_agent_expr): New function.
7486 * ax.h (gdb_free_agent_expr): New declaration.
7487 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7489 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7491 (clear_breakpoint_conditions_and_commands): New function.
7492 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7493 (clear_breakpoint_conditions_and_commands): New declaration.
7495 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7497 * linux-aarch64-low.c (asm/ptrace.h): Include.
7499 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7501 Fix TLS access for -static -pthread.
7502 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7503 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7504 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7506 2014-05-20 Pedro Alves <palves@redhat.com>
7508 * linux-aarch64-low.c (aarch64_insert_point)
7509 (aarch64_remove_point): No longer check whether the type is
7510 supported here. Adjust to new interface.
7511 (the_low_target): Install aarch64_supports_z_point_type as
7512 supports_z_point_type method.
7513 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7514 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7515 instead of a Z packet char. Adjust.
7516 (arm_supports_z_point_type): New function.
7517 (arm_insert_point, arm_remove_point): Adjust to new interface.
7518 (the_low_target): Install arm_supports_z_point_type.
7519 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7520 (cris_insert_point, cris_remove_point): Adjust to new interface.
7521 Don't check whether the type is supported here.
7522 (the_low_target): Install cris_supports_z_point_type.
7523 * linux-low.c (linux_supports_z_point_type): New function.
7524 (linux_insert_point, linux_remove_point): Adjust to new interface.
7525 * linux-low.h (struct linux_target_ops) <insert_point,
7526 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7527 raw_breakpoint pointer parameter.
7528 <supports_z_point_type>: New method.
7529 * linux-mips-low.c (mips_supports_z_point_type): New function.
7530 (mips_insert_point, mips_remove_point): Adjust to new interface.
7531 Use mips_supports_z_point_type.
7532 (the_low_target): Install mips_supports_z_point_type.
7533 * linux-ppc-low.c (the_low_target): Install NULL as
7534 supports_z_point_type method.
7535 * linux-s390-low.c (the_low_target): Install NULL as
7536 supports_z_point_type method.
7537 * linux-sparc-low.c (the_low_target): Install NULL as
7538 supports_z_point_type method.
7539 * linux-x86-low.c (x86_supports_z_point_type): New function.
7540 (x86_insert_point): Adjust to new insert_point interface. Use
7541 insert_memory_breakpoint. Adjust to new
7542 i386_low_insert_watchpoint interface.
7543 (x86_remove_point): Adjust to remove_point interface. Use
7544 remove_memory_breakpoint. Adjust to new
7545 i386_low_remove_watchpoint interface.
7546 (the_low_target): Install x86_supports_z_point_type.
7547 * lynx-low.c (lynx_target_ops): Install NULL as
7548 supports_z_point_type callback.
7549 * nto-low.c (nto_supports_z_point_type): New.
7550 (nto_insert_point, nto_remove_point): Adjust to new interface.
7551 (nto_target_ops): Install nto_supports_z_point_type.
7552 * mem-break.c: Adjust intro comment.
7553 (struct raw_breakpoint) <raw_type, size>: New fields.
7554 <inserted>: Update comment.
7555 <shlib_disabled>: Delete field.
7556 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7557 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7558 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7559 (raw_bkpt_type_to_target_hw_bp_type): New function.
7560 (find_enabled_raw_code_breakpoint_at): New function.
7561 (find_raw_breakpoint_at): New type and size parameters. Use them.
7562 (insert_memory_breakpoint): New function, based off
7563 set_raw_breakpoint_at.
7564 (remove_memory_breakpoint): New function.
7565 (set_raw_breakpoint_at): Reimplement.
7566 (set_breakpoint): New, based on set_breakpoint_at.
7567 (set_breakpoint_at): Reimplement.
7568 (delete_raw_breakpoint): Go through the_target->remove_point
7569 instead of assuming memory breakpoints.
7570 (find_gdb_breakpoint_at): Delete.
7571 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7572 (find_gdb_breakpoint): New function.
7573 (set_gdb_breakpoint_at): Delete.
7574 (z_type_supported): New function.
7575 (set_gdb_breakpoint_1): New function, loosely based off
7576 set_gdb_breakpoint_at.
7577 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7578 (delete_gdb_breakpoint_at): Delete.
7579 (delete_gdb_breakpoint_1): New function, loosely based off
7580 delete_gdb_breakpoint_at.
7581 (delete_gdb_breakpoint): New function.
7582 (clear_gdb_breakpoint_conditions): Rename to ...
7583 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7585 (add_condition_to_breakpoint): Make static.
7586 (add_breakpoint_condition): Take a struct breakpoint pointer
7587 instead of an address. Adjust.
7588 (gdb_condition_true_at_breakpoint): Rename to ...
7589 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7591 (gdb_condition_true_at_breakpoint): Reimplement.
7592 (add_breakpoint_commands): Take a struct breakpoint pointer
7593 instead of an address. Adjust.
7594 (gdb_no_commands_at_breakpoint): Rename to ...
7595 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7596 parameter. Return true if no breakpoint was found. Change debug
7598 (gdb_no_commands_at_breakpoint): Reimplement.
7599 (run_breakpoint_commands): Rename to ...
7600 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7601 and change return type to boolean.
7602 (run_breakpoint_commands): New function.
7603 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7604 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7605 breakpoint. Go through the_target->remove_point instead of
7606 assuming memory breakpoint.
7607 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7608 software and hardware breakpoints.
7609 (reinsert_raw_breakpoint): Go through the_target->insert_point
7610 instead of assuming memory breakpoint.
7611 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7612 software and hardware breakpoints.
7613 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7614 Check both software and hardware breakpoints.
7615 (validate_inserted_breakpoint): Assert the breakpoint is a
7616 software breakpoint. Set the inserted flag to -1 instead of
7617 setting shlib_disabled.
7618 (delete_disabled_breakpoints): Adjust.
7619 (validate_breakpoints): Only validate software breakpoints.
7620 Adjust to inserted flag change.
7621 (check_mem_read, check_mem_write): Skip breakpoint types other
7622 than software breakpoints. Adjust to inserted flag change.
7623 * mem-break.h (enum raw_bkpt_type): New enum.
7624 (raw_breakpoint, struct process_info): Forward declare.
7625 (Z_packet_to_target_hw_bp_type): Delete declaration.
7626 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7627 (set_gdb_breakpoint, delete_gdb_breakpoint)
7628 (clear_breakpoint_conditions): New declarations.
7629 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7630 (breakpoint_inserted_here): Update comment.
7631 (add_breakpoint_condition, add_breakpoint_commands): Replace
7632 address parameter with a breakpoint pointer parameter.
7633 (gdb_breakpoint_here): Update comment.
7634 (delete_gdb_breakpoint_at): Delete.
7635 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7636 * server.c (process_point_options): Take a struct breakpoint
7637 pointer instead of an address. Adjust.
7638 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7639 delete_gdb_breakpoint.
7640 * spu-low.c (spu_target_ops): Install NULL as
7641 supports_z_point_type method.
7642 * target.h: Include mem-break.h.
7643 (struct target_ops) <prepare_to_access_memory>: Update comment.
7644 <supports_z_point_type>: New field.
7645 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7646 instead of a char. Also take a raw breakpoint pointer.
7647 * win32-arm-low.c (the_low_target): Install NULL as
7648 supports_z_point_type.
7649 * win32-i386-low.c (i386_supports_z_point_type): New function.
7650 (i386_insert_point, i386_remove_point): Adjust to new interface.
7651 (the_low_target): Install i386_supports_z_point_type.
7652 * win32-low.c (win32_supports_z_point_type): New function.
7653 (win32_insert_point, win32_remove_point): Adjust to new interface.
7654 (win32_target_ops): Install win32_supports_z_point_type.
7655 * win32-low.h (struct win32_target_ops):
7656 <supports_z_point_type>: New method.
7657 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7658 instead of a char. Also take a raw breakpoint pointer.
7660 2014-05-20 Pedro Alves <palves@redhat.com>
7662 * mem-break.h: Include break-common.h.
7663 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7664 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7665 (Z_packet_to_target_hw_bp_type): New declaration.
7666 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7667 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7668 (Z_PACKET_ACCESS_WP): Delete macros.
7669 (Z_packet_to_hw_type): Delete function.
7670 * i386-low.h: Don't include break-common.h here.
7671 (Z_packet_to_hw_type): Delete declaration.
7672 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7673 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7674 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7675 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7676 * linux-aarch64-low.c: Don't include break-common.h here.
7677 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7678 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7679 (Z_packet_to_target_hw_bp_type): Delete function.
7680 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7682 (mips_insert_point, mips_remove_point): Use
7683 Z_packet_to_target_hw_bp_type.
7685 2014-05-20 Pedro Alves <palves@redhat.com>
7687 * linux-aarch64-low.c: Include break-common.h.
7688 (enum target_point_type): Delete.
7689 (Z_packet_to_point_type): Rename to ...
7690 (Z_packet_to_target_hw_bp_type): ... this, and return a
7691 target_hw_bp_type instead.
7692 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7693 instead of an enum target_point_type.
7694 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7696 (aarch64_dr_state_insert_one_point)
7697 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7698 (aarch64_handle_aligned_watchpoint)
7699 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7700 Take an enum target_hw_bp_type instead of an enum
7702 (aarch64_supports_z_point_type): New function.
7703 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7704 use Z_packet_to_target_hw_bp_type.
7706 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7708 * configure.ac: Only use -Werror by default when DEVELOPMENT
7710 * configure: Regenerate.
7712 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7714 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7715 * linux-x86-low.c (X86_64_USER_REGS): New.
7716 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7718 2014-04-28 Yao Qi <yao@codesourcery.com>
7720 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7723 2014-04-25 Pedro Alves <palves@redhat.com>
7726 * linux-low.c (linux_attach_fail_reason_string): New function.
7727 (linux_attach_lwp): Delete.
7728 (linux_attach_lwp_1): Rename to ...
7729 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7730 argument. Remove "initial" parameter. Return int instead of
7731 void. Don't error or warn here.
7732 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7733 failure to attach to the tgid. Call warning when failing to
7735 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7736 argument. Remove "initial" parameter. Return int instead of
7737 void. Don't error or warn here.
7738 (linux_attach_fail_reason_string): New declaration.
7739 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7740 interface change. Use linux_attach_fail_reason_string.
7742 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7743 Walfred Tedeschi <walfred.tedeschi@intel.com>
7745 * Makefile.in: Added rules to handle new files
7746 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7747 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7748 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7749 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7750 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7751 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7753 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7754 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7755 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7756 i386/x32-avx512.xml.
7757 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7758 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7759 i386/x32-avx512-linux.xml.
7760 * i387-fp.c (num_avx512_k_registers): New constant for number
7762 (num_avx512_zmmh_low_registers): New constant for number of
7763 lower ZMM registers (0-15).
7764 (num_avx512_zmmh_high_registers): New constant for number of
7765 higher ZMM registers (16-31).
7766 (num_avx512_ymmh_registers): New contant for number of higher
7767 YMM registers (ymm16-31 added by avx521 on x86_64).
7768 (num_avx512_xmm_registers): New constant for number of higher
7769 XMM registers (xmm16-31 added by AVX512 on x86_64).
7770 (struct i387_xsave): Add space for AVX512 registers.
7771 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7772 Add code to handle AVX512 registers.
7773 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7774 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7775 prototypei from generated file.
7776 (tdesc_amd64_avx512_linux): Likewise.
7777 (init_registers_x32_avx512_linux): Likewise.
7778 (tdesc_x32_avx512_linux): Likewise.
7779 (init_registers_i386_avx512_linux): Likewise.
7780 (tdesc_i386_avx512_linux): Likewise.
7781 (x86_64_regmap): Add AVX512 registers.
7782 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7784 (initialize_low_arch): Add code to initialize AVX512 registers.
7786 2014-04-23 Pedro Alves <palves@redhat.com>
7788 * mem-break.c (find_gdb_breakpoint_at): Make static.
7789 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7791 2014-04-23 Pedro Alves <palves@redhat.com>
7793 * i386-low.c: Don't include break-common.h here.
7794 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7795 prototype to take target_hw_bp_type as argument instead of a Z
7797 * i386-low.h: Include break-common.h here.
7798 (Z_packet_to_hw_type): Declare.
7799 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7801 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7802 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7803 (x86_remove_point): Convert the packet number to a
7804 target_hw_bp_type before calling i386_low_remove_watchpoint.
7805 * win32-i386-low.c (i386_insert_point): Convert the packet number
7806 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7807 (i386_remove_point): Convert the packet number to a
7808 target_hw_bp_type before calling i386_low_remove_watchpoint.
7810 2014-04-23 Pedro Alves <palves@redhat.com>
7812 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7814 2014-04-10 Pedro Alves <palves@redhat.com>
7816 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7817 Check if the condition or command is NULL before checking if the
7818 breakpoint is known. On success, return true.
7819 * mem-break.h (add_breakpoint_condition): Document return.
7820 (add_breakpoint_commands): Add describing comment.
7821 * server.c (skip_to_semicolon): New function.
7822 (process_point_options): Use it.
7824 2014-04-09 Pedro Alves <palves@redhat.com>
7826 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7829 2014-02-27 Pedro Alves <palves@redhat.com>
7832 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7834 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7836 (last_thread_of_process_p): Take a PID argument instead of a
7838 (linux_wait_for_lwp): Delete.
7839 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7841 (linux_low_filter_event): New function, party factored out from
7842 linux_wait_for_event.
7843 (linux_wait_for_event): Rename to ...
7844 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7845 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7846 sigsuspend. Check for zombie leaders.
7847 (linux_wait_for_event): Reimplement as wrapper around
7848 linux_wait_for_event_filtered.
7849 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7850 a normal or signal exit is seen, it's the whole process exiting.
7851 (wait_for_sigstop): No longer a for_each_inferior callback.
7852 Rewrite on top of linux_wait_for_event_filtered.
7853 (stop_all_lwps): Call wait_for_sigstop directly.
7854 * server.c (resume, handle_target_event): Handle
7855 TARGET_WAITKIND_NO_RESUMED.
7857 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7859 * win32-low.c (psapi_get_dll_name,
7860 * win32_CreateToolhelp32Snapshot): Delete.
7861 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7862 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7864 (handle_load_dll): Add function description.
7865 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7867 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7869 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7871 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7872 base address when calling win32_add_one_solib.
7873 (handle_load_dll): Delete local variable load_addr.
7874 Remove 0x1000 offset applied to DLL base address when calling
7875 win32_add_one_solib.
7876 (handle_unload_dll): Add comment.
7878 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7880 * win32-low.c (win32_add_all_dlls): Renames
7881 win32_ensure_ntdll_loaded. Rewrite function documentation.
7882 Adjust implementation to always load all DLLs.
7883 Add 0x1000 offset to DLL base address when calling
7884 win32_add_one_solib.
7885 (child_initialization_done): New static global.
7886 (do_initial_child_stuff): Set child_initialization_done to
7887 zero during child initialization, and 1 after. Replace call
7888 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7890 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7891 (handle_unload_dll): Add function documentation.
7892 (get_child_debug_event): Ignore load and unload DLL events
7893 during child initialization.
7895 2014-02-20 Doug Evans <dje@google.com>
7897 Remove global all_lwps.
7898 * inferiors.h (ptid_of): Move here from linux-low.h.
7899 (pid_of, lwpid_of): Ditto.
7900 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7901 parameter is a struct thread_info * now.
7902 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7903 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7904 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7906 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7907 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7908 * linux-arm-low.c (update_registers_callback): Update, "entry"
7909 parameter is a struct thread_info * now.
7910 Fetch lwpid from current_inferior directly.
7911 (arm_insert_point): Pass &all_threads to find_inferior instead of
7913 (arm_remove_point): Ditto.
7914 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7915 (arm_prepare_to_resume): Fetch pid from thread.
7916 (arm_read_description): Fetch lwpid from current_inferior directly.
7917 * linux-low.c (all_lwps): Delete.
7918 (delete_lwp): Delete call to remove_inferior.
7919 (handle_extended_wait): Fetch lwpid from thread.
7920 (add_lwp): Don't set lwp->entry.id. Remove call to
7921 add_inferior_to_list.
7922 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7923 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7924 (kill_one_lwp_callback): Ditto.
7925 (linux_kill): Don't dereference NULL pointer.
7926 Fetch ptid,lwpid from thread.
7927 (get_detach_signal): Fetch ptid from thread.
7928 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7929 Simplify call to regcache_invalidate_thread.
7930 (delete_lwp_callback): Update, "entry" parameter is a
7931 struct thread_info * now. Fetch pid from thread.
7932 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7933 (status_pending_p_callback): Update, "entry" parameter is a
7934 struct thread_info * now. Fetch ptid from thread.
7935 (find_lwp_pid): Update, "entry" parameter is a
7936 struct thread_info * now.
7937 (linux_wait_for_lwp): Fetch pid from thread.
7938 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7939 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7940 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7941 (dequeue_one_deferred_signal): Ditto.
7942 (cancel_breakpoint): Fetch ptid from current_inferior.
7943 (linux_wait_for_event): Pass &all_threads to find_inferior,
7944 not &all_lwps. Fetch ptid, lwpid from thread.
7945 (count_events_callback): Update, "entry" parameter is a
7946 struct thread_info * now.
7947 (select_singlestep_lwp_callback): Ditto.
7948 (select_event_lwp_callback): Ditto.
7949 (cancel_breakpoints_callback): Ditto.
7950 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7952 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7953 (unsuspend_one_lwp): Update, "entry" parameter is a
7954 struct thread_info * now.
7955 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7957 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7958 Fetch lwpid from thread, not lwp.
7959 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7960 Pass &all_threads to find_inferior, not &all_lwps.
7961 (send_sigstop): Fetch lwpid from thread, not lwp.
7962 (send_sigstop_callback): Update, "entry" parameter is a
7963 struct thread_info * now.
7964 (suspend_and_send_sigstop_callback): Ditto.
7965 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7966 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7967 struct thread_info * now.
7968 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7970 (lwp_running): Update, "entry" parameter is a
7971 struct thread_info * now.
7972 (stop_all_lwps): Fetch ptid from thread.
7973 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7974 (linux_resume_one_lwp): Fetch lwpid from thread.
7975 (linux_set_resume_request): Update, "entry" parameter is a
7976 struct thread_info * now. Fetch pid, lwpid from thread.
7977 (resume_status_pending_p): Update, "entry" parameter is a
7978 struct thread_info * now.
7979 (need_step_over_p): Ditto. Fetch lwpid from thread.
7980 (start_step_over): Fetch lwpid from thread.
7981 (linux_resume_one_thread): Update, "entry" parameter is a
7982 struct thread_info * now. Fetch lwpid from thread.
7983 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7984 (proceed_one_lwp): Update, "entry" parameter is a
7985 struct thread_info * now. Fetch lwpid from thread.
7986 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7987 struct thread_info * now.
7988 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7989 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7990 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7992 (regsets_store_inferior_registers): Ditto.
7993 (fetch_register, store_register): Ditto.
7994 (linux_read_memory, linux_write_memory): Ditto.
7995 (linux_request_interrupt): Ditto.
7996 (linux_read_auxv): Ditto.
7997 (linux_xfer_siginfo): Ditto.
7998 (linux_qxfer_spu): Ditto.
7999 (linux_qxfer_libraries_svr4): Ditto.
8000 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8001 moved to inferiors.h.
8003 (get_thread_lwp): Update.
8004 (struct lwp_info): Delete member "entry". Simplify comment for
8007 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8008 current_inferior directly.
8009 (update_watch_registers_callback): Update, "entry" parameter is a
8010 struct thread_info * now. Fetch pid from thread.
8011 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8012 (mips_insert_point): Fetch lwpid from current_inferior.
8013 Pass &all_threads to find_inferior, not &all_lwps.
8014 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8015 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8017 (mips_stopped_data_address): Ditto.
8018 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8020 * linux-tile-low.c (tile_arch_setup): Ditto.
8021 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8022 (update_debug_registers_callback): Update, "entry" parameter is a
8023 struct thread_info * now. Fetch pid from thread.
8024 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8025 Pass &all_threads to find_inferior, not &all_lwps.
8026 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8027 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8028 Pass &all_threads to find_inferior, not &all_lwps.
8029 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8030 (i386_dr_low_get_status): Ditto.
8031 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8032 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8033 (x86_linux_read_description): Ditto.
8034 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8036 2014-02-20 Doug Evans <dje@google.com>
8038 * inferiors.c (get_first_inferior): Fix buglet.
8040 2014-02-19 Doug Evans <dje@google.com>
8042 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8043 * inferiors.c (add_thread): Change result type to struct thread_info *.
8044 All callers updated.
8045 (add_lwp): Call add_thread here instead of in callers.
8046 All callers updated.
8047 * linux-low.h (get_lwp_thread): Rewrite.
8048 (struct lwp_info): New member "thread".
8050 2014-02-19 Doug Evans <dje@google.com>
8052 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8053 All callers updated.
8055 2014-02-19 Doug Evans <dje@google.com>
8057 * inferiors.c (add_thread): Fix whitespace.
8059 2014-02-19 Doug Evans <dje@google.com>
8061 * dll.c (clear_dlls): Replace accessing list implemention details
8063 * gdbthread.h (get_first_thread): Declare.
8064 * inferiors.c (for_each_inferior_with_data): New function.
8065 (get_first_thread): New function.
8066 (find_thread_ptid): Simplify.
8067 (get_first_inferior): New function.
8068 (clear_list): Delete.
8069 (one_inferior_p): New function.
8070 (clear_inferior_list): New function.
8071 (clear_inferiors): Update.
8072 * inferiors.h (for_each_inferior_with_data): Declare.
8073 (clear_inferior_list): Declare.
8074 (one_inferior_p): Declare.
8075 (get_first_inferior): Declare.
8076 * linux-low.c (linux_wait_for_event): Replace accessing list
8077 implemention details with API function.
8078 * server.c (target_running): Ditto.
8079 (accumulate_file_name_length): New function.
8080 (emit_dll_description): New function.
8081 (handle_qxfer_libraries): Replace accessing list implemention
8082 details with API function.
8083 (handle_qxfer_threads_worker): New function.
8084 (handle_qxfer_threads_proper): Replace accessing list implemention
8085 details with API function.
8086 (handle_query): Ditto.
8087 (visit_actioned_threads_callback_ftype): New typedef.
8088 (visit_actioned_threads_data): New struct.
8089 (visit_actioned_threads): Rewrite to be find_inferior callback.
8090 (resume): Call find_inferior.
8091 (handle_status): Replace accessing list implemention
8092 details with API function.
8093 (process_serial_event): Replace accessing list implemention details
8095 * target.c (set_desired_inferior): Replace accessing list implemention
8096 details with API function.
8097 * tracepoint.c (same_process_p): New function.
8098 (gdb_agent_about_to_close): Replace accessing list implemention
8099 details with API function.
8100 * win32-low.c (child_delete_thread): Replace accessing list
8101 implemention details with API function.
8102 (match_dll_by_basename): New function.
8103 (dll_is_loaded_by_basename): New function.
8104 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8105 details call to dll_is_loaded_by_basename.
8107 2014-02-19 Doug Evans <dje@google.com>
8109 * dll.h (struct dll_info): Add comment.
8110 * gdbthread.h (struct thread_info): Add comment.
8111 (current_ptid): Simplify.
8112 * inferiors.c (add_process): Update.
8113 (remove_process): Update.
8114 * inferiors.h (struct process_info): Rename member "head" to "entry".
8115 * linux-low.c (delete_lwp): Update.
8117 (last_thread_of_process_p): Update.
8118 (kill_one_lwp_callback, linux_kill): Update.
8119 (status_pending_p_callback): Update.
8120 (wait_for_sigstop): Update. Simplify read of ptid.
8121 (start_step_over): Update.
8122 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8123 (get_lwp_thread): Update.
8124 (struct lwp_info): Rename member "head" to "entry".
8125 * regcache.h (inferior_list_entry): Delete.
8126 * server.c (kill_inferior_callback): Update.
8127 (detach_or_kill_inferior_callback): Update.
8128 (print_started_pid): Update.
8129 (print_attached_pid): Update.
8130 (process_serial_event): Simplify read of ptid.
8131 * thread-db.c (thread_db_create_event): Update.
8132 (thread_db_get_tls_address): Update.
8133 * win32-low.c (current_inferior_ptid): Simplify.
8135 2014-02-19 Tom Tromey <tromey@redhat.com>
8137 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8139 (target_supports_btrace): Update.
8141 2014-02-14 Yao Qi <yao@codesourcery.com>
8143 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8144 (rsp-low-ipa.o): New target.
8146 2014-02-12 Tom Tromey <tromey@redhat.com>
8148 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8149 convert_ascii_to_int.
8150 * regcache.c (registers_to_string): Likewise.
8151 * remote-utils.c (decode_M_packet): Likewise.
8152 * server.c (process_serial_event): Likewise.
8154 2014-02-12 Tom Tromey <tromey@redhat.com>
8156 * server.c (handle_query, handle_v_run): Use hex2bin, not
8158 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8160 2014-02-12 Tom Tromey <tromey@redhat.com>
8162 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8163 convert_int_to_ascii.
8164 * regcache.c (registers_to_string, collect_register_as_string):
8166 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8168 * server.c (process_serial_event): Likewise.
8169 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8170 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8172 2014-02-12 Tom Tromey <tromey@redhat.com>
8174 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8175 bin2hex, not hexify.
8176 * tracepoint.c (cmd_qtstatus): Likewise.
8178 2014-02-12 Tom Tromey <tromey@redhat.com>
8180 * remote-utils.c (monitor_output): Pass explicit length to
8183 2014-02-12 Tom Tromey <tromey@redhat.com>
8185 * tracepoint.c: Include rsp-low.h.
8186 * server.c: Include rsp-low.h.
8187 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8188 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8190 * remote-utils.c: Include rsp-low.h.
8191 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8192 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8193 (convert_int_to_ascii, convert_ascii_to_int): Move to
8195 * regcache.c: Include rsp-low.h.
8196 * ax.c: Include rsp-low.h.
8197 * Makefile.in (SFILES): Add common/rsp-low.c.
8198 (OBS): Add rsp-low.o.
8199 (rsp-low.o): New target.
8201 2014-02-12 Tom Tromey <tromey@redhat.com>
8203 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8204 Include print-utils.h.
8205 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8206 (plongest, thirty_two, phex_nz): Remove.
8207 * Makefile.in (SFILES): Add common/print-utils.c.
8208 (OBS): Add print-utils.o.
8209 (print-utils-ipa.o): New target.
8210 (print-utils.o): New target.
8211 (IPA_OBJS): Add print-utils-ipa.o.
8213 2014-02-06 Tom Tromey <tromey@redhat.com>
8215 * Makefile.in (SFILES): Fix indentation.
8217 2014-02-05 Doug Evans <dje@google.com>
8219 * linux-low.c (linux_wait_for_event): Improve comment.
8220 (linux_wait_1): Keep current_inferior in sync with event_child.
8222 2014-01-22 Doug Evans <dje@google.com>
8224 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8226 2014-01-22 Doug Evans <dje@google.com>
8228 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8229 * configure: Regenerate.
8230 * config.in: Regenerate.
8231 * Makefile.in (SFILES): Add debug.c.
8233 * debug.c: New file.
8234 * debug.h: New file.
8235 * linux-aarch64-low.c (*): Update all debugging printfs to use
8236 debug_printf instead of fprintf.
8237 * linux-arm-low.c (*): Ditto.
8238 * linux-cris-low.c (*): Ditto.
8239 * linux-crisv32-low.c (*): Ditto.
8240 * linux-m32r-low.c (*): Ditto.
8241 * linux-sparc-low.c (*): Ditto.
8242 * linux-x86.c (*): Ditto.
8243 * linux-low.c (*): Ditto.
8244 (linux_wait_1): Add calls to debug_enter, debug_exit.
8245 (linux_wait): Remove redundant debugging printf.
8246 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8247 (linux_resume, unstop_all_lwps): Ditto.
8248 * mem-break.c (*): Update all debugging printfs to use
8249 debug_printf instead of fprintf.
8250 * remote-utils.c (*): Ditto.
8251 * thread-db.c (*): Ditto.
8252 * server.c #include <ctype.h>, "gdb_vecs.h".
8253 (debug_threads): Moved to debug.c.
8254 (*): Update all debugging printfs to use debug_printf instead of
8256 (start_inferior): Replace call to fflush with call to debug_flush.
8257 (monitor_show_help): Mention set debug-format.
8258 (parse_debug_format_options): New function.
8259 (handle_monitor_command): Handle "monitor set debug-format".
8260 (gdbserver_usage): Mention --debug-format.
8261 (main): Parse --debug-format.
8262 * server.h (debug_threads): Declaration moved to debug.h.
8264 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8265 trace_debug_1 that uses debug_printf.
8266 (tracepoint_look_up_symbols): Update all debugging printfs to use
8267 debug_printf instead of fprintf.
8269 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8271 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8274 2014-01-17 Pedro Alves <palves@redhat.com>
8277 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8278 defined after including gdb_proc_service.h.
8280 2014-01-16 Doug Evans <dje@google.com>
8282 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8283 (match_dll): Use it.
8285 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8287 * target.h (target_ops) <read_btrace>: Change parameters and
8288 return type to allow error reporting.
8289 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8290 trace reading errors on.
8291 * linux-low.c (linux_low_read_btrace): Pass trace reading
8293 (linux_low_disable_btrace): New.
8295 2014-01-15 Doug Evans <dje@google.com>
8297 * inferiors.c (thread_id_to_gdb_id): Delete.
8298 * inferiors.h (thread_id_to_gdb_id): Delete.
8300 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8302 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8303 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8306 2014-01-08 Pedro Alves <palves@redhat.com>
8308 * server.c (handle_status): Don't discard previous queued stop
8309 replies or thread's pending status here.
8310 (main) <disconnection>: Do it here instead.
8312 2014-01-08 Pedro Alves <palves@redhat.com>
8314 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8315 * server.c (visit_actioned_threads, handle_pending_status): New
8317 (handle_v_cont): Factor out parts to ...
8318 (resume): ... this new function. If in all-stop, and a thread
8319 being resumed has a pending status, report it without actually
8321 (myresume): Adjust to use the new 'resume' function.
8322 (clear_pending_status_callback, set_pending_status_callback)
8323 (find_status_pending_thread_callback): New functions.
8324 (handle_status): Handle the case of multiple threads having
8325 interesting statuses to report. Report threads' real last signal
8326 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8327 with an interesting thread to report the status for, instead of
8328 always reporting the status of the first thread.
8330 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8332 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8333 * gdbreplay.c (gdbreplay_version): Likewise.
8335 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8337 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8338 iov.iov_len with the real length in use.
8340 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8342 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8343 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8344 for all targets that use win32-low.c.
8345 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8346 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8348 2013-12-13 Pedro Alves <palves@redhat.com>
8350 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8351 if equal to TARGET_WAITKIND_LOADED.
8352 * win32-low.c (cached_status): New static global.
8353 (win32_wait): Add declaration.
8354 (do_initial_child_stuff): Flush all initial pending debug events
8355 up to the initial breakpoint.
8356 (win32_wait): If CACHED_STATUS was set, return that instead
8357 of doing a real wait. Remove the code resuming the execution
8358 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8359 during the initial phase. Also remove the code changing
8360 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8361 TARGET_WAITKIND_STOPPED.
8363 2013-12-11 Yao Qi <yao@codesourcery.com>
8365 * notif.c (handle_notif_ack): Return 0 if no notification
8368 2013-11-20 Doug Evans <dje@google.com>
8370 * linux-low.c (linux_set_resume_request): Fix comment.
8372 2013-11-20 Doug Evans <dje@google.com>
8374 * linux-low.c (resume_status_pending_p): Tweak comment.
8376 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8378 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8379 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8380 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8381 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8382 (srv_amd64_regobj): Add amd64-mpx.o.
8383 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8384 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8385 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8386 * i387-fp.c (num_pl_bnd_register) Added constant.
8387 (num_pl_bnd_cfg_registers) Added constant.
8388 (struct i387_xsave) Added reserved area and MPX fields.
8389 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8390 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8392 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8393 (init_registers_amd64_mpx_linux): Declare new function.
8394 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8395 (x86_64_regmap): Add MPX registers.
8396 (x86_linux_read_description): Add MPX case.
8397 (initialize_low_arch): Initialize MPX targets.
8399 2013-11-18 Tom Tromey <tromey@redhat.com>
8401 * configure: Rebuild.
8402 * configure.ac: Don't check for stdlib.h.
8403 * gdbreplay.c: Unconditionally include stdlib.h.
8405 2013-11-18 Tom Tromey <tromey@redhat.com>
8407 * config.in: Rebuild.
8408 * configure: Rebuild.
8409 * configure.ac: Don't use AC_HEADER_DIRENT.
8411 2013-11-18 Tom Tromey <tromey@redhat.com>
8413 * server.h: Don't check HAVE_STRING_H.
8414 * gdbreplay.c: Don't check HAVE_STRING_H.
8415 * configure: Rebuild.
8417 2013-11-18 Tom Tromey <tromey@redhat.com>
8419 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8422 2013-11-08 Tom Tromey <tromey@redhat.com>
8424 * configure, config.in: Rebuild.
8425 * configure.ac: Remove unused configury.
8427 2013-11-08 Tom Tromey <tromey@redhat.com>
8429 * acinclude.m4: Include common.m4, codeset.m4.
8430 * configure, config.in: Rebuild.
8431 * configure.ac: Use GDB_AC_COMMON.
8433 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8435 * linux-s390-low.c (HWCAP_S390_TE): New define.
8436 (s390_arch_setup): Consider the TE field in the HWCAP for
8437 determining 'have_regset_tdb'.
8439 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8442 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8445 2013-10-02 Pedro Alves <palves@redhat.com>
8447 * server.c (process_serial_event): Don't output "GDBserver
8448 exiting" if GDB is connected through stdio.
8449 * target.c (mywait): Likewise, be silent if GDB is connected
8452 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8454 * lynx-low.c (lynx_add_threads_after_attach): New function.
8455 (lynx_attach): Remove call to add_thread. Add call to
8456 lynx_add_threads_after_attach instead.
8458 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8460 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8461 * config.in, configure: Regenerated.
8463 2013-09-18 Yao Qi <yao@codesourcery.com>
8466 * server.c (start_inferior): Clear 'resume_info'.
8468 2013-09-16 Jiong Wang <jiwang@tilera.com>
8470 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8473 2013-09-16 Jiong Wang <jiwang@tilera.com>
8475 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8476 linux-tile-low.o to srv_tgtobj.
8478 2013-09-16 Will Newton <will.newton@linaro.org>
8480 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8483 2013-09-06 Pedro Alves <palves@redhat.com>
8485 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8486 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8487 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8488 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8489 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8490 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8492 2013-09-06 Pedro Alves <palves@redhat.com>
8494 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8495 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8497 2013-09-06 Pedro Alves <palves@redhat.com>
8499 * linux-amd64-ipa.c: Include tracepoint.h.
8500 * linux-i386-ipa.c: Include tracepoint.h.
8502 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8504 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8505 (ps_get_thread_area): New function.
8507 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8509 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8510 (initialize_low_arch): Call init_registers_crisv32 rather than
8511 init_register_crisv32.
8513 2013-09-05 Pedro Alves <palves@redhat.com>
8515 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8517 * hostio.h: ... this new file.
8518 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8519 win32-low.c: Include hostio.h.
8521 2013-09-05 Pedro Alves <palves@redhat.com>
8523 * server.h (gdb_client_data, handler_func, callback_handler_func)
8524 (delete_file_handler, add_file_handler, append_callback_event)
8525 (delete_callback_event, start_event_loop, initialize_event_loop):
8526 Move to event-loop.h and include it.
8527 * event-loop.h: New file.
8529 2013-09-05 Pedro Alves <palves@redhat.com>
8531 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8532 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8533 (loaded_dll, unloaded_dll): Move to ...
8534 * dll.h: ... this new file.
8535 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8537 2013-09-05 Pedro Alves <palves@redhat.com>
8539 * server.h (current_process, get_thread_process, all_processes)
8540 (add_inferior_to_list, for_each_inferior, current_inferior)
8541 (remove_inferior, add_process, remove_process, find_process_pid)
8542 (have_started_inferiors_p, have_attached_inferiors_p)
8543 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8544 (clear_inferiors, find_inferior, find_inferior_id)
8545 (inferior_target_data, set_inferior_target_data)
8546 (inferior_regcache_data, set_inferior_regcache_data): Move to
8547 inferiors.h, and include it.
8548 * inferiors.h: New file.
8550 2013-09-05 Pedro Alves <palves@redhat.com>
8552 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8556 2013-09-05 Pedro Alves <palves@redhat.com>
8558 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8560 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8561 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8562 (handle_tracepoint_general_set, handle_tracepoint_query)
8563 (tracepoint_finished_step, tracepoint_was_hit)
8564 (release_while_stepping_state_list, current_traceframe)
8565 (in_readonly_region, traceframe_read_mem)
8566 (fetch_traceframe_registers, traceframe_read_sdata)
8567 (traceframe_read_info, struct fast_tpoint_collect_status)
8568 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8569 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8570 (supply_fast_tracepoint_registers)
8571 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8572 (ipa_tdesc, claim_trampoline_space)
8573 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8574 (agent_mem_read, agent_get_trace_state_variable_value)
8575 (agent_set_trace_state_variable_value, agent_tsv_read)
8576 (agent_mem_read_string, get_raw_reg_func_addr)
8577 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8578 * tracepoint.h: ... this new file.
8580 2013-09-05 Pedro Alves <palves@redhat.com>
8582 * server.h (perror_with_name, error, fatal, warning, paddress)
8583 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8585 * utils.h: New file.
8587 2013-09-05 Pedro Alves <palves@redhat.com>
8589 * server.h (remote_debug, noack_mode, transport_is_reliable)
8590 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8591 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8592 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8593 (write_enn, initialize_async_io, enable_async_io)
8594 (disable_async_io, check_remote_input_interrupt_request)
8595 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8596 (dead_thread_notify, prepare_resume_reply)
8597 (decode_address_to_semicolon, decode_address, decode_m_packet)
8598 (decode_M_packet, decode_X_packet, decode_xfer_write)
8599 (decode_search_memory_packet, unhexify, hexify)
8600 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8601 (look_up_one_symbol, relocate_instruction)
8602 (monitor_output): Move to remote-utils.h, and include it.
8603 * remote-utils.h: New file.
8605 2013-09-05 Pedro Alves <palves@redhat.com>
8607 * server.h (_): Delete.
8609 2013-09-02 Pedro Alves <palves@redhat.com>
8611 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8612 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8614 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8616 2013-09-02 Pierre Muller <muller@sourceware.org>
8618 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8619 or WriteProcessMemory complete successfully and handle
8620 ERROR_PARTIAL_COPY error.
8622 2013-09-02 Pedro Alves <palves@redhat.com>
8624 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8625 error instead of EIO.
8627 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8630 * linux-low.c: Include filestuff.h.
8631 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8632 * lynx-low.c: Include filestuff.h.
8633 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8634 * server.c: Include filestuff.h.
8635 (main): Call notice_open_fds.
8636 * spu-low.c: Include filestuff.h.
8637 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8639 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8641 * Makefile.in: Explain why ../target and ../nat are not
8642 listed as include file search paths.
8643 (linux-waitpid.o): New object file rule.
8644 * configure.srv (srv_native_linux_obj): New variable.
8645 Replace all occurrences of linux native object files with
8646 $srv_native_linux_obj.
8647 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8648 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8649 (linux_enable_event_reporting): Remove declaration.
8650 (my_waitpid): Moved to common/linux-waitpid.c.
8651 (linux_wait_for_event): Pass ptid when calling
8652 linux_enable_event_reporting.
8653 (linux_supports_tracefork_flag): Remove.
8654 (linux_enable_event_reporting): Likewise.
8655 (linux_tracefork_grandchild): Remove.
8656 (STACK_SIZE): Moved to common/linux-ptrace.c.
8657 (linux_tracefork_child): Remove.
8658 (linux_test_for_tracefork): Remove.
8659 (linux_look_up_symbols): Call linux_supports_traceclone.
8660 (initialize_low): Remove call to linux_test_for_tracefork.
8661 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8662 common/linux-ptrace.h.
8663 (PTRACE_TYPE_ARG4): Likewise.
8664 Include linux-ptrace.h.
8666 2013-08-21 Pedro Alves <palves@redhat.com>
8668 * config.in: Renegerate.
8670 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8672 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8673 (SFILES): Remove $(srcdir)/common/target-common.c and
8674 add $(srcdir)/target/waitstatus.c.
8675 (OBS): Remove target-common.o and add waitstatus.o.
8676 (server_h): Remove $(srcdir)/../common/target-common.h and
8677 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8678 and $(srcdir)/../target/waitstatus.h.
8679 (target-common.o): Remove.
8680 (waitstatus.o): New target object file.
8681 * target.h: Do not include target-common.h and
8682 include target/resume.h, target/wait.h and
8683 target/waitstatus.h.
8685 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8687 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8688 to PTRACE_TYPE_ARG3.
8689 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8690 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8692 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8693 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8695 2013-07-27 Jie Zhang <jie@codesourcery.com>
8696 Daniel Jacobowitz <dan@codesourcery.com>
8697 Yao Qi <yao@codesourcery.com>
8699 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8700 (mips-linux-watch.o): New rule.
8701 (mips_linux_watch_h): New variable.
8702 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8704 * linux-mips-low.c: Include mips-linux-watch.h.
8705 (struct arch_process_info, struct arch_lwp_info): New.
8706 (update_watch_registers_callback): New function.
8707 (mips_linux_new_process, mips_linux_new_thread) New functions.
8708 (mips_linux_prepare_to_resume, mips_insert_point): New
8710 (mips_remove_point, mips_stopped_by_watchpoint): New
8712 (rsp_bp_type_to_target_hw_bp_type): New function.
8713 (mips_stopped_data_address): New function.
8714 (the_low_target): Add watchpoint support functions.
8716 2013-07-27 Yao Qi <yao@codesourcery.com>
8718 * i386-low.c: Include break-common.h.
8719 (enum target_hw_bp_type): Remove.
8721 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8723 * Makefile.in (SFILES): /common/target-common.c.
8724 (OBS): Add target-common.o.
8725 (server_h): Add $(srcdir)/../common/target-common.h.
8726 (target-common.o): New target.
8727 * server.c (queue_stop_reply_callback): Free
8728 status string after use.
8729 * target.c (target_waitstatus_to_string): Remove.
8730 * target.h: Include target-common.h.
8731 (resume_kind): Likewise.
8732 (target_waitkind): Likewise.
8733 (target_waitstatus): Likewise.
8734 (TARGET_WNOHANG): Likewise.
8736 2013-07-04 Yao Qi <yao@codesourcery.com>
8738 * Makefile.in (host_alias): Use @host_noncanonical@.
8739 (target_alias): Use @target_noncanonical@.
8740 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8741 ACX_NONCANONICAL_HOST.
8742 * configure: Regenerated.
8745 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8747 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8748 * configure: Rebuild.
8749 * Makefile.in (version_host, version_target): Get from configure.
8750 (version.c): Use $(version_host) and $(version_target).
8752 2013-07-03 Pedro Alves <palves@redhat.com>
8754 * Makefile.in (config.status): Depend on development.sh.
8755 * acinclude.m4: Include libmcheck.m4.
8756 * configure: Regenerate.
8758 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8760 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8761 attribute inside the parentheses.
8762 (winapi_DebugSetProcessKillOnExit): Ditto.
8763 (winapi_DebugBreakProcess): Ditto.
8764 (winapi_GenerateConsoleCtrlEvent): Ditto.
8766 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8768 * notif.h (notif_event): Add a dummy member to avoid compiler
8771 2013-07-01 Pedro Alves <palves@redhat.com>
8773 * hostio.c (HOSTIO_PATH_MAX): Define.
8774 (require_filename, handle_open, handle_unlink, handle_readlink):
8777 2013-07-01 Pedro Alves <palves@redhat.com>
8779 * server.h: Include "pathmax.h".
8780 * linux-low.c: Don't include sys/param.h.
8781 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8783 * win32-low.c: Don't include sys/param.h.
8784 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8786 2013-07-01 Pedro Alves <palves@redhat.com>
8788 * event-loop.c: Don't check HAVE_UNISTD_H before including
8790 * gdbreplay.c: Likewise.
8791 * remote-utils.c: Likewise.
8792 * server.c: Likewise.
8793 * configure.ac: Don't check for unistd.h.
8794 * configure: Regenerate.
8796 2013-06-28 Tom Tromey <tromey@redhat.com>
8798 * Makefile.in (version.c): Use version.in, not
8801 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8803 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8804 * configure: Rebuild.
8805 * Makefile.in (version_host, version_target): Get from configure.
8806 (version.c): Use $(version_host) and $(version_target).
8808 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8810 Fix trace-status to output user name without trailing colon.
8811 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8813 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8815 Fix trace-status to output proper start-time and stop-time.
8816 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8817 output start time and stop time in hex as gdb expects.
8819 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8821 * tracepoint.c (build_traceframe_info_xml): Output trace state
8822 variables present in the trace buffer.
8824 2013-06-24 Tom Tromey <tromey@redhat.com>
8826 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8828 (version.o): Remove.
8829 * gdbreplay.c: Include version.h.
8830 (version, host_name): Don't declare.
8831 * server.h: Include version.h.
8832 (version, host_name): Don't declare.
8834 2013-06-12 Pedro Alves <palves@redhat.com>
8836 * linux-x86-low.c (linux_is_elf64): Delete global.
8837 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8838 with local linux_pid_exe_is_elf_64_file use.
8840 2013-06-11 Pedro Alves <palves@redhat.com>
8842 * linux-low.c (regset_disabled, disable_regset): New functions.
8843 (regsets_fetch_inferior_registers)
8844 (regsets_store_inferior_registers): Use them.
8845 (initialize_regsets_info); Don't allocate the disabled_regsets
8847 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8850 2013-06-11 Pedro Alves <palves@redhat.com>
8852 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8855 2013-06-11 Pedro Alves <palves@redhat.com>
8857 * linux-x86-low.c (initialize_low_arch): Call
8858 init_registers_x32_avx_linux.
8860 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8862 Fix compatibility with Android Bionic.
8863 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8866 2013-06-07 Pedro Alves <palves@redhat.com>
8869 * Makefile.in (OBS): Add tdesc.o.
8870 (IPA_OBJS): Add tdesc-ipa.o.
8871 (tdesc-ipa.o): New rule.
8872 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8874 * linux-low.c (new_inferior): Delete.
8875 (disabled_regsets, num_regsets): Delete.
8876 (linux_add_process): Adjust to set the new per-process
8878 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8879 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8880 was a stop. When calling arch_setup, switch the current inferior
8881 to the thread that got an event.
8882 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8883 (regsets_fetch_inferior_registers)
8884 (regsets_store_inferior_registers): New regsets_info parameter.
8886 (linux_register_in_regsets): New regs_info parameter. Adjust to
8888 (register_addr, fetch_register, store_register): New usrregs_info
8889 parameter. Adjust to use it.
8890 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8891 parameter regs_info. Adjust to use it.
8892 (linux_fetch_registers): Get the current inferior's regs_info, and
8894 (linux_store_registers): Ditto.
8895 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8896 (initialize_low): Don't initialize the target_regsets here. Call
8897 initialize_low_arch.
8898 * linux-low.h (target_regsets): Delete declaration.
8899 (struct regsets_info): New.
8900 (struct usrregs_info): New.
8901 (struct regs_info): New.
8902 (struct process_info_private) <new_inferior>: New field.
8903 (struct linux_target_ops): Delete the num_regs, regmap, and
8904 regset_bitmap fields. New field regs_info.
8905 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8906 * i387-fp.c (num_xmm_registers): Delete.
8907 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8908 calls to new interface.
8909 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8910 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8911 Infer the number of xmm registers from the regcache's target
8913 * i387-fp.h (num_xmm_registers): Delete.
8914 * inferiors.c (add_thread): Don't install the thread's regcache
8916 * proc-service.c (gregset_info): Fetch the current inferior's
8917 regs_info. Adjust to use it.
8918 * regcache.c: Include tdesc.h.
8919 (register_bytes, reg_defs, num_registers)
8920 (gdbserver_expedite_regs): Delete.
8921 (get_thread_regcache): If the thread doesn't have a regcache yet,
8922 create one, instead of aborting gdbserver.
8923 (regcache_invalidate_one): Rename to ...
8924 (regcache_invalidate_thread): ... this.
8925 (regcache_invalidate_one): New.
8926 (regcache_invalidate): Only invalidate registers of the current
8928 (init_register_cache): Add target_desc parameter, and use it.
8929 (new_register_cache): Ditto. Assert the target description has a
8930 non zero registers_size.
8931 (regcache_cpy): Add assertions. Adjust.
8932 (realloc_register_cache, set_register_cache): Delete.
8933 (registers_to_string, registers_from_string): Adjust.
8934 (find_register_by_name, find_regno, find_register_by_number)
8935 (register_cache_size): Add target_desc parameter, and use it.
8936 (free_register_cache_thread, free_register_cache_thread_one)
8937 (regcache_release, register_cache_size): New.
8938 (register_size): Add target_desc parameter, and use it.
8939 (register_data, supply_register, supply_register_zeroed)
8940 (supply_regblock, supply_register_by_name, collect_register)
8941 (collect_register_as_string, collect_register_by_name): Adjust.
8942 * regcache.h (struct target_desc): Forward declare.
8943 (struct regcache) <tdesc>: New field.
8944 (init_register_cache, new_register_cache): Add target_desc
8946 (regcache_invalidate_thread): Declare.
8947 (regcache_invalidate_one): Delete declaration.
8948 (regcache_release): Declare.
8949 (find_register_by_number, register_cache_size, register_size)
8950 (find_regno): Add target_desc parameter.
8951 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8953 * remote-utils.c: Include tdesc.h.
8954 (outreg, prepare_resume_reply): Adjust.
8955 * server.c: Include tdesc.h.
8956 (gdbserver_xmltarget): Delete declaration.
8957 (get_features_xml, process_serial_event): Adjust.
8958 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8960 (struct process_info) <tdesc>: New field.
8961 (ipa_tdesc): Declare.
8962 * tdesc.c: New file.
8963 * tdesc.h: New file.
8964 * tracepoint.c: Include tdesc.h.
8965 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8966 (get_context_regcache): Adjust to pass ipa_tdesc down.
8967 (do_action_at_tracepoint): Adjust to get the register cache size
8968 from the context regcache's description.
8969 (traceframe_walk_blocks): Adjust to get the register cache size
8970 from the current trace frame's description.
8971 (traceframe_get_pc): Adjust to get current trace frame's
8972 description and pass it down.
8973 (gdb_collect): Adjust to get the register cache size from the
8975 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8976 (gdbserver_xmltarget): Delete.
8977 (initialize_low_tracepoint): Set the ipa's target description.
8978 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8979 (initialize_low_tracepoint): Set the ipa's target description.
8980 * linux-x86-low.c: Include tdesc.h.
8981 [__x86_64__] (is_64bit_tdesc): New.
8982 (ps_get_thread_area, x86_get_thread_area): Use it.
8983 (i386_cannot_store_register): Rename to ...
8984 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8985 (i386_cannot_fetch_register): Rename to ...
8986 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8987 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8989 (target_regsets): Rename to ...
8990 (x86_regsets): ... this.
8991 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8993 (x86_siginfo_fixup): Use is_64bit_tdesc.
8994 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8995 (tdesc_x32_avx_linux, tdesc_x32_linux)
8996 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8998 (x86_linux_update_xmltarget): Delete.
8999 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9000 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9001 (AMD64_LINUX_USER64_CS): New.
9002 (x86_linux_read_description): New, based on
9003 x86_linux_update_xmltarget.
9004 (same_process_callback): New.
9005 (x86_arch_setup_process_callback): New.
9006 (x86_linux_update_xmltarget): New.
9007 (x86_regsets_info): New.
9008 (amd64_linux_regs_info): New.
9009 (i386_linux_usrregs_info): New.
9010 (i386_linux_regs_info): New.
9011 (x86_linux_regs_info): New.
9012 (x86_arch_setup): Reimplement.
9013 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9014 (x86_emit_ops): Ditto.
9015 (the_low_target): Adjust. Install x86_linux_regs_info,
9016 x86_cannot_fetch_register, and x86_cannot_store_register.
9017 (initialize_low_arch): New.
9018 * linux-ia64-low.c (tdesc_ia64): Declare.
9019 (ia64_fetch_register): Adjust.
9020 (ia64_usrregs_info, regs_info): New globals.
9021 (ia64_regs_info): New function.
9022 (the_low_target): Adjust.
9023 (initialize_low_arch): New function.
9024 * linux-sparc-low.c (tdesc_sparc64): Declare.
9025 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9027 (sparc_arch_setup): New function.
9028 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9029 (the_low_target): Adjust.
9030 (initialize_low_arch): New function.
9031 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9032 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9033 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9034 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9035 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9036 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9037 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9038 (tdesc_powerpc_isa205_vsx64l): Declare.
9039 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9040 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9041 (ppc_set_pc, ppc_get_hwcap): Adjust.
9042 (ppc_usrregs_info): Forward declare.
9043 (!__powerpc64__) ppc_regmap_adjusted: New global.
9044 (ppc_arch_setup): Adjust to the current process'es target
9046 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9047 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9048 (ppc_store_evrregset): Adjust.
9049 (target_regsets): Rename to ...
9050 (ppc_regsets): ... this, and make static.
9051 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9052 (ppc_regs_info): New function.
9053 (the_low_target): Adjust.
9054 (initialize_low_arch): New function.
9055 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9056 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9057 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9058 (tdesc_s390x_linux64v2): Declare.
9059 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9060 (s390_fill_gregset, s390_store_last_break): Adjust.
9061 (target_regsets): Rename to ...
9062 (s390_regsets): ... this, and make static.
9063 (s390_get_pc, s390_set_pc): Adjust.
9064 (s390_get_hwcap): New target_desc parameter, and use it.
9065 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9066 (s390_arch_setup): Adjust to set the current process'es target
9067 description. Don't adjust the regmap.
9068 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9069 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9070 (regs_info_3264): New globals.
9071 (s390_regs_info): New function.
9072 (the_low_target): Adjust.
9073 (initialize_low_arch): New function.
9074 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9075 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9076 [__mips64] (init_registers_mips_linux)
9077 (init_registers_mips_dsp_linux): Delete defines.
9078 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9079 (have_dsp): New global.
9080 (mips_read_description): New, based on mips_arch_setup.
9081 (mips_arch_setup): Reimplement.
9082 (get_usrregs_info): New function.
9083 (mips_cannot_fetch_register, mips_cannot_store_register)
9084 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9085 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9086 (target_regsets): Rename to ...
9087 (mips_regsets): ... this, and make static.
9088 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9089 (dsp_regs_info, regs_info): New globals.
9090 (mips_regs_info): New function.
9091 (the_low_target): Adjust.
9092 (initialize_low_arch): New function.
9093 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9094 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9096 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9097 (arm_read_description): New, with bits factored from
9099 (arm_arch_setup): Reimplement.
9100 (target_regsets): Rename to ...
9101 (arm_regsets): ... this, and make static.
9102 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9103 (arm_regs_info): New function.
9104 (the_low_target): Adjust.
9105 (initialize_low_arch): New function.
9106 * linux-m68k-low.c (tdesc_m68k): Declare.
9107 (target_regsets): Rename to ...
9108 (m68k_regsets): ... this, and make static.
9109 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9110 (m68k_regs_info): New function.
9111 (m68k_arch_setup): New function.
9112 (the_low_target): Adjust.
9113 (initialize_low_arch): New function.
9114 * linux-sh-low.c (tdesc_sharch): Declare.
9115 (target_regsets): Rename to ...
9116 (sh_regsets): ... this, and make static.
9117 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9118 (sh_regs_info, sh_arch_setup): New functions.
9119 (the_low_target): Adjust.
9120 (initialize_low_arch): New function.
9121 * linux-bfin-low.c (tdesc_bfin): Declare.
9122 (bfin_arch_setup): New function.
9123 (bfin_usrregs_info, regs_info): New globals.
9124 (bfin_regs_info): New function.
9125 (the_low_target): Adjust.
9126 (initialize_low_arch): New function.
9127 * linux-cris-low.c (tdesc_cris): Declare.
9128 (cris_arch_setup): New function.
9129 (cris_usrregs_info, regs_info): New globals.
9130 (cris_regs_info): New function.
9131 (the_low_target): Adjust.
9132 (initialize_low_arch): New function.
9133 * linux-cris-low.c (tdesc_crisv32): Declare.
9134 (cris_arch_setup): New function.
9135 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9136 (cris_regs_info): New function.
9137 (the_low_target): Adjust.
9138 (initialize_low_arch): New function.
9139 * linux-m32r-low.c (tdesc_m32r): Declare.
9140 (m32r_arch_setup): New function.
9141 (m32r_usrregs_info, regs_info): New globals.
9142 (m32r_regs_info): Adjust.
9143 (initialize_low_arch): New function.
9144 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9145 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9146 (tic6x_usrregs_info): Forward declare.
9147 (tic6x_read_description): New function, based on ...
9148 (tic6x_arch_setup): ... this. Reimplement.
9149 (target_regsets): Rename to ...
9150 (tic6x_regsets): ... this, and make static.
9151 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9152 (tic6x_regs_info): New function.
9153 (the_low_target): Adjust.
9154 (initialize_low_arch): New function.
9155 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9156 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9157 (target_regsets): Rename to ...
9158 (xtensa_regsets): ... this, and make static.
9159 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9161 (xtensa_arch_setup, xtensa_regs_info): New functions.
9162 (the_low_target): Adjust.
9163 (initialize_low_arch): New function.
9164 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9165 (nios2_arch_setup): Set the current process'es tdesc.
9166 (target_regsets): Rename to ...
9167 (nios2_regsets): ... this.
9168 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9169 (nios2_regs_info): New function.
9170 (the_low_target): Adjust.
9171 (initialize_low_arch): New function.
9172 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9173 (aarch64_arch_setup): Set the current process'es tdesc.
9174 (target_regsets): Rename to ...
9175 (aarch64_regsets): ... this.
9176 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9177 (aarch64_regs_info): New function.
9178 (the_low_target): Adjust.
9179 (initialize_low_arch): New function.
9180 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9182 (target_regsets): Rename to ...
9183 (tile_regsets): ... this.
9184 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9185 (tile_regs_info): New function.
9186 (tile_arch_setup): Set the current process'es tdesc.
9187 (the_low_target): Adjust.
9188 (initialize_low_arch): New function.
9189 * spu-low.c (tdesc_spu): Declare.
9190 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9191 * win32-arm-low.c (tdesc_arm): Declare.
9192 (arm_arch_setup): New function.
9193 (the_low_target): Install arm_arch_setup instead of
9195 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9196 (init_windows_x86): Rename to ...
9197 (i386_arch_setup): ... this. Set `win32_tdesc'.
9198 (the_low_target): Adjust.
9199 * win32-low.c (win32_tdesc): New global.
9200 (child_add_thread): Don't create the thread cache here.
9201 (do_initial_child_stuff): Set the new process'es tdesc.
9202 * win32-low.h (struct target_desc): Forward declare.
9203 (win32_tdesc): Declare.
9204 * lynx-i386-low.c (tdesc_i386): Declare global.
9205 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9206 * lynx-low.c (lynx_tdesc): New global.
9207 (lynx_add_process): Set the new process'es tdesc.
9208 * lynx-low.h (struct target_desc): Forward declare.
9209 (lynx_tdesc): Declare global.
9210 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9211 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9212 * nto-low.c (nto_tdesc): New global.
9213 (do_attach): Set the new process'es tdesc.
9214 * nto-low.h (struct target_desc): Forward declare.
9215 (nto_tdesc): Declare.
9216 * nto-x86-low.c (tdesc_i386): Declare.
9217 (nto_x86_arch_setup): Set `nto_tdesc'.
9219 2013-06-04 Gary Benson <gbenson@redhat.com>
9221 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9222 to qSupported response when appropriate.
9223 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9224 with nonzero-length annex.
9225 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9226 arguments supplied in annex.
9228 2013-05-31 Doug Evans <dje@google.com>
9231 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9232 64 bits in 64-cross-32 environment.
9234 2013-05-28 Pedro Alves <palves@redhat.com>
9236 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9237 (aarch64-without-fpu.c): Delete rule.
9238 * configure.srv (aarch64*-*-linux*): Remove references to
9239 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9240 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9243 2013-05-24 Pedro Alves <palves@redhat.com>
9245 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9246 instead of strchr/decode_address. Error if the range isn't split
9247 with a ','. Don't assume there's be a ':' in the action.
9249 2013-05-23 Yao Qi <yao@codesourcery.com>
9250 Pedro Alves <palves@redhat.com>
9252 * linux-low.c (lwp_in_step_range): New function.
9253 (linux_wait_1): If the thread was range stepping and stopped
9254 outside the stepping range, report the stop to GDB. Otherwise,
9255 continue stepping. Add range stepping debug output.
9256 (linux_set_resume_request): Copy the step range from the resume
9258 (linux_supports_range_stepping): New.
9259 (linux_target_ops) <supports_range_stepping>: Set to
9260 linux_supports_range_stepping.
9261 * linux-low.h (struct linux_target_ops)
9262 <supports_range_stepping>: New field.
9263 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9264 * linux-x86-low.c (x86_supports_range_stepping): New.
9265 (the_low_target) <supports_range_stepping>: Set to
9266 x86_supports_range_stepping.
9267 * server.c (handle_v_cont): Handle 'r' action.
9268 (handle_v_requests): Append ";r" if the target supports range
9270 * target.h (struct thread_resume) <step_range_start,
9271 step_range_end>: New fields.
9272 (struct target_ops) <supports_range_stepping>:
9274 (target_supports_range_stepping): New macro.
9276 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9278 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9279 confusion in comment.
9281 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9283 * lynx-low.c (struct process_info_private): New type.
9284 (lynx_add_process): New function.
9285 (lynx_create_inferior, lynx_attach): Replace calls to
9286 add_process by calls to lynx_add_process.
9287 (lynx_resume): If PTID is null, then try using
9288 current_process()->private->last_wait_event_ptid.
9290 (lynx_clear_inferiors): Delete. The contents of that function
9291 has been inlined in lynx_mourn;
9292 (lynx_wait_1): Save the ptid in the process's private data.
9293 (lynx_mourn): Free the process' private data. Replace call
9294 to lynx_clear_inferiors by call to clear_inferiors.
9296 2013-05-17 Yao Qi <yao@codesourcery.com>
9298 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9301 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9303 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9304 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9305 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9306 PT_TEXT_END_ADDR guards. Update comments.
9307 (linux_target_op) <read_offsets>: Conditionally define to
9308 linux_read_offsets if the target is UCLIBC and if it defines
9309 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9311 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9312 Andrew Jenner <andrew@codesourcery.com>
9314 * Makefile.in (SFILES): Add linux-nios2-low.c.
9315 (clean): Add action to delete nios2-linux.c.
9316 (nios2-linux.c): New rule.
9317 * configure.srv: Add nios2*-*-linux*.
9318 * linux-nios2-low.c: New.
9320 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9322 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9324 2013-04-25 Hui Zhu <hui@codesourcery.com>
9327 * ax.c (ax_printf): Add fflush.
9329 2013-04-22 Tom Tromey <tromey@redhat.com>
9331 * Makefile.in (SFILES): Add filestuff.c.
9332 (OBS): Add filestuff.o.
9333 (filestuff.o): New target.
9334 * config.in, configure: Rebuild.
9335 * configure.ac: Check for fdwalk, pipe2.
9337 2013-04-17 Pedro Alves <palves@redhat.com>
9339 * configure.ac (USE_THREAD_DB): Delete variable.
9340 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9341 Don't AC_SUBST USE_THREAD_DB.
9342 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9343 * config.in, configure: Regenerate.
9345 2013-04-16 Pedro Alves <palves@redhat.com>
9347 * linux-low.h (struct lwp_info) <thread_known>: Move under
9348 the USE_THREAD_DB #ifdef.
9350 2013-04-16 Pedro Alves <palves@redhat.com>
9352 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9353 (linux-low.o): Delete rule.
9354 * linux-low.h: Always include "gdb_thread_db.h" instead of
9355 conditionally including thread_db.h.
9356 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9359 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9361 * Makefile.in (install-only): Fix make install regression.
9363 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9365 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9366 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9368 * gdbserver.1: Remove.
9370 2013-03-22 Pedro Alves <palves@redhat.com>
9372 * linux-low.c (handle_extended_wait): Don't call
9373 linux_enable_event_reporting.
9375 2013-03-15 Tony Theodore <tonyt@logyst.com>
9378 * Makefile.in (SHELL): Use @SHELL@.
9380 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9382 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9385 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9387 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9388 Remove extraneous NULL element.
9390 2013-03-13 Yao Qi <yao@codesourcery.com>
9392 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9393 'V' block in trace frame.
9395 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9397 * target.h (struct target_ops): Add btrace ops.
9398 (target_supports_btrace): New macro.
9399 (target_enable_btrace): New macro.
9400 (target_disable_btrace): New macro.
9401 (target_read_btrace): New macro.
9402 * gdbthread.h (struct thread_info): Add btrace field.
9403 * server.c: Include btrace-common.h.
9404 (handle_btrace_general_set): New function.
9405 (handle_btrace_enable): New function.
9406 (handle_btrace_disable): New function.
9407 (handle_general_set): Call handle_btrace_general_set.
9408 (handle_qxfer_btrace): New function.
9409 (struct qxfer qxfer_packets[]): Add btrace entry.
9410 * inferiors.c (remove_thread): Disable btrace.
9411 * linux-low: Include linux-btrace.h.
9412 (linux_low_enable_btrace): New function.
9413 (linux_low_read_btrace): New function.
9414 (linux_target_ops): Add btrace ops.
9415 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9416 Add srv_linux_btrace=yes.
9417 (x86_64-*-linux*): Add linux-btrace.o.
9418 Add srv_linux_btrace=yes.
9419 * configure.ac: Define HAVE_LINUX_BTRACE.
9420 * config.in: Regenerated.
9421 * configure: Regenerated.
9423 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9425 * server.c (handle_qxfer): Preserve error message if -3 is
9427 (qxfer): Document the -3 return value.
9429 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9431 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9432 (linux_btrace_h): New variable.
9433 (linux-btrace.o): New rule.
9435 2013-03-08 Stan Shebs <stan@codesourcery.com>
9436 Hafiz Abid Qadeer <abidh@codesourcery.com>
9438 * tracepoint.c (trace_buffer_size): New global.
9439 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9440 (init_trace_buffer): Change to one-argument function. Allocate
9441 trace buffer memory.
9442 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9443 handle QTBuffer:size packet.
9444 (cmd_bigqtbuffer_size): New function.
9445 (initialize_tracepoint): Call init_trace_buffer with
9446 DEFAULT_TRACE_BUFFER_SIZE.
9447 * server.c (handle_query): Add QTBuffer:size in the
9450 2013-03-07 Yao Qi <yao@codesourcery.com>
9452 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9453 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9455 (cmd_qtsp): Adjust condition. Do post increment.
9456 Set cur_action and cur_step_action back to 0.
9458 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9461 * linux-low.c (linux_write_memory): Return early success if LEN is
9464 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9466 * configure.srv: Add x86_64-*-cygwin* as target.
9468 2013-02-28 Tom Tromey <tromey@redhat.com>
9470 * configure.ac: Invoke AC_SYS_LARGEFILE.
9471 * configure, config.in: Rebuild.
9473 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9475 * win32-low.c: Throughout, fix format strings and casts of
9476 printf-like functions to avoid type related warnings on all
9478 (get_child_debug_event): Print dwDebugEventCode as hex since
9479 that's how it's usually documented.
9481 2013-02-28 Yao Qi <yao@codesourcery.com>
9483 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9486 2013-02-27 Jiong Wang <jiwang@tilera.com>
9488 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9489 (reg-tilegx32.c): New rule.
9490 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9491 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9492 different register info initializer according to elf class.
9493 (init_registers_tilgx32): New function. The tilegx32 register info
9495 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9496 (tile_store_gregset): Likewise.
9498 2013-02-27 Yao Qi <yao@codesourcery.com>
9500 * server.c (process_point_options): Print debug message when
9501 debug_threads is true.
9503 2013-02-26 Yao Qi <yao@codesourcery.com>
9505 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9507 2013-02-19 Pedro Alves <palves@redhat.com>
9508 Kai Tietz <ktietz@redhat.com>
9512 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9513 instead of strtoul to extract address from packet.
9514 (process_serial_event) <'z'>: Likewise.
9516 2013-02-18 Yao Qi <yao@codesourcery.com>
9518 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9520 2013-02-14 Pedro Alves <palves@redhat.com>
9524 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9525 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9527 2013-02-14 Pedro Alves <palves@redhat.com>
9529 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9531 2013-02-14 Pedro Alves <palves@redhat.com>
9533 * tracepoint.c (save_string): Delete.
9534 (add_tracepoint_action): Use savestring instead of save_string.
9536 2013-02-12 Pedro Alves <palves@redhat.com>
9538 * linux-xtensa-low.c: Ditto.
9539 * xtensa-xtregs.c: Ditto.
9541 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9543 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9546 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9548 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9549 aarch64_num_wp_regs and aarch64_num_bp_regs to
9550 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9552 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9554 * linux-aarch64-low.c (ps_get_thread_area): Replace
9555 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9557 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9558 Marcus Shawcroft <marcus.shawcroft@arm.com>
9559 Nigel Stephens <nigel.stephens@arm.com>
9560 Yufeng Zhang <yufeng.zhang@arm.com>
9562 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9563 (aarch64.c, aarch64-without-fpu.c): New targets.
9564 * configure.srv (aarch64*-*-linux*): New.
9565 * linux-aarch64-low.c: New file.
9567 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9569 * linux-low.c (handle_extended_wait, linux_create_inferior)
9570 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9571 (dequeue_one_deferred_signal, linux_resume_one_thread)
9572 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9573 (linux_tracefork_grandchild, linux_test_for_tracefork)
9574 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9575 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9576 where the argument is 0.
9578 2013-01-25 Yao Qi <yao@codesourcery.com>
9580 * event-loop.c: Include "queue.h".
9581 (gdb_event_p): New typedef.
9582 (struct gdb_event) <next_event>: Remove.
9583 (event_queue): Change to QUEUE(gdb_event_p).
9584 (async_queue_event): Remove.
9585 (gdb_event_xfree): New.
9586 (initialize_event_loop): New.
9587 (process_event): Use API from QUEUE.
9588 (wait_for_event): Likewise.
9589 * server.c (main): Call initialize_event_loop.
9590 * server.h (initialize_event_loop): Declare.
9592 2013-01-18 Yao Qi <yao@codesourcery.com>
9594 * ax.h (struct eval_agent_expr_context): New.
9595 (gdb_eval_agent_expr): Update declaration.
9596 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9597 TFRAME. Add new argument CTX.
9598 * server.h (struct eval_agent_expr_context): Declare.
9599 (agent_mem_read, agent_tsv_read): Update declaration.
9600 (agent_mem_read_string): Likewise.
9601 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9602 (add_traceframe_block): Add new argument TPOINT.
9603 Increase TPOINT->traceframe_usage.
9604 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9605 eval_tracepoint_agent_expr.
9606 (condition_true_at_tracepoint): Likewise.
9607 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9608 (agent_mem_read_string, agent_tsv_read): Likewise.
9610 2013-01-16 Yao Qi <yao@codesourcery.com>
9612 * linux-low.c (linux_resume_one_lwp): Don't check
9613 'lwp->bp_reinsert != 0'.
9615 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9616 Pedro Alves <palves@redhat.com>
9618 * lynx-low.c (ptrace_request_to_str): Define a temporary
9619 macro and use it to simplify this function's implementation.
9621 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9623 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9626 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9628 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9630 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9632 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9634 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9636 * lynx-low.c (lynx_resume): Use the resume_info parameter
9637 to determine the ptid for the lynx_ptrace call, unless
9638 it is equal to minus_one_ptid, in which case we use the
9639 ptid of the current_inferior.
9640 (lynx_wait_1): After having received a thread create/exit
9641 event, resume the inferior's execution using the signaling
9642 thread's ptid, rather than the old ptid.
9644 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9646 * lynx-low.c (lynx_resume): Delete variable ret.
9648 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9650 * gdbreplay.c (gdbreplay_version): Update copyright year.
9651 * server.c (gdbserver_version): Likewise.
9653 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9655 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9658 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9660 * lynx-low.c (ptrace_request_to_str): Add handling for
9663 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9665 * lynx-low.c (lynx_attach): Delete variable new_process.
9667 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9669 * lynx-low.c (lynx_create_inferior): Delete variable
9672 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9674 * lynx-low.c (ptrace_request_to_str): Do not handle
9675 PTRACE_GETTHREADLIST if this macro does not exist.
9677 2012-12-15 Yao Qi <yao@codesourcery.com>
9679 * Makefile.in (OBS): Add notif.o.
9680 * notif.c, notif.h: New.
9681 * server.c: Include "notif.h".
9682 (struct vstop_notif) <next>: Remove.
9684 (queue_stop_reply): Update.
9685 (push_event, send_next_stop_reply): Remove.
9686 (discard_queued_stop_replies): Update.
9687 (notif_stop): New variable.
9688 (handle_v_stopped): Remove.
9689 (handle_v_requests): Don't call handle_v_stopped. Call
9690 handle_ack_notif instead.
9691 (queue_stop_reply_callback): Call notif_event_enque instead
9692 of queue_stop_reply.
9693 (handle_status): Don't call send_next_stop_reply, call
9694 notif_write_event instead.
9695 (kill_inferior_callback): Likewise.
9696 (detach_or_kill_inferior_callback): Likewise.
9697 (main): Call initialize_notif.
9698 (process_serial_event): Call QUEUE_is_empty.
9699 (handle_target_event): Call notif_push instead of push event.
9700 * server.h (push_event): Remove declaration.
9702 2012-12-10 Tom Tromey <tromey@redhat.com>
9704 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9705 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9708 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9709 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9710 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9711 (amd64-linux-ipa.o, ax.o): Rewrite.
9712 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9713 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9714 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9715 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9716 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9717 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9718 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9719 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9720 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9721 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9722 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9723 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9724 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9725 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9726 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9727 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9728 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9729 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9730 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9731 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9732 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9733 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9734 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9735 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9736 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9737 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9738 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9739 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9740 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9741 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9742 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9743 (reg-tilegx.o): Remove.
9744 (all_object_files): New macro.
9745 Include .deps files.
9746 * aclocal.m4, configure: Rebuild.
9747 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9748 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9749 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9751 2012-12-05 Tom Tromey <tromey@redhat.com>
9754 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9756 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9758 * configure.ac: Check for linux/perf_event.h.
9759 * config.in: Regenerated.
9760 * configure: Regenerated.
9762 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9764 * hostio.c (handle_readlink): Decrease buffer size
9765 parameter passed to readlink by one byte.
9767 2012-11-26 Yao Qi <yao@codesourcery.com>
9769 * configure.ac (build_warnings): Append '-Wempty-body'.
9770 * configure: Regenerated.
9771 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9774 2012-11-15 Pierre Muller <muller@sourceware.org>
9776 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9777 * config.in: Regenerate.
9778 * configure: Regenerate.
9779 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9780 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9781 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9782 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9784 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9785 instead of <sys/wait.h> header.
9786 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9788 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9790 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9791 (various make rules): Remove -DGDBSERVER
9793 2012-11-09 Yao Qi <yao@codesourcery.com>
9795 * spu-low.c (current_ptid): Move it to ..
9796 * gdbthread.h: ... here. New.
9797 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9798 * server.c (myresume, process_serial_event): Likewise.
9799 * thread-db.c (thread_db_find_new_threads): Likewise.
9800 * tracepoint.c (run_inferior_command): Likewise.
9802 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9804 * server.c (handle_search_memory_1): Include access length in
9807 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9809 * linux-crisv32-low.c: Fix compile errors.
9811 2012-09-04 Yao Qi <yao@codesourcery.com>
9813 * tracepoint.c (cmd_qtsv): Adjust debug message.
9814 Don't check CUR_TPOINT.
9816 2012-08-28 Yao Qi <yao@codesourcery.com>
9818 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9819 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9820 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9821 Remove declarations of xmalloc, xreallloc, xstrdup and
9823 * Makefile.in (libiberty_h): New.
9824 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9825 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9827 2012-08-23 Yao Qi <yao@codesourcery.com>
9829 * server.h: Remove declaration of 'xsnprintf'.
9831 2012-08-22 Keith Seitz <keiths@redhat.com>
9833 * server.h: Include build-gnulib-gbserver/config.h.
9834 * gdbreplay.c: Likewise.
9836 2012-08-08 Doug Evans <dje@google.com>
9838 * Makefile.in (SFILES): Add gdb_vecs.c.
9839 (OBS): Add gdb_vecs.o.
9840 (gdb_vecs_h, host_defs_h): New variables.
9841 (thread-db.o): Add $(gdb_vecs_h) dependency.
9842 (gdb_vecs.o): New rule.
9843 * thread-db.c: #include "gdb_vecs.h".
9844 (thread_db_load_search): Use a vector to iterate over path elements.
9845 Handle text appearing after "$pdir".
9847 * configure.ac: Add check for strstr.
9848 * config.in: Regenerate.
9849 * configure: Regenerate.
9851 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9853 * hostio.c (handle_pread): If pread fails, fall back to attempting
9855 (handle_pwrite): Likewise for pwrite.
9857 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9859 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9860 between unsupported TYPE and unimplementable ADDR/LEN combination.
9861 (arm_insert_point): Act on new return value.
9863 2012-07-31 Pedro Alves <palves@redhat.com>
9865 * server.c (process_point_options): Only skip tokens if we find
9866 one that is unrecognized. Don't treat 'X' specially while
9867 skipping unrecognized tokens.
9869 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9871 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9872 to 4-byte-align HW breakpoint addresses for Thumb.
9874 2012-07-27 Yao Qi <yao@codesourcery.com>
9878 * server.h: Declare gdb_agent_about_to_close.
9879 * target.c (kill_inferior): Include "agent.h".
9880 New. Send command 'kill'.
9881 * target.h (kill_inferior): Removed macro.
9882 * tracepoint.c (gdb_agent_about_to_close): New.
9883 (gdb_agent_helper_thread): Handle command 'close'.
9884 Wait endlessly until the inferior stops.
9885 Install gdb_agent_remove_socket to atexit hook.
9886 (agent_socket_name): New static variable.
9887 (gdb_agent_socket_init): Replace local variable 'name' with
9888 'agent_socket_name'.
9889 (gdb_agent_remove_socket): New.
9891 2012-07-27 Yao Qi <yao@codesourcery.com>
9893 * server.c (process_point_options): Stop at 'X' when parsing.
9895 2012-07-19 Michael Eager <eager@eagercon.com>
9897 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9899 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9900 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9901 hardware breakpoint.
9903 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9905 * gdbserver/linux-low.c (initialize_low): Call
9906 linux_ptrace_init_warnings.
9908 2012-07-02 Doug Evans <dje@google.com>
9910 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9913 2012-07-02 Stan Shebs <stan@codesourcery.com>
9915 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9916 (ax.o): Add it to build rule.
9918 (OBS): Add format.o.
9919 (IPA_OBS): Add format.o.
9920 * server.c (handle_query): Claim support for breakpoint commands.
9921 (process_point_options): Add command case.
9922 (process_serial_event): Leave running if there are printfs in
9924 * mem-break.h (any_persistent_commands): Declare.
9925 (add_breakpoint_commands): Declare.
9926 (gdb_no_commands_at_breakpoint): Declare.
9927 (run_breakpoint_commands): Declare.
9928 * mem-break.c (struct point_command_list): New struct.
9929 (struct breakpoint): New field command_list.
9930 (any_persistent_commands): New function.
9931 (add_commands_to_breakpoint): New function.
9932 (add_breakpoint_commands): New function.
9933 (gdb_no_commands_at_breakpoint): New function.
9934 (run_breakpoint_commands): New function.
9935 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9937 * ax.c: Include format.h.
9938 (ax_printf): New function.
9939 (gdb_eval_agent_expr): Add printf opcode.
9941 2012-06-13 Yao Qi <yao@codesourcery.com>
9943 * server.c (start_inferior): Remove duplicated writes to fields
9944 'last_resume_kind' and 'last_status' of 'current_inferior'.
9946 2012-06-12 Yao Qi <yao@codesourcery.com>
9947 Pedro Alves <palves@redhat.com>
9949 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9951 * server.c (handle_v_cont): Extend comment.
9953 2012-06-11 Yao Qi <yao@codesourcery.com>
9955 * linux-low.c (linux_attach): Add 'static'.
9957 2012-06-06 Yao Qi <yao@codesourcery.com>
9959 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9961 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9963 Fix gcc -flto compilation warning.
9964 * server.c (main): Make variable multi_mode and attach volatile.
9966 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9968 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9969 if the platform doesn't know about it.
9971 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9973 * Makefile.in (SFILES): Add linux-tile-low.c.
9974 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9975 * configure.srv: Handle tilegx-*-linux*.
9976 * linux-tile-low.c: New file.
9978 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9980 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9982 2012-05-24 Pedro Alves <palves@redhat.com>
9986 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9988 2012-05-24 Pedro Alves <palves@redhat.com>
9992 Replace target_signal with gdb_signal throughout.
9994 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9996 * linux-low.c (linux_store_registers): Avoid the copying sequence
9997 when no data has been retrieved by ptrace.
9999 2012-05-22 Will Deacon <will.deacon@arm.com>
10001 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10002 Include asm/ptrace.h.
10003 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10006 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10008 * linux-low.c (linux_store_registers): Don't re-retrieve data
10009 with ptrace that has already been obtained from /proc. Always
10010 copy any data retrieved with ptrace to the buffer supplied.
10012 2012-05-11 Yao Qi <yao@codesourcery.com>
10013 Pedro Alves <palves@redhat.com>
10015 * linux-low.c (enum stopping_threads_kind): New.
10016 (stopping_threads): Change type to `enum stopping_threads_kind'.
10017 (handle_extended_wait): If stopping and suspending threads, leave
10018 the new_lwp suspended too.
10019 (linux_wait_for_event): Adjust.
10020 (stop_all_lwps): Set `stopping_threads' to
10021 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10022 whether we're suspending threads or just stopping them. Assert no
10025 2012-04-29 Yao Qi <yao@codesourcery.com>
10027 * server.h: Move some code to ...
10028 * gdbthread.h: ... here. New.
10029 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10030 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10031 (nto-low.o, win32-low.o): Likewise.
10032 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10033 * regcache.c, remote-utils.c, server.c: Likewise.
10034 * target.c, tracepoint.c, win32-low.c: Likewise.
10036 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10038 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10039 (PTRACE_ARG4_TYPE): Likewise.
10040 (PTRACE_XFER_TYPE): Likewise.
10041 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10042 ptrace to PTRACE_ARG3_TYPE.
10043 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10044 (PTRACE_ARG4_TYPE): Likewise.
10045 (PTRACE_XFER_TYPE): Likewise.
10046 (linux_detach_one_lwp): Cast fourth argument of
10047 ptrace to long then PTRACE_ARG4_TYPE.
10048 (regsets_fetch_inferior_registers): Cast third argument of
10049 ptrace to long then PTRACE_ARG3_TYPE.
10050 (regsets_store_inferior_registers): Likewise.
10052 2012-04-20 Pedro Alves <palves@redhat.com>
10054 * configure: Regenerate.
10056 2012-04-19 Pedro Alves <palves@redhat.com>
10058 * Makefile.in (GNULIB_BUILDDIR): New.
10059 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10060 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10061 (all, install-only, uninstall, clean-info, all-lib, clean): No
10062 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10063 (maintainer-clean realclean distclean): Use subdir_do.
10065 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10066 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10067 * acinclude.m4: Include acx_configure_dir.m4.
10068 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10069 calls. Call AC_PROG_RANLIB. Configure gnulib using
10072 (GNULIB_STDINT_H): Adjust.
10073 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10074 * gdbreplay.c: Include build-gnulib/config.h.
10075 * server.h: Likewise.
10076 * aclocal.m4: Regenerate.
10077 * config.in: Regenerate.
10078 * configure: Regenerate.
10080 2012-04-19 Pedro Alves <palves@redhat.com>
10082 * Makefile.in (LIBGNU, INCGNU): Adjust.
10083 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10084 (all, install-only, uninstall, clean-info, all-lib, clean)
10085 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10086 * configure.ac: Adjust AC_OUTPUT output.
10087 * aclocal.m4: Regenerate.
10088 * configure: Regenerate.
10090 2012-04-19 Pedro Alves <palves@redhat.com>
10092 * Makefile.in (generated_files): New.
10093 (server_h): Remove the explicit dependency on config.h, and depend
10094 on $generated_files.
10096 2012-04-19 Pedro Alves <palves@redhat.com>
10098 * Makefile.in (INCGNU): Add -Ignulib.
10100 2012-04-19 Pedro Alves <palves@redhat.com>
10102 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10103 (INCGNU): ... this, and spell out -I here.
10104 (GNULIB_LIB): Rename to ...
10105 (LIBGNU): ... this.
10106 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10108 2012-04-19 Pedro Alves <palves@redhat.com>
10110 * config.in: Regenerate.
10112 2012-04-19 Pedro Alves <palves@redhat.com>
10114 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10115 * server.h (memmem): Remove declaration.
10116 * config.in: Regenerate.
10117 * configure: Regenerate.
10119 2012-04-19 Yao Qi <yao@codesourcery.com>
10121 * Makefile.in (SFILES): Add common/vec.c.
10125 2012-04-19 Yao Qi <yao@codesourcery.com>
10127 * remote-utils.c (prepare_resume_reply): Replace with macro
10128 target_core_of_thread.
10129 * server.c (handle_qxfer_threads_proper): Likewise.
10130 * target.h (traget_core_of_thread): New macro.
10132 2012-04-18 Pedro Alves <palves@redhat.com>
10134 * aclocal.m4: Regenerate.
10135 * configure: Regenerate.
10137 2012-04-16 Yao Qi <yao@codesourcery.com>
10139 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10140 duplicated on address.
10142 2012-04-16 Yao Qi <yao@codesourcery.com>
10144 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10145 (struct tracepoint_action_ops) <send>: New field.
10146 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10147 (agent_expr_send, x_tracepoint_action_send): New.
10148 (l_tracepoint_action_send): New.
10149 (cmd_qtdp): Download and install tracepoint
10150 according to `use_agent'.
10151 (run_inferior_command): Add one more parameter `len'.
10153 (tracepoint_send_agent): New.
10154 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10156 2012-04-16 Yao Qi <yao@codesourcery.com>
10158 * tracepoint.c (download_tracepoints): Moved to ...
10159 (cmd_qtstart): ... here.
10161 2012-04-14 Yao Qi <yao@codesourcery.com>
10163 * tracepoint.c: Include inttypes.h.
10164 (struct collect_memory_action): Use sized types.
10165 (struct tracepoint): Likewise.
10166 (cmd_qtdp, stop_tracing): Update print specifiers.
10167 (cmd_qtp, response_tracepoint): Likewise.
10168 (collect_data_at_tracepoint): Likewise.
10169 (collect_data_at_step): Likewise.
10171 2012-04-14 Yao Qi <yao@codesourcery.com>
10173 Import gnulib module inttypes.
10174 * aclocal.m4, config.in, configure: Regenerated.
10176 2012-04-14 Yao Qi <yao@codesourcery.com>
10178 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10179 Makefile and config.status at last.
10181 2012-04-13 Yao Qi <yao@codesourcery.com>
10183 * tracepoint.c: Include stdint.h unconditionally.
10185 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10187 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10188 on BFD_HAVE_SYS_PROCFS_TYPE.
10189 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10190 * configure: Regenerate.
10191 * config.in: Likewise.
10193 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10195 * Makefile.in (clean): Also remove x32.c x32-linux.c
10196 x32-avx.c x32-avx-linux.c.
10197 (x32.o): New target.
10199 (x32-linux.o): Likewise.
10200 (x32-linux.c): Likewise.
10201 (x32-avx.o): Likewise.
10202 (x32-avx.c): Likewise.
10203 (x32-avx-linux.o): Likewise.
10204 (x32-avx-linux.c): Likewise.
10206 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10207 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10208 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10209 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10210 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10211 i386/x32-avx-linux.xml.
10213 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10214 (init_registers_x32_avx_linux): Likwise.
10215 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10216 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10218 2012-04-13 Pedro Alves <palves@redhat.com>
10220 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10221 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10222 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10223 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10226 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10228 * linux-x86-low.c (compat_x32_clock_t): New.
10229 (compat_x32_siginfo_t): Likewise.
10230 (compat_x32_siginfo_from_siginfo): Likewise.
10231 (siginfo_from_compat_x32_siginfo): Likewise.
10232 (linux_is_elf64): Likewise.
10233 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10234 and siginfo_from_compat_x32_siginfo for x32.
10235 (x86_arch_setup): Set linux_is_elf64.
10237 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10240 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10242 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10243 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10244 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10245 compatible with process.
10247 2012-04-12 Yao Qi <yao@codesourcery.com>
10249 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10250 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10251 (install-only, install-info, clean): Handle sub dir gnulib.
10252 (all-lib, am--refresh): New targets.
10253 (memmem.o): Remove target.
10254 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10255 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10256 (AC_REPLACE_FUNCS): Remove memmem.
10257 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10258 (AC_OUTPUT): Generate Makefile in gnulib/.
10259 * aclocal.m4, config.in, configure: Regenerated.
10261 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10263 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10265 2012-04-05 Pedro Alves <palves@redhat.com>
10267 -Werror=strict-aliasing
10269 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10272 2012-04-04 Pedro Alves <palves@redhat.com>
10274 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10275 (sparc_store_gregset_from_stack, sparc_store_gregset)
10276 (sparc_breakpoint_at): Fix formatting.
10278 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10280 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10282 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10283 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10284 * config.in: Regenerate.
10285 * configure: Likewise.
10287 2012-03-29 Pedro Alves <palves@redhat.com>
10289 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10290 Correct ptrace arguments.
10292 2012-03-28 Pedro Alves <palves@redhat.com>
10294 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10295 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10296 (IA64_FR1_REGNUM): New defines.
10297 (ia64_fetch_register): New.
10298 (the_low_target): Install it.
10299 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10301 * linux-low.c (linux_fetch_registers): Try the
10302 the_low_target.fetch_register hook first.
10304 * linux-arm-low.c (the_low_target): Adjust.
10305 * linux-bfin-low.c (the_low_target): Adjust.
10306 * linux-cris-low.c (the_low_target): Adjust.
10307 * linux-crisv32-low.c (the_low_target): Adjust.
10308 * linux-m32r-low.c (the_low_target): Adjust.
10309 * linux-m68k-low.c (the_low_target): Adjust.
10310 * linux-mips-low.c (the_low_target): Adjust.
10311 * linux-ppc-low.c (the_low_target): Adjust.
10312 * linux-s390-low.c (the_low_target): Adjust.
10313 * linux-sh-low.c (the_low_target): Adjust.
10314 * linux-sparc-low.c (the_low_target): Adjust.
10315 * linux-tic6x-low.c (the_low_target): Adjust.
10316 * linux-x86-low.c (the_low_target): Adjust.
10317 * linux-xtensa-low.c (the_low_target): Adjust.
10319 2012-03-26 Pedro Alves <palves@redhat.com>
10321 * server.c (handle_qxfer_libraries): Don't bail early if
10322 the_target->qxfer_libraries_svr4 is not NULL.
10324 2012-03-26 Pedro Alves <palves@redhat.com>
10326 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10328 2012-03-23 Pedro Alves <palves@redhat.com>
10330 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10331 "library-list-svr4" element's start tag when the the DSO list is
10334 2012-03-23 Pedro Alves <palves@redhat.com>
10336 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10337 a variable whose type size is the same as the inferior's pointer
10340 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10342 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10344 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10345 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10346 * linux-low.h: Include <signal.h>.
10347 (struct siginfo): Remove forward declaration.
10348 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10351 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10353 * .gitignore: Ignore more files.
10355 2012-03-19 Pedro Alves <palves@redhat.com>
10356 Jan Kratochvil <jan.kratochvil@redhat.com>
10358 * server.c (cont_thread, general_thread): Add describing comments.
10359 (start_inferior): Clear `cont_thread'.
10360 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10363 2012-03-15 Yao Qi <yao@codesourcery.com>
10365 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10367 (cmd_qtdp): ... here.
10369 2012-03-15 Yao Qi <yao@codesourcery.com>
10371 * tracepoint.c (struct tracepoint_action_ops): New.
10372 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10373 (m_tracepoint_action_download): New.
10374 (r_tracepoint_action_download): New.
10375 (x_tracepoint_action_download): New.
10376 (l_tracepoint_action_download): New.
10377 (add_tracepoint_action): Install `action->ops' according type.
10378 (download_tracepoint_1): Move code `download' function pointer
10379 of various tracepoint_action_ops.
10381 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10383 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10384 linux_ptrace_attach_warnings.
10386 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10388 * Makefile.in (linux-ptrace.o): New.
10389 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10390 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10391 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10392 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10393 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10395 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10397 2012-03-08 Yao Qi <yao@codesourcery.com>
10398 Pedro Alves <palves@redhat.com>
10400 Fix PR server/13392.
10401 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10402 offset of JMP insn.
10403 * tracepoint.c (remove_tracepoint): New.
10404 (cmd_qtdp): Call remove_tracepoint when failed to install.
10406 2012-03-07 Pedro Alves <palves@redhat.com>
10408 * linux-low.c (get_detach_signal): New.
10409 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10410 Pass on pending signals to PTRACE_DETACH. Check the result of the
10412 * server.c (program_signals, program_signals_p): New.
10413 (handle_general_set): Handle QProgramSignals.
10414 * server.h (program_signals, program_signals_p): Declare.
10416 2012-03-05 Pedro Alves <palves@redhat.com>
10417 Jan Kratochvil <jan.kratochvil@redhat.com>
10419 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10422 2012-03-03 Yao Qi <yao@codesourcery.com>
10424 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10425 agent_look_up_symbols.
10427 2012-03-03 Yao Qi <yao@codesourcery.com>
10429 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10430 (linux-x86-low.o): Likewise.
10431 * server.h: Remove in_process_agent_loaded.
10432 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10436 2012-03-03 Yao Qi <yao@codesourcery.com>
10438 * tracepoint.c (gdb_agent_capability): New global.
10439 (in_process_agent_loaded_ust): Renamed to
10440 `in_process_agent_supports_ust'.
10442 (in_process_agent_supports_ust): Call agent_capability_check.
10443 (clear_installed_tracepoints): Assert that agent supports
10446 2012-03-03 Yao Qi <yao@codesourcery.com>
10448 * linux-low.c (linux_supports_agent): New.
10449 (linux_target_ops): Initialize field `supports_agent' with
10450 linux_supports_agent.
10451 * target.h (struct target_ops) <supports_agent>: New.
10452 (target_supports_agent): New macro.
10453 * server.c (handle_general_set): Handle packet 'QAgent'.
10454 (handle_query): Send `QAgent+'.
10455 * Makefile.in (server.o): Depends on agent.h.
10457 2012-03-03 Yao Qi <yao@codesourcery.com>
10459 * Makefile.in (OBS): Add agent.o.
10460 Add new rule for agent.o.
10461 Track dependence of tracepoint.c on agent.h.
10462 * tracepoint.c (run_inferior_command_1):
10463 (run_inferior_command): Call agent_run_command.
10464 (gdb_ust_connect_sync_socket): Deleted. Move it to
10466 (resume_thread, stop_thread): Likewise.
10467 (gdb_ust_socket_init): Renamed to ...
10468 (gdb_agent_socket_init): ... New.
10469 (gdb_ust_thread): Renamed to ...
10470 (gdb_agent_helper_thread): ... New.
10471 (gdb_ust_init): Move some code to ...
10472 (gdb_agent_init): ... here. New.
10473 [HAVE_UST]: Call gdb_ust_init.
10474 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10475 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10476 * config.in, configure: Regenerated.
10478 2012-03-02 Pedro Alves <palves@redhat.com>
10480 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10481 * linux-low.c (struct simple_pid_list): New.
10482 (stopped_pids): New a struct simple_pid_list pointer.
10483 (add_to_pid_list, pull_pid_from_list): New.
10484 (handle_extended_wait): Don't assume the first signal new children
10485 report is SIGSTOP. Adjust call to pull_pid_from_list.
10486 (linux_wait_for_lwp): Adjust.
10488 2012-03-02 Yao Qi <yao@codesourcery.com>
10490 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10493 2012-03-02 Yao Qi <yao@codesourcery.com>
10495 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10496 `stop_pc' and `tpoint'. Update caller.
10498 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10500 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10501 * linux-low.c (use_linux_regsets): New macro.
10502 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10503 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10504 (linux_register_in_regsets): New function.
10505 (usr_fetch_inferior_registers): Skip registers covered by
10507 (usr_store_inferior_registers): Likewise.
10508 (usr_fetch_inferior_registers): New macro.
10509 (usr_store_inferior_registers): Likewise.
10510 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10511 (linux_store_registers): Likewise.
10512 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10514 (init_registers_mips64_dsp_linux): Likewise.
10515 (init_registers_mips_linux): New macro.
10516 (init_registers_mips_dsp_linux): Likewise.
10517 (mips_dsp_num_regs): Likewise.
10518 (DSP_BASE, DSP_CONTROL): New fallback macros.
10519 (mips_base_regs): New macro.
10520 (mips_regmap): Use it. Fix the size.
10521 (mips_dsp_regmap): New variable.
10522 (mips_dsp_regset_bitmap): Likewise.
10523 (mips_arch_setup): New function.
10524 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10526 (mips_cannot_store_register): Likewise.
10527 (the_low_target): Update .arch_setup, .num_regs and .regmap
10528 initializers. Add .regset_bitmap initializer.
10529 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10531 * linux-bfin-low.c (the_low_target): Likewise.
10532 * linux-cris-low.c (the_low_target): Likewise.
10533 * linux-crisv32-low.c (the_low_target): Likewise.
10534 * linux-ia64-low.c (the_low_target): Likewise.
10535 * linux-m32r-low.c (the_low_target): Likewise.
10536 * linux-m68k-low.c (the_low_target): Likewise.
10537 * linux-ppc-low.c (the_low_target): Likewise.
10538 * linux-s390-low.c (the_low_target): Likewise.
10539 * linux-sh-low.c (the_low_target): Likewise.
10540 * linux-sparc-low.c (the_low_target): Likewise.
10541 * linux-tic6x-low.c (the_low_target): Likewise.
10542 * linux-x86-low.c (the_low_target): Likewise.
10543 * linux-xtensa-low.c (the_low_target): Likewise.
10544 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10545 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10546 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10548 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10549 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10551 2012-02-29 Yao Qi <yao@codesourcery.com>
10552 Pedro Alves <palves@redhat.com>
10554 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10555 `step_over_finished' is true.
10557 2012-02-27 Pedro Alves <palves@redhat.com>
10559 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10560 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10562 2012-02-27 Pedro Alves <palves@redhat.com>
10565 * linux-low.c (pid_is_stopped): New.
10566 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10568 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10570 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10573 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10575 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10577 2012-02-24 Luis Machado <lgustavo@codesourcery>
10579 * server.c (handle_query): Advertise support for target-side
10580 breakpoint condition evaluation.
10581 (process_point_options): New function.
10582 (process_serial_event): When inserting a breakpoint, check for
10583 a target-side condition that should be evaluated.
10585 * mem-break.c: Include regcache.h and ax.h.
10586 (point_cond_list_t): New data structure.
10587 (breakpoint) <cond_list>: New field.
10588 (find_gdb_breakpoint_at): Make non-static.
10589 (delete_gdb_breakpoint_at): Clear any target-side
10591 (clear_gdb_breakpoint_conditions): New function.
10592 (add_condition_to_breakpoint): Likewise.
10593 (add_breakpoint_condition): Likewise.
10594 (gdb_condition_true_at_breakpoint): Likewise.
10595 (gdb_breakpoint_here): Return result directly instead
10596 of going through a local variable.
10598 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10599 (clear_gdb_breakpoint_conditions): Likewise.
10600 (add_breakpoint_condition): Likewise.
10601 (gdb_condition_true_at_breakpoint): Likewise.
10603 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10604 (need_step_over_p): Take target-side breakpoint condition into
10607 2012-02-24 Luis Machado <lgustavo@codesourcery>
10609 * server.h: Include tracepoint.h.
10610 (agent_mem_read, agent_get_trace_state_variable_value,
10611 agent_set_trace_state_variable_value,
10612 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10613 get_set_tsv_func_addr): New prototypes.
10615 * ax.h: New include file.
10616 * ax.c: New source file.
10618 * tracepoint.c: Include ax.h.
10619 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10620 agent_expr, eval_result_type): Move to ax.h.
10621 (parse_agent_expr): Rename to ...
10622 (gdb_parse_agent_expr): ... this, make it non-static and move
10624 (unparse_agent_expr) Rename to ...
10625 (gdb_unparse_agent_expr): ... this, make it non-static and move
10627 (eval_agent_expr): Rename to ...
10628 (eval_tracepoint_agent_expr): ... this.
10629 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10630 forward declarations.
10631 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10632 (agent_get_trace_state_variable_value): New function.
10633 (agent_set_trace_state_variable_value): New function.
10634 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10635 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10636 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10637 (condition_true_at_tracepoint): Likewise.
10638 (parse_agent_expr): Rename to ...
10639 (gdb_parse_agent_expr): ... this and move to ax.c.
10640 (unparse_agent_expr): Rename to ...
10641 (gdb_unparse_agent_expr): ... this and move to ax.c.
10642 (gdb_agent_op_name): Move to ax.c.
10643 (eval_agent_expr): Rename to ...
10644 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10646 (eval_tracepoint_agent_expr): New function.
10647 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10649 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10651 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10652 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10653 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10654 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10655 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10656 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10657 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10658 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10659 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10660 (compile_bytecodes): Remove forward declaration.
10661 (is_goto_target): Move to ax.c.
10662 (compile_bytecodes): Move to ax.c and call
10663 agent_get_trace_state_variable_value (...) and
10664 agent_set_trace_state_variable_value (...).
10666 * Makefile.in: Update ax.c and IPA dependencies.
10668 2012-02-24 Pedro Alves <palves@redhat.com>
10670 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10671 (cmd_bigqtbuffer_circular): ... this. Only handle
10672 'QTBuffer:circular:'.
10673 (handle_tracepoint_general_set): Adjust.
10675 2012-02-16 Yao Qi <yao@codesourcery.com>
10677 * inferiors.c: Move code to ...
10678 * dll.c: .... here. New.
10679 * server.h: Declare clear_dlls.
10680 * Makefile.in (SFILES): Add dll.c.
10684 2012-02-11 Yao Qi <yao@codesourcery.com>
10686 * server.c: (handle_monitor_command): Add a new parameter
10688 (handle_query): Update caller.
10690 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10692 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10693 * configure, config.in: Regenerate.
10694 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10697 2012-02-02 Pedro Alves <palves@redhat.com>
10699 Try SIGKILL first, then PTRACE_KILL.
10700 * linux-low.c (linux_kill_one_lwp): New.
10701 (linux_kill_one_lwp): Rename to ...
10702 (kill_one_lwp_callback): ... this. Use the new
10703 linux_kill_one_lwp.
10705 2012-02-02 Pedro Alves <palves@redhat.com>
10707 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10710 2012-01-27 Pedro Alves <palves@redhat.com>
10712 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10713 (elf_64_file_p): Make static.
10714 (linux_pid_exe_is_elf_64_file): New.
10715 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10716 Delete declarations.
10717 (linux_pid_exe_is_elf_64_file): Declare.
10718 * linux-x86-low.c (x86_arch_setup): Use
10719 linux_pid_exe_is_elf_64_file.
10721 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10723 * linux-low.c (linux_wait_for_event_1): Rename to ...
10724 (linux_wait_for_event): ... here and merge it with former
10725 linux_wait_for_event - new variable wait_ptid, use it.
10726 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10728 2012-01-23 Pedro Alves <palves@redhat.com>
10730 * server.c (main): Avoid yet another case of infinite loop while
10731 detaching/killing after a longjmp.
10733 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10736 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10738 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10740 * hostio.c (handle_readlink): New function.
10741 (handle_vFile): Call it to handle "vFile:readlink" packets.
10743 2012-01-20 Pedro Alves <palves@redhat.com>
10744 Ulrich Weigand <ulrich.weigand@linaro.org>
10746 * server.c (handle_v_requests): Only support vAttach and vRun to
10747 start multiple processes when in extended protocol mode.
10749 2012-01-17 Pedro Alves <palves@redhat.com>
10751 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10752 memalign plus mprotect to allocate the scratch buffer.
10754 2012-01-13 Pedro Alves <palves@redhat.com>
10756 * server.c (attach_inferior): Clear `cont_thread'.
10758 2012-01-13 Pedro Alves <palves@redhat.com>
10760 * server.c (main): Avoid infinite loop while detaching/killing
10763 2012-01-09 Doug Evans <dje@google.com>
10765 * server.c (start_inferior): Set last_ptid in --wrapper case.
10767 2012-01-06 Yao Qi <yao@codesourcery.com>
10769 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10771 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10773 2012-01-04 Yao Qi <yao@codesourcery.com>
10775 * tracepoint.c (cmd_qtdp): Print debug message
10776 for static tracepoint.
10778 2012-01-04 Yao Qi <yao@codesourcery.com>
10780 * tracepoint.c (trace_vdebug): Differentiate debug message
10781 between gdbserver and IPA.
10783 2012-01-03 Yao Qi <yao@codesourcery.com>
10785 * tracepoint.c (tracepoint_was_hit): Don't collect for
10788 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10790 * terminal.h: Reformat copyright header.
10792 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10794 * server.c (gdbserver_version): Update copyright year.
10795 * gdbreplay.c (gdbreplay_version): Likewise.
10797 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10799 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10802 2011-12-18 Hui Zhu <teawater@gmail.com>
10803 * linux-low.c (linux_create_inferior): Save return value to ret.
10805 2011-12-18 Hui Zhu <teawater@gmail.com>
10807 * linux-low.c (linux_create_inferior): Save return value to ret.
10809 2011-12-16 Doug Evans <dje@google.com>
10811 * linux-low.c (linux_create_inferior): If stdio connection,
10812 redirect stdin from /dev/null, stdout to stderr.
10813 * remote-utils.c (remote_is_stdio): New static global.
10814 (remote_connection_is_stdio): New function.
10815 (remote_prepare): Handle stdio connection.
10816 (remote_open): Ditto.
10817 (remote_close): Don't close stdin for stdio connections.
10818 (read_prim,write_prim): New functions. Replace all calls to
10819 read/write to these.
10820 * server.c (main): Watch for "-" argument. Move call to
10821 remote_prepare before start_inferior.
10822 * server.h (STDIO_CONNECTION_NAME): New macro.
10823 (remote_connection_is_stdio): Declare.
10825 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10826 in debugging output.
10828 2011-12-15 Yao Qi <yao@codesourcery.com>
10830 * tracepoint.c: Include sys/syscall.h.
10831 (gdb_ust_thread): Remove preprocessor conditional.
10833 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10835 * linux-low.c (linux_detach_one_lwp): Call
10836 the_low_target.prepare_to_resume before detaching.
10838 2011-12-14 Yao Qi <yao@codesourcery.com>
10840 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10843 2011-12-14 Yao Qi <yao@codesourcery.com>
10845 * i386-low.c (i386_low_stopped_data_address): Initialize local
10846 variable `control'.
10848 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10852 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10853 DR_CONTROL unless necessary. Extend comments.
10854 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10855 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10857 2011-12-13 Yao Qi <yao@codesourcery.com>
10859 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10861 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10863 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10865 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10866 Print new debug message for such case.
10868 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10870 Fix overlapping memcpy.
10871 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10872 the read_inferior_memory transfer.
10873 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10874 write_inferior_memory transfer.
10875 (set_fast_tracepoint_jump): New variable buf. Use it for the
10876 read_inferior_memory and write_inferior_memory transfers.
10877 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10878 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10879 Use it for the write_inferior_memory transfer.
10880 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10883 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10885 * linux-low.c (fetch_register, store_register): Make code
10886 consistent, fix formatting.
10888 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10890 * linux-low.c (usr_store_inferior_registers): Factor out code
10891 to handle individual registers into...
10892 (store_register): ... this new function.
10894 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10896 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10897 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10898 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10899 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10900 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10901 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10902 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10903 (srv_xmlfiles): Add new XML files.
10905 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10907 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10908 (init_registers_s390_linux32v1): Add prototype.
10909 (init_registers_s390_linux32v2): Likewise.
10910 (init_registers_s390_linux64v1): Likewise.
10911 (init_registers_s390_linux64v2): Likewise.
10912 (init_registers_s390x_linux64v1): Likewise.
10913 (init_registers_s390x_linux64v2): Likewise.
10914 (s390_num_regs): Increment to 52.
10915 (s390_regmap): Add orig_r2 register.
10916 (s390_num_regs_3264): Increment to 68.
10917 (s390_regmap_3264): Add orig_r2 register.
10918 (s390_collect_ptrace_register): Handle orig_r2 register.
10919 (s390_supply_ptrace_register): Likewise.
10920 (s390_fill_last_break): New function.
10921 (s390_store_last_break): Likewise.
10922 (s390_fill_system_call): New function.
10923 (s390_store_system_call): Likewise.
10924 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10926 (s390_check_regset): New function.
10927 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10928 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10929 Update target_regsets for available register sets.
10931 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10932 Jan Kratochvil <jan.kratochvil@redhat.com>
10934 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10935 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10937 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10938 * linux-low.h (struct process_info_private): New member r_debug.
10939 * server.c (handle_qxfer_libraries): Call
10940 the_target->qxfer_libraries_svr4.
10941 (handle_qxfer_libraries_svr4): New function.
10942 (qxfer_packets): New entry "libraries-svr4".
10943 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10944 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10945 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10946 PACKET_qXfer_libraries_svr4.
10948 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10950 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10951 PSW address/mask between 8-byte and 16-byte formats.
10952 (s390_supply_ptrace_register): Likewise.
10953 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10954 basic addressing mode bit.
10956 2011-11-24 Stan Shebs <stan@codesourcery.com>
10958 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10960 2011-11-17 Stan Shebs <stan@codesourcery.com>
10962 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10963 (tracing_start_time): New global.
10964 (tracing_stop_time): New global.
10965 (tracing_user_name): New global.
10966 (tracing_notes): New global.
10967 (tracing_stop_note): New global.
10968 (cmd_qtstart): Set traceframe_usage, start_time.
10969 (stop_tracing): Set stop_time.
10970 (cmd_qtstatus): Report additional status.
10971 (cmd_qtp): New function.
10972 (handle_tracepoint_query): Call it.
10973 (cmd_qtnotes): New function.
10974 (handle_tracepoint_general_set): Call it.
10975 (get_timestamp): Rename from tsv_get_timestamp.
10977 2011-11-14 Stan Shebs <stan@codesourcery.com>
10978 Kwok Cheung Yeung <kcy@codesourcery.com>
10980 * linux-x86-low.c (small_jump_insn): New.
10981 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10982 trampoline and error message, build a trampoline and issue a small
10983 jump instruction to it.
10984 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10985 trampoline and error message.
10986 (x86_get_min_fast_tracepoint_insn_len): New.
10987 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10988 * linux-low.h (struct linux_target_ops): Add arguments to
10989 install_fast_tracepoint_jump_pad operation, add new operation.
10990 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10992 (linux_get_min_fast_tracepoint_insn_len): New function.
10993 (linux_target_op): Add new operation.
10994 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10995 (gdb_trampoline_buffer_end): Ditto.
10996 (gdb_trampoline_buffer_error): Ditto.
10997 (struct ipa_sym_addresses): Add fields for new IPA variables.
10998 (symbol_list): Add entries for new IPA variables.
10999 (struct tracepoint): Add fields to hold the address range of the
11000 trampoline used by the tracepoint.
11001 (trampoline_buffer_head): New static variable.
11002 (trampoline_buffer_tail): Ditto.
11003 (claim_trampoline_space): New function.
11004 (have_fast_tracepoint_trampoline_buffer): New function.
11005 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11007 (install_fast_tracepoint): Ditto, also add error buffer argument.
11008 (cmd_qtminftpilen): New function.
11009 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11010 (fast_tracepoint_from_trampoline_address): New function.
11011 (fast_tracepoint_collecting): Handle trampoline as part of jump
11013 (set_trampoline_buffer_space): New function.
11014 (initialize_tracepoint): Initialize new IPA variables.
11015 * target.h (struct target_ops): Add arguments to
11016 install_fast_tracepoint_jump_pad operation, add new
11017 get_min_fast_tracepoint_insn_len operation.
11018 (target_get_min_fast_tracepoint_insn_len): New.
11019 (install_fast_tracepoint_jump_pad): Add arguments.
11020 * server.h (IPA_BUFSIZ): Define.
11021 * linux-i386-ipa.c: Include extra header files.
11022 (initialize_fast_tracepoint_trampoline_buffer): New function.
11023 (initialize_low_tracepoint): Call it.
11024 * server.h (set_trampoline_buffer_space): Declare.
11025 (claim_trampoline_space): Ditto.
11026 (have_fast_tracepoint_trampoline_buffer): Ditto.
11028 2011-11-14 Yao Qi <yao@codesourcery.com>
11030 * server.c (handle_query): Handle InstallInTrace for qSupported.
11031 * tracepoint.c (add_tracepoint): Sort list.
11032 (install_tracepoint, download_tracepoint): New.
11033 (cmd_qtdp): Call them to install and download tracepoints.
11034 (sort_tracepoints): Removed.
11035 (cmd_qtstart): Update.
11037 2011-11-14 Yao Qi <yao@codesourcery.com>
11039 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11040 * mem-break.h: Declare.
11041 * tracepoint.c (cmd_qtstart): Move some code to ...
11042 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11044 (download_tracepoints): Move some code to ...
11045 (download_tracepoint_1): ... here. New.
11047 2011-11-08 Yao Qi <yao@codesourcery.com>
11049 * remote-utils.c (relocate_instruction): A comment fix.
11051 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11053 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11054 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11055 dr_status_mirror and dr_control_mirror from debug_reg_state.
11056 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11057 (i386_initial_stuff): Remove use of deleted globals.
11058 (i386_get_thread_context, i386_set_thread_context,
11059 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11060 from debug_reg_state.
11062 2011-11-05 Yao Qi <yao@codesourcery.com>
11064 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11065 address as TPOINT's.
11067 2011-11-02 Stan Shebs <stan@codesourcery.com>
11069 * tracepoint.c (agent_mem_read_string): New function.
11070 (eval_agent_expr): Call it for tracenz.
11071 * server.c (handle_query): Report support for tracenz.
11073 2011-11-02 Yao Qi <yao@codesourcery.com>
11075 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11077 2011-11-02 Yao Qi <yao@codesourcery.com>
11079 * target.h: Fix a typo in comment.
11081 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11083 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11084 clobber the breakpoints' shadows with fast tracepoint jumps.
11085 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11086 * target.c (write_inferior_memory): Also pass MYADDR down to
11089 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11091 * configure.ac: Check support for personality routine.
11092 * configure: Regenerate.
11093 * config.in: Likewise.
11094 * linux-low.c: Include <sys/personality.h>.
11095 Define ADDR_NO_RANDOMIZE if necessary.
11096 (linux_create_inferior): Disable address space randomization when
11097 forking inferior, if requested.
11098 (linux_supports_disable_randomization): New function.
11099 (linux_target_ops): Install it.
11100 * server.h (disable_randomization): Declare.
11101 * server.c (disable_randomization): New global variable.
11102 (handle_general_set): Handle QDisableRandomization.
11103 (handle_query): Likewise for qSupported.
11104 (main): Support --disable-randomization and --no-disable-randomization
11105 command line arguments.
11106 * target.h (struct target_ops): Add supports_disable_randomization.
11107 (target_supports_disable_randomization): New macro.
11109 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11111 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11113 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11114 [!PT_GETDSBT] (target_loadmap): New definition.
11115 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11116 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11117 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11118 and PT_GETDSBT to LINUX_LOADMAP.
11119 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11120 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11122 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11124 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11125 (arm_linux_hwbp_cap): New static variable.
11126 (arm_linux_get_hwbp_cap): Replace by ...
11127 (arm_linux_init_hwbp_cap): ... this new function.
11128 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11129 (arm_linux_get_hw_watchpoint_count): Likewise.
11130 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11131 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11132 (arm_prepare_to_resume): Use perror_with_name instead of error.
11134 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11136 * linux-arm-low.c: Include <signal.h>.
11137 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11138 (struct arm_linux_hwbp_cap): New data type.
11139 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11140 (struct arm_linux_hw_breakpoint): New data type.
11141 (MAX_BPTS, MAX_WPTS): Define.
11142 (struct arch_process_info, struct arch_lwp_info): New data types.
11143 (arm_linux_get_hwbp_cap): New function.
11144 (arm_linux_get_hw_breakpoint_count): Likewise.
11145 (arm_linux_get_hw_watchpoint_count): Likewise.
11146 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11147 (arm_hwbp_control_initialize): Likewise.
11148 (arm_hwbp_control_is_enabled): Likewise.
11149 (arm_hwbp_control_is_initialized): Likewise.
11150 (arm_hwbp_control_disable): Likewise.
11151 (arm_linux_hw_breakpoint_equal): Likewise.
11152 (arm_linux_hw_point_initialize): Likewise.
11153 (struct update_registers_data): New data structure.
11154 (update_registers_callback: New function.
11155 (arm_insert_point): Likewise.
11156 (arm_remove_point): Likewise.
11157 (arm_stopped_by_watchpoint): Likewise.
11158 (arm_stopped_data_address): Likewise.
11159 (arm_new_process): Likewise.
11160 (arm_new_thread): Likewise.
11161 (arm_prepare_to_resume): Likewise.
11162 (the_low_target): Register arm_insert_point, arm_remove_point,
11163 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11164 arm_new_thread, and arm_prepare_to_resume.
11166 2011-09-15 Stan Shebs <stan@codesourcery.com>
11168 * server.h (struct emit_ops): Add compare-goto fields.
11169 * tracepoint.c (gdb_agent_op_sizes): New table.
11170 (emit_eq_goto): New function.
11171 (emit_ne_goto): New function.
11172 (emit_lt_goto): New function.
11173 (emit_le_goto): New function.
11174 (emit_gt_goto): New function.
11175 (emit_ge_goto): New function.
11176 (is_goto_target): New function.
11177 (compile_bytecodes): Recognize special cases of compare-goto
11178 combinations and call specialized emitters for them.
11179 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11180 (amd64_emit_ne_goto): New function.
11181 (amd64_emit_lt_goto): New function.
11182 (amd64_emit_le_goto): New function.
11183 (amd64_emit_gt_goto): New function.
11184 (amd64_emit_ge_goto): New function.
11185 (amd64_emit_ops): Add the new functions.
11186 (i386_emit_eq_goto): New function.
11187 (i386_emit_ne_goto): New function.
11188 (i386_emit_lt_goto): New function.
11189 (i386_emit_le_goto): New function.
11190 (i386_emit_gt_goto): New function.
11191 (i386_emit_ge_goto): New function.
11192 (i386_emit_ops): Add the new functions.
11194 2011-09-08 Stan Shebs <stan@codesourcery.com>
11196 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11197 (i386_emit_epilogue): Restore %ebx.
11199 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11201 * server.c (step_thread): Remove definition.
11202 (process_serial_event): Don't handle Hs.
11203 * server.h (step_thread): Remove declaration.
11204 * target.c (set_desired_inferior): Remove use of step_thread.
11206 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11208 * linux-low.c: Include linux-procfs.h.
11209 (linux_attach_lwp_1): Update comments.
11210 (linux_attach): Scan for existing threads when attaching to a
11211 process that is the tgid.
11212 * Makefile.in: Update dependencies.
11214 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11216 * configure.srv: Add linux-procfs.o dependencies.
11218 2011-08-14 Yao Qi <yao@codesourcery.com>
11220 * target.h (struct target_ops): Fix indent.
11221 * win32-low.c (win32_target_ops): Fix comment.
11223 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11224 Yao Qi <yao@codesourcery.com>
11226 * Makefile.in (clean): Remove tic6x-*.c files.
11227 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11228 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11229 (tic6x-c64xp-linux.c): Likewise.
11230 * configure.srv: Add support for tic6x-*-uclinux.
11231 * linux-tic6x-low.c: New.
11232 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11234 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11235 Yao Qi <yao@codesourcery.com>
11237 * target.h (struct target_ops): Add read_loadmap.
11238 * linux-low.c (struct target_loadseg): New type.
11239 (struct target_loadmap): New type.
11240 (linux_read_loadmap): New function.
11241 (linux_target_ops): Add linux_read_loadmap.
11242 * server.c (handle_query): Support qXfer:fdpic:read packet.
11243 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11246 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11248 * win32-low.c: Include <stdint.h>.
11250 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11252 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11253 to the inferior here.
11254 (i386_remove_aligned_watchpoint): Ditto.
11255 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11256 fit part of the watchpoint in the debug registers.
11257 (i386_update_inferior_debug_regs): New.
11258 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11259 registers, and only update the inferior on success.
11260 (i386_low_remove_watchpoint): Ditto.
11262 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11264 * linux-low.c (compare_ints, unique, list_threads, show_process,
11265 linux_core_of_thread): Delete.
11266 (linux_target_ops): Change linux_core_of_thread to
11267 linux_common_core_of_thread.
11268 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11269 * utils.c (malloc_failure): Change type of argument.
11270 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11271 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11272 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11273 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11274 (IPA_OBJS): Add common-utils-ipa.o.
11275 (ptid_h, linux_osdata_h): New macros.
11276 (server_h): Add common/common-utils.h, common/xml-utils.h,
11277 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11279 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11280 ptid.o, buffer.o): New rules.
11281 (linux-low.o): Add common/linux-osdata.h as a dependency.
11282 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11283 * configure.ac: Add AC_HEADER_DIRENT check.
11284 * config.in: Regenerate.
11285 * configure: Regenerate.
11286 * remote-utils.c (xml_escape_text): Delete.
11287 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11288 buffer_xml_printf): Move to common/buffer.c.
11289 * server.c (main): Remove call to initialize_inferiors.
11290 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11291 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11292 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11293 internal_error, gdb_assert, gdb_assert_fail): Delete.
11294 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11295 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11297 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11298 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11299 initialize_inferiors): Delete.
11301 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11303 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11306 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11308 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11310 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11312 2011-05-26 Yao Qi <yao@codesourcery.com>
11314 * Makefile.in (thread-db.o): Track dependence to
11315 common/gdb_thread_db.h.
11316 * thread-db.c: include gdb_thread_db.h from right place.
11318 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11320 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11321 __FILE__ and __LINE__ to internal_error.
11323 2011-05-13 Doug Evans <dje@google.com>
11325 * thread-db.c (try_thread_db_load_from_sdir): New function.
11326 (try_thread_db_load_from_dir): New function.
11327 (thread_db_load_search): Handle $sdir, ignore $pdir.
11328 Remove trying of system directories if search of
11329 libthread-db-search-path fails, that is now done via $sdir.
11331 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11333 * server.c (handle_query): Add EnableDisableTracepoints to the list
11334 of supported features.
11335 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11337 (cmd_qtenable_disable): New.
11338 (cmd_qtstart): Install tracepoints even if disabled.
11339 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11340 receiving a QTEnable or QTDisable packet.
11341 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11342 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11344 (gdb_probe): Skip data collection if static tracepoint is disabled.
11346 2011-05-10 Doug Evans <dje@google.com>
11348 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11350 2011-05-04 Doug Evans <dje@google.com>
11352 * linux-low.c (linux_join): Skip process lookup.
11353 * spu-low.c (spu_join): Ditto.
11354 * server.c (join_inferiors_callback): Delete.
11355 (process_serial_event): For 'D' packet (detach) call join_inferior
11358 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11360 * README: Don't mention xscale*-*-linux*.
11361 * configure.srv (xscale*-*-linux*): Don't handle target.
11363 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11365 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11367 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11368 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11369 (i386_emit_void_call_2): Likewise.
11371 2011-04-26 Yao Qi <yao@codesourcery.com>
11373 * linux-low.c: Move common macros to linux-ptrace.h.
11374 Include linux-ptrace.h.
11375 * Makefile.in (linux_ptrace_h): New.
11376 (linux-low.o): Depends on linux-ptrace.h.
11378 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11380 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11381 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11382 (remote_prepare): New function with most of the TCP code from ...
11383 (remote_open): ... here. Detect PORT here unconditionally. Move also
11384 setting transport_is_reliable.
11385 * server.c (run_once): New variable.
11386 (gdbserver_usage): Document it.
11387 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11388 the first run if RUN_ONCE.
11389 * server.h (run_once, remote_prepare): New declarations.
11391 2011-04-19 Tom Tromey <tromey@redhat.com>
11393 * win32-low.c (handle_load_dll): Remove duplicate "the".
11395 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11397 Remove support for old Cygwin 1.5 versions.
11398 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11399 function to avoid warning.
11400 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11403 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11405 * gdbserver/server.h (Macro _): Define it if not available.
11407 2011-03-14 Michael Snyder <msnyder@vmware.com>
11409 * hostio.c (handle_close): Remove unnecessary null test.
11411 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11413 * Makefile.in (maintainer-clean realclean distclean): Remove
11414 "make ... subdir_do" command.
11416 2011-03-10 Michael Snyder <msnyder@vmware.com>
11418 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11420 * server.c (handle_v_run): Free alloced buffer on early return.
11422 2011-03-09 Yao Qi <yao@codesourcery.com>
11425 2011-03-04 Yao Qi <yao@codesourcery.com>
11427 * Makefile.in: Remove GNU make feature --directory.
11429 2011-03-05 Yao Qi <yao@codesourcery.com>
11431 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11432 (subdir_do): New make target. Copied from gdb/Makefile.
11433 (maintainer-clean, realclean, distclean, clean): Call corresponding
11434 make targets in common/Makefile.
11436 2011-02-11 Yao Qi <yao@codesourcery.com>
11438 * configure.ac: Call AC_PROG_RANLIB.
11439 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11440 * configure: Regenerate.
11442 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11444 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11446 2011-03-06 Yao Qi <yao@codesourcery.com>
11448 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11450 2011-03-05 Yao Qi <yao@codesourcery.com>
11452 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11453 (subdir_do): New make target. Copied from gdb/Makefile.
11454 (maintainer-clean, realclean, distclean, clean): Call corresponding
11455 make targets in common/Makefile.
11457 2011-03-04 Yao Qi <yao@codesourcery.com>
11459 * Makefile.in: Remove GNU make feature --directory.
11461 2011-03-04 Michael Snyder <msnyder@vmware.com>
11463 * server.c (queue_stop_reply): Call xmalloc not malloc.
11465 2011-03-02 Michael Snyder <msnyder@vmware.com>
11467 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11469 2011-02-28 Michael Snyder <msnyder@vmware.com>
11471 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11472 (cmd_qtframe): Ditto.
11473 (cmd_qtbuffer): Ditto.
11474 (cmd_bigqtbuffer): Ditto.
11476 * utils.c (decimal2str): Initialize 'width' to nine, then
11477 don't mess with it.
11479 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11481 * hostio.c (require_data): Free *data, not data.
11483 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11485 * hostio.c (require_data): Use free, not xfree.
11487 2011-02-27 Michael Snyder <msnyder@vmware.com>
11489 * server.c (handle_query): Discard unused value.
11491 * hostio.c (require_data): Free malloc memory before returning
11494 2011-02-26 Michael Snyder <msnyder@vmware.com>
11496 * linux-low.c (list_threads): Call closedir for dirent.
11498 2011-02-27 Michael Snyder <msnyder@vmware.com>
11500 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11501 a case statement falls through.
11503 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11505 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11508 2011-02-26 Michael Snyder <msnyder@vmware.com>
11510 * utils.c (decimal2str): Eliminate dead code and dead param.
11511 (pulongest): Drop dead param from call to decimal2str.
11514 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11516 Revert the following patch (not approved yet):
11517 2011-02-21 Hui Zhu <teawater@gmail.com>
11518 * tracepoint.c (tp_printf): New function.
11519 (eval_agent_expr): Handle gdb_agent_op_printf.
11521 2011-02-21 Hui Zhu <teawater@gmail.com>
11523 * tracepoint.c (tp_printf): New function.
11524 (eval_agent_expr): Handle gdb_agent_op_printf.
11526 2011-02-18 Tom Tromey <tromey@redhat.com>
11528 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11529 (tracepoint.o): Likewise.
11530 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11531 (gdb_agent_op_names): Likewise.
11533 2011-02-18 Tom Tromey <tromey@redhat.com>
11535 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11536 gdb_agent_op_rot>: New constants.
11537 (gdb_agent_op_names): Add pick and roll.
11538 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11541 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11543 * aclocal.m4: Regenerated with aclocal-1.11.1.
11545 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11547 * server.c (handle_qxfer_traceframe_info): New.
11548 (qxfer_packets): Register "traceframe-info".
11549 (handle_query): Report support for qXfer:traceframe-info:read+.
11550 * tracepoint.c (match_blocktype): New.
11551 (traceframe_find_block_type): Rename to ...
11552 (traceframe_walk_blocks): ... this. Add callback filter argument,
11554 (traceframe_find_block_type): New, reimplemented on top of
11555 traceframe_walk_blocks.
11556 (build_traceframe_info_xml): New.
11557 (traceframe_read_info): New.
11558 * server.h (traceframe_read_info): Declare.
11560 2011-02-11 Yao Qi <yao@codesourcery.com>
11562 * configure.ac: Call AC_PROG_RANLIB.
11563 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11564 * configure: Regenerate.
11566 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11568 * server.c (gdb_read_memory): Change return semantics to allow
11570 (handle_search_memory_1): Adjust.
11571 (process_serial_event) <'m' packet>: Handle partial transfers.
11572 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11574 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11576 * regcache.c (init_register_cache): Initialize
11577 regcache->register_status.
11578 (free_register_cache): Release regcache->register_status.
11579 (regcache_cpy): Copy register_status.
11580 (registers_to_string): Print 'x's for unavailable registers.
11581 (supply_register): Mark the register's status valid or
11582 unavailable, depending on whether a buffer was passed in or not.
11583 (supply_register_zeroed): New.
11584 (supply_regblock): Mark the registers' status valid or
11585 unavailable, depending on whether a buffer was passed in or not.
11586 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11587 (struct regcache): New `register_status' field.
11588 (supply_register_zeroed): Declare.
11589 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11590 supply_register_zeroed, rather than passing a NULL buffer to
11592 * tracepoint.c (fetch_traceframe_registers): Update comment.
11594 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11596 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11599 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11601 * server.h (decode_xfer_write): Change prototype.
11602 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11603 and don't extract the annex here.
11604 * server.c (decode_xfer_read): Remove `annex' parameter,
11605 and don't extract the annex here.
11606 (decode_xfer): New.
11607 (struct qxfer): New.
11608 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11609 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11610 (handle_qxfer_statictrace): New functions, abstracted out from
11611 handle_query, and made to use the struct qxfer interface.
11612 (handle_threads_qxfer_proper): Rename to ...
11613 (handle_qxfer_threads_proper): ... this.
11614 (handle_threads_qxfer): Rename to ...
11615 (handle_qxfer_threads): ... this. Adjust.
11616 (qxfer_packets): New array.
11617 (handle_qxfer): New function.
11618 (handle_query): Use handle_qxfer.
11620 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11622 * gdbreplay.c: Shorten lines of >= 80 columns.
11623 * linux-low.c: Ditto.
11624 * linux-ppc-low.c: Ditto.
11625 * linux-s390-low.c: Ditto.
11626 * linux-sparc-low.c: Ditto.
11627 * linux-x86-low.c: Ditto.
11628 * linux-xtensa-low.c: Ditto.
11629 * mem-break.c: Ditto.
11630 * nto-low.c: Ditto.
11631 * regcache.h: Ditto.
11632 * remote-utils.c: Ditto.
11635 * thread-db.c: Ditto.
11636 * tracepoint.c: Ditto.
11638 * win32-low.h: Ditto.
11640 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11642 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11645 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11647 * server.c (gdbserver_version): Update copyright year in version
11649 * gdbreplay.c (gdbreplay_version): Ditto.
11651 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11653 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11654 * linux-bfin-low.c: New file.
11655 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11656 PT_DATA_ADDR for BFIN targets.
11657 * Makefile.in (SFILES): Add linux-bfin-low.c.
11658 (clean): Remove reg-bfin.c.
11659 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11660 * README: Mention supported Blackfin targets.
11662 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11664 * .gitignore: New file.
11666 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11668 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11670 2010-10-22 Jie Zhang <jie@codesourcery.com>
11672 * Makefile.in: Add FLAGS_TO_PASS variable.
11673 (install): Remove dependency of install-only and recursively
11674 invoke make for install-only.
11676 2010-10-04 Doug Evans <dje@google.com>
11678 * Makefile.in (uninstall): Use $(DESTDIR).
11680 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11684 * linux-x86-low.c (compat_siginfo_from_siginfo)
11685 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11686 si_code is < 0. Check for si_code == SI_TIMER before checking for
11689 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11691 * lynx-i386-low.c: New file.
11692 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11694 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11696 * lynx-low.c (ptrace_request_to_str): Remove handling for
11697 request values that have been removed in LynxOS 5.x.
11699 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11701 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11704 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11706 * configure.ac: Add --enable-inprocess-agent option.
11707 * configure: Rebuilt.
11709 2010-09-06 Yao Qi <yao@codesourcery.com>
11711 * linux-low.c (linux_kill): Remove unused variable.
11712 (linux_stabilize_threads): Likewise.
11713 * server.c (start_inferior): Likewise.
11714 (queue_stop_reply_callback): Likewise.
11715 * tracepoint.c (do_action_at_tracepoint): Likewise.
11717 2010-09-06 Yao Qi <yao@codesourcery.com>
11719 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11722 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11724 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11726 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11728 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11731 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11733 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11734 gdbserver/lynx-ppc-low.c: New files.
11735 * Makefile.in (lynx_low_h): New variable.
11736 (lynx-low.o, lynx-ppc-low.o): New rules.
11737 * configure.ac: On LynxOS, link with -lnetinet.
11738 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11739 * configure: regenerate.
11741 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11743 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11744 * configure.ac: Add check for vasprintf and vsnprintf.
11745 * configure, config.in: Regenerate.
11746 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11748 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11750 * gdbreplay.c: Move include of alloca.h up, next to include of
11752 * server.h: Add include of malloc.h.
11753 * mem-break.c: Remove include of malloc.h.
11754 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11756 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11758 * Makefile.in (memmem.o): Build with -Wno-error.
11760 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11762 * utils.c (xsnprintf): Make non-static.
11763 * server.h: Add xsnprintf declaration.
11764 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11765 replace calls to snprintf by calls to xsnprintf throughout.
11767 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11769 * configure.ac: Add configure check for alloca.
11770 * configure, config.in: Regenerate.
11771 * server.h: Include alloca.h if it exists.
11772 * gdbreplay.c: Include alloca.h if it exists.
11774 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11776 * linux-low.c (__SIGRTMIN): Define if not already defined.
11777 (linux_create_inferior): Check for __ANDROID__ rather than
11779 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11780 are already deferred.
11781 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11782 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11783 stopped and already has a pending signal to report.
11784 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11785 a pending signal to report or is moving out of a jump pad.
11786 (linux_init_signals): Check for __ANDROID__ rather than
11789 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11791 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11792 debug_threads check. Avoid a linear search when not doing debug
11795 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11797 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11798 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11799 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11800 (process_event): Change local fd's type to gdb_fildes_t.
11801 (create_file_handler): Adjust prototype.
11802 (delete_file_handler): Adjust prototype.
11803 (handle_file_event): Adjust prototype. Use pfildes.
11804 (create_file_event): Adjsut prototype.
11805 * remote-utils.c (remote_desc, listen_desc): Change type to
11807 * server.h: New gdb_fildes_t typedef.
11808 [USE_WIN32API]: Include winsock2.h.
11809 (delete_file_handler, add_file_handler): Adjust prototypes.
11810 (pfildes): Declare.
11811 * utils.c (pfildes): New.
11813 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11815 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11816 * configure: Regenerate.
11818 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11820 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11821 (linux_done_accessing_memory): ... this.
11822 (linux_target_ops): Adjust.
11823 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11824 * nto-low.c (nto_target_ops): Adjust comment.
11825 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11826 * spu-low.c (spu_target_ops): Adjust comment.
11827 * target.h (target_ops): Rename unprepare_to_access_memory field
11828 to done_accessing_memory.
11829 (unprepare_to_access_memory): Rename to ...
11830 (done_accessing_memory): ... this.
11832 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11834 * linux-low.c (linux_prepare_to_access_memory): New.
11835 (linux_unprepare_to_access_memory): New.
11836 (linux_target_ops): Install them.
11837 * server.c (read_memory): Rename to ...
11838 (gdb_read_memory): ... this. Use
11839 prepare_to_access_memory/prepare_to_access_memory.
11840 (write_memory): Rename to ...
11841 (gdb_write_memory): ... this. Use
11842 prepare_to_access_memory/prepare_to_access_memory.
11843 (handle_search_memory_1): Adjust.
11844 (process_serial_event): Adjust.
11845 * target.h (struct target_ops): New fields
11846 prepare_to_access_memory and unprepare_to_access_memory.
11847 (prepare_to_access_memory, unprepare_to_access_memory): New.
11848 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11849 prepare_to_access_memory/prepare_to_access_memory.
11850 * nto-low.c (nto_target_ops): Adjust.
11851 * spu-low.c (spu_target_ops): Adjust.
11852 * win32-low.c (win32_target_ops): Adjust.
11854 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11856 * Makefile.in (WARN_CFLAGS): Get it from configure.
11857 (WERROR_CFLAGS): New.
11858 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11859 * configure.ac: Introduce --enable-werror, which adds -Werror to
11860 the compiler command line. Enabled by default. Disable with
11861 --disable-werror. Add -Wdeclaration-after-statement
11862 Wpointer-arith and -Wformat-nonliteral to warning flags.
11863 * configure: Regenerate.
11865 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11867 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11869 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11871 * gdbreplay.c (remote_error): New.
11873 (expect): Use gdbchar. Check for error reading from GDB.
11874 Clarify sync error output.
11875 (play): Check for errors writing to GDB.
11876 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11877 * remote-utils.c (getpkt): Check for errors writing to the remote
11880 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11882 * linux-low.c (linux_wait_1): Move non-debugging code out of
11883 `debug_threads' control.
11885 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11887 * linux-low.c (linux_wait_1): Don't set last_status here.
11888 * server.c (push_event, queue_stop_reply_callback): Assert we're
11889 not pushing a TARGET_WAITKIND_IGNORE event.
11890 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11891 (myresume, handle_target_event): Set the thread's last_resume_kind
11892 and last_status from the target returned status.
11894 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11898 * linux-x86-low.c (update_debug_registers_callback): New.
11899 (i386_dr_low_set_addr): Use it.
11900 (i386_dr_low_get_addr): New.
11901 (i386_dr_low_set_control): Use update_debug_registers_callback.
11902 (i386_dr_low_get_control): New.
11903 (i386_dr_low_get_status): Adjust.
11904 * linux-low.c (linux_stop_lwp): New.
11905 * linux-low.h (linux_stop_lwp): Declare.
11907 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11908 argument instead of a i386_debug_reg_state.
11909 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11910 a i386_debug_reg_state.
11911 (i386_insert_aligned_watchpoint): Adjust.
11912 (i386_remove_aligned_watchpoint): Adjust.
11913 (i386_low_stopped_data_address): Read the debug registers from the
11914 inferior instead of from the mirrors.
11915 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11916 (i386_dr_low_get_addr): Declare.
11917 (i386_dr_low_get_control): Declare.
11918 (i386_dr_low_get_status): Change prototype.
11920 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11921 (i386_dr_low_get_addr): New.
11922 (i386_dr_low_get_control): New.
11923 (i386_dr_low_get_status): Adjust prototype. Return
11925 (i386_initial_stuff): Clear dr_status_mirror and
11927 (i386_get_thread_context): Adjust.
11928 (i386_set_thread_context): Adjust.
11929 (i386_thread_added): Adjust.
11931 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11933 * linux-low.h (linux_thread_area): Delete declaration.
11935 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11937 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11938 after its termination.
11940 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11942 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11943 (gdb_wants_all_stopped): Delete.
11944 (linux_wait_1): Don't call them.
11945 * server.c (handle_v_cont): Tag all threads as want-stopped.
11946 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11947 stopped as "client-wants-stopped".
11949 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11951 * Makefile.in (signals_h): New.
11952 (server_h): Depend on it.
11953 (server.o): Don't depend on $(signals_def).
11954 (signals.o): Depend on $(signals_def).
11956 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11958 * Makefile.in (signals_def): New.
11959 (server_h): Append include/gdb/signals.h and signals_def.
11960 (server.o): Append signals_def.
11962 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11964 * server.c (handle_target_event): Use target_signal_to_host for
11965 resume_info.sig initialization.
11966 * target.h (struct thread_resume) <sig>: New comment.
11968 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11970 * server.c (handle_query): strcpy() the returned string from paddress()
11971 instead of sprintf().
11972 * utils.c (paddress): Return phex_nz().
11974 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11976 * server.c (handle_v_cont): Call mourn_inferior if process
11978 (myresume): Likewise.
11980 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11982 Static tracepoints, and integration with UST.
11984 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11985 * mem-break.c (uninsert_all_breakpoints)
11986 (reinsert_all_breakpoints): New.
11987 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11988 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11989 (gdb_agent_ust_loaded, helper_thread_id)
11990 (gdb_agent_helper_thread_id): New macros.
11991 (struct ipa_sym_addresses): Add addr_ust_loaded,
11992 addr_helper_thread_id, addr_cmd_buf.
11993 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11994 (in_process_agent_loaded_ust): New.
11995 (write_e_ust_not_loaded): New.
11996 (maybe_write_ipa_ust_not_loaded): New.
11997 (struct collect_static_trace_data_action): New.
11998 (enum tracepoint_type) <static_tracepoint>: New.
11999 (struct tracepoint) <handle>: Mention static tracepoints.
12000 (struct static_tracepoint_ctx): New.
12001 (CMD_BUF_SIZE): New.
12002 (add_tracepoint_action): Handle static tracepoint actions.
12003 (unprobe_marker_at): New.
12004 (clear_installed_tracepoints): Handle static tracepoints.
12005 (cmd_qtdp): Handle static tracepoints.
12006 (probe_marker_at): New.
12007 (cmd_qtstart): Handle static tracepoints.
12008 (response_tracepoint): Handle static tracepoints.
12009 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12010 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12011 (get_context_regcache): Handle static tracepoints.
12012 (do_action_at_tracepoint): Handle static tracepoint actions.
12013 (traceframe_find_block_type): Handle static trace data blocks.
12014 (traceframe_read_sdata): New.
12015 (download_tracepoints): Download static tracepoint actions.
12016 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12017 (GDB_PROBE_NAME): New.
12019 (GET_UST_SYM): New.
12022 (ust_marker_to_static_tracepoint): New.
12024 (collect_ust_data_at_tracepoint): New.
12025 (gdb_ust_probe): New.
12026 (UNIX_PATH_MAX, SOCK_DIR): New.
12027 (gdb_ust_connect_sync_socket): New.
12028 (resume_thread, stop_thread): New.
12029 (run_inferior_command): New.
12030 (init_named_socket): New.
12031 (gdb_ust_socket_init): New.
12032 (cstr_to_hexstr): New.
12034 (first_marker, next_marker): New.
12035 (response_ust_marker): New.
12036 (cmd_qtfstm, cmd_qtsstm): New.
12037 (unprobe_marker_at, probe_marker_at): New.
12038 (cmd_qtstmat, gdb_ust_thread): New.
12039 (gdb_ust_init): New.
12040 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12041 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12042 (ST_REGENTRY): New.
12043 (x86_64_st_collect_regmap): New.
12044 (X86_64_NUM_ST_COLLECT_GREGS): New.
12045 (AMD64_RIP_REGNUM): New.
12046 (supply_static_tracepoint_registers): New.
12047 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12048 (ST_REGENTRY): New.
12049 (i386_st_collect_regmap): New.
12050 (i386_NUM_ST_COLLECT_GREGS): New.
12051 (supply_static_tracepoint_registers): New.
12052 * server.c (handle_query): Handle qXfer:statictrace:read.
12053 <qSupported>: Report support for StaticTracepoints, and
12054 qXfer:statictrace:read features.
12055 * server.h (traceframe_read_sdata)
12056 (supply_static_tracepoint_registers): Declare.
12057 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12058 (unpack_varlen_hex): Include in IPA build.
12059 * Makefile.in (ustlibs, ustinc): New.
12060 (IPA_OBJS): Add remote-utils-ipa.o.
12061 ($(IPA_LIB)): Link -ldl and -lpthread.
12063 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12064 * config.in, configure: Regenerate.
12066 2010-06-20 Ian Lance Taylor <iant@google.com>
12067 Pedro Alves <pedro@codesourcery.com>
12069 * linux-x86-low.c (always_true): Delete.
12070 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12071 trying to fool the compiler with always_true.
12073 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12075 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12076 conditions in gdbserver.
12078 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12080 * spu-low.c (spu_read_memory): Wrap around local store limit.
12081 (spu_write_memory): Likewise.
12083 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12085 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12086 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12088 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12090 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12091 uses with LONGEST uses.
12093 2010-06-14 Stan Shebs <stan@codesourcery.com>
12094 Pedro Alves <pedro@codesourcery.com>
12098 * linux-x86-low.c: Include limits.h.
12100 (always_true): New.
12103 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12104 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12105 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12106 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12107 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12108 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12109 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12110 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12111 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12112 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12113 (amd64_emit_void_call_2): New.
12114 (amd64_emit_ops): New.
12115 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12116 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12117 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12118 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12119 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12120 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12121 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12122 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12123 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12124 (i386_emit_stack_adjust, i386_emit_int_call_1)
12125 (i386_emit_void_call_2): New.
12126 (i386_emit_ops): New.
12127 (x86_emit_ops): New.
12128 (the_low_target): Install x86_emit_ops.
12129 * server.h (struct emit_ops): New.
12130 (get_raw_reg_func_addr): Declare.
12131 (current_insn_ptr, emit_error): Declare.
12132 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12133 (set_trace_state_variable_value): New defines.
12134 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12135 addr_get_trace_state_variable_value and
12136 addr_set_trace_state_variable_value.
12137 (symbol_list): New fields for get_raw_reg,
12138 get_trace_state_variable_value and set_trace_state_variable_value.
12139 (condfn): New typedef.
12140 (struct tracepoint): New field `compiled_cond'.
12141 (do_action_at_tracepoint): Clear compiled_cond.
12142 (get_trace_state_variable_value, set_trace_state_variable_value):
12144 (condition_true_at_tracepoint): If there's a compiled condition,
12146 (current_insn_ptr, emit_error): New globals.
12147 (struct bytecode_address): New.
12148 (get_raw_reg_func_addr): New.
12149 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12150 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12151 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12152 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12153 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12154 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12155 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12156 (compile_tracepoint_condition, compile_bytecodes): New.
12157 * target.h (emit_ops): Forward declare.
12158 (struct target_ops): New field emit_ops.
12159 (target_emit_ops): New.
12160 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12161 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12162 * linux-low.c (linux_emit_ops): New.
12163 (linux_target_ops): Install it.
12164 * linux-low.h (struct linux_target_ops): New field emit_ops.
12166 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12168 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12169 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12171 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12172 Stan Shebs <stan@codesourcery.com>
12174 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12175 (all): Depend on $(extra_libraries).
12176 (install-only): Install the IPA.
12177 (IPA_OBJS, IPA_LIB): New.
12178 (clean): Remove the IPA lib.
12179 (IPAGENT_CFLAGS): New.
12180 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12181 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12182 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12183 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12184 * configure.ac: Check for atomic builtins support in the compiler.
12185 (IPA_DEPFILES, extra_libraries): Define.
12186 * configure.srv (ipa_obj): Add description.
12187 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12188 (i[34567]86-*-linux*): Set ipa_obj.
12189 (x86_64-*-linux*): Set ipa_obj.
12190 * linux-low.c (stabilizing_threads): New.
12191 (supports_fast_tracepoints): New.
12192 (linux_detach): Stabilize threads before detaching.
12193 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12194 the lwp is either not stabilizing, or is moving out of a jump pad.
12195 (linux_fast_tracepoint_collecting): New.
12196 (maybe_move_out_of_jump_pad): New.
12197 (enqueue_one_deferred_signal): New.
12198 (dequeue_one_deferred_signal): New.
12199 (linux_wait_for_event_1): If moving out of a jump pad, defer
12200 pending signals to later.
12201 (linux_stabilize_threads): New.
12202 (linux_wait_1): Check if threads need moving out of jump pads, and
12204 (stuck_in_jump_pad_callback): New.
12205 (move_out_of_jump_pad_callback): New.
12206 (lwp_running): New.
12207 (linux_resume_one_lwp): Handle moving out of jump pads.
12208 (linux_set_resume_request): Dequeue deferred signals.
12209 (need_step_over_p): Also step over fast tracepoint jumps.
12210 (start_step_over): Also uninsert fast tracepoint jumps.
12211 (finish_step_over): Also reinsert fast tracepoint jumps.
12212 (linux_install_fast_tracepoint_jump): New.
12213 (linux_target_ops): Install linux_stabilize_threads and
12214 linux_install_fast_tracepoint_jump_pad.
12215 * linux-low.h (linux_target_ops) <get_thread_area,
12216 install_fast_tracepoint_jump_pad>: New fields.
12217 (struct lwp_info) <collecting_fast_tracepoint,
12218 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12219 (linux_get_thread_area): Declare.
12220 * linux-x86-low.c (jump_insn): New.
12221 (x86_get_thread_area): New.
12222 (append_insns): New.
12223 (push_opcode): New.
12224 (amd64_install_fast_tracepoint_jump_pad): New.
12225 (i386_install_fast_tracepoint_jump_pad): New.
12226 (x86_install_fast_tracepoint_jump_pad): New.
12227 (the_low_target): Install x86_get_thread_area and
12228 x86_install_fast_tracepoint_jump_pad.
12229 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12230 (struct fast_tracepoint_jump): New.
12231 (fast_tracepoint_jump_insn): New.
12232 (fast_tracepoint_jump_shadow): New.
12233 (find_fast_tracepoint_jump_at): New.
12234 (fast_tracepoint_jump_here): New.
12235 (delete_fast_tracepoint_jump): New.
12236 (set_fast_tracepoint_jump): New.
12237 (uninsert_fast_tracepoint_jumps_at): New.
12238 (reinsert_fast_tracepoint_jumps_at): New.
12239 (set_breakpoint_at): Use write_inferior_memory.
12240 (uninsert_raw_breakpoint): Use write_inferior_memory.
12241 (check_mem_read): Mask out fast tracepoint jumps.
12242 (check_mem_write): Mask out fast tracepoint jumps.
12243 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12244 (set_fast_tracepoint_jump): Declare.
12245 (delete_fast_tracepoint_jump)
12246 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12247 (reinsert_fast_tracepoint_jumps_at): Declare.
12248 * regcache.c: Don't compile many functions when building the
12249 in-process agent library.
12250 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12251 the register buffer in the heap.
12252 (free_register_cache): If the register buffer isn't owned by the
12253 regcache, don't free it.
12254 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12255 pre-existing register caches.
12256 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12258 (convert_ascii_to_int): : Constify `from' parameter type.
12259 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12260 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12261 the needed buffer in-place.
12262 (relocate_instruction): New.
12263 * server.c (handle_query) <qSymbols>: If the target supports
12264 tracepoints, give it a chance of looking up symbols. Report
12265 support for fast tracepoints.
12266 (handle_status): Stabilize threads.
12267 (process_serial_event): Adjust.
12268 * server.h (struct fast_tracepoint_jump): Forward declare.
12269 (struct process_info) <fast_tracepoint_jumps>: New field.
12270 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12271 (decode_X_packet, decode_M_packet): Adjust.
12272 (relocate_instruction): Declare.
12273 (in_process_agent_loaded): Declare.
12274 (tracepoint_look_up_symbols): Declare.
12275 (struct fast_tpoint_collect_status): Declare.
12276 (fast_tracepoint_collecting): Declare.
12277 (force_unlock_trace_buffer): Declare.
12278 (handle_tracepoint_bkpts): Declare.
12279 (initialize_low_tracepoint)
12280 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12281 * target.h (struct target_ops) <stabilize_threads,
12282 install_fast_tracepoint_jump_pad>: New fields.
12283 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12284 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12285 [HAVE_STDINT_H]: Include stdint.h.
12286 (trace_debug_1): Rename to ...
12287 (trace_vdebug): ... this.
12288 (trace_debug): Rename to ...
12289 (trace_debug_1): ... this. Add `level' parameter.
12290 (trace_debug): New.
12291 (ATTR_USED, ATTR_NOINLINE): New.
12292 (IP_AGENT_EXPORT): New.
12293 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12294 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12295 (about_to_request_buffer_space, trace_buffer_is_full)
12296 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12297 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12298 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12299 (traceframe_write_count, traceframes_created)
12300 (trace_state_variables)
12301 New renaming defines.
12302 (struct ipa_sym_addresses): New.
12303 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12304 (symbol_list): New.
12305 (ipa_sym_addrs): New.
12306 (all_tracepoint_symbols_looked_up): New.
12307 (in_process_agent_loaded): New.
12308 (write_e_ipa_not_loaded): New.
12309 (maybe_write_ipa_not_loaded): New.
12310 (tracepoint_look_up_symbols): New.
12311 (debug_threads) [IN_PROCESS_AGENT]: New.
12312 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12313 (UNKNOWN_SIDE_EFFECTS): New.
12314 (stop_tracing): New.
12315 (flush_trace_buffer): New.
12316 (stop_tracing_bkpt): New.
12317 (flush_trace_buffer_bkpt): New.
12318 (read_inferior_integer): New.
12319 (read_inferior_uinteger): New.
12320 (read_inferior_data_pointer): New.
12321 (write_inferior_data_pointer): New.
12322 (write_inferior_integer): New.
12323 (write_inferior_uinteger): New.
12324 (struct collect_static_trace_data_action): Delete.
12325 (enum tracepoint_type): New.
12326 (struct tracepoint) <type>: New field `type'.
12327 <actions_str, step_actions, step_actions_str>: Only include in
12329 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12330 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12331 (tracepoints): Use IP_AGENT_EXPORT.
12332 (last_tracepoint): Don't include in the IPA.
12333 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12334 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12335 (alloced_trace_state_variables): New.
12336 (trace_state_variables): Use IP_AGENT_EXPORT.
12337 (traceframe_t): Delete unused variable.
12338 (circular_trace_buffer): Don't include in the IPA.
12339 (trace_buffer_start): Delete.
12340 (struct trace_buffer_control): New.
12341 (trace_buffer_free): Delete.
12342 (struct ipa_trace_buffer_control): New.
12343 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12344 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12346 (trace_buffer_ctrl): New.
12347 (TRACE_BUFFER_CTRL_CURR): New.
12348 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12349 Reimplement as macros.
12350 (trace_buffer_wrap): Delete.
12351 (traceframe_write_count, traceframe_read_count)
12352 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12353 (struct tracepoint_hit_ctx) <type>: New field.
12354 (struct fast_tracepoint_ctx): New.
12355 (memory_barrier): New.
12357 (record_tracepoint_error): Update atomically in the IPA.
12358 (clear_inferior_trace_buffer): New.
12359 (about_to_request_buffer_space): New.
12360 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12361 updating the same buffer.
12362 (add_tracepoint): Default the tracepoint's type to trap
12363 tracepoint, and orig_size to -1.
12364 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12365 internal variables.
12366 (create_trace_state_variable): New parameter `gdb'. Handle it.
12367 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12368 (cmd_qtdp): Handle fast tracepoints.
12369 (cmd_qtdv): Adjust.
12370 (max_jump_pad_size): New.
12371 (gdb_jump_pad_head): New.
12372 (get_jump_space_head): New.
12373 (claim_jump_space): New.
12374 (sort_tracepoints): New.
12375 (MAX_JUMP_SIZE): New.
12376 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12378 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12379 support. Upload fast traceframes, and delete internal IPA
12381 (stop_tracing_handler): New.
12382 (flush_trace_buffer_handler): New.
12383 (cmd_qtstop): Upload fast tracepoints.
12384 (response_tracepoint): Handle fast tracepoints.
12385 (tracepoint_finished_step): Upload fast traceframes. Set the
12386 tracepoint hit context's tracepoint type.
12387 (handle_tracepoint_bkpts): New.
12388 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12389 type. Add comment about fast tracepoints.
12390 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12391 non-existing action_str field.
12392 (get_context_regcache): Handle fast tracepoints.
12393 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12395 (fast_tracepoint_from_jump_pad_address): New.
12396 (fast_tracepoint_from_ipa_tpoint_address): New.
12397 (collecting_t): New.
12398 (force_unlock_trace_buffer): New.
12399 (fast_tracepoint_collecting): New.
12401 (gdb_collect): New.
12402 (write_inferior_data_ptr): New.
12403 (target_tp_heap): New.
12404 (target_malloc): New.
12405 (download_agent_expr): New.
12407 (download_tracepoints): New.
12408 (download_trace_state_variables): New.
12409 (upload_fast_traceframes): New.
12410 (IPA_FIRST_TRACEFRAME): New.
12411 (IPA_NEXT_TRACEFRAME_1): New.
12412 (IPA_NEXT_TRACEFRAME): New.
12413 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12414 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12415 (gdb_jump_pad_buffer_end): New.
12416 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12417 (initialize_tracepoint): Adjust.
12418 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12419 buffer. Initialize the low module.
12420 * utils.c (PREFIX, TOOLNAME): New.
12421 (malloc_failure): Use PREFIX.
12422 (error): In the IPA, an error causes an exit.
12423 (fatal, warning): Use PREFIX.
12424 (internal_error): Use TOOLNAME.
12425 (NUMCELLS): Increase to 10.
12426 * configure, config.in: Regenerate.
12428 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12430 * server.c (handle_query) <qSupported>: Do two passes over the
12431 qSupported string to avoid nesting strtok.
12433 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12435 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12437 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12438 -Wl,--dynamic-list.
12439 * configure: Regenerate.
12440 * proc-service.list: New.
12442 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12444 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12447 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12449 * gdbreplay.c (remote_open): Check error return from socket() call by
12450 its equality to -1 not by it being negative.
12451 * remote-utils.c (remote_open): Likewise.
12453 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12455 * config.h: Regenerate.
12457 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12459 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12460 doesn't provide PTRACE_GET_THREAD_AREA.
12462 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12464 * linux-m68k-low.c: Include <asm/ptrace.h>
12465 (ps_get_thread_area): Implement.
12467 2010-05-03 Doug Evans <dje@google.com>
12469 * event-loop.c (struct callback_event): New struct.
12470 (callback_list): New global.
12471 (append_callback_event, delete_callback_event): New functions.
12472 (process_callback): New function.
12473 (start_event_loop): Call it.
12474 * remote-utils.c (NOT_SCHEDULED): Define.
12475 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12476 moved out of readchar.
12477 (readchar): Rewrite. Call reschedule before returning.
12478 (reset_readchar): New function.
12479 (remote_close): Call it.
12480 (process_remaining, reschedule): New functions.
12481 * server.h (callback_handler_func): New typedef.
12482 (append_callback_event, delete_callback_event): Declare.
12484 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12486 * proc-service.c (ps_pglobal_lookup): Use
12487 thread_db_look_up_one_symbol.
12488 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12489 parameter. Use it instead of all_symbols_looked_up.
12490 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12492 (all_symbols_looked_up): Don't declare.
12493 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12494 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12496 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12497 Set all_symbols_looked_up here.
12498 (thread_db_look_up_one_symbol): New.
12499 (thread_db_get_tls_address): Adjust.
12500 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12501 thread_db object on the heap, and tentatively set it in the
12503 (thread_db_init): Don't set all_symbols_looked_up here.
12504 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12506 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12508 * linux-low.c (linux_kill, linux_detach): Adjust.
12509 (status_pending_p_callback): Remove redundant statement. Check
12510 for !TARGET_WAITIKIND_IGNORE, instead of
12511 TARGET_WAITKIND_STOPPED.
12512 (handle_tracepoints): Make sure LWP is locked. Adjust.
12513 (linux_wait_for_event_1): Adjust.
12514 (linux_cancel_breakpoints): New.
12515 (unsuspend_one_lwp): New.
12516 (unsuspend_all_lwps): New.
12517 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12518 (send_sigstop_callback): Change return type to int, add new
12519 `except' parameter and handle it.
12520 (suspend_and_send_sigstop_callback): New.
12521 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12522 pass them down. If SUSPEND, also increment the lwp's suspend
12524 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12525 (need_step_over_p): Don't consider suspended LWPs.
12526 (start_step_over): Adjust.
12527 (proceed_one_lwp): Change return type to int, add new `except'
12528 parameter and handle it.
12529 (unsuspend_and_proceed_one_lwp): New.
12530 (proceed_all_lwps): Use find_inferior instead of
12532 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12533 also decrement the suspend count of LWPs. Pass `except' down,
12534 instead of hacking its suspend count.
12535 (linux_pause_all): Add `freeze' parameter. Adjust.
12536 (linux_unpause_all): New.
12537 (linux_target_ops): Install linux_unpause_all.
12538 * server.c (handle_status): Adjust.
12539 * target.h (struct target_ops): New fields `unpause_all' and
12540 `cancel_breakpoints'. Add new parameter to `pause_all'.
12541 (pause_all): Add new `freeze' parameter.
12542 (unpause_all): New.
12543 (cancel_breakpoints): New.
12544 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12545 cancel breakpoints.
12546 (cmd_qtstart): Pause threads.
12547 (stop_tracing): Pause threads, and cancel breakpoints.
12548 * win32-low.c (win32_target_ops): Adjust.
12550 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12552 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12553 the inferior right away from here...
12554 (linux_wait_1): ... to here, and adjust to check the thread's
12555 last_resume_kind instead of the lwp's step or stop_expected flags.
12557 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12559 * README: Use consistent `GDB' and `GDBserver' spellings.
12561 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12563 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12564 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12565 (linux_detach_one_lwp): Assume the lwp is stopped.
12566 (any_thread_of): Delete.
12567 (linux_detach): Stop all lwps here. Don't blindly delete all
12569 (delete_lwp_callback): New.
12570 (linux_mourn): Delete all lwps of the process that is gone.
12571 (linux_wait_1): Don't delete the last lwp of the process here.
12572 * mem-break.h (mark_breakpoints_out): Declare.
12573 * mem-break.c (mark_breakpoints_out): New.
12574 (free_all_breakpoints): Use it.
12575 * server.c (handle_target_event): If the process is gone, mark
12577 * thread-db.c (struct thread_db) <create_bp>: New field.
12578 (thread_db_enable_reporting): Fix prototype. Store a thread event
12579 breakpoint reference in the thread_db struct.
12580 (thread_db_load_search): Clear the thread_db object.
12581 (try_thread_db_load_1): Ditto.
12582 (switch_to_process): New.
12583 (disable_thread_event_reporting): Use it.
12584 (remove_thread_event_breakpoints): New.
12585 (thread_db_detach, thread_db_mourn): Use it.
12587 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12589 * linux-low.c (linux_enable_event_reporting): New.
12590 (linux_wait_for_event_1, handle_extended_wait): Use it.
12592 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12594 * linux-low.c (linux_kill_one_lwp, linux_kill)
12595 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12596 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12597 SIGSTOP even if the LWP is stopped.
12598 (send_sigstop_callback): New.
12599 (stop_all_lwps): Use send_sigstop_callback instead.
12600 (linux_resume_one_thread): Adjust.
12601 (proceed_one_lwp): Still proceed an LWP that the client has
12602 requested to stop, if we haven't reported it as stopped yet. Make
12603 sure that LWPs the client want stopped, have a pending SIGSTOP.
12605 2010-04-26 Doug Evans <dje@google.com>
12607 * server.c (handle_general_set): Make static.
12609 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12610 Print received char after testing for error/eof instead of before.
12611 (input_interrupt): Tweak comment.
12613 2010-04-23 Doug Evans <dje@google.com>
12615 * server.c (start_inferior): Print inferior argv if --debug.
12617 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12619 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12620 * nto-x86-low.c: Include server.h
12622 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12624 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12625 be consistent with other sources of this directory.
12626 (init_registers_amd64): Correct name of source file of this function
12629 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12631 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12632 64-bit executables.
12634 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12636 * win32-i386-low.c: Add 64-bit support.
12637 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12638 (init_registers_amd64): Declare.
12639 (mappings): Add 64-bit version of array.
12640 (init_windows_x86): New function.
12641 (the_low_target): Change init_arch field to init_windows_x86.
12643 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12645 * win32-low.c: Adapt to support also 64-bit architecture.
12646 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12647 (get_image_name): Use SIZE_T type for local variable `done'.
12648 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12649 (toolhelp_get_dll_name): Idem.
12650 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12651 Use uintptr_t typecast to avoid warning.
12652 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12653 (handle_exception): Use phex_nz to avoid warning.
12654 (win32_wait): Remove unused local variable `process'.
12656 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12658 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12661 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12663 * configure.ac: Use `ws2_32' library for srv_mingw.
12664 * configure: Regenerate.
12665 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12666 * remote-utils.c: Likewise.
12668 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12670 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12671 if __x86_64__ is defined.
12673 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12675 * configure: Regenerate.
12677 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12679 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12680 * target.h (target_ops): New get_tib_address field.
12681 * win32-low.h (win32_thread_info): Add thread_local_base field.
12682 * win32-low.c (child_add_thread): Add tlb argument.
12683 Set thread_local_base field to TLB.
12684 (get_child_debug_event): Adapt to child_add_thread change.
12685 (win32_get_tib_address): New function.
12686 (win32_target_ops): Set get_tib_address field to
12687 win32_get_tib_address.
12688 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12690 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12692 * linux-low.c (linux_mourn): Also remove the process.
12693 * server.c (handle_target_event): Don't remove the process here.
12694 * nto-low.c (nto_mourn): New.
12695 (nto_target_ops): Install it.
12696 * spu-low.c (spu_mourn): New.
12697 (spu_target_ops): Install it.
12698 * win32-low.c (win32_mourn): New.
12699 (win32_target_ops): Install it.
12701 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12703 * server.h (buffer_xml_printf): Remove redundant `;'.
12705 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12707 * regcache.c (set_register_cache): Invalidate regcaches before
12708 changing the register cache layout.
12709 (regcache_invalidate_one): Allow a NULL regcache.
12710 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12711 regcaches before changing the register cache layout or the target
12714 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12716 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12717 variable warning on Linux/x86-64.
12719 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12721 GDBserver disconnected tracing support.
12723 * linux-low.c (linux_remove_process): Delete.
12724 (add_lwp): Don't set last_resume_kind here.
12725 (linux_kill): Use `mourn'.
12726 (linux_detach): Use `thread_db_detach', and `mourn'.
12727 (linux_mourn): New.
12728 (linux_attach_lwp_1): Adjust comment.
12729 (linux_attach): last_resume_kind moved the thread_info; adjust.
12730 (status_pending_p_callback): Adjust.
12731 (linux_wait_for_event_1): Adjust.
12732 (count_events_callback, select_singlestep_lwp_callback)
12733 (select_event_lwp_callback, cancel_breakpoints_callback)
12734 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12735 (proceed_one_lwp): Adjust.
12736 (linux_async): Add debug output.
12737 (linux_thread_stopped): New.
12738 (linux_pause_all): New.
12739 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12741 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12742 (thread_db_free): Delete declaration.
12743 (thread_db_detach, thread_db_mourn): Declare.
12744 * thread-db.c (thread_db_init): Use thread_db_mourn.
12745 (thread_db_free): Delete, split in two.
12746 (disable_thread_event_reporting): New.
12747 (thread_db_detach): New.
12748 (thread_db_mourn): New.
12750 * server.h (struct thread_info) <last_resume_kind>: New field.
12751 <attached>: Add comment.
12752 <gdb_detached>: New field.
12753 (handler_func): Change return type to int.
12754 (handle_serial_event, handle_target_event): Ditto.
12755 (gdb_connected): Declare.
12757 (disconnected_tracing): Declare.
12758 (stop_tracing): Declare.
12760 * server.c (handle_query) <qSupported>: Report support for
12761 disconnected tracing.
12762 (queue_stop_reply_callback): Account for running threads.
12763 (gdb_wants_thread_stopped): New.
12764 (gdb_wants_all_threads_stopped): New.
12765 (gdb_reattached_process): New.
12766 (handle_status): Clear the `gdb_detached' flag of all processes.
12767 In all-stop, stop all threads.
12768 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12769 (process_serial_event): If the remote connection breaks, or if an
12770 exit was forced with "monitor exit", force an event loop exit.
12771 Handle disconnected tracing on detach.
12772 (handle_serial_event): Adjust.
12773 (handle_target_event): If GDB isn't connected, forward events back
12774 to the inferior, unless the last process exited, in which case,
12775 exit gdbserver. Adjust interface.
12777 * remote-utils.c (remote_open): Don't block in accept. Instead
12778 register an event loop source on the listen socket file
12779 descriptor. Refactor bits into ...
12780 (listen_desc): ... this new global.
12781 (gdb_connected): ... this new function.
12782 (enable_async_notification): ... this new function.
12783 (handle_accept_event): ... this new function.
12784 (remote_close): Clear remote_desc.
12786 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12788 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12790 (mourn_inferior): Define.
12791 (target_process_qsupported): Avoid the dangling else problem.
12792 (thread_stopped): Define.
12793 (pause_all): Define.
12794 (target_waitstatus_to_string): Declare.
12795 * target.c (target_waitstatus_to_string): New.
12797 * tracepoint.c (tracing): Make extern.
12798 (disconnected_tracing): New.
12799 (stop_tracing): Make extern. Handle tracing stops due to GDB
12801 (cmd_qtdisconnected): New.
12802 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12803 (handle_tracepoint_general_set): Handle QTDisconnected.
12805 * event-loop.c (event_handler_func): Change return type to int.
12806 (process_event): Bail out if the event handler wants the event
12808 (handle_file_event): Ditto.
12809 (start_event_loop): Bail out if the event handler wants the event
12812 * nto-low.c (nto_target_ops): Adjust.
12813 * spu-low.c (spu_wait): Don't remove the process here.
12814 (spu_target_ops): Adjust.
12815 * win32-low.c (win32_wait): Don't remove the process here.
12816 (win32_target_ops): Adjust.
12818 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12820 * regcache.c (realloc_register_cache): Invalidate inferior's
12821 regcache before recreating it.
12823 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12825 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12827 2010-04-09 Stan Shebs <stan@codesourcery.com>
12828 Pedro Alves <pedro@codesourcery.com>
12830 * server.h (LONGEST): New.
12831 (struct thread_info) <while_stepping>: New field.
12832 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12834 (initialize_tracepoint, handle_tracepoint_general_set)
12835 (handle_tracepoint_query, tracepoint_finished_step)
12836 (tracepoint_was_hit, release_while_stepping_state_list):
12837 (current_traceframe): Declare.
12838 * server.c (handle_general_set): Handle tracepoint packets.
12839 (read_memory): New.
12840 (write_memory): New.
12841 (handle_search_memory_1): Use read_memory.
12842 (handle_query): Report support for conditional tracepoints, trace
12843 state variables, and tracepoint sources. Handle tracepoint
12845 (main): Initialize the tracepoints module.
12846 (process_serial_event): Handle traceframe reads/writes.
12848 * linux-low.c (handle_tracepoints): New.
12849 (linux_wait_1): Call it.
12850 (linux_resume_one_lwp): Handle while-stepping.
12851 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12852 (linux_target_ops): Install them.
12853 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12855 * linux-x86-low.c (x86_supports_tracepoints): New.
12856 (the_low_target). Install it.
12858 * mem-break.h (delete_breakpoint): Declare.
12859 * mem-break.c (delete_breakpoint): Make external.
12861 * target.h (struct target_ops): Add `supports_tracepoints',
12862 `read_pc', and `write_pc' fields.
12863 (target_supports_tracepoints): Define.
12864 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12867 * regcache.h (struct regcache) <registers_owned>: New field.
12868 (init_register_cache, regcache_cpy): Declare.
12869 (regcache_read_pc, regcache_write_pc): Declare.
12870 (register_cache_size): Declare.
12871 (supply_regblock): Declare.
12872 * regcache.c (init_register_cache): New.
12873 (new_register_cache): Use it.
12874 (regcache_cpy): New.
12875 (register_cache_size): New.
12876 (supply_regblock): New.
12877 (regcache_read_pc, regcache_write_pc): New.
12879 * tracepoint.c: New.
12881 * Makefile.in (OBS): Add tracepoint.o.
12882 (tracepoint.o): New rule.
12884 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12886 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12888 (i386-mmx.c): Likewise.
12889 (i386-mmx-linux.o): Likewise.
12890 (i386-mmx-linux.c): Likewise.
12892 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12893 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12894 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12895 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12897 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12898 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12899 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12901 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12903 * Makefile.in (clean): Updated.
12905 (i386-avx.c): Likewise.
12906 (i386-avx-linux.o): Likewise.
12907 (i386-avx-linux.c): Likewise.
12908 (amd64-avx.o): Likewise.
12909 (amd64-avx.c): Likewise.
12910 (amd64-avx-linux.o): Likewise.
12911 (amd64-avx-linux.c): Likewise.
12913 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12914 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12915 (srv_amd64_regobj): Add amd64-avx.o.
12916 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12917 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12918 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12919 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12920 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12921 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12922 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12924 * i387-fp.c: Include "i386-xstate.h".
12926 (i387_cache_to_xsave): Likewise.
12927 (i387_xsave_to_cache): Likewise.
12928 (x86_xcr0): Likewise.
12930 * i387-fp.h (i387_cache_to_xsave): Likewise.
12931 (i387_xsave_to_cache): Likewise.
12932 (x86_xcr0): Likewise.
12934 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12935 * linux-crisv32-low.c (target_regsets): Likewise.
12936 * linux-m68k-low.c (target_regsets): Likewise.
12937 * linux-mips-low.c (target_regsets): Likewise.
12938 * linux-ppc-low.c (target_regsets): Likewise.
12939 * linux-s390-low.c (target_regsets): Likewise.
12940 * linux-sh-low.c (target_regsets): Likewise.
12941 * linux-sparc-low.c (target_regsets): Likewise.
12942 * linux-xtensa-low.c (target_regsets): Likewise.
12944 * linux-low.c: Include <sys/uio.h>.
12945 (regsets_fetch_inferior_registers): Support nt_type.
12946 (regsets_store_inferior_registers): Likewise.
12947 (linux_process_qsupported): New.
12948 (linux_target_ops): Add linux_process_qsupported.
12950 * linux-low.h (regset_info): Add nt_type.
12951 (linux_target_ops): Add process_qsupported.
12953 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12955 (init_registers_i386_avx_linux): New.
12956 (init_registers_amd64_avx_linux): Likewise.
12957 (xmltarget_i386_linux_no_xml): Likewise.
12958 (xmltarget_amd64_linux_no_xml): Likewise.
12959 (PTRACE_GETREGSET): Likewise.
12960 (PTRACE_SETREGSET): Likewise.
12961 (x86_fill_xstateregset): Likewise.
12962 (x86_store_xstateregset): Likewise.
12963 (use_xml): Likewise.
12964 (x86_linux_update_xmltarget): Likewise.
12965 (x86_linux_process_qsupported): Likewise.
12966 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12967 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12968 init_registers_i386_linux here. Call
12969 x86_linux_update_xmltarget.
12970 (the_low_target): Add x86_linux_process_qsupported.
12972 * server.c (handle_query): Call target_process_qsupported.
12974 * target.h (target_ops): Add process_qsupported.
12975 (target_process_qsupported): New.
12977 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12979 * inferiors.c (add_thread): Set last_status kind to
12980 TARGET_WAITKIND_IGNORE.
12981 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12982 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12983 (linux_wait_1): Move `thread' local definition to block that uses
12984 it. Don't NULL initialize `event_child'.
12985 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12986 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12987 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12989 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12991 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12992 an extended waitstatus, or by a watchpoint.
12993 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12994 thread was stepping or has been stopped by a watchpoint.
12996 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12998 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12999 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13000 of another, then delete the previous, and validate all
13002 (validate_inserted_breakpoint): New.
13003 (delete_disabled_breakpoints): New.
13004 (validate_breakpoints): New.
13005 (check_mem_read): Validate breakpoints before trusting their
13006 shadow. Delete disabled breakpoints.
13007 (check_mem_write): Validate breakpoints before trusting they
13008 should be inserted. Delete disabled breakpoints.
13009 * mem-break.h (validate_breakpoints):
13010 * server.c (handle_query): Validate breakpoints when we see a
13013 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13015 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13016 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13017 if we could tell there's a GDB breakpoint at stop_pc.
13018 (need_step_over_p): Don't do a step over if we find a GDB
13019 breakpoint at the resume PC.
13021 * mem-break.c (struct raw_breakpoint): New.
13022 (enum bkpt_type): New type `gdb_breakpoint'.
13023 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13024 fields. New field `raw'.
13025 (find_raw_breakpoint_at): New.
13026 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13027 breakpoint instead.
13028 (set_breakpoint_at): Adjust.
13029 (delete_raw_breakpoint): New.
13030 (release_breakpoint): New.
13031 (delete_breakpoint): Rename to...
13032 (delete_breakpoint_1): ... this. Add proc parameter. Use
13033 release_breakpoint. Return ENOENT.
13034 (delete_breakpoint): Reimplement.
13035 (find_breakpoint_at): Delete.
13036 (find_gdb_breakpoint_at): New.
13037 (delete_breakpoint_at): Delete.
13038 (set_gdb_breakpoint_at): New.
13039 (delete_gdb_breakpoint_at): New.
13040 (gdb_breakpoint_here): New.
13041 (set_reinsert_breakpoint): Use release_breakpoint.
13042 (uninsert_breakpoint): Rename to ...
13043 (uninsert_raw_breakpoint): ... this.
13044 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13045 (reinsert_raw_breakpoint): Change parameter type to
13047 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13049 (check_breakpoints): Adjust. Use release_breakpoint.
13050 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13051 (breakpoint_inserted_here): Ditto.
13052 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13053 Don't trust the breakpoint's shadow if it is not inserted.
13054 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13055 (delete_all_breakpoints): Adjust.
13056 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13057 use delete_breakpoint_1.
13059 * mem-break.h (breakpoints_supported): Delete declaration.
13060 (set_gdb_breakpoint_at): Declare.
13061 (gdb_breakpoint_here): Declare.
13062 (delete_breakpoint_at): Delete.
13063 (delete_gdb_breakpoint_at): Declare.
13065 * server.h (struct raw_breakpoint): Forward declare.
13066 (struct process_info): New field `raw_breakpoints'.
13068 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13071 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13073 * linux-low.c (status_pending_p_callback): Fix comment.
13074 (linux_wait_for_event_1): Move most of the internal breakpoint
13075 handling from here...
13076 (linux_wait_1): ... to here.
13077 (count_events_callback): New.
13078 (select_singlestep_lwp_callback): New.
13079 (select_event_lwp_callback): New.
13080 (cancel_breakpoints_callback): New.
13081 (select_event_lwp): New.
13082 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13083 priority to all LWPs that have had events that should be reported
13084 to the client. Cancel breakpoints when about to reporting the
13085 event to the client, not while stopping lwps. No longer cancel
13086 finished single-steps here.
13087 (cancel_finished_single_step): Delete.
13088 (cancel_finished_single_steps): Delete.
13090 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13092 * mem-break.c (enum bkpt_type): New.
13093 (struct breakpoint): New field `type'.
13094 (set_breakpoint_at): Change return type to struct breakpoint
13095 pointer. Set type to `other_breakpoint' by default.
13096 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13097 in the breakpoint list.
13098 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13099 (reinsert_breakpoint): Rename to ...
13100 (reinsert_raw_breakpoint): ... this.
13101 (reinsert_breakpoints_at): Adjust.
13102 * mem-break.h (struct breakpoint): Declare.
13103 (set_breakpoint_at): Change return type to struct breakpoint
13106 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13108 * server.c (handle_query): Assign, not compare.
13110 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13112 Teach linux gdbserver to step-over-breakpoints.
13114 * linux-low.c (can_hardware_single_step): New.
13115 (supports_breakpoints): New.
13116 (handle_extended_wait): If stopping threads, read the stop pc of
13117 the new cloned LWP.
13119 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13120 low target doesn't support retrieving the PC.
13121 (add_lwp): Set last_resume_kind to resume_continue.
13122 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13123 (linux_attach): Don't clear stop_expected. Set the lwp's
13124 last_resume_kind to resume_stop.
13125 (linux_detach_one_lwp): Don't check for removed breakpoints.
13126 (check_removed_breakpoint): Delete.
13127 (status_pending_p): Rename to ...
13128 (status_pending_p_callback): ... this. Don't check for removed
13129 breakpoints. Don't consider threads that are stopped from GDB's
13131 (linux_wait_for_lwp): Always read the stop_pc here.
13132 (cancel_breakpoint): New.
13133 (step_over_bkpt): New global.
13134 (linux_wait_for_event_1): Implement stepping over breakpoints.
13135 (gdb_wants_lwp_stopped): New.
13136 (gdb_wants_all_stopped): New.
13137 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13138 single-step traps here. Store the thread's last reported target
13140 (send_sigstop): Don't clear stop_expected. Always set it,
13142 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13143 (cancel_finished_single_step): New.
13144 (cancel_finished_single_steps): New.
13145 (wait_for_sigstop): Don't cancel finished single-step traps here.
13146 (linux_resume_one_lwp): Don't check for removed breakpoints.
13147 Don't set `step' on non-hardware step archs.
13148 (linux_set_resume_request): Ignore resume_stop requests if already
13149 stopping or stopped. Set the lwp's last_resume_kind.
13150 (resume_status_pending_p): Don't check for removed breakpoints.
13151 (need_step_over_p): New.
13152 (start_step_over): New.
13153 (finish_step_over): New.
13154 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13155 requests. Clear the thread's last reported target waitstatus.
13156 Don't use the `suspended' flag. Don't consider pending breakpoints.
13157 (linux_resume): Start a step-over if necessary.
13158 (proceed_one_lwp): New.
13159 (proceed_all_lwps): New.
13160 (unstop_all_lwps): New.
13161 * linux-low.h (struct lwp_info): Rewrite comment for the
13162 `suspended' flag. Add the `stop_pc' field. Delete the
13163 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13164 Add `'last_resume_kind' and `need_step_over' fields.
13165 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13166 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13167 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13168 (set_raw_breakpoint_at): New.
13169 (set_breakpoint_at): Rewrite to use it.
13170 (reinsert_breakpoint_handler): Delete.
13171 (set_reinsert_breakpoint): New.
13172 (reinsert_breakpoint_by_bp): Delete.
13173 (delete_reinsert_breakpoints): New.
13174 (uninsert_breakpoint): Rewrite.
13175 (uninsert_breakpoints_at): New.
13176 (reinsert_breakpoint): Rewrite.
13177 (reinsert_breakpoints_at): New.
13178 (check_breakpoints): Rewrite.
13179 (breakpoint_here): New.
13180 (breakpoint_inserted_here): New.
13181 (check_mem_read): Adjust.
13182 * mem-break.h (breakpoints_supported, breakpoint_here)
13183 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13184 (reinsert_breakpoint_by_bp): Delete declaration.
13185 (delete_reinsert_breakpoints): Declare.
13186 (reinsert_breakpoint): Delete declaration.
13187 (reinsert_breakpoints_at): Declare.
13188 (uninsert_breakpoint): Delete declaration.
13189 (uninsert_breakpoints_at): Declare.
13190 (check_breakpoints): Adjust prototype.
13191 * server.h: Adjust include order.
13192 (struct thread_info): Declare here. Add a `last_status' field.
13194 2010-03-23 Michael Snyder <msnyder@vmware.com>
13196 * server.c (crc32): New function.
13197 (handle_query): Add handling for 'qCRC:' request.
13199 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13201 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13202 lwp had been stopped by a watchpoint.
13204 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13206 * server.h (internal_error): Declare.
13207 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13208 * utils.c (internal_error): New function.
13210 2010-03-15 Andreas Schwab <schwab@redhat.com>
13212 * configure.srv: Fix typo setting srv_regobj.
13214 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13216 * linux-low.c (fetch_register): Avoid passing a non string literal
13218 (usr_store_inferior_registers): Ditto.
13220 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13222 * linux-low.c (linux_write_memory): Bail out early if peeking
13225 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13227 * linux-low.h (struct lwp_info): New fields
13228 `stopped_by_watchpoint' and `stopped_data_address'.
13229 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13230 here, and cache them in the lwp object.
13231 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13233 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13235 (linux_stopped_by_watchpoint): Rewrite.
13236 (linux_stopped_data_address): Rewrite.
13238 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13240 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13241 switching the current inferior, not before.
13243 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13245 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13246 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13247 i386-linux.c and amd64-linux.c.
13248 (reg-i386.o): Removed.
13249 (reg-i386.c): Likewise.
13250 (reg-i386-linux.o): Likewise.
13251 (reg-i386-linux.c): Likewise.
13252 (reg-x86-64.o): Likewise.
13253 (reg-x86-64.c): Likewise.
13254 (reg-x86-64-linux.o): Likewise.
13255 (reg-x86-64-linux.c): Likewise.
13257 (i386.c): Likewise.
13258 (i386-linux.o): Likewise.
13259 (i386-linux.c): Likewise.
13260 (amd64.o): Likewise.
13261 (amd64.c): Likewise.
13262 (amd64-linux.o): Likewise.
13263 (amd64-linux.c): Likewise.
13265 * configure.srv (srv_i386_regobj): New.
13266 (srv_i386_linux_regobj): Likewise.
13267 (srv_amd64_regobj): Likewise.
13268 (srv_amd64_linux_regobj): Likewise.
13269 (srv_i386_32bit_xmlfiles): Likewise.
13270 (srv_i386_64bit_xmlfiles): Likewise.
13271 (srv_i386_xmlfiles): Likewise.
13272 (srv_amd64_xmlfiles): Likewise.
13273 (srv_i386_linux_xmlfiles): Likewise.
13274 (srv_amd64_linux_xmlfiles): Likewise.
13275 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13276 srv_xmlfiles to $srv_i386_xmlfiles.
13277 (i[34567]86-*-mingw32ce*): Likewise.
13278 (i[34567]86-*-mingw*): Likewise.
13279 (i[34567]86-*-nto*): Likewise.
13280 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13281 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13282 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13283 (x86_64-*-linux*): Likewise.
13285 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13286 (init_registers_amd64_linux): New.
13287 (x86_arch_setup): Replace init_registers_x86_64_linux with
13288 init_registers_amd64_linux.
13290 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13292 * configure.ac: Check for libdl. If it is not available link against
13293 static libthread_db.
13294 * configure: Regenerate.
13296 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13300 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13301 handing a read watchpoint.
13302 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13304 2010-02-12 Doug Evans <dje@google.com>
13306 * linux-low.c (linux_supports_tracefork_flag): Document.
13307 (linux_look_up_symbols): Add comment.
13309 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13311 * regcache.c (supply_register): Clear regcache if buf is NULL.
13313 2010-02-02 Nicolas Roche <roche@sourceware.org>
13314 Joel Brobecker <brobecker@adacore.com>
13316 * inferiors.c (find_inferior): Add function documentation.
13317 (unloaded_dll): Handle the case where the unloaded dll has not
13318 been previously registered in the dll list.
13320 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13322 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13323 (thumb2_breakpoint): New.
13324 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13326 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13328 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13329 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13332 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13334 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13336 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13338 * linux-s390-low.c (s390_collect_ptrace_register)
13339 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13341 2010-01-21 Doug Evans <dje@google.com>
13343 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13344 (PTRACE_ARG4_TYPE): New macro.
13345 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13346 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13347 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13348 (usr_store_inferior_registers): Ditto.
13349 (linux_read_memory, linux_write_memory): Ditto.
13350 (linux_test_for_tracefork): Ditto.
13352 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13353 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13355 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13357 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13360 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13362 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13363 prototype to take a regcache. Adjust.
13365 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13367 * regcache.h (struct thread_info): Forward declare.
13368 (struct regcache): New.
13369 (new_register_cache): Adjust prototype.
13370 (get_thread_regcache): Declare.
13371 (free_register_cache): Adjust prototype.
13372 (registers_to_string, registers_from_string): Ditto.
13373 (supply_register, supply_register_by_name, collect_register)
13374 (collect_register_as_string, collect_register_by_name): Ditto.
13375 * regcache.c (struct inferior_regcache_data): Delete.
13376 (get_regcache): Rename to ...
13377 (get_thread_regcache): ... this. Adjust. Switch inferior before
13378 fetching registers.
13379 (regcache_invalidate_one): Adjust.
13380 (regcache_invalidate): Fix prototype.
13381 (new_register_cache): Return the new register cache.
13382 (free_register_cache): Change prototype.
13383 (realloc_register_cache): Adjust.
13384 (registers_to_string): Change prototype to take a regcache. Adjust.
13385 (registers_from_string): Ditto.
13386 (register_data): Ditto.
13387 (supply_register): Ditto.
13388 (supply_register_by_name): Ditto.
13389 (collect_register): Ditto.
13390 (collect_register_as_string): Ditto.
13391 (collect_register_by_name): Ditto.
13392 * server.c (process_serial_event): Adjust.
13393 * linux-low.h (regset_fill_func, regset_store_func): Change
13395 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13397 * linux-low.c (get_stop_pc): Adjust.
13398 (check_removed_breakpoint): Adjust.
13399 (linux_wait_for_event): Adjust.
13400 (linux_resume_one_lwp): Adjust.
13401 (fetch_register): Add regcache parameter. Adjust.
13402 (usr_store_inferior_registers): Ditto.
13403 (regsets_fetch_inferior_registers): Ditto.
13404 (regsets_store_inferior_registers): Ditto.
13405 (linux_fetch_registers, linux_store_registers): Ditto.
13406 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13408 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13410 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13411 prototype to take a regcache.
13412 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13413 * remote-utils.c (convert_ascii_to_int, outreg)
13414 (prepare_resume_reply): Change prototype to take a regcache.
13416 * target.h (struct target_ops) <fetch_registers, store_registers>:
13417 Change prototype to take a regcache.
13418 (fetch_inferior_registers, store_inferior_registers): Change
13419 prototype to take a regcache. Adjust.
13420 * proc-service.c (ps_lgetregs): Adjust.
13421 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13422 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13423 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13424 take a regcache. Adjust.
13425 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13426 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13427 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13428 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13429 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13430 (cris_cannot_fetch_register):
13431 (cris_breakpoint_at): Change prototype to take a regcache.
13433 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13434 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13435 to take a regcache. Adjust.
13436 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13438 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13439 take a regcache. Adjust.
13440 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13441 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13442 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13443 * linux-mips-low.c (mips_get_pc):
13444 (mips_set_pc): Change prototype to take a regcache. Adjust.
13445 (mips_reinsert_addr): Adjust.
13446 (mips_collect_register): Change prototype to take a regcache.
13448 (mips_supply_register):
13449 (mips_collect_register_32bit, mips_supply_register_32bit)
13450 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13451 (mips_store_fpregset): Ditto.
13452 * linux-ppc-low.c (ppc_supply_ptrace_register)
13453 (ppc_supply_ptrace_register): Ditto.
13454 (parse_spufs_run): Adjust.
13455 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13456 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13457 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13458 take a regcache. Adjust.
13459 * linux-s390-low.c (s390_collect_ptrace_register)
13460 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13461 (s390_set_pc): Change prototype to take a regcache. Adjust.
13462 (s390_arch_setup): Adjust.
13463 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13464 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13465 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13466 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13467 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13469 (sparc_breakpoint_at): Adjust.
13470 * linux-xtensa-low.c (xtensa_fill_gregset):
13471 (xtensa_store_gregset):
13472 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13473 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13474 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13475 prototype to take a regcache. Adjust.
13476 * win32-arm-low.c (arm_fetch_inferior_register)
13477 (arm_store_inferior_register): Change prototype to take a
13479 * win32-i386-low.c (i386_fetch_inferior_register)
13480 (i386_store_inferior_register): Change prototype to take a
13482 * win32-low.c (child_fetch_inferior_registers)
13483 (child_store_inferior_registers): Change prototype to take a
13485 (win32_wait): Adjust.
13486 (win32_fetch_inferior_registers): Change prototype to take a
13488 (win32_store_inferior_registers): Adjust.
13489 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13490 store_inferior_register>: Change prototype to take a regcache.
13492 2010-01-20 Doug Evans <dje@google.com>
13494 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13496 (linux_wait_for_event1, linux_init_signals): Ditto.
13497 (W_STOPCODE): Provide definition if missing.
13499 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13501 * linux-low.c (linux_core_of_thread): New.
13502 (compare_ints, show_process, list_threads): New.
13503 (linux_qxfer_osdata): Report threads and cores.
13504 (linux_target_op): Register linux_core_of_thread.
13505 * remote-utils.c (prepare_resume_reply): Report the core.
13506 (buffer_xml_printf): Support %d specifier.
13507 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13509 (handle_query): Handle qXfer:threads. Announce availability
13511 * target.h (struct target_ops): New field core_of_thread.
13513 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13515 * Makefile.in (clean): Remove new generated files.
13516 (reg-s390.o, reg-s390.c): Remove rules.
13517 (reg-s390x.o, reg-s390x.c): Likewise.
13518 (s390-linux32.o, s390-linux32.c): Add rules.
13519 (s390-linux64.o, s390-linux64.c): Likewise.
13520 (s390x-linux64.o, s390x-linux64.c): Likewise.
13521 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13522 * linux-s390-low.c: Include <elf.h>.
13523 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13524 (init_registers_s390): Remove prototype.
13525 (init_registers_s390x): Likewise.
13526 (init_registers_s390_linux32): Add prototype.
13527 (init_registers_s390_linux64): Likewise.
13528 (init_registers_s390x_linux64): Likewise.
13529 (s390_num_regs_3264): New define.
13530 (s390_regmap_3264): New global variable.
13531 (s390_cannot_fetch_register): Remove obsolete check.
13532 (s390_cannot_store_register): Likewise.
13533 (s390_collect_ptrace_register): Handle upper/lower register halves.
13534 (s390_supply_ptrace_register): Likewise.
13535 (s390_fill_gregset): Update to register number changes.
13536 (s390_get_hwcap): New routine.
13537 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13538 Install appropriate regmap and register set.
13540 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13542 * server.c (gdbserver_version): Update copyright year to 2010.
13543 * gdbreplay.c (gdbreplay_version): Likewise.
13545 2009-12-28 Doug Evans <dje@google.com>
13547 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13548 elf/external.h. Include <elf.h> instead but only if necessary.
13550 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13552 * linux-low.c (linux_remove_process): Remove `detaching'
13553 parameter. Don't release/detach from thread_db here.
13554 (linux_kill): Release/detach from thread_db here, ...
13555 (linux_detach): ... and here, before actually detaching.
13556 (linux_wait_1): ... and here, when a process exits.
13557 * thread-db.c (any_thread_of): New.
13558 (thread_db_free): Switch the current inferior to a thread of the
13561 2009-12-21 Doug Evans <dje@google.com>
13563 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13565 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13566 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13567 warning ifndef __NR_tkill. Move setting of errno there too.
13568 Delete unnecessary resetting of errno after syscall.
13569 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13571 * configure.ac: Check for dladdr.
13572 * config.in: Regenerate.
13573 * configure: Regenerate.
13574 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13575 (try_thread_db_load): Update.
13577 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13579 2009-12-18 Doug Evans <dje@google.com>
13581 * event-loop.c: Include unistd.h if it exists.
13583 * linux-low.c (my_waitpid): Move definition away from being in
13584 between linux_tracefork_child/linux_test_for_tracefork.
13586 * gdb_proc_service.h (psaddr_t): Fix type.
13587 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13588 signature to match glibc.
13590 2009-12-16 Doug Evans <dje@google.com>
13592 * linux-low.c (linux_read_memory): Fix argument to read.
13594 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13596 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13597 events, don't leave current_inferior pointing at null.
13599 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13601 * win32-low.c (LOG): Delete.
13602 (OUTMSG): Output to stderr.
13603 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13604 on compile time LOG macro.
13605 (win32_wait): Fix debug output.
13607 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13609 * win32-low.c (win32_add_one_solib): If the dll name is
13610 "ntdll.dll", prepend the system directory to the dll path.
13612 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13614 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13616 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13617 Vladimir Prus <vladimir@codesourcery.com>
13619 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13620 * configure.ac: Check for __mcoldfire__ and set
13621 gdb_cv_m68k_is_coldfire.
13622 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13623 reg-cf.o and reg-m68k.o.
13624 * configure: Regenerated.
13626 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13628 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13629 Pass it to thread_db_free.
13630 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13631 proper `detaching' argument to linux_remove_process.
13632 * linux-low.h (thread_db_free): Add `detaching' parameter.
13633 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13635 (thread_db_free): Add `detaching' parameter. Only
13636 call td_ta_clear_event if detaching from process.
13638 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13640 * thread-db.c (thread_db_free): Fix typo.
13642 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13645 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13647 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13649 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13650 with an i686 compiler.
13651 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13653 * configure: Rebuilt.
13655 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13659 * server.c (handle_search_memory_1): Correct read_addr initialization
13660 in loop for searching subsequent chunks.
13662 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13664 * configure.ac: New --with-libthread-db option.
13665 * thread-db.c: Allow direct dependence on libthread_db.
13666 (thread_db_free): Adjust.
13667 * config.in: Regenerate.
13668 * configure: Likewise.
13670 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13673 * thread-db.c (attach_thread): New function.
13674 (maybe_attach_thread): Return success/failure.
13675 (find_new_threads_callback): Adjust.
13676 (thread_db_find_new_threads): Loop until no new threads.
13678 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13680 * proc-service.c (ps_lgetregs): Formatting.
13682 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13684 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13685 * configure.ac: Adjust.
13686 * linux-low.h (struct process_info_private): Move members to struct
13688 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13689 * linux-low.c (linux_remove_process): Adjust.
13690 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13691 * server.c (handle_query): Move code ...
13692 (handle_monitor_command): ... here. New function.
13693 * target.h (struct target_ops): New member.
13694 * thread-db.c (struct thread_db): New.
13695 (libthread_db_search_path): New variable.
13696 (thread_db_create_event, thread_db_enable_reporting)
13697 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13698 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13699 (try_thread_db_load_1, dladdr_to_soname): New functions.
13700 (try_thread_db_load, thread_db_load_search): New functions.
13701 (thread_db_init): Search for libthread_db.
13702 (thread_db_free): New function.
13703 (thread_db_handle_monitor_command): Likewise.
13704 * config.in: Regenerate.
13705 * configure: Regenerate.
13707 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13709 * spu-low.c (spu_kill): Wait for inferior to terminate.
13710 Call clear_inferiors.
13711 (spu_detach): Call clear_inferiors.
13713 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13715 * aclocal.m4: Regenerate.
13716 * config.in: Likewise.
13717 * configure: Likewise.
13719 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13721 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13722 (parse_spufs_run): New function.
13723 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13724 (ppc_breakpoint_at): Handle SPU breakpoints.
13726 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13728 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13729 (SPUFS_MAGIC): Define.
13730 (spu_enumerate_spu_ids): New function.
13731 (linux_qxfer_spu): New function.
13732 (linux_target_ops): Install linux_qxfer_spu.
13734 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13736 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13737 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13738 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13739 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13740 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13741 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13742 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13743 (init_registers_powerpc_cell32l): Add prototype.
13744 (init_registers_powerpc_cell64l): Likewise.
13745 (ppc_arch_setup): Detect Cell/B.E. architecture.
13747 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13749 * Makefile.in (datarootdir): New variable.
13751 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13753 * linux-low.c (linux_write_memory): Update debugging output.
13754 * Makefile.in (clean): Add new descriptions.
13755 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13756 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13757 * configure.srv: Add new files for arm*-*-linux*.
13758 * linux-arm-low.c: Add new declarations.
13759 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13760 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13761 (HWCAP_VFPv3D16): New.
13762 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13763 instead of __IWMMXT__.
13764 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13765 (arm_arch_setup): New.
13766 (target_regsets): Remove #ifdef. Add VFP regset.
13767 (the_low_target): Use arm_arch_setup.
13769 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13771 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13772 the main thread again.
13774 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13776 Adding Neutrino gdbserver.
13777 * configure: Regenerated.
13778 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13779 * configure.srv (i[34567]86-*-nto*): New target.
13780 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13781 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13782 (nto_comctrl) [__QNX__]: New function.
13783 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13785 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13787 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13790 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13791 Pedro Alves <pedro@codesourcery.com>
13793 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13794 don't support CONTEXT_EXTENDED_REGISTERS.
13795 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13796 (the_low_target): Install them.
13797 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13798 failing with ERROR_PIPE_NOT_CONNECTED.
13800 2009-06-30 Doug Evans <dje@google.com>
13801 Pierre Muller <muller@ics.u-strasbg.fr>
13803 Add h/w watchpoint support to x86-linux, win32-i386.
13804 * Makefile.in (SFILES): Add i386-low.c
13805 (i386_low_h): Define.
13806 (i386-low.o): Add dependencies.
13807 (linux-x86-low.o): Add i386-low.h dependency.
13808 (win32-i386-low.o): Ditto.
13809 * i386-low.c: New file.
13810 * i386-low.h: New file.
13811 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13812 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13813 * linux-low.c (linux_add_process): Initialize arch_private.
13814 (linux_remove_process): Free arch_private.
13815 (add_lwp): Initialize arch_private.
13816 (delete_lwp): Free arch_private.
13817 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13819 * linux-low.h (process_info_private): New member arch_private.
13820 (lwp_info): New member arch_private.
13821 (linux_target_ops): New members new_process, new_thread,
13823 (ptid_of): New macro.
13824 * linux-x86-low.c: Include stddef.h, i386-low.h.
13825 (arch_process_info): New struct.
13826 (arch_lwp_info): New struct.
13827 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13828 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13829 (i386_dr_low_get_status): New function.
13830 (x86_insert_point, x86_remove_point): New functions.
13831 (x86_stopped_by_watchpoint): New function.
13832 (x86_stopped_data_address): New function.
13833 (x86_linux_new_process, x86_linux_new_thread): New functions.
13834 (x86_linux_prepare_to_resume): New function.
13835 (the_low_target): Add entries for insert_point, remove_point,
13836 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13838 * server.c (debug_hw_points): New global.
13839 (monitor_show_help): Document set debug-hw-points.
13840 (handle_query): Process "set debug-hw-points".
13841 * server.h (debug_hw_points): Declare.
13842 (paddress): Declare.
13843 * utils.c (NUMCELLS, CELLSIZE): New macros.
13844 (get_sell, xsnprintf, paddress): New functions.
13845 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13846 remove_point, stopped_by_watchpoint, stopped_data_address.
13847 * win32-i386-low.c: Include i386-low.h.
13848 (debug_reg_state): Replaces dr.
13849 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13850 (i386_dr_low_get_status): New function.
13851 (i386_insert_point, i386_remove_point): New functions.
13852 (i386_stopped_by_watchpoint): New function.
13853 (i386_stopped_data_address): New function.
13854 (i386_initial_stuff): Update.
13855 (get_thread_context,set_thread_context,i386_thread_added): Update.
13856 (the_low_target): Add entries for insert_point,
13857 remove_point, stopped_by_watchpoint, stopped_data_address.
13858 * win32-low.c (win32_insert_watchpoint): New function.
13859 (win32_remove_watchpoint): New function.
13860 (win32_stopped_by_watchpoint): New function.
13861 (win32_stopped_data_address): New function.
13862 (win32_target_ops): Add entries for insert_watchpoint,
13863 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13864 * win32-low.h (win32_target_ops): New members insert_point,
13865 remove_point, stopped_by_watchpoint, stopped_data_address.
13867 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13869 * server.c (process_serial_event): Re-return unsupported, not
13870 error, if the type isn't recognized. Re-allow supporting only
13871 insert or remove packets. Also call require_running for
13872 breakpoints. Add missing break statement to default case. Tidy.
13873 * target.h (struct target_ops): Rename insert_watchpoint to
13874 insert_point, and remove_watchpoint to remove_point.
13876 * linux-low.h (struct linux_target_ops): Likewise.
13877 * linux-low.c (linux_insert_watchpoint): Rename to ...
13878 (linux_insert_point): ... this. Adjust.
13879 (linux_remove_watchpoint): Rename to ...
13880 (linux_remove_point): ... this. Adjust.
13881 (linux_target_ops): Adjust.
13882 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13883 (cris_insert_point): ... this.
13884 (cris_remove_watchpoint): Rename to ...
13885 (cris_remove_point): ... this.
13886 (the_low_target): Adjust.
13888 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13890 * server.c (handle_v_kill): Pass signal_pid to
13891 kill_inferior if multi_process is zero.
13893 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13895 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13896 * target.h (target_ops): Comment for *_watchpoint to make it clear
13897 the functions can get types '0' and '1'.
13899 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13901 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13902 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13903 * regcache.c (get_regcache): Likewise.
13904 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13905 * win32-low.c (child_fetch_inferior_registers): Remove check for
13908 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13909 Pedro Alves <pedro@codesourcery.com>
13911 * target.h (struct target_ops) <supports_multi_process>: New
13913 (target_supports_multi_process): New.
13914 * server.c (handle_query): Even if GDB reports support, only
13915 enable multi-process if the target also supports it. Report
13916 multi-process support only if the target backend supports it.
13917 * linux-low.c (linux_supports_multi_process): New function.
13918 (linux_target_ops): Install it as target_supports_multi_process
13921 2009-05-24 Doug Evans <dje@google.com>
13923 Global renaming of find_thread_pid to find_thread_ptid.
13924 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13925 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13926 All callers updated.
13928 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13929 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13932 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13933 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13934 (linux_resume_one_lwp): Ditto.
13936 2009-05-23 Doug Evans <dje@google.com>
13938 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13939 from struct inferior_list_entry * to struct lwp_info *.
13940 All callers updated.
13942 2009-05-13 Doug Evans <dje@google.com>
13944 * linux-x86-low.c: Don't include assert.h.
13945 (x86_siginfo_fixup): Use fatal, not assert.
13946 (x86_arch_setup): Fix comment.
13948 2009-05-12 Doug Evans <dje@google.com>
13950 Biarch support for i386/amd64 gdbserver.
13951 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13952 Add linux-x86-low.c.
13953 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13954 (linux-x86-low.o): Add.
13955 * linux-x86-64-low.c: Delete.
13956 * linux-i386-low.c: Delete.
13957 * linux-x86-low.c: New file.
13958 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13960 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13962 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13963 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13964 (linux_child_pid_to_exec_file): New function.
13965 (elf_64_header_p, elf_64_file_p): New functions.
13966 (siginfo_fixup): New function.
13967 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13968 give target a chance to convert layout.
13969 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13970 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13972 2009-05-07 Doug Evans <dje@google.com>
13974 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13975 (regsets_store_inferior_registers): Ditto.
13977 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13981 * linux-low.c (must_set_ptrace_flags): Delete.
13982 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13984 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13985 `lwp->must_set_ptrace_flags' instead.
13986 (linux_wait_for_event_1): Set ptrace options here.
13987 (linux_wait_1): ... not here.
13989 2009-04-30 Doug Evans <dje@google.com>
13991 * inferiors.c (started_inferior_callback): New function.
13992 (attached_inferior_callback): New function.
13993 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13994 * server.c (print_started_pid, print_attached_pid): New functions.
13995 (detach_or_kill_for_exit): New function.
13996 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13997 * server.h (have_started_inferiors_p): Declare.
13998 (have_attached_inferiors_p): Declare.
14000 * inferiors.c (remove_process): Fix memory leak, free process.
14001 * linux-low.c (linux_remove_process): New function.
14002 (linux_kill): Call it instead of remove_process.
14003 (linux_detach, linux_wait_1): Ditto.
14005 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14007 * configure.srv: Add x86 Windows CE target.
14009 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14011 * inferiors.c (get_thread_process): Make global.
14012 * server.h (get_thread_process): Add prototype.
14013 * thread-db.c (find_one_thread): Use get_thread_process
14014 instead of current_process.
14015 (thread_db_get_tls_address): Do not crash if called when
14016 thread layer is not yet initialized.
14018 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14020 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14021 * spu-low.c (current_tid): Rename to ...
14022 (current_ptid): ... this.
14023 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14024 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14025 ptid_get_lwp (current_ptid) instead of current_tid.
14026 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14027 instead of current_tid. Use find_process_pid to verify pid
14028 argument is valid. Pass proper argument to remove_process.
14029 (spu_thread_alive): Compare current_ptid instead of current_tid.
14030 (spu_resume): Likewise.
14032 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14034 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14037 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14039 Implement the multiprocess extensions, and add linux multiprocess
14042 * server.h (ULONGEST): Declare.
14043 (struct ptid, ptid_t): New.
14044 (minus_one_ptid, null_ptid): Declare.
14045 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14046 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14047 (struct inferior_list_entry): Change `id' type from unsigned from
14049 (struct sym_cache, struct breakpoint, struct
14050 process_info_private): Forward declare.
14051 (struct process_info): Declare.
14052 (current_process): Declare.
14053 (all_processes): Declare.
14054 (initialize_inferiors): Declare.
14055 (add_thread): Adjust to use ptid_t.
14056 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14057 (add_process, remove_process, find_thread_pid): Declare.
14058 (find_inferior_id): Adjust to use ptid_t.
14059 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14060 (multi_process): Declare.
14061 (push_event): Adjust to use ptid_t.
14062 (read_ptid, write_ptid): Declare.
14063 (prepare_resume_reply): Adjust to use ptid_t.
14064 (clear_symbol_cache): Declare.
14065 * inferiors.c (all_processes): New.
14066 (null_ptid, minus_one_ptid): New.
14067 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14068 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14069 (add_thread): Change unsigned long to ptid. Remove gdb_id
14071 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14072 (gdb_id_to_thread): Rename to ...
14073 (find_thread_pid): ... this. Change unsigned long to ptid.
14074 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14075 (loaded_dll, pull_pid_from_list): Adjust.
14076 (add_process, remove_process, find_process_pid)
14077 (get_thread_process, current_process, initialize_inferiors): New.
14078 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14079 (struct target_waitstatus) <related_pid>: Ditto.
14080 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14081 return type to int.
14082 (struct target_ops) <join>: Add `pid' argument.
14083 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14084 (struct target_ops) <wait>: Add `ptid' field. Change return type
14086 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14087 (mywait): Add `ptid' argument. Change return type to ptid_t.
14088 (target_pid_to_str): Declare.
14089 * target.c (set_desired_inferior): Adjust to use ptids.
14090 (mywait): Add new `ptid' argument. Adjust.
14091 (target_pid_to_str): New.
14092 * mem-break.h (free_all_breakpoints): Declare.
14093 * mem-break.c (breakpoints): Delelete.
14094 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14095 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14096 to use per-process breakpoint list.
14097 (free_all_breakpoints): New.
14098 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14099 (symbol_cache, all_symbols_looked_up): Delete.
14101 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14103 (prepare_resume_reply): Change ptid argument's type from unsigned
14104 long to ptid_t. Adjust. Implement W;process and X;process.
14105 (free_sym_cache, clear_symbol_cache): New.
14106 (look_up_one_symbol): Adjust to per-process symbol cache. *
14107 * server.c (cont_thread, general_thread, step_thread): Change type
14109 (attached): Delete.
14110 (multi_process): New.
14111 (last_ptid): Change type to ptid_t.
14112 (struct vstop_notif) <ptid>: Change type to ptid_t.
14113 (queue_stop_reply, push_event): Change `ptid' argument's type to
14115 (discard_queued_stop_replies): Add `pid' argument.
14116 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14117 changes. Don't reference the `attached' global.
14118 (attach_inferior): Adjust to mywait interface changes.
14119 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14120 features. Handle and report "multiprocess+". Handle
14122 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14124 (handle_v_kill): New.
14125 (handle_v_stopped): Adjust to use target_pid_to_str.
14126 (handle_v_requests): Allow multiple attaches and runs when
14127 multiprocess extensions are in effect. Handle "vKill".
14128 (myresume): Adjust to use ptids.
14129 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14130 (handle_status): Adjust to discard_queued_stop_replies interface
14132 (first_thread_of, kill_inferior_callback)
14133 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14134 (main): Call initialize_inferiors. Adjust to use ptids, killing
14135 and detaching from all inferiors. Handle multiprocess packet
14137 * linux-low.h: Include gdb_proc_service.h.
14138 (struct process_info_private): New.
14139 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14140 <lwpid_of>: Use ptid_get_lwp.
14141 (get_lwp_thread): Adjust.
14142 (struct lwp_info): Add `dead' member.
14143 (find_lwp_pid): Declare.
14144 * linux-low.c (thread_db_active): Delete.
14145 (new_inferior): Adjust comment.
14146 (inferior_pid): Delete.
14147 (linux_add_process): New.
14148 (handle_extended_wait): Adjust.
14149 (add_lwp): Change unsigned long to ptid.
14150 (linux_create_inferior): Add process to processes table. Adjust
14151 to use ptids. Don't set new_inferior here.
14152 (linux_attach_lwp): Rename to ...
14153 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14154 it. Adjust to use ptids.
14155 (linux_attach_lwp): New.
14156 (linux_attach): Add process to processes table. Don't set
14158 (struct counter): New.
14159 (second_thread_of_pid_p, last_thread_of_process_p): New.
14160 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14161 multiple processes.
14162 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14163 processes. Remove process from process table.
14164 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14165 to multiple processes.
14166 (any_thread_of): New.
14167 (linux_detach): Add `pid' argument, and handle it. Remove process
14168 from processes table.
14169 (linux_join): Add `pid' argument. Handle it.
14170 (linux_thread_alive): Change unsighed long argument to ptid_t.
14171 Consider dead lwps as not being alive.
14172 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14173 threads we're not interested in.
14174 (same_lwp, find_lwp_pid): New.
14175 (linux_wait_for_lwp): Change `pid' argument's type from int to
14177 (linux_wait_for_event): Rename to ...
14178 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14179 from int to ptid_t. Adjust.
14180 (linux_wait_for_event): New.
14181 (linux_wait_1): Add `ptid' argument. Change return type to
14182 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14183 that exit from the process table.
14184 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14186 (mark_lwp_dead): New.
14187 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14188 stopping all threads, mark its main lwp as dead.
14189 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14191 (fetch_register, usr_store_inferior_registers)
14192 (regsets_fetch_inferior_registers)
14193 (regsets_store_inferior_registers, linux_read_memory)
14194 (linux_write_memory): Inline `inferior_pid'.
14195 (linux_look_up_symbols): Adjust to use per-process
14196 `thread_db_active'.
14197 (linux_request_interrupt): Adjust to use ptids.
14198 (linux_read_auxv): Inline `inferior_pid'.
14199 (initialize_low): Don't reference thread_db_active.
14200 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14201 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14202 (ps_getpid): Return the pid of the current inferior.
14203 * thread-db.c (proc_handle, thread_agent): Delete.
14204 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14206 (find_one_thread): Change argument type to ptid_t. Adjust to
14208 (maybe_attach_thread): Adjust to per-process data and ptids.
14209 (thread_db_find_new_threads): Ditto.
14210 (thread_db_init): Ditto.
14211 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14212 processes table. Adjust to use ptids.
14213 (spu_kill, spu_detach): Adjust interface. Remove process from
14215 (spu_join, spu_thread_alive): Adjust interface.
14216 (spu_wait): Adjust interface. Remove process from processes
14217 table. Adjust to use ptids.
14218 * win32-low.c (current_inferior_tid): Delete.
14219 (current_inferior_ptid): New.
14220 (debug_event_ptid): New.
14221 (thread_rec): Take a ptid. Adjust.
14222 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14223 (child_delete_thread): Ditto.
14224 (do_initial_child_stuff): Add `attached' argument. Add process to
14226 (child_fetch_inferior_registers, child_store_inferior_registers):
14228 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14229 (win32_attach): Pass 1 to do_initial_child_stuff.
14230 (win32_kill): Adjust interface. Remove process from processes
14232 (win32_detach): Ditto.
14233 (win32_join): Adjust interface.
14234 (win32_thread_alive): Take a ptid.
14235 (win32_resume): Adjust to use ptids.
14236 (get_child_debug_event): Ditto.
14237 (win32_wait): Adjust interface. Remove exiting process from
14240 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14242 Non-stop mode support.
14244 * server.h (non_stop): Declare.
14245 (gdb_client_data, handler_func): Declare.
14246 (delete_file_handler, add_file_handler, start_event_loop):
14248 (handle_serial_event, handle_target_event, push_event)
14249 (putpkt_notif): Declare.
14250 * target.h (enum resume_kind): New.
14251 (struct thread_resume): Replace `step' field by `kind' field.
14252 (TARGET_WNOHANG): Define.
14253 (struct target_ops) <wait>: Add `options' argument.
14254 <supports_non_stop, async, start_non_stop>: New fields.
14255 (target_supports_non_stop, target_async): New.
14256 (start_non_stop): Declare.
14257 (mywait): Add `options' argument.
14258 * target.c (mywait): Add `options' argument. Print child exit
14259 notifications here.
14260 (start_non_stop): New.
14261 * server.c (non_stop, own_buf, mem_buf): New globals.
14262 (struct vstop_notif): New.
14263 (notif_queue): New global.
14264 (queue_stop_reply, push_event, discard_queued_stop_replies)
14265 (send_next_stop_reply): New.
14266 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14268 (attach_inferior): In non-stop mode, don't wait for the target
14270 (handle_general_set): Handle QNonStop.
14271 (handle_query): When handling qC, return the current general
14272 thread, instead of the first thread of the list.
14273 (handle_query): If the backend supports non-stop mode, include
14274 QNonStop+ in the qSupported query response.
14275 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14277 (handle_v_attach, handle_v_run): Handle non-stop mode.
14278 (handle_v_stopped): New.
14279 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14280 (myresume): Adjust to use resume_kind. Handle non-stop.
14281 (queue_stop_reply_callback): New.
14282 (handle_status): Handle non-stop mode.
14283 (main): Clear non_stop flag on reconnection. Use the event-loop.
14284 Refactor serial protocol handling from here ...
14285 (process_serial_event): ... to this new function. When GDB
14286 selects any thread, select one here. In non-stop mode, wait until
14287 GDB acks all pending events before exiting.
14288 (handle_serial_event, handle_target_event): New.
14289 * remote-utils.c (remote_open): Install remote_desc in the event
14291 (remote_close): Remove remote_desc from the event loop.
14292 (putpkt_binary): Rename to...
14293 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14294 (putpkt_binary): New as wrapper around putpkt_binary_1.
14295 (putpkt_notif): New.
14296 (prepare_resume_reply): In non-stop mode, don't change the
14298 * event-loop.c: New.
14299 * Makefile.in (OBJ): Add event-loop.o.
14300 (event-loop.o): New rule.
14302 * linux-low.h (pid_of): Moved here.
14304 (get_lwp_thread): Use lwpid_of.
14305 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14306 * linux-low.c (pid_of): Delete.
14307 (inferior_pid): Use lwpid_of.
14308 (linux_event_pipe): New.
14309 (target_is_async_p): New.
14311 (handle_extended_wait): Use lwpid_of.
14312 (add_lwp): Don't set lwpid field.
14313 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14314 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14315 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14316 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14317 first. Adjust to linux_wait_for_event interface changes. Use
14319 (linux_detach): Don't delete the main lwp here.
14320 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14321 (status_pending_p): Don't consider explicitly suspended lwps.
14322 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14323 pointer. Add OPTIONS argument. Change return type to int. Use
14324 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14325 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14326 pointer. Add status pointer argument. Return a pid instead of a
14327 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14328 changes. In non-stop mode, don't switch to a random thread.
14329 (linux_wait): Rename to...
14330 (linux_wait_1): ... this. Add target_options argument, and handle
14331 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14332 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14333 clean exit and signal exit code. Don't stop all threads in
14334 non-stop mode. In all-stop mode, only stop all threads when
14335 reporting a stop to GDB. Handle explicit thread stop requests.
14336 (async_file_flush, async_file_mark): New.
14338 (send_sigstop): Use lwpid_of.
14339 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14340 interface changes. In non-stop mode, don't switch to a random
14342 (linux_resume_one_lwp): Use lwpid_of.
14343 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14344 (linux_resume_one_thread): ... this. Handle resume_stop. In
14345 non-stop mode, don't look for pending flag in all threads.
14346 (resume_status_pending_p): Don't consider explicitly suspended
14348 (my_waitpid): Reimplement. Emulate __WALL.
14349 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14351 (sigchld_handler, linux_supports_non_stop, linux_async)
14352 (linux_start_non_stop): New.
14353 (linux_target_ops): Register linux_supports_non_stop, linux_async
14354 and linux_start_non_stop.
14355 (initialize_low): Install SIGCHLD handler.
14356 * thread-db.c (thread_db_create_event, find_one_thread)
14357 (thread_db_get_tls_address): Use lwpid_of.
14358 * win32-low.c (win32_detach): Adjust to use resume_kind.
14359 (win32_wait): Add `options' argument.
14360 * spu-low.c (spu_resume): Adjust to use resume_kind.
14361 (spu_wait): Add `options' argument.
14363 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14365 Decouple target code from remote protocol.
14367 * target.h (enum target_waitkind): New.
14368 (struct target_waitstatus): New.
14369 (struct target_ops) <wait>: Return an unsigned long. Take a
14370 target_waitstatus pointer instead of a char pointer.
14371 (mywait): Likewise.
14372 * target.c (mywait): Change prototype to return an unsigned long.
14373 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14374 * server.h (thread_from_wait, old_thread_from_wait): Delete
14376 (prepare_resume_reply): Change prototype to take a
14378 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14379 (last_status, last_ptid): New.
14380 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14381 pid instead of a signal.
14382 (attach_inferior): Remove "status" and "signal" parameters.
14384 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14386 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14387 (handle_v_requests, myresume): Remove "status" and "signal"
14388 parameters. Adjust.
14389 (handle_status): New.
14390 (main): Delete local `status'. Adjust.
14391 * remote-utils.c: Include target.h.
14392 (prepare_resume_reply): Change prototype to take a
14393 target_waitstatus. Adjust.
14395 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14397 * spu-low.c (spu_wait): Adjust.
14398 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14400 (win32_wait): Adjust.
14402 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14404 * target.h (struct thread_resume): Delete leave_stopped member.
14405 (struct target_ops): Add a `n' argument to the `resume' callback.
14406 * server.c (start_inferior): Adjust.
14407 (handle_v_cont, myresume): Adjust.
14408 * linux-low.c (check_removed_breakpoint): Adjust to resume
14409 interface change, and to removed leave_stopped field.
14410 (resume_ptr): Delete.
14411 (struct thread_resume_array): New.
14412 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14413 resume interface change.
14414 (linux_continue_one_thread, linux_queue_one_thread)
14415 (resume_status_pending_p): Check if the resume field is NULL
14416 instead of checking the leave_stopped member.
14417 (linux_resume): Adjust to the target resume interface change.
14418 * spu-low.c (spu_resume): Adjust to the target resume interface
14420 * win32-low.c (win32_detach, win32_resume): Ditto.
14422 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14424 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14426 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14428 (linux_continue_one_thread): Only preserve the stepping flag if
14429 there's a pending breakpoint.
14431 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14433 * server.c (main): After the inferior having exited, call
14434 remote_close before exiting gdbserver.
14436 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14438 Fix size of FPSCR in Power 7 processors.
14439 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14440 (PPC_FEATURE_HAS_DFP): New #define.
14441 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14444 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14446 * server.c (handle_query) Whitespace and formatting.
14448 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14450 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14451 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14452 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14453 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14454 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14455 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14456 Makefile.in, configure.ac: Fix whitespace throughout.
14457 * configure: Regenerate.
14459 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14461 * inferiors.c (find_inferior): Make it safe for the callback
14462 function to delete the currently iterated inferior.
14464 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14466 * Makefile.in (linuw_low_h): Move higher.
14467 (thread-db.o): Depend on $(linux_low_h).
14469 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14471 Rename "process" to "lwp" throughout.
14473 * linux-low.c (all_processes): Rename to...
14474 (all_lwps): ... this.
14475 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14476 (add_process): Rename to ...
14477 (add_lwp): ... this. Adjust.
14478 (linux_create_inferior): Adjust.
14479 (linux_attach_lwp): Adjust.
14480 (linux_attach): Adjust.
14481 (linux_kill_one_process): Rename to ...
14482 (linux_kill_one_lwp): ... this. Adjust.
14483 (linux_kill): Adjust.
14484 (linux_detach_one_process): Rename to ...
14485 (linux_detach_one_lwp): ... this. Adjust.
14486 (linux_detach): Adjust.
14487 (check_removed_breakpoint): Adjust.
14488 (status_pending_p): Adjust.
14489 (linux_wait_for_process): Rename to ...
14490 (linux_wait_for_lwp): ... this. Adjust.
14491 (linux_wait_for_event): Adjust.
14492 (send_sigstop): Adjust.
14493 (wait_for_sigstop): Adjust.
14494 (stop_all_processes): Rename to ...
14495 (stop_all_lwps): ... this.
14496 (linux_resume_one_process): Rename to ...
14497 (linux_resume_one_lwp): ... this. Adjust.
14498 (linux_set_resume_request, linux_continue_one_thread)
14499 (linux_queue_one_thread, resume_status_pending_p)
14500 (usr_store_inferior_registers, regsets_store_inferior_registers)
14501 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14503 * linux-low.h (get_process): Rename to ...
14504 (get_lwp): ... this. Adjust.
14505 (get_thread_process): Rename to ...
14506 (get_thread_lwp): ... this. Adjust.
14507 (get_process_thread): Rename to ...
14508 (get_lwp_thread): ... this. Adjust.
14509 (struct process_info): Rename to ...
14510 (struct lwp_info): ... this.
14511 (all_processes): Rename to ...
14512 (all_lwps): ... this.
14513 * proc-service.c (ps_lgetregs): Adjust.
14514 * thread-db.c (thread_db_create_event, find_one_thread)
14515 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14517 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14519 * server.c (handle_query): Handle "qAttached".
14521 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14523 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14524 GPLv3, update license URL.
14526 2009-03-01 Doug Evans <dje@google.com>
14528 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14529 (server_h): Add gdb_signals.h.
14530 (signals.o): Update.
14531 * server.h (target_signal_from_host,target_signal_to_host_p)
14532 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14534 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14536 * remote-utils.c (getpkt): Also generate remote-debug
14537 information if noack_mode is set.
14539 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14541 * server.c (handle_query): Report qXfer:siginfo:read and
14542 qXfer:siginfo:write as supported and handle them.
14543 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14544 * linux-low.c (linux_xfer_siginfo): New.
14545 (linux_target_ops): Set it.
14547 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14549 * server.c (gdbserver_usage): Mention --remote-debug.
14550 (main): Accept '--remote-debug' switch.
14552 2009-01-18 Doug Evans <dje@google.com>
14554 * regcache.c (new_register_cache): No need to check result of xcalloc.
14555 * server.c (handle_search_memory): Back out calls to xmalloc,
14556 result is checked and error is returned to user upon failure.
14557 (handle_query): Ditto. Add more checks for result of malloc.
14558 (handle_v_cont): Check result of malloc, report error back to
14560 (handle_v_run): Ditto. Call freeargv.
14561 * server.h (freeargv): Declare.
14562 * utils.c (freeargv): New fn.
14564 2009-01-15 Doug Evans <dje@google.com>
14566 * gdbreplay.c (perror_with_name): Make arg const char *.
14567 * server.h (target_signal_to_name): Make return type const char *.
14568 * thread-db.c (thread_db_err_str): Make return type const char *.
14569 * utils.c (perror_with_name): Make arg const char *.
14571 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14573 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14574 when handling a EXIT_PROCESS_DEBUG_EVENT.
14576 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14578 * gdbreplay.c (gdbreplay_version): Update copyright year.
14579 * server.c (gdbserver_version): Likewise.
14581 2009-01-05 Doug Evans <dje@google.com>
14583 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14584 (handle_extended_wait): Improve comment.
14586 2008-12-13 Doug Evans <dje@google.com>
14588 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14589 * server.h (ATTR_MALLOC): New macro.
14590 (xmalloc,xcalloc,xstrdup): Declare.
14591 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14592 * inferiors.c: Ditto.
14593 * linux-low.c: Ditto.
14594 * mem-break.c: Ditto.
14595 * regcache.c: Ditto.
14596 * remote-utils.c: Ditto.
14599 * win32-low.c: Ditto.
14601 2008-12-12 Doug Evans <dje@google.com>
14603 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14604 in debugging printf.
14606 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14608 2008-12-09 Doug Evans <dje@google.com>
14610 * linux-low.h (struct process_info): Delete member tid, unused.
14611 * thread-db.c (find_one_thread): Update.
14612 (maybe_attach_thread): Update.
14614 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14616 * target.h (struct target_ops): Add qxfer_osdata member.
14617 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14619 (linux_qxfer_osdata): New functions.
14620 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14622 * server.c (handle_query): Handle "qXfer:osdata:read:".
14623 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14624 (buffer_xml_printf): New functions.
14625 * server.h (struct buffer): New.
14626 (buffer_grow_str, buffer_grow_str0): New macros.
14627 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14628 (buffer_xml_printf): Declare.
14630 2008-11-24 Doug Evans <dje@google.com>
14632 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14634 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14636 * server.c (handle_v_run): Always use the supplied argument list.
14638 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14640 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14641 (xtensa_regmap_table): Add entry for scompare1.
14643 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14645 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14646 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14647 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14648 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14649 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14650 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14651 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14652 XML target descriptions.
14653 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14654 when inferior is running on an ISA 2.05 or later processor. Add
14655 special case to return offset for full 64-bit slot of FPSCR when
14658 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14660 * Makefile.in (SFILES, clean): Added sparc64 files.
14661 (reg-sparc64.o, reg-sparc64.c): New.
14662 * configure.srv (sparc*-*-linux*): New configuration.
14663 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14664 syscall arguments for SPARC.
14665 (regsets_store_inferior_registers): Likewise.
14666 * linux-sparc-low.c: New file.
14668 2008-10-21 Doug Evans <dje@google.com>
14670 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14671 (READLINE_DIR,READLINE_DEP): Delete.
14672 (INTERNAL_CFLAGS): Update.
14673 (LINTFLAGS): Update.
14675 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14677 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14678 whole argv from the last run, not just argv[0].
14680 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14682 * regcache.c (new_register_cache): Return NULL if the register
14683 cache size isn't known yet.
14684 (free_register_cache): Avoid dereferencing a NULL regcache.
14686 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14688 * configure.srv: Merge MIPS and MIPS64.
14690 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14692 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14694 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14696 * Makefile.in: Add required vsx dependencies.
14698 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14699 Declare init_registers_powerpc_vsx32l.
14700 Declare init_registers_powerpc_vsx64l.
14701 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14702 (ppc_arch_setup): Check for VSX in hwcap.
14703 (ppc_fill_vsxregset): New function.
14704 (ppc_store_vsxregset): New function.
14705 Add new VSX entry in regset_info target_regsets.
14707 * configure.srv: Add new VSX dependencies.
14709 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14711 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14712 (remote_open): Set or clear transport_is_reliable.
14713 (putpkt_binary): Don't expect acks in noack mode.
14714 (getpkt): Don't send ack/nac in noack mode.
14715 * server.c (handle_general_set): Handle QStartNoAckMode.
14716 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14718 (main): Reset noack_mode on every connection.
14719 * server.h (noack_mode): Declare.
14721 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14723 * Makefile.in (GDBREPLAY_OBS): New variable.
14724 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14726 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14727 Daniel Jacobowitz <dan@codesourcery.com>
14729 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14730 (usr_store_inferior_registers): Likewise.
14731 (regsets_store_inferior_registers): Likewise.
14733 2008-07-31 Rolf Jansen <rj@surtec.com>
14734 Pedro Alves <pedro@codesourcery.com>
14736 * configure.ac: Check for memmem declaration.
14737 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14738 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14739 (disable_packet_qfThreadInfo): Unconditionally compile.
14740 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14741 * configure, config.in: Regenerate.
14743 2008-07-28 Doug Kwan <dougkwan@google.com>
14745 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14746 (linux_write_memory): Remove declaration of errno.
14748 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14750 * linux-low.c (handle_extended_wait): Do not use "status"
14751 variable uninitialized.
14753 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14755 * server.c (handle_v_attach): Inhibit reporting dll changes.
14757 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14759 * remote-utils.c (prepare_resume_reply): If requested, don't
14760 output "thread:TID" in the T stop reply.
14762 * server.c (disable_packet_vCont, disable_packet_Tthread)
14763 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14764 (handle_query): If requested, disable support for qC, qfThreadInfo
14766 (handle_v_requests): If requested, disable support for vCont.
14767 (gdbserver_show_disableable): New.
14768 (main): Handle --disable-packet and --disable-packet=LIST.
14770 * server.h (disable_packet_vCont, disable_packet_Tthread)
14771 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14773 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14775 * server.c (gdbserver_usage): Mention --version.
14777 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14779 * Makefile.in (gdbreplay.o): New rule.
14781 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14783 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14784 message, not gdbserver.
14786 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14787 Nathan Sidwell <nathan@codesourcery.com>
14788 Joseph Myers <joseph@codesourcery.com>
14790 * acinclude.m4: Include ../../config/acx.m4.
14791 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14792 * configure, config.in: Regenerate.
14793 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14794 * server.c (gdbserver_version): Print PKGVERSION.
14795 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14796 (main): Adjust gdbserver_usage calls.
14797 * gdbreplay.c (version, host_name): Add declarations.
14798 (gdbreplay_version, gdbreplay_usage): New.
14799 (main): Accept --version and --help options.
14801 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14803 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14804 (arm_breakpoint_at): Handle Thumb.
14805 (the_low_target): Add comment.
14807 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14809 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14811 2008-05-09 Doug Evans <dje@google.com>
14813 * server.h (decode_search_memory_packet): Declare.
14814 * remote-utils.c (decode_search_memory_packet): New fn.
14815 * server.c (handle_search_memory_1): New fn.
14816 (handle_search_memory): New fn.
14817 (handle_query): Process qSearch:memory packets.
14819 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14821 * regcache.c (registers_length): Remove.
14822 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14823 full register packet.
14824 * regcache.h (registers_length): Remove prototype.
14825 * server.h (PBUFSIZ): Define to 16384.
14827 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14829 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14830 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14831 powerpc-64l.o, and powerpc-altivec64l.o.
14832 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14833 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14834 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14835 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14836 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14839 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14840 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14841 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14842 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14843 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14844 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14845 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14846 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14847 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14848 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14851 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14852 (init_registers_powerpc_32l): ... this new prototype.
14853 (init_registers_powerpc_32): Remove, replace by ...
14854 (init_registers_powerpc_altivec32l): ... this new prototype.
14855 (init_registers_powerpc_e500): Remove, replace by ...
14856 (init_registers_powerpc_e500l): ... this new prototype.
14857 (init_registers_ppc64): Remove, replace by ...
14858 (init_registers_powerpc_64l): ... this new prototype.
14859 (init_registers_powerpc_64): Remove, replace by ...
14860 (init_registers_powerpc_altivec64l): ... this new prototype.
14861 (ppc_num_regs): Set to 73.
14862 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14863 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14864 (ppc_cannot_store_register): Handle orig_r3 and trap.
14865 (ppc_arch_setup): Update init_registers_... calls.
14866 (ppc_fill_gregset): Handle orig_r3 and trap.
14868 * inferiors.c (clear_inferiors): Reset current_inferior.
14870 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14872 * acinclude.m4: Add override.m4.
14873 * configure: Regenerate.
14875 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14877 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14878 initial call to init_register_ppc64.
14880 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14882 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14883 single powerpc*-*-linux* case.
14884 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14886 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14888 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14889 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14891 * linux-ppc-low.c: Include <elf.h>.
14892 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14893 (ppc_hwcap): New global variable.
14894 (ppc_regmap): Remove __SPE__ #ifdef sections.
14895 (ppc_regmap_e500): New global variable.
14896 (ppc_cannot_store_register): Update __SPE__ special case.
14897 (ppc_get_hwcap): New function.
14898 (ppc_arch_setup): Use it to determine whether inferior supports
14899 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14900 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14901 Do not access registers if target does not support AltiVec.
14902 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14903 Do not access registers if target does not support SPE.
14904 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14906 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14908 * linux-low.c (disabled_regsets, num_regsets): New.
14909 (use_regsets_p): Delete.
14910 (linux_wait_for_process): Clear disabled_regsets.
14911 (regsets_fetch_inferior_registers): Check and set it.
14912 (regsets_store_inferior_registers): Likewise.
14913 (linux_fetch_registers, linux_store_registers): Do not use
14915 (initialize_low): Allocate disabled_regsets.
14917 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14919 * Makefile.in (LIBOBJS): New.
14920 (OBS): Use LIBOBJS.
14921 (memmem.o): New rule.
14922 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14923 * configure: Regenerated.
14925 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14927 * server.c (handle_query): Never return "unsupported" for
14928 qXfer:features:read queries.
14930 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14932 * server.c (get_features_xml): Fix inverted condition.
14933 (handle_query): Always support qXfer:feature:read.
14935 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14937 * server.c (wrapper_argv): New.
14938 (start_inferior): Handle wrapper_argv. If set, expect an extra
14940 (gdbserver_usage): Document --wrapper.
14941 (main): Parse --wrapper.
14943 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14945 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14946 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14947 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14948 (ppc_set_pc): Likewise.
14949 (ppc_arch_setup): New function.
14950 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14951 of collect_register.
14952 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14954 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14956 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14957 instead of linux-ppc64-low.o.
14958 * linux-ppc64-low.c: Remove file.
14959 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14960 (linux-ppc64-low.o): Remove rule.
14962 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14963 (init_registers_powerpc_64): Likewise.
14964 (ppc_regmap): Conditionally define depending on __powerpc64__.
14965 (ppc_cannot_store_register): Do not special-case "fpscr" when
14966 compiled on __powerpc64__.
14967 (ppc_collect_ptrace_register): New function.
14968 (ppc_supply_ptrace_register): New function.
14969 (ppc_breakpoint): Change type to "unsigned int".
14970 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14971 (the_low_target): Conditionally provide initializers for the
14972 arch_setup member depending on __powerpc64__. Install
14973 collect_ptrace_register and supply_ptrace_register members.
14975 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14977 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14978 * server.c (gdbserver_xmltarget): Define.
14979 (get_features_xml): Use it to replace "target.xml" and arch_string.
14981 * configure.srv: Remove srv_xmltarget. Add XML files that were
14982 mentioned there to srv_xmlfiles instead. Remove conditional tests
14983 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14984 srv_xmlfiles and srv_regobj to include all possible choices.
14985 * configure.ac (srv_xmltarget): Remove.
14986 (srv_xmlfiles): Do not add "target.xml".
14987 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14988 checks for supplementary target information.
14989 * configure: Regenerate.
14990 * Makefile.in (XML_TARGET): Remove.
14991 (target.xml): Remove rule.
14992 (clean): Do not clean up target.xml.
14993 (.PRECIOUS): Do not mention target.xml.
14995 * target.h (struct target_ops): Remove arch_string member.
14996 * linux-low.c (linux_arch_string): Remove.
14997 (linux_target_ops): Remove arch_string initializer.
14998 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14999 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15000 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15001 * spu-low.c (spu_arch_string): Remove.
15002 (spu_target_ops): Remove arch_string initializer.
15003 * win32-low.c (win32_arch_string): Remove.
15004 (win32_target_ops): Remove arch_string initializer.
15005 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15006 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15007 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15009 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15011 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15012 by collect_ptrace_register and supply_ptrace_register hooks.
15013 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15014 instead of checking for the_low_target.left_pad_xfer.
15015 (usr_store_inferior_registers): Use collect_ptrace_register callback
15016 instead of checking for the_low_target.left_pad_xfer.
15018 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15019 (s390_supply_ptrace_register): Likewise.
15020 (s390_fill_gregset): Call s390_collect_ptrace_register.
15021 (the_low_target): Update.
15023 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15024 (ppc_supply_ptrace_register): Likewise.
15025 (the_low_target): Update.
15027 * linux-i386-low.c (the_low_target): Update.
15028 * linux-x86-64-low.c (the_low_target): Update.
15030 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15032 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15033 reg-s390.o and reg-s390x.o.
15035 * linux-low.c (new_inferior): New global variable.
15036 (linux_create_inferior, linux_attach): Set it.
15037 (linux_wait_for_process): Call the_low_target.arch_setup after the
15038 target has stopped for the first time.
15039 (initialize_low): Do not call the_low_target.arch_setup.
15041 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15042 (s390_set_pc): Likewise.
15043 (s390_arch_setup): New function.
15044 (the_low_target): Use s390_arch_setup as arch_setup routine.
15046 * regcache.c (realloc_register_cache): New function.
15047 (set_register_cache): Call it for each existing regcache.
15049 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15051 * server.h (init_registers): Remove prototype.
15053 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15054 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15055 instead of init_registers ().
15056 * linux-arm-low.c (init_registers_arm): Add prototype.
15057 (init_registers_arm_with_iwmmxt): Likewise.
15058 (the_low_target): Add initializer for arch_setup field.
15059 * linux-cris-low.c (init_registers_cris): Add prototype.
15060 (the_low_target): Add initializer for arch_setup field.
15061 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15062 (the_low_target): Add initializer for arch_setup field.
15063 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15064 (the_low_target): Add initializer for arch_setup field.
15065 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15066 (the_low_target): Add initializer for arch_setup field.
15067 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15068 (the_low_target): Add initializer for arch_setup field.
15069 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15070 (the_low_target): Add initializer for arch_setup field.
15071 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15072 (init_registers_mips64_linux): Likewise.
15073 (the_low_target): Add initializer for arch_setup field.
15074 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15075 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15076 (the_low_target): Add initializer for arch_setup field.
15077 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15078 (init_registers_powerpc_64): Likewise.
15079 (the_low_target): Add initializer for arch_setup field.
15080 * linux-s390-low.c (init_registers_s390): Add prototype.
15081 (init_registers_s390x): Likewise.
15082 (the_low_target): Add initializer for arch_setup field.
15083 * linux-sh-low.c (init_registers_sh): Add prototype.
15084 (the_low_target): Add initializer for arch_setup field.
15085 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15086 (the_low_target): Add initializer for arch_setup field.
15087 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15088 (the_low_target): Add initializer for arch_setup field.
15090 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15091 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15092 instead of init_registers ().
15093 * win32-arm-low.c (init_registers_arm): Add prototype.
15094 (the_low_target): Add initializer for arch_setup field.
15095 * win32-i386-low.c (init_registers_i386): Add prototype.
15096 (the_low_target): Add initializer for arch_setup field.
15098 * spu-low.c (init_registers_spu): Add prototype.
15099 (initialize_low): Call initialie_registers_spu () instead of
15100 initialize_registers ().
15102 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15104 * server.c (handle_v_requests): When handling the vRun and vAttach
15105 packets, if already debugging a process, don't kill it. Return an
15108 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15110 * server.c (handle_query): Correct length check.
15112 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15114 * win32-low.c (do_initial_child_stuff): Add process handle
15115 parameter. Set current_process_handle and current_process_id from the
15116 parameters. Clear globals.
15117 (win32_create_inferior): Don't set current_process_handle and
15118 current_process_id here. Instead pass them on the call to
15119 do_initial_child_stuff.
15120 (win32_attach): Likewise.
15121 (win32_clear_inferiors): New.
15122 (win32_kill): Don't close the current process handle or the
15123 current thread handle here. Instead call win32_clear_inferiors.
15124 (win32_detach): Don't open a new handle to the process. Call
15125 win32_clear_inferiors.
15126 (win32_join): Don't rely on current_process_handle; open a new
15127 handle using the process id.
15128 (win32_wait): Call win32_clear_inferiors when the inferior process
15131 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15133 * server.c (monitor_show_help): Add "exit".
15135 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15137 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15138 (clean): Add reg-xtensa.c.
15139 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15140 * configure.srv (xtensa*-*-linux*) New target.
15141 * linux-xtensa-low.c: New.
15142 * xtensa-xtregs.c: New.
15144 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15146 * hostio.c: Don't include errno.h.
15147 (errno_to_fileio_errno): Move to hostio-errno.
15148 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15149 error number outputting to the target->hostio_last_error callback.
15150 (hostio_packet_error): Use FILEIO_EINVAL directly.
15151 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15152 calls to hostio_error.
15153 * hostio-errno.c: New.
15154 * server.h (hostio_last_error_from_errno): Declare.
15155 * target.h (target_ops): Add hostio_last_error member.
15156 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15157 as hostio_last_error handler.
15158 * spu-low.c (spu_target_ops): Likewise.
15159 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15160 (wince_hostio_last_error): New functions.
15161 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15162 as hostio_last_error handler.
15163 (win32_target_ops) [!_WIN32_WCE]: Register
15164 hostio_last_error_from_errno as hostio_last_error handler.
15165 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15166 (hostio-errno.o): New rule.
15167 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15168 * configure.srv (srv_hostio_err_objs): New variable. Default to
15170 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15171 * configure: Regenerate.
15173 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15175 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15176 (linux_kill, linux_detach): Clean up the process list.
15177 * remote-utils.c (remote_open): Improve port number parsing.
15178 (putpkt_binary, input_interrupt): Only send interrupts if the target
15180 * server.c (extended_protocol): Make static.
15181 (attached): Define earlier.
15182 (exit_requested, response_needed, program_argv): New variables.
15183 (target_running): New.
15184 (start_inferior): Clear attached here.
15185 (attach_inferior): Set attached here.
15186 (require_running): Define.
15187 (handle_query): Use require_running and target_running. Implement
15189 (handle_v_attach, handle_v_run): New.
15190 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15191 (gdbserver_usage): Update.
15192 (main): Redo argument parsing. Handle --debug and --multi. Handle
15193 --attach along with other options or after the port. Save
15194 program_argv. Support no initial program. Resynchronize
15195 communication with GDB after an error. Handle "monitor exit".
15196 Use require_running and target_running. Always allow the extended
15197 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15198 restart in extended mode.
15199 * README: Refer to the GDB manual. Update --attach usage.
15201 2007-12-20 Andreas Schwab <schwab@suse.de>
15203 * linux-low.c (STACK_SIZE): Define.
15204 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15205 (linux_test_for_tracefork): Likewise.
15207 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15209 * linux-low.c (linux_wait_for_event): Update messages. Do not
15210 reinsert auto-delete breakpoints.
15211 * mem-break.c (struct breakpoint): Change return type of handler to
15213 (set_breakpoint_at): Update handler type.
15214 (reinsert_breakpoint_handler): Return 1 instead of calling
15216 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15218 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15219 * mem-break.h (set_breakpoint_at): Update handler type.
15220 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15221 * win32-low.c (auto_delete_breakpoint): New.
15222 (get_child_debug_event): Use it.
15224 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15226 * configure.ac: Check for pread and pwrite.
15227 * hostio.c (handle_pread): Fall back to lseek and read.
15228 (handle_pwrite): Fall back to lseek and write.
15229 * config.in, configure: Regenerated.
15231 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15233 * server.c (myresume): Add own_buf argument.
15234 (main): Update calls.
15236 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15238 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15239 * remote-utils.c (remote_open): Do not call disable_async_io.
15240 (block_async_io): Delete.
15241 (unblock_async_io): Make static.
15242 (initialize_async_io): New.
15243 * server.c (handle_v_cont): Handle async I/O here.
15244 (myresume): Likewise. Move other common resume tasks here...
15245 (main): ... from here. Call initialize_async_io. Disable async
15246 I/O before the main loop.
15247 * server.h (initialize_async_io): Declare.
15248 (block_async_io, unblock_async_io): Delete prototypes.
15249 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15251 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15253 * remote-utils.c (readchar): Allow binary data in received messages.
15255 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15257 * win32-low.c (attaching): New global.
15258 (win32_create_inferior): Clear the `attaching' global.
15259 (win32_attach): Set the `attaching' global.
15260 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15261 attaching. Only set a breakpoint at the entry point if not
15264 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15266 * server.c (main): Don't report dll events on the initial
15267 connection on attaches.
15269 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15271 * server.c (main): Relax numerical bases supported for the pid of
15272 the --attach command line argument.
15274 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15276 * win32-low.c (win32_attach): Call OpenProcess before
15277 DebugActiveProcess, not after. Add last error output to error
15280 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15282 * win32-low.c (win32_get_thread_context)
15283 (win32_set_thread_context): New functions.
15284 (thread_rec): Use win32_get_thread_context.
15285 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15286 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15289 2007-12-03 Leo Zayas
15290 Pedro Alves <pedro_alves@portugalmail.pt>
15292 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15294 (child_add_thread): Minor cleanup.
15295 (child_continue): Resume artificially suspended threads before
15296 calling ContinueDebugEvent.
15297 (suspend_one_thread): New.
15298 (fake_breakpoint_event): New.
15299 (get_child_debug_event): Change return type to int. Check here if
15300 gdb sent an interrupt request. If a soft interrupt was requested,
15301 fake a breakpoint event. Return 0 if there is no event to handle,
15303 (win32_wait): Don't check here if gdb sent an interrupt request.
15304 Ensure there is a valid event to handle.
15305 (win32_request_interrupt): Add soft interruption method as last
15308 2007-12-03 Leo Zayas
15309 Pedro Alves <pedro_alves@portugalmail.pt>
15311 * win32-low.h (win32_thread_info): Add descriptions to the
15312 structure members. Replace `suspend_count' counter by a
15314 * win32-low.c (thread_rec): Update condition of when to get the
15315 context from the inferior. Rely on ContextFlags being set if it
15316 has already been retrieved. Only suspend the inferior thread if
15317 we haven't already. Warn if that fails.
15318 (continue_one_thread): s/suspend_count/suspended/. Only call
15319 ResumeThread once. Warn if that fails.
15321 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15323 * win32-low.c (win32_wait): Don't read from the inferior when it
15324 has already exited.
15326 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15328 * Makefile.in (win32_low_h): New variable.
15329 (win32-low.o): Add dependency on $(win32_low_h).
15330 (win32-arm-low.o, win32-i386-low.o): New rules.
15332 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15334 * hostio.c: Correct copyright year.
15336 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15338 * Makefile.in (OBS): Add hostio.o.
15339 (hostio.o): New rule.
15340 * server.h (handle_vFile): Declare.
15341 * hostio.c: New file.
15342 * server.c (handle_v_requests): Take packet_len and new_packet_len
15343 for binary packets. Call handle_vFile.
15344 (main): Update call to handle_v_requests.
15346 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15348 * linux-low.c: Include <sched.h>.
15350 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15352 * linux-low.c (linux_tracefork_grandchild): New.
15353 (linux_tracefork_child): Use clone.
15354 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15356 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15358 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15360 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15362 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15364 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15366 * inferiors.c (change_inferior_id): Delete.
15367 (add_pid_to_list, pull_pid_from_list): New.
15368 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15369 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15370 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15371 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15372 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15373 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15374 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15375 (using_threads): Always set to 1.
15376 (handle_extended_wait): New.
15377 (add_process): Do not set TID.
15378 (linux_create_inferior): Set must_set_ptrace_flags.
15379 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15380 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15381 (linux_thread_alive): Rename TID argument to LWPID.
15382 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15383 (linux_wait_for_event): Do not use TID or check using_threads. Update
15384 call to dead_thread_notify. Call handle_extended_wait.
15385 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15386 (send_sigstop): Delete sigstop_sent.
15387 (wait_for_sigstop): Avoid TID.
15388 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15389 (linux_test_for_tracefork): New.
15390 (linux_lookup_signals): Use thread_db_active and
15391 linux_supports_tracefork_flag.
15392 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15393 * linux-low.h (get_process_thread): Avoid TID.
15394 (struct process_ifo): Move thread_known and tid to the end. Remove
15396 (linux_attach_lwp, thread_db_init): Update prototypes.
15397 * server.h (change_inferior_id): Delete prototype.
15398 (add_pid_to_list, pull_pid_from_list): New prototypes.
15399 * thread-db.c (thread_db_use_events): New.
15400 (find_first_thread): Rename to...
15401 (find_one_thread): ...this. Update callers and messages. Do not
15402 call fatal. Check thread_db_use_events. Do not call
15403 change_inferior_id or new_thread_notify.
15404 (maybe_attach_thread): Update. Do not call new_thread_notify.
15405 (thread_db_init): Set thread_db_use_events. Check use_events.
15406 * utils.c (fatal, warning): Correct message prefix.
15408 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15410 * Makefile.in (clean): Remove new files.
15411 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15412 (powerpc-64.o, powerpc-64.c): New rules.
15413 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15414 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15416 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15418 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15419 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15420 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15421 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15422 (target_regsets): Add AltiVec and SPE register sets.
15423 * configure.ac: Check for AltiVec and SPE.
15424 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15425 (ppc_fill_vrregset, ppc_store_vrregset): New.
15426 (target_regsets): Add AltiVec register set.
15427 * configure: Regenerated.
15429 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15431 * linux-low.c (O_LARGEFILE): Define.
15432 (linux_read_memory): Use /proc/PID/mem.
15433 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15434 * configure, config.in: Regenerated.
15436 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15438 * linux-low.c (linux_wait_for_event): Do not pass signals while
15441 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15443 * win32-low.c (create_process): New.
15444 (win32_create_inferior): Use create_process instead of
15445 CreateProcess. If create_process failed retry appending an ".exe"
15446 suffix. Store the GetLastError result immediatelly after
15447 create_process calls and use it on the call to error.
15449 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15451 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15453 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15455 * configure.ac: Switch license to GPLv3.
15457 2007-08-01 Michael Snyder <msnyder@access-company.com>
15459 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15461 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15463 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15465 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15466 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15467 CloseToolhelp32Snapshot.
15468 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15469 CloseToolhelp32Snapshot.
15471 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15473 * server.c (main): Check for inferior exit before main loop.
15475 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15477 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15478 instead of on tmp_desc.
15480 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15481 Daniel Jacobowitz <dan@codesourcery.com>
15483 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15484 (add_thread): Minor cleanups.
15485 (clear_inferiors): Move lower in the file. Clear the DLL
15487 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15488 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15489 (xml_escape_text): New.
15490 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15492 (handle_v_cont): Report errors.
15493 (gdbserver_version): Update.
15494 (main): Correct size of own_buf. Do not report initial DLL events.
15495 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15496 (unloaded_dll, xml_escape_text): New.
15497 * win32-low.c (enum target_waitkind): Update comments.
15498 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15499 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15500 (win32_EnumProcessModules, win32_GetModuleInformation)
15501 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15502 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15503 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15504 (win32_Module32First, win32_Module32Next, load_toolhelp)
15505 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15506 (get_child_debug_event): Handle DLL events.
15507 (win32_wait): Likewise.
15509 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15511 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15512 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15514 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15516 * win32-low.c (handle_output_debug_string): Ignore event if not
15519 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15521 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15523 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15525 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15527 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15529 * inferiors.c (change_inferior_id): Add comment.
15530 * linux-low.c (check_removed_breakpoint): Add an early
15531 prototype. Improve debug output.
15532 (linux_attach): Doc update.
15533 (linux_detach_one_process, linux_detach): Clean up before releasing
15535 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15536 * linux-low.h (struct process_info): Doc improvement.
15537 * mem-break.c (delete_all_breakpoints): New.
15538 * mem-break.h (delete_all_breakpoints): New prototype.
15539 * thread-db.c (find_first_thread): New.
15540 (thread_db_create_event): Call it instead of
15541 thread_db_find_new_threads. Clean up unused variables.
15542 (maybe_attach_thread): Remove first thread handling.
15543 (thread_db_find_new_threads): Use find_first_thread.
15544 (thread_db_get_tls_address): Likewise.
15546 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15548 * thread-db.c (thread_db_find_new_threads): Add prototype.
15549 (thread_db_create_event): Check for the main thread before adding
15551 (maybe_attach_thread): Only enable event reporting if TID == 0.
15552 (thread_db_get_tls_address): Check for new threads.
15554 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15556 * linux-low.c (linux_create_inferior): Try execv before execvp.
15557 * spu-low.c (spu_create_inferior): Likewise.
15559 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15561 * linux-low.c (linux_create_inferior): Change execv to execvp.
15562 * spu-low.c (spu_create_inferior): Likewies.
15564 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15566 * Makefile.in (clean): Clean new files instead of deleted ones.
15567 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15568 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15570 * configure.srv: Specify XML files and new regformats for MIPS and
15572 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15573 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15574 an entry for the restart register.
15575 (mips_cannot_fetch_register, mips_cannot_store_register)
15576 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15577 register names to match the XML descriptions.
15578 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15579 restart register instead of $0.
15581 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15582 Markus Deuling <deuling@de.ibm.com>
15584 * remote-utils.c (decode_xfer_write): New function.
15585 * server.h (decode_xfer_write): Add prototype.
15586 * server.c (handle_query): Add PACKET_LEN argument. Support
15587 qXfer:spu:read and qXfer:spu:write packets.
15588 (main): Pass packet_len to handle_query.
15589 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15590 * target.h (target_ops): Add qxfer_spu.
15592 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15594 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15595 accessing non-seekable spufs files.
15597 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15599 * server.c (handle_query): Add reply for qC packet.
15601 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15602 Leo Zayas <lerele@champenstudios@com>
15604 * server.h (check_remote_input_interrupt_request): New function.
15605 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15606 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15607 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15608 (check_remote_input_interrupt_request): New function.
15609 * server.h (check_remote_input_interrupt_request): Declare.
15610 * win32-low.c (winapi_DebugBreakProcess,
15611 winapi_GenerateConsoleCtrlEvent): New typedefs.
15612 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15614 (win32_wait): Check for remote interrupt request
15615 with check_remote_input_interrupt_request.
15616 (win32_request_interrupt): New function.
15617 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15619 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15621 * win32-low.c (debug_registers_changed,
15622 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15623 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15624 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15625 (thread_rec): Get context using the low target.
15626 (child_add_thread): Call thread_added on the low target,
15627 which does the same thing.
15629 (do_initial_child_stuff): Remove debug registers references.
15630 Set context using the low target. Resume threads after
15631 setting the contexts.
15632 (child_continue): Remove dead variable. Remove debug
15633 registers references.
15634 (child_fetch_inferior_registers): Go through the low target.
15635 (do_child_store_inferior_registers): Remove.
15636 (child_store_inferior_registers): Go through the low target.
15637 (win32_resume): Remove debug registers references.
15638 Set context using the low target.
15639 (handle_exception): Change return type to void. Don't record
15640 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15641 first chance exception.
15642 (get_child_debug_event): Change return type to void. Remove
15643 goto loop. Always return after waiting for debug event.
15644 (win32_wait): Convert to switch statement. Handle spurious
15647 * win32-i386-low.c (debug_registers_changed,
15648 debug_registers_used): New.
15649 (initial_stuff): Rename to ...
15650 (i386_initial_stuff): ... this. Clear debug registers
15652 (store_debug_registers): Delete.
15653 (i386_get_thread_context): New.
15654 (load_debug_registers): Delete.
15655 (i386_set_thread_context): New.
15656 (i386_thread_added): New.
15657 (single_step): Rename to ...
15658 (i386_single_step): ... this.
15659 (do_fetch_inferior_registers): Rename to ...
15660 (i386_fetch_inferior_register): ... this.
15661 (i386_store_inferior_register): New.
15662 (the_low_target): Adapt to new interface.
15664 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15665 (arm_get_thread_context): New.
15666 (arm_set_thread_context): New.
15668 (do_fetch_inferior_registers): Rename to ...
15669 (arm_fetch_inferior_register): ... this.
15670 (arm_store_inferior_register): New.
15671 (arm_wince_breakpoint): Reimplement as unsigned long.
15672 (arm_wince_breakpoint_len): Define.
15673 (the_low_target): Adapt to new interface.
15675 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15676 load_debug_registers. Add get_thread_context, set_thread_context,
15677 thread_added and store_inferior_register. Rename
15678 fetch_inferior_registers to fetch_inferior_register.
15679 (regptr): Remove declaration.
15681 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15683 * linux-low.c (linux_detach): Change return type to int. Return 0.
15684 * spu-low.c (spu_detach): Likewise.
15686 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15688 * target.h (target_ops): Change return type of detach to int.
15690 (join_inferior): New.
15691 * server.c (main): Don't skip detach support on mingw32.
15692 If the inferior doesn't support detaching return error.
15693 Call join_inferior instead of using waitpid.
15694 * linux-low.c (linux_join): New.
15695 (linux_target_op): Add linux_join.
15696 * spu-low.c (spu_join): New.
15697 (spu_target_ops): Add spu_join.
15698 * win32-low.c (win32_detach): Adapt to new interface.
15699 Reopen current_process_handle before detaching. Issue a child
15700 resume before detaching.
15702 (win32_target_op): Add win32_join.
15704 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15706 * win32-low.c (win32-attach): Fix return value.
15707 * target.h (target_ops): Describe ATTACH return values.
15709 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15711 * win32-low.c (GETPROCADDRESS): Define.
15712 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15713 (winapi_DebugSetProcessKillOnExit): Likewise.
15714 (win32_create_inferior): Force usage of ansi CreateProcessA.
15715 (win32_attach): Use GETPROCADDRESS.
15716 (win32_detach): Likewise.
15718 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15720 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15722 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15724 * win32-low.c: Commit leftover changes from 2007-03-29.
15726 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15728 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15729 fields short instead of int. Add explicit padding.
15730 (i387_cache_to_fsave): Remove unnecessary casts.
15731 (i387_fsave_to_cache): Doc fix.
15732 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15734 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15736 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15737 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15739 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15741 * configure.srv (arm*-*-mingw32ce*): Move near the other
15744 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15746 * configure.ac: Add errno checking.
15747 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15748 sys/file.h and malloc.h.
15749 (AC_CHECK_DECLS): Add perror.
15750 (srv_mingwce): Handle.
15751 * configure.srv (i[34567]86-*-cygwin*): Add
15752 win32-i386-low.o to srv_tgtobj.
15753 (i[34567]86-*-mingw*): Likewise.
15754 (arm*-*-mingw32ce*): Add case.
15755 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15756 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15757 [__MINGW32CE__] (strerror): New function.
15758 [__MINGW32CE__] (errno): Define to GetLastError.
15759 [__MINGW32CE__] (COUNTOF): New macro.
15760 (remote_open): Remove extra close call.
15761 * mem-break.c (delete_breakpoint_at): New function.
15762 * mem-break.h (delete_breakpoint_at): Declare.
15763 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15764 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15765 [USE_WIN32API] (read, write): Add char* casts.
15766 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15767 * server.h: Include wincecompat.h on Windows CE.
15768 [HAVE_ERRNO_H]: Check.
15769 (perror): Declare if not declared.
15770 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15771 (perror_with_name): Remove errno declaration.
15772 * wincecompat.h: New.
15773 * wincecompat.c: New.
15774 * win32-low.h: New.
15775 * win32-arm-low.c: New.
15776 * win32-i386-low.c: New.
15777 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15778 (OUTMSG2): Make it safe.
15780 (COUNTOF): New macro.
15781 (NUM_REGS): Get it from the low target.
15782 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15783 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15784 (thread_rec): Let low target handle debug registers.
15785 (child_add_thread): Likewise.
15786 (child_init_thread_list): Likewise.
15787 (continue_one_thread): Likewise.
15789 (do_child_fetch_inferior_registers): Move to ...
15790 * win32-i386-low.c: ... here, and rename to ...
15791 (do_fetch_inferior_registers): ... this.
15792 * win32-low.c (child_fetch_inferior_registers):
15793 Go through the low target.
15794 (do_child_store_inferior_registers): Use regptr.
15795 (strwinerror): New function.
15796 (win32_create_inferior): Handle Windows CE.
15797 Use strwinerror instead of strerror on Windows error
15798 codes. Add program to the error output.
15799 Don't close the main thread handle on Windows CE.
15800 (win32_attach): Use coredll.dll on Windows CE.
15801 (win32_kill): Close current process and current
15803 (win32_detach): Use coredll.dll on Windows CE.
15804 (win32_resume): Let low target handle debug registers, and
15806 (handle_exception): Add/Remove initial breakpoint. Avoid
15807 non-existant WSTOPSIG on Windows CE.
15808 (win32_read_inferior_memory): Cast to remove warning.
15809 (win32_arch_string): Go through the low target.
15810 (initialize_low): Call set_breakpoint_data with the low
15811 target's breakpoint.
15812 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15813 FOP_REGNUM, mappings): Move to ...
15814 * win32-i386-low.c: ... here.
15815 * win32-low.c (win32_thread_info): Move to ...
15816 * win32-low.h: ... here.
15817 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15818 win32-arm-low.c and wincecompat.c.
15819 (all:): Add $EXEEXT.
15820 (install-only:): Likewise.
15821 (gdbserver:): Likewise.
15822 (gdbreplay:): Likewise.
15823 * config.in: Regenerate.
15824 * configure: Regenerate.
15826 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15828 * win32-low.c: Rename typedef thread_info to
15829 win32_thread_info throughout.
15831 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15833 * win32-i386-low.c: Rename to ...
15834 * win32-low.c: ... this.
15835 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15836 * Makefile.in: Likewise.
15838 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15840 * remote-utils.c (monitor_output): Constify msg parameter.
15841 * server.h (monitor_output): Likewise.
15842 * win32-i386-low.c (handle_output_debug_string): New.
15843 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15844 handle_output_debug_string.
15845 (get_child_debug_event): Likewise.
15847 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15849 * server.c (main): Correct strtoul check.
15851 2007-03-27 Jon Ringle <jon@ringle.org>
15853 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15855 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15857 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15859 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15861 * terminal.h: Check HAVE_SGTTY_H.
15863 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15865 * remote-utils.c (remote_open): Print out the assigned port number.
15867 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15869 * remote-utils.c (monitor_output): New function.
15870 * server.c (debug_threads): Define here.
15871 (monitor_show_help): New function.
15872 (handle_query): Handle qRcmd.
15873 (main): Do not handle 'd' packet.
15874 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15875 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15878 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15880 * Makefile.in (EXEEXT): New.
15881 (clean): Use $(EXEEXT).
15883 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15885 * target.h (target_ops): Rename send_signal to request_interrupt,
15886 and remove enum target_signal parameter.
15887 * linux-low.c (linux_request_interrupt): Rename from
15888 linux_send_signal, and always send SIGINT.
15889 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15890 and always send SIGINT.
15891 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15893 (input_interrupt): Likewise.
15895 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15897 * server.c (get_features_xml): Check if target implemented
15899 * win32-i386-low.c (win32_arch_string): New.
15900 (win32_target_ops): Add win32_arch_string as arch_string member.
15902 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15904 * spu-low.c (spu_arch_string): New.
15905 (spu_target_ops): Add spu_arch_string.
15907 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15909 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15910 * configure.ac: Do not check for terminal.h.
15911 * configure, config.in: Regenerated.
15913 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15915 * Makefile.in (OBS): Add $(XML_BUILTIN).
15916 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15918 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15919 (arm-with-iwmmxt.c): New.
15920 * config.in, configure: Regenerate.
15921 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15922 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15923 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15924 (arm*-*-linux*): Add iWMMXt and regset support.
15925 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15926 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15927 (arm_store_wmmxregset, target_regsets): New.
15928 * server.c (get_features_xml): Take annex argument. Check builtin
15930 (handle_query): Handle multiple annexes.
15932 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15934 * remote-utils.c [USE_WIN32API] (read, write): Define.
15935 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15938 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15940 * linux-i386-low.c (the_low_target): Set arch_string.
15941 * linux-x86-64-low.c (the_low_target): Likewise.
15942 * linux-low.c (linux_arch_string): New.
15943 (linux_target_ops): Add it.
15944 * linux-low.h (struct linux_target_ops): Add arch_string.
15945 * server.c (write_qxfer_response): Use const void * for DATA.
15946 (get_features_xml): New.
15947 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15948 * target.h (struct target_ops): Add arch_string method.
15950 2007-01-03 Denis Pilat <denis.pilat@st.com>
15951 Daniel Jacobowitz <dan@codesourcery.com>
15953 * linux-low.c (linux_kill): Handle being called with no threads.
15954 * win32-i386-low.c (win32_kill): Likewise.
15955 (get_child_debug_event): Clear current_process_handle.
15957 2006-12-30 Denis PILAT <denis.pilat@st.com>
15958 Daniel Jacobowitz <dan@codesourcery.com>
15960 * remote-utils.c (remote_open): Check the type of specified
15961 serial port devices before opening them.
15962 * server.c (main): Kill the inferior if an error occurs during
15963 the first remote_open.
15965 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15967 * README: Update supported targets.
15969 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15971 * Makefile.in (clean): Remove reg-mips64.c.
15972 (reg-mips64.c, reg-mips64.o): New rules.
15973 * configure.srv: Handle mips64. Include regset support for mips.
15974 * linux-mips-low.c (union mips_register): New.
15975 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15976 (mips_breakpoint, mips_breakpoint_at): Use int.
15977 (mips_collect_register, mips_supply_register)
15978 (mips_collect_register_32bit, mips_supply_register_32bit)
15979 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15980 (mips_store_fpregset, target_regsets): New.
15981 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15983 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15985 * configure.srv: Add target "spu*-*-*".
15986 * Makefile.in (clean): Remove reg-spu.c.
15987 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15988 * spu-low.c: New file.
15990 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15992 * configure.ac: Correct td_thr_tls_get_addr test.
15993 * configure: Regenerated.
15995 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15997 * linux-low.c (linux_wait_for_event): Reformat. Use the
15998 pass_signals array.
15999 * remote-utils.c (decode_address_to_semicolon): New.
16000 * server.c (pass_signals, handle_general_set): New.
16001 (handle_query): Mention QPassSignals for qSupported.
16002 (main): Call handle_general_set.
16003 * server.h (pass_signals, decode_address_to_semicolon): New.
16005 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16007 * server.c (handle_query): Correct error handling for read_auxv.
16009 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16011 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16012 and srv_linux_thread_db to yes.
16013 * linux-s390-low.c (s390_fill_gregset): New function.
16014 (target_regsets): Define data structure.
16016 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16018 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16019 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16020 * config.in, configure: Regenerated.
16021 * inferiors.c (gdb_id_to_thread): New function.
16022 (gdb_id_to_thread_id): Use it.
16023 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16024 * linux-low.h (struct process_info): Add th member.
16025 (thread_db_get_tls_address): New prototype.
16026 * remote-utils.c (decode_address): Make non-static.
16027 * server.c (handle_query): Handle qGetTLSAddr.
16028 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16029 * target.h (struct target_ops): Add get_tls_address.
16030 * thread-db.c (maybe_attach_thread): Save the thread handle.
16031 (thread_db_get_tls_address): New.
16033 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16035 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16036 (linux_resume_one_process): Take a siginfo_t *. Update all
16037 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16038 (struct pending_signals): Add a siginfo_t.
16039 (linux_wait_for_process): Always set last_status.
16040 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16041 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16042 * linux-low.h (struct process_info): Add last_status.
16044 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16046 * remote-utils.c (try_rle): New function.
16047 (putpkt_binary): Use it.
16049 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16051 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16052 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16053 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16054 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16055 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16058 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16060 * server.c (terminal_fd): New variable.
16061 (old_foreground_pgrp): Likewise.
16062 (restore_old_foreground_pgrp): New function.
16063 (start_inferior): Record the terminal file descriptor in terminal_fd
16064 and its original foreground group in old_foreground_pgrp. Register
16065 restore_old_foreground_pgrp with atexit().
16067 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16069 * server.c (handle_query): Correct qPart to qXfer.
16071 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16073 * configure.ac: Check for more headers which are missing on
16074 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16075 * configure.srv: Add Cygwin and mingw32.
16076 * remote-utils.c: Don't include headers unconditionally which
16077 are missing on mingw32. Include <winsock.h> for mingw32.
16078 (remote_open): Adjust for mingw32 support. Flush
16079 standard error after writing to it.
16080 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16081 (unblock_async_io, enable_async_io, disable_async_io)
16082 (readchar, getpkt): Update for Winsock support.
16083 (prepare_resume_reply): Expect a protocol signal number.
16084 * server.c: Disable <sys/wait.h> on mingw32.
16085 (start_inferior): Adjust for mingw32 support. Flush
16086 standard error after writing to it.
16087 (attach_inferior): Likewise. Use protocol signal
16089 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16091 * win32-i386-low.c: New file.
16092 * Makefile.in (XM_CLIBS): Set.
16093 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16094 (win32-i386-low.o): New dependency rule.
16095 * linux-low.c (linux_wait): Use target signal numbers.
16096 * target.h (struct target_ops): Doc fix.
16097 * server.h (target_signal_to_name): New prototype.
16098 * gdbreplay.c: Don't include headers unconditionally which
16099 are missing on mingw32. Include <winsock.h> for mingw32.
16100 (remote_close, remote_open): Adjust for Winsock support.
16101 * configure, config.in: Regenerated.
16103 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16105 * server.c (decode_xfer_read, write_qxfer_response): New.
16106 (handle_query): Take a packet length argument. Handle
16107 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16108 the qSupported response.
16109 (main): Update call to handle_query.
16111 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16113 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16114 (putpkt_binary): Renamed from putpkt and adjusted for binary
16116 (putpkt): New wrapper for putpkt_binary.
16117 (readchar): Don't mask off the high bit.
16118 (decode_X_packet): New function.
16119 * server.c (main): Call putpkt_binary if a handler sets the packet
16120 length. Save the length of the incoming packet. Handle 'X'.
16121 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16123 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16125 * server.c (handle_query): Handle qSupported.
16127 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16129 * remote-utils.c (all_symbols_looked_up): New variable.
16130 (look_up_one_symbol): Check it.
16131 * server.h (look_up_one_symbol): New declaration.
16132 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16134 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16136 * Makefile.in (linux-arm-low.o): Update dependencies.
16137 * linux-arm-low.c: Include "gdb_proc_service.h".
16138 (PTRACE_GET_THREAD_AREA): Define.
16139 (ps_get_thread_area): New function.
16141 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16143 * configure.srv (m68k*-*-uclinux*): New target.
16144 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16145 (linux_resume_one_process): Remove extraneous cast.
16146 (linux_read_offsets): New.
16147 (linux_target_op): Add linux_read_offsets on mmuless systems.
16148 * server.c (handle_query): Add qOffsets logic.
16149 * target.h (struct target_ops): Add read_offsets.
16151 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16153 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16154 (PTRACE_GET_THREAD_AREA): Define.
16155 (ps_get_thread_area): New function.
16156 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16157 (linux-x86-64-low.o): Update.
16159 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16161 * configure.ac: Remove checks for prfpregset_t.
16162 * gdb_proc_service.h: New file.
16163 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16164 new "gdb_proc_service.h".
16165 * proc-service.c: Likewise.
16166 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16167 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16168 * Makefile.in (gdb_proc_service_h): Updated.
16169 * configure, config.in: Regenerated.
16171 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16173 * remote-utils.c (prepare_resume_reply): Move declaration
16174 of gdb_id_from_wait to the top of the block.
16176 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16178 * linux-low.c (regsets_store_inferior_registers): Read the regset
16179 from the target before filling it.
16181 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16183 * server.c (attach_inferior): Return SIGTRAP for a successful
16186 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16188 * Makefile.in (OBS): Add version.o.
16189 (STAGESTUFF): Delete.
16190 (version.o): Add dependencies.
16191 (version.c): Replace rule.
16192 (clean): Remove version.c.
16193 * server.c (gdbserver_version): New.
16194 (gdbserver_usage): Use printf.
16195 (main): Handle --version and --help.
16196 * server.h (version, host_name): Add declarations.
16198 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16210 * linux-x86-64-low.c:
16212 * linux-s390-low.c:
16213 * linux-ppc64-low.c:
16215 * linux-mips-low.c:
16216 * linux-m68k-low.c:
16217 * linux-m32r-low.c:
16220 * linux-ia64-low.c:
16221 * linux-i386-low.c:
16222 * linux-crisv32-low.c:
16234 * gdbserver.1: Add (C) after Copyright. Update the FSF
16237 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16239 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16240 (arm_breakpoint_at): Recognize both breakpoints.
16241 (the_low_target): Use the correct breakpoint instruction.
16243 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16245 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16246 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16247 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16248 (the_low_target): Update.
16250 2005-10-25 Andreas Schwab <schwab@suse.de>
16252 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16254 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16255 (ia64_num_regs): Reduce to 462.
16257 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16259 * acinclude.m4: Correct quoting.
16260 * aclocal.m4: Regenerated.
16262 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16263 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16264 (thread_db_init): Call thread_db_err_str.
16265 * configure.ac: Check for TD_VERSION.
16266 * config.in, configure: Regenerated.
16268 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16270 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16272 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16274 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16275 is not available. Define HAVE_PTRACE_GETREGS if it is.
16276 * config.in, configure: Regenerated.
16277 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16278 * linux-i386-low.c, linux-m68k-low.c: Update to use
16279 HAVE_PTRACE_GETREGS.
16280 * linux-low.c (regsets_fetch_inferior_registers)
16281 (regsets_store_inferior_registers): Only return 0 if we processed
16283 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16284 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16286 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16288 * inferiors.c (struct thread_info): Add gdb_id.
16289 (add_thread): Add gdb_id argument.
16290 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16291 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16292 calls to add_thread.
16293 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16294 * server.c (handle_query): Use thread_to_gdb_id.
16295 (handle_v_cont, main): Use gdb_id_to_thread_id.
16296 * server.h (add_thread): Update prototype.
16297 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16300 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16302 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16303 left-padded registers.
16304 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16305 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16307 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16309 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16310 * configure: Regenerate.
16311 * config.in: Regenerate.
16312 * server.h (NEED_DECLARATION_STRERROR):
16313 Replace with !HAVE_DECL_STRERROR.
16315 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16317 * linux-low.c (linux_wait, linux_send_signal): Don't test
16318 an unsigned long variable for > 0 if it could be MAX_ULONG.
16319 * server.c (myresume): Likewise.
16320 * target.c (set_desired_inferior): Likewise.
16322 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16324 * configure.ac: Simplify and improve check for socklen_t.
16325 * configure, config.in: Regenerate.
16327 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16329 * acconfig.h: Remove.
16330 * configure.ac: Add a test for socklen_t. Use three-argument
16331 AC_DEFINE throughout.
16332 * config.in: Regenerated using autoheader 2.59.
16333 * configure: Regenerated.
16335 * gdbreplay.c (socklen_t): Provide a default.
16336 (remote_open): Use socklen_t.
16337 * remote-utils.c (socklen_t): Provide a default.
16338 (remote_open): Use socklen_t.
16339 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16342 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16344 * linux-low.c (linux_read_memory, linux_write_memory)
16345 (linux_read_auxv): Likewise.
16346 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16347 (check_mem_write): Likewise.
16348 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16350 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16351 (registers_from_string, register_data): Likewise.
16352 * server.c (handle_query, main): Likewise.
16353 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16354 (decode_M_packet): Likewise.
16355 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16356 * target.h (struct target_ops): Update read_memory, write_memory,
16358 (read_inferior_memory, write_inferior_memory): Update.
16359 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16360 to unsigned char *.
16361 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16362 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16363 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16364 linux-s390-low.c, linux-sh-low.c: Update for changes in
16365 read_inferior_memory and the_low_target->breakpoint.
16367 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16369 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16370 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16371 * configure.srv: Add powerpc64-*-linux*.
16372 * linux-ppc64-low.c: New file.
16374 2005-05-23 Orjan Friberg <orjanf@axis.com>
16376 * linux-cris-low.c: New file with support for CRIS.
16377 * linux-crisv32-low.c: Ditto for CRISv32.
16378 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16379 (clean): Add reg-cris.c and reg-crisv32.c.
16380 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16381 reg-crisv32.o, and reg-crisv32.c to make rules.
16382 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16383 recognized targets.
16385 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16387 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16388 of sizeof (PTRACE_XFER_TYPE).
16389 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16391 2005-05-12 Orjan Friberg <orjanf@axis.com>
16393 * target.h (struct target_ops): Add insert_watchpoint,
16394 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16395 pointers for hardware watchpoint support.
16396 * linux-low.h (struct linux_target_ops): Ditto.
16397 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16398 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16399 to linux_target_ops.
16400 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16402 * server.c (main): Recognize 'Z' and 'z' packets.
16404 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16406 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16407 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16408 (the_low_target): Add new members.
16410 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16412 * proc-service.c (ps_lgetregs): Search all_processes instead of
16415 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16417 * server.c (start_inferior): Change return type to int.
16418 (attach_inferior): Change sigptr to int *.
16419 (handle_v_cont, handle_v_requests): Change signal to int *.
16420 (main): Change signal to int.
16422 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16424 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16425 * configure.srv: Add m32r*-*-linux*.
16426 * linux-m32r-low.c: New file.
16428 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16430 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16432 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16434 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16435 Take unsigned long arguments for PIDs.
16436 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16437 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16438 (wait_for_sigstop, linux_resume_one_process)
16439 (regsets_fetch_inferior_registers, linux_send_signal)
16440 (linux_read_auxv): Likewise. Update the types of variables holding
16441 PIDs. Update format string specifiers.
16442 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16443 * remote-utils.c (prepare_resume_reply): Likewise.
16444 * server.c (cont_thread, general_thread, step_thread)
16445 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16447 (handle_query): Update format specifiers.
16448 (handle_v_cont, main): Use strtoul for thread IDs.
16449 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16450 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16451 (general_thread, step_thread, thread_from_wait)
16452 (old_thread_from_wait): Update.
16453 * target.h (struct thread_resume): Use unsigned long for THREAD.
16454 (struct target_ops): Use unsigned long for arguments to attach and
16457 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16459 * acinclude.m4: Include bfd/bfd.m4 directly.
16460 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16461 <agriffis@toolchain.org>.
16462 * aclocal.m4, configure: Regenerated.
16464 2005-01-07 Andrew Cagney <cagney@gnu.org>
16466 * configure.ac: Rename configure.in, require autoconf 2.59.
16467 * configure: Re-generate.
16469 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16471 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16472 LIBS when finished.
16473 * aclocal.m4: Regenerated.
16474 * configure: Regenerated.
16476 2004-11-21 Andreas Schwab <schwab@suse.de>
16478 * linux-m68k-low.c (m68k_num_gregs): Define.
16479 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16480 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16481 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16482 (m68k_breakpoint_at): New. Add to the_low_target.
16484 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16485 srv_linux_thread_db to yes.
16487 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16489 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16490 (ARCH_SET_FS): Likewise.
16491 (ARCH_GET_FS): Likewise.
16492 (ARCH_GET_GS): Likewise.
16494 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16496 * linux-i386-low.c (ps_get_thread_area): New.
16497 * linux-x86-64-low.c (ps_get_thread_area): New.
16498 * linux-low.c: Include <sys/syscall.h>.
16499 (linux_kill_one_process): Don't kill the first thread here.
16500 (linux_kill): Kill the first thread here.
16501 (kill_lwp): New function.
16502 (send_sigstop, linux_send_signal): Use it.
16503 * proc-service.c: Clean up #ifdefs.
16504 (fpregset_info): Delete.
16505 (ps_lgetregs): Update and enable implementation.
16506 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16508 * remote-utils.c (struct sym_cache, symbol_cache): New.
16509 (input_interrupt): Print a clearer message.
16510 (async_io_enabled): New variable.
16511 (enable_async_io, disable_async_io): Use it. Update comments.
16512 (look_up_one_symbol): Use the symbol cache.
16513 * thread-db.c (thread_db_look_up_symbols): New function.
16514 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16516 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16518 * configure.in: Test for -rdynamic.
16519 * configure: Regenerated.
16520 * Makefile (INTERNAL_LDFLAGS): New.
16521 (gdbserver, gdbreplay): Use it.
16523 2004-09-02 Andrew Cagney <cagney@gnu.org>
16525 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16527 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16529 * linux-low.c (linux_wait): Clear all_processes list also.
16531 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16533 * linux-low.c: Include <errno.h>. Remove extern declaration of
16536 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16538 * gdbreplay.c, server.h, utils.c: Update copyright years.
16540 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16542 * server.c (main): Print child status or termination signal from
16543 variable 'signal', not 'sig'.
16545 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16547 * linux-low.c (linux_read_memory): Change return type to
16548 int. Check for and return error from ptrace().
16549 * target.c (read_inferior_memory): Change return type to int. Pass
16550 back return status from the_target->read_memory().
16551 * target.h (struct target_ops): Adapt *read_memory() prototype.
16553 (read_inferior_memory): Adapt prototype.
16554 * server.c (main): Return an error packet if
16555 read_inferior_memory() returns an error.
16557 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16559 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16560 Unify with other clean targets.
16562 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16564 * server.c (handle_v_cont): Call set_desired_inferior.
16566 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16568 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16570 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16572 * linux-low.c (linux_wait): Unblock async I/O.
16573 (linux_resume): Block and enable async I/O.
16574 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16575 * server.h (block_async_io, unblock_async_io): Add prototypes.
16577 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16579 * remote-utils.c (remote_open): Print a status notice after
16580 opening a TCP port.
16581 * server.c (attach_inferior): Print a status notice after
16584 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16586 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16588 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16590 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16592 * server.c, target.h: Update copyright years.
16594 2004-02-25 Roland McGrath <roland@redhat.com>
16596 * target.h (struct target_ops): New member `read_auxv'.
16597 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16598 * linux-low.c (linux_read_auxv): New function.
16599 (linux_target_ops): Initialize `read_auxv' member to that.
16601 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16603 Committed by Jim Blandy <jimb@redhat.com>.
16605 * linux-s390-low.c (s390_num_regs): Update.
16606 (s390_regmap): Remove control registers. Use __s390x__ predefine
16607 instead of GPR_SIZE to distiguish s390 and s390x targets.
16609 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16611 * linux-low.c: Update copyright year.
16612 (check_removed_breakpoint): Clear pending_is_breakpoint.
16613 (linux_set_resume_request, linux_queue_one_thread)
16614 (resume_status_pending_p): New functions.
16615 (linux_continue_one_thread): Use process->resume.
16616 (linux_resume): Only resume threads if there are no pending events.
16617 * linux-low.h (struct process_info): Add resume request
16620 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16622 * regcache.c (new_register_cache): Clear the allocated register
16623 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16625 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16627 * linux-low.c (linux_resume): Take a struct thread_resume *
16629 (linux_wait): Update call.
16630 (resume_ptr): New static variable.
16631 (linux_continue_one_thread): Renamed from
16632 linux_continue_one_process. Use resume_ptr.
16633 (linux_resume): Use linux_continue_one_thread.
16634 * server.c (handle_v_cont, handle_v_requests): New functions.
16635 (myresume): New function.
16636 (main): Handle 'v' case.
16637 * target.h (struct thread_resume): New type.
16638 (struct target_ops): Change argument of "resume" to struct
16640 (myresume): Delete macro.
16642 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16644 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16645 (uninstall): Support DESTDIR.
16647 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16649 * configure.srv: Add xscale*linux copy of arm*linux entry.
16651 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16653 * linux-arm-low.c (arm_reinsert_addr): New function.
16654 (the_low_target): Add arm_reinsert_addr.
16656 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16658 * mem-break.c: Remove whitespace at end of file.
16660 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16662 * configure.in: Check whether we need to prototype strerror.
16663 * server.h: Optionally prototype strerror.
16664 * gdbreplay.c (perror_with_name): Use strerror.
16665 * linux-low.c (linux_attach_lwp): Use strerror.
16666 * utils.c (perror_with_name): Use strerror.
16667 * config.in, configure: Regenerated.
16669 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16671 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16672 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16674 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16676 * Makefile.in (SFILES): Update.
16677 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16678 low-sun3.c: Remove files.
16680 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16682 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16683 (linux_detach_one_process, linux_detach): New functions.
16684 (linux_target_ops): Add linux_detach.
16685 * server.c (main): Handle 'D' packet.
16686 * target.h (struct target_ops): Add "detach" member.
16687 (detach_inferior): Define.
16689 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16691 From Kelley Cook <kelleycook@wideopenwest.com>:
16692 * configure.srv: Accept i[34567]86 variants.
16694 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16696 * linux-low.c (linux_wait_for_event): Correct comment typos.
16697 (linux_resume_one_process): Call check_removed_breakpoint.
16698 (linux_send_signal): New function.
16699 (linux_target_ops): Add linux_send_signal.
16700 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16702 * target.h (struct target_ops): Add send_signal.
16704 2003-05-29 Jim Blandy <jimb@redhat.com>
16706 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16707 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16708 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16709 away part of the register's value.
16711 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16713 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16714 (linux_wait_for_event, linux_init_signals): Likewise.
16716 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16718 * configure.in: Check for stdlib.h.
16719 * configure: Regenerated.
16720 * config.in: Regenerated.
16722 2003-01-04 Andreas Schwab <schwab@suse.de>
16724 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16726 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16728 * Makefile.in: Remove obsolete code.
16730 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16732 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16733 defined(PT_FPR0_HI).
16735 2002-11-17 Stuart Hughes <seh@zee2.com>
16737 * linux-arm-low.c (arm_num_regs): Increase.
16738 (arm_regmap): Include status register.
16740 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16742 * linux-low.c (register_addr): Remove incorrect -1 check.
16744 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16746 * linux-low.c (linux_create_inferior): Call setpgid. Return
16748 (unstopped_p, linux_signal_pid): Remove.
16749 (linux_target_ops): Remove linux_signal_pid.
16750 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16751 global instead of target method.
16752 * target.h (struct target_ops): Remove signal_pid. Update comment
16753 for create_inferior.
16754 * server.c (signal_pid): New variable.
16755 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16756 gdbserver. Set the child to be the foreground process group.
16757 (attach_inferior): Set signal_pid.
16759 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16761 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16763 2002-08-20 Jim Blandy <jimb@redhat.com>
16765 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16768 2002-08-01 Andrew Cagney <cagney@redhat.com>
16770 * Makefile.in: Make chill references obsolete.
16772 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16774 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16775 * configure: Regenerate.
16776 * config.in: Regenerate.
16778 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16780 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16781 (perror_with_name, remote_close, remote_open, expect, play): Static.
16783 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16785 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16786 byte offsets instead of an array of indexes.
16787 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16789 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16791 * regcache.c: Add comment.
16793 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16795 * thread-db.c: New file.
16796 * proc-service.c: New file.
16797 * acinclude.m4: New file.
16798 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16799 proc-service.o, and thread-db.o.
16800 (linux-low.o): Add USE_THREAD_DB.
16801 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16802 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16803 * aclocal.m4: Regenerated.
16804 * config.in: Regenerated.
16805 * configure: Regenerated.
16806 * configure.in: Check for proc_service.h, sys/procfs.h,
16807 thread_db.h, and linux/elf.h headrs.
16808 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16809 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16810 Check for -lthread_db and thread support.
16811 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16812 PowerPC, and SuperH.
16813 * i387-fp.c: Constify arguments.
16814 * i387-fp.h: Likewise.
16815 * inferiors.c: (struct thread_info): Renamed from
16816 `struct inferior_info'. Remove PID member. Use generic inferior
16817 list header. All uses updated.
16818 (inferiors, signal_pid): Removed.
16819 (all_threads): New variable.
16820 (get_thread): Define.
16821 (add_inferior_to_list): New function.
16822 (for_each_inferior): New function.
16823 (change_inferior_id): New function.
16824 (add_inferior): Removed.
16825 (remove_inferior): New function.
16826 (add_thread): New function.
16827 (free_one_thread): New function.
16828 (remove_thread): New function.
16829 (clear_inferiors): Use for_each_inferior and free_one_thread.
16830 (find_inferior): New function.
16831 (find_inferior_id): New function.
16832 (inferior_target_data): Update argument type.
16833 (set_inferior_target_data): Likewise.
16834 (inferior_regcache_data): Likewise.
16835 (set_inferior_regcache_data): Likewise.
16836 * linux-low.c (linux_bp_reinsert): Remove.
16837 (all_processes, stopping_threads, using_thrads)
16838 (struct pending_signals, debug_threads, pid_of): New.
16839 (inferior_pid): Replace with macro.
16840 (struct inferior_linux_data): Remove.
16841 (get_stop_pc, add_process): New functions.
16842 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16843 Use add_process and add_thread.
16844 (linux_attach_lwp): New function, based on old linux_attach. Use
16845 add_process and add_thread. Set stop_expected for new threads.
16846 (linux_attach): New function.
16847 (linux_kill_one_process): New function.
16848 (linux_kill): Kill all LWPs.
16849 (linux_thread_alive): Use find_inferior_id.
16850 (check_removed_breakpoints, status_pending_p): New functions.
16851 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16852 Update. Use WNOHANG. Wait for cloned processes also. Update process
16853 struct for the found process.
16854 (linux_wait_for_event): New function.
16855 (linux_wait): Use it. Support LWPs.
16856 (send_sigstop, wait_for_sigstop, stop_all_processes)
16857 (linux_resume_one_process, linux_continue_one_process): New functions.
16858 (linux_resume): Support LWPs.
16859 (REGISTER_RAW_SIZE): Remove.
16860 (fetch_register): Use register_size instead. Call supply_register.
16861 (usr_store_inferior_registers): Likewise. Call collect_register.
16862 Fix recursive case.
16863 (regsets_fetch_inferior_registers): Improve error message.
16864 (regsets_store_inferior_registers): Add debugging.
16865 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16866 (unstopped_p, linux_signal_pid): New functions.
16867 (linux_target_ops): Add linux_signal_pid.
16868 (linux_init_signals): New function.
16869 (initialize_low): Call it. Initialize using_threads.
16870 * regcache.c (inferior_regcache_data): Add valid
16872 (get_regcache): Fetch registers lazily. Add fetch argument
16873 and update all callers.
16874 (regcache_invalidate_one, regcache_invalidate): New
16876 (new_register_cache): Renamed from create_register_cache.
16877 Return the new regcache.
16878 (free_register_cache): Change argument to a void *.
16879 (registers_to_string, registers_from_string): Call get_regcache
16880 with fetch flag set.
16881 (register_data): Make static. Pass fetch flag to get_regcache.
16882 (supply_register): Call get_regcache with fetch flag clear.
16883 (collect_register): Call get_regcache with fetch flag set.
16884 (collect_register_as_string): New function.
16885 * regcache.h: Update.
16886 * remote-utils.c (putpkt): Flush after debug output and use
16888 Handle input interrupts while waiting for an ACK.
16889 (input_interrupt): Use signal_pid method.
16890 (getpkt): Flush after debug output and use stderr.
16891 (outreg): Use collect_register_as_string.
16892 (new_thread_notify, dead_thread_notify): New functions.
16893 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16894 and general_thread.
16895 (look_up_one_symbol): Flush after debug output.
16896 * server.c (step_thread, server_waiting): New variables.
16897 (start_inferior): Don't use signal_pid. Update call to mywait.
16898 (attach_inferior): Update call to mywait.
16899 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16900 (main): Don't fetch/store registers explicitly. Use
16901 set_desired_inferior. Support proposed ``Hs'' packet. Update
16903 * server.h: Update.
16904 (struct inferior_list, struct_inferior_list_entry): New.
16905 * target.c (set_desired_inferior): New.
16906 (write_inferior_memory): Constify.
16907 (mywait): New function.
16908 * target.h: Update.
16909 (struct target_ops): New signal_pid method.
16910 (mywait): Removed macro, added prototype.
16912 * linux-low.h (regset_func): Removed.
16913 (regset_fill_func, regset_store_func): New.
16914 (enum regset_type): New.
16915 (struct regset_info): Add type field. Use new operation types.
16916 (struct linux_target_ops): stop_pc renamed to get_pc.
16917 Add decr_pc_after_break and breakpoint_at.
16918 (get_process, get_thread_proess, get_process_thread)
16919 (strut process_info, all_processes, linux_attach_lwp)
16920 (thread_db_init): New.
16922 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16923 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16924 (the_low_target): Add new members.
16925 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16926 (i386_store_fpxregset): Constify.
16927 (target_regsets): Add new kind identifier.
16928 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16929 (i386_set_pc): Add debugging.
16930 (i386_breakpoint_at): New function.
16931 (the_low_target): Add new members.
16932 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16933 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16934 (mips_breakpoint_at): New.
16935 (the_low_target): Add new members.
16936 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16937 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16938 (the_low_target): Add new members.
16939 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16940 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16941 (the_low_target): Add new members.
16942 * linux-x86-64-low.c (target_regsets): Add new kind
16945 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16947 From Martin Pool <mbp@samba.org>:
16948 * server.c (gdbserver_usage): New function.
16951 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16953 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16954 stop_at -> stop_pc.
16956 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16958 * Makefile.in: Remove obsolete code.
16960 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16962 * linux-low.c (regsets_fetch_inferior_registers),
16963 (regsets_store_inferior_registers): Removed cast to int from
16965 * regcache.h: Added declaration of struct inferior_info.
16967 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16969 * inferiors.c (struct inferior_info): Add regcache_data.
16970 (add_inferior): Call create_register_cache.
16971 (clear_inferiors): Call free_register_cache.
16972 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16973 * regcache.c (struct inferior_regcache_data): New.
16974 (registers): Remove.
16975 (get_regcache): New function.
16976 (create_register_cache, free_register_cache): New functions.
16977 (set_register_cache): Don't initialize the register cache here.
16978 (registers_to_string, registers_from_string, register_data): Call
16980 * regcache.h: Add prototypes.
16981 * server.h: Likewise.
16983 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16985 * mem-break.c: New file.
16986 * mem-break.h: New file.
16987 * Makefile.in: Add mem-break.o rule; update server.h
16989 * inferiors.c (struct inferior_info): Add target_data
16991 (clear_inferiors): Free target_data member if set.
16992 (inferior_target_data, set_inferior_target_data): New functions.
16993 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16994 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16995 * linux-low.c (linux_bp_reinsert): New variable.
16996 (struct inferior_linux_data): New.
16997 (linux_create_inferior): Use set_inferior_target_data.
16998 (linux_attach): Likewise. Call add_inferior.
16999 (linux_wait_for_one_inferior): New function.
17000 (linux_wait): Call it.
17001 (linux_write_memory): Add const.
17002 (initialize_low): Call set_breakpoint_data.
17003 * linux-low.h (struct linux_target_ops): Add breakpoint
17005 * server.c (attach_inferior): Remove extra add_inferior
17007 * server.h: Include mem-break.h. Update inferior.c
17009 * target.c (read_inferior_memory)
17010 (write_inferior_memory): New functions.
17011 * target.h (read_inferior_memory)
17012 (write_inferior_memory): Change macros to prototypes.
17013 (struct target_ops): Update comments. Add const to write_memory
17016 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17018 * linux-low.c (usr_store_inferior_registers): Support
17019 registers which are allowed to fail to store.
17020 * linux-low.h (linux_target_ops): Likewise.
17021 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17022 (ppc_cannot_store_register): FPSCR may not be storable.
17024 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17026 * server.h: Include <string.h> if HAVE_STRING_H.
17027 * ChangeLog: Correct paths in last ChangeLog entry.
17029 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17031 * linux-low.h: Remove obsolete prototypes.
17032 (struct linux_target_ops): New.
17033 (extern the_low_target): New.
17034 * linux-low.c (num_regs, regmap): Remove declarations.
17035 (register_addr): Use the_low_target explicitly.
17036 (fetch_register): Likewise.
17037 (usr_fetch_inferior_registers): Likewise.
17038 (usr_store_inferior_registers): Likewise.
17039 * linux-arm-low.c (num_regs): Remove.
17040 (arm_num_regs): Define.
17041 (arm_regmap): Renamed from regmap, made static.
17042 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17044 (arm_cannot_store_register): Renamed from cannot_store_register,
17046 (the_low_target): New.
17047 * linux-i386-low.c (num_regs): Remove.
17048 (i386_num_regs): Define.
17049 (i386_regmap): Renamed from regmap, made static.
17050 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17052 (i386_cannot_store_register): Renamed from cannot_store_register,
17054 (the_low_target): New.
17055 * linux-ia64-low.c (num_regs): Remove.
17056 (ia64_num_regs): Define.
17057 (ia64_regmap): Renamed from regmap, made static.
17058 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17060 (ia64_cannot_store_register): Renamed from cannot_store_register,
17062 (the_low_target): New.
17063 * linux-m68k-low.c (num_regs): Remove.
17064 (m68k_num_regs): Define.
17065 (m68k_regmap): Renamed from regmap, made static.
17066 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17068 (m68k_cannot_store_register): Renamed from cannot_store_register,
17070 (the_low_target): New.
17071 * linux-mips-low.c (num_regs): Remove.
17072 (mips_num_regs): Define.
17073 (mips_regmap): Renamed from regmap, made static.
17074 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17076 (mips_cannot_store_register): Renamed from cannot_store_register,
17078 (the_low_target): New.
17079 * linux-ppc-low.c (num_regs): Remove.
17080 (ppc_num_regs): Define.
17081 (ppc_regmap): Renamed from regmap, made static.
17082 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17084 (ppc_cannot_store_register): Renamed from cannot_store_register,
17086 (the_low_target): New.
17087 * linux-s390-low.c (num_regs): Remove.
17088 (s390_num_regs): Define.
17089 (s390_regmap): Renamed from regmap, made static.
17090 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17092 (s390_cannot_store_register): Renamed from cannot_store_register,
17094 (the_low_target): New.
17095 * linux-sh-low.c (num_regs): Remove.
17096 (sh_num_regs): Define.
17097 (sh_regmap): Renamed from regmap, made static.
17098 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17100 (sh_cannot_store_register): Renamed from cannot_store_register,
17102 (the_low_target): New.
17103 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17104 (the_low_target): New.
17106 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17108 * Makefile.in: Add stamp-h target.
17109 * configure.in: Create stamp-h.
17110 * configure: Regenerated.
17112 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17114 * inferiors.c: New file.
17115 * target.c: New file.
17116 * target.h: New file.
17117 * Makefile.in: Add target.o and inferiors.o. Update
17119 * linux-low.c (inferior_pid): New static variable,
17120 moved from server.c.
17121 (linux_create_inferior): Renamed from create_inferior.
17122 Call add_inferior. Return 0 on success instead of a PID.
17123 (linux_attach): Renamed from myattach.
17124 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17125 (linux_thread_alive): Renamed from mythread_alive.
17126 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17128 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17129 (regsets_store_inferior_registers): Correct error message.
17130 Add missing ``return 0''.
17131 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17132 (linux_store_registers): Renamed from store_inferior_registers.
17133 (linux_read_memory): Renamed from read_inferior_memory.
17134 (linux_write_memory): Renamed from write_inferior_memory.
17135 (linux_target_ops): New structure.
17136 (initialize_low): Call set_target_ops ().
17137 * remote-utils.c (unhexify): New function.
17138 (hexify): New function.
17139 (input_interrupt): Send signals to ``signal_pid''.
17140 * server.c (inferior_pid): Remove.
17141 (start_inferior): Update create_inferior call.
17142 (attach_inferior): Call add_inferior.
17143 (handle_query): New function.
17144 (main): Call handle_query for `q' packets.
17145 * server.h: Include "target.h". Remove obsolete prototypes.
17146 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17148 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17150 * Makefile.in: Add WARN_CFLAGS. Update configury
17152 * configure.in: Check for <string.h>
17153 * configure: Regenerate.
17154 * config.in: Regenerate.
17155 * gdbreplay.c: Include needed system headers.
17156 (remote_open): Remove strchr prototype.
17157 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17158 * regcache.c (supply_register): Change buf argument to const void *.
17159 (supply_register_by_name): Likewise.
17160 (collect_register): Change buf argument to void *.
17161 (collect_register_by_name): Likewise.
17162 * regcache.h: Add missing prototypes.
17163 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17164 * server.c (handle_query): New function.
17165 (attached): New static variable, moved out of main.
17166 (main): Quiet longjmp clobber warnings.
17167 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17168 * utils.c (error): Remove NORETURN.