1 2019-07-19 Alan Hayward <alan.hayward@arm.com>
3 * configure.srv: Add new files. Remove xml generated files.
4 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
6 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
7 * linux-aarch32-tdesc.c: New file.
8 * linux-aarch32-tdesc.h: New file.
9 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
10 * linux-arm-low.c (init_registers_arm, tdesc_arm)
11 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
12 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
13 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
14 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
16 (arm_read_description): Call arm_linux_read_description.
17 (initialize_low_arch): Don't init registers.
18 * linux-arm-tdesc.c: New file.
19 * linux-arm-tdesc.h: New file.
21 2019-07-10 Alan Hayward <alan.hayward@arm.com>
23 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
24 Move counter inside for.
25 (arm_read_description): Check ptrace earlier.
26 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
28 2019-07-09 Tom Tromey <tom@tromey.com>
31 * configure.ac: Change common to gdbsupport.
32 * acinclude.m4: Change common to gdbsupport.
33 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
34 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
36 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
37 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
38 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
39 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
40 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
41 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
42 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
43 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
44 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
47 2019-07-04 Alan Hayward <alan.hayward@arm.com>
49 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
51 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
53 2019-07-04 Alan Hayward <alan.hayward@arm.com>
55 * configure.srv: Remove legacy xml.
56 * linux-aarch64-low.c (initialize_low_arch): Remove
57 initialize_low_tdesc call.
58 * linux-aarch64-tdesc-selftest.c: Remove file.
59 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
60 * linux-x86-low.c (initialize_low_arch): Remove
61 initialize_low_tdesc call.
62 * linux-x86-tdesc-selftest.c: Remove file.
63 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
65 2019-06-20 Tom de Vries <tdevries@suse.de>
67 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
68 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
70 2019-06-19 Tom de Vries <tdevries@suse.de>
72 * debug.h (debug_write): Change return type to ssize_t.
73 * debug.c (debug_write): Same.
75 2019-06-14 Tom Tromey <tom@tromey.com>
77 * configure.ac: Use new path to gnulib.
79 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
82 2019-06-11 Tom Tromey <tom@tromey.com>
84 * Makefile.in (SFILES): Add alloc.c.
86 (IPA_OBJS): Add alloc-ipa.o.
87 (alloc-ipa.o): New target.
88 (%.o: ../%.c): New pattern rule.
90 2019-06-10 Tom Tromey <tromey@adacore.com>
92 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
93 end warning with a newline.
94 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
96 * thread-db.c (attach_thread): Don't end warning with a newline.
97 (thread_db_notice_clone): Likewise.
98 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
100 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
101 end warning with a newline.
103 2019-06-04 Pedro Alves <palves@redhat.com>
105 * server.c (captured_main): Use make_unique_xstrdup.
107 2019-06-02 Tom Tromey <tom@tromey.com>
109 * gdbreplay.c (fromhex): Remove.
110 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
112 2019-05-29 Tom Tromey <tromey@adacore.com>
114 * configure: Rebuild.
116 2019-05-06 Kevin Buettner <kevinb@redhat.com>
118 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
119 sign extension code on 32-bit builds.
121 2019-05-03 Eli Zaretskii <eliz@gnu.org>
124 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
126 2019-04-19 Tom Tromey <tom@tromey.com>
128 * server.c (struct vstop_notif): Derive from notif_event.
130 (queue_stop_reply): Update.
131 (remove_all_on_match_ptid): Change type. Rewrite.
132 (discard_queued_stop_replies): Rewrite.
133 (in_queued_stop_replies_ptid): Change type.
134 (in_queued_stop_replies): Rewrite.
135 (notif_stop): Update.
136 (queue_stop_reply_callback): Update.
137 (captured_main): Don't call initialize_notif.
138 (push_stop_notification): Update.
139 * notif.c (notif_write_event, handle_notif_ack)
140 (notif_event_enque, notif_push): Update.
141 (notif_event_xfree, initialize_notif): Remove.
142 * notif.h (struct notif_event): Include <list>, not
144 (struct notif_server) <queue>: Now a std::list.
145 (notif_event_p): Remove typedef.
146 (initialize_notif): Don't declare.
147 (struct notif_event): Add virtual destructor.
149 2019-04-17 Alan Hayward <alan.hayward@arm.com>
151 * ax.c (ax_vdebug): Call debug_printf.
152 * debug.c (debug_write): New function.
153 * debug.h (debug_write): New declaration.
154 * linux-low.c (sigchld_handler): Call debug_write.
156 2019-04-17 Alan Hayward <alan.hayward@arm.com>
158 * debug.c (debug_set_output): New function.
159 (debug_vprintf): Send output to debug_file.
160 (debug_flush): Likewise.
161 * debug.h (debug_set_output): New declaration.
162 * server.c (handle_monitor_command): Add debug-file option.
163 (captured_main): Likewise.
165 2019-04-17 Alan Hayward <alan.hayward@arm.com>
167 * debug.c (remote_debug): Add definition.
168 * debug.h (remote_debug): Add declaration.
169 * hostio.c (remote_debug): Remove declaration.
170 * remote-utils.c (struct ui_file): Likewise.
171 (remote_debug): Likewise.
172 * remote-utils.h (remote_debug): Likewise,
173 * server.c (remote_debug): Remove definition.
175 2019-04-10 Kevin Buettner <kevinb@redhat.com>
177 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
178 when using a 64-bit gdbserver.
180 2019-04-09 Tom Tromey <tromey@adacore.com>
182 * linux-low.c (select_event_lwp): Use find_thread_in_random.
184 2019-04-08 Tom Tromey <tom@tromey.com>
186 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
188 (linux_resume_one_lwp): Likewise.
190 2019-04-08 Tom Tromey <tom@tromey.com>
192 * gdbreplay.c: Update.
193 * linux-low.c: Update.
196 2019-04-08 Tom Tromey <tom@tromey.com>
198 * server.c: Use C++ exception handling.
199 * linux-low.c: Use C++ exception handling.
200 * gdbreplay.c: Use C++ exception handling.
202 2019-04-08 Tom Tromey <tom@tromey.com>
204 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
205 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
206 (captured_main, main): Update.
207 * gdbreplay.c (main): Update.
209 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
211 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
212 value in argument pointer, return 1 if the entry is found and 0
213 otherwise. Move comment.
214 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
215 * linux-low.h (linux_get_auxv): Declare.
216 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
218 2019-04-05 Tom Tromey <tromey@adacore.com>
220 * server.c (gdbserver_usage): Use upper-case for metasyntactic
223 2019-03-28 Alan Hayward <alan.hayward@arm.com>
225 * linux-low.c (AT_HWCAP2): Add define if not already included.
227 2019-03-26 Alan Hayward <alan.hayward@arm.com>
229 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
230 (aarch64_arch_setup): Call linux_get_hwcap.
231 * linux-arm-low.c (arm_get_hwcap): Remove function.
232 (arm_read_description): Call linux_get_hwcap.
233 * linux-low.c (linux_get_auxv): New function.
234 (linux_get_hwcap): Likewise.
235 (linux_get_hwcap2): Likewise.
236 * linux-low.h (linux_get_hwcap): New declaration.
237 (linux_get_hwcap2): Likewise.
238 * linux-ppc-low.c (ppc_get_auxv): Remove function.
239 (ppc_arch_setup): Call linux_get_hwcap.
240 * linux-s390-low.c (s390_get_hwcap): Remove function.
241 (s390_arch_setup): Call linux_get_hwcap.
243 2019-03-22 Alan Hayward <alan.hayward@arm.com>
244 Jiong Wang <jiong.wang@arm.com>
246 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
247 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
249 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
251 2019-03-22 Alan Hayward <alan.hayward@arm.com>
252 Jiong Wang <jiong.wang@arm.com>
254 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
255 (aarch64_get_hwcap): New function.
256 (aarch64_arch_setup): Read APIA hwcap.
258 2019-03-22 Alan Hayward <alan.hayward@arm.com>
259 Jiong Wang <jiong.wang@arm.com>
261 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
262 (initialize_low_tracepoint): Likewise.
263 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
264 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
265 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
266 (aarch64_linux_read_description): Likewise.
267 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
269 2019-03-12 John Baldwin <jhb@FreeBSD.org>
271 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
272 i386_create_target_description for 'segments' parameter.
273 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
274 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
275 * win32-i386-low.c (i386_arch_setup): Likewise.
277 2019-03-12 Tom Tromey <tromey@adacore.com>
279 * linux-low.c (iterate_over_lwps): Update.
281 2019-03-06 Tom Tromey <tom@tromey.com>
283 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
284 (captured_main): Use SCOPE_EXIT.
286 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
288 * configure.srv: Use '$enable_unittest' instead of '$development'
289 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
292 2019-02-27 Tom Tromey <tromey@adacore.com>
294 * gdbreplay.c (logchar): Handle \r\n.
296 2019-02-07 Alan Hayward <alan.hayward@arm.com>
298 * linux-low.c (linux_attach): Add process before lwp.
299 * server.c (attach_inferior): Check if already attached.
301 2019-02-07 Tom Tromey <tom@tromey.com>
303 * x86-tdesc.h: Rename include guard.
304 * x86-low.h: Add include guard.
305 * wincecompat.h: Rename include guard.
306 * win32-low.h: Add include guard.
307 * utils.h: Rename include guard.
308 * tracepoint.h: Rename include guard.
309 * tdesc.h: Rename include guard.
310 * target.h: Rename include guard.
311 * server.h: Rename include guard.
312 * remote-utils.h: Rename include guard.
313 * regcache.h: Rename include guard.
314 * nto-low.h: Rename include guard.
315 * notif.h: Add include guard.
316 * mem-break.h: Rename include guard.
317 * lynx-low.h: Add include guard.
318 * linux-x86-tdesc.h: Add include guard.
319 * linux-s390-tdesc.h: Add include guard.
320 * linux-ppc-tdesc-init.h: Add include guard.
321 * linux-low.h: Add include guard.
322 * linux-aarch64-tdesc.h: Add include guard.
323 * linux-aarch32-low.h: Add include guard.
324 * inferiors.h: Rename include guard.
325 * i387-fp.h: Rename include guard.
326 * hostio.h: Rename include guard.
327 * gdbthread.h: Rename include guard.
328 * gdb_proc_service.h: Rename include guard.
329 * event-loop.h: Rename include guard.
330 * dll.h: Rename include guard.
331 * debug.h: Rename include guard.
332 * ax.h: Rename include guard.
334 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
337 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
338 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
340 2019-01-25 Tom Tromey <tom@tromey.com>
342 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
344 2019-01-25 Tom Tromey <tom@tromey.com>
346 * win32-low.c: Fix common/ includes.
347 * win32-i386-low.c: Fix common/ includes.
348 * tracepoint.c: Fix common/ includes.
349 * thread-db.c: Fix common/ includes.
350 * target.h: Fix common/ includes.
351 * symbol.c: Fix common/ includes.
352 * spu-low.c: Fix common/ includes.
353 * server.h: Fix common/ includes.
354 * server.c: Fix common/ includes.
355 * remote-utils.c: Fix common/ includes.
356 * regcache.h: Fix common/ includes.
357 * regcache.c: Fix common/ includes.
358 * nto-x86-low.c: Fix common/ includes.
359 * notif.h: Fix common/ includes.
360 * mem-break.h: Fix common/ includes.
361 * lynx-low.c: Fix common/ includes.
362 * lynx-i386-low.c: Fix common/ includes.
363 * linux-x86-tdesc-selftest.c: Fix common/ includes.
364 * linux-x86-low.c: Fix common/ includes.
365 * linux-low.c: Fix common/ includes.
366 * inferiors.h: Fix common/ includes.
367 * i387-fp.c: Fix common/ includes.
368 * hostio.c: Fix common/ includes.
369 * hostio-errno.c: Fix common/ includes.
370 * gdbthread.h: Fix common/ includes.
371 * gdbreplay.c: Fix common/ includes.
372 * fork-child.c: Fix common/ includes.
373 * event-loop.c: Fix common/ includes.
375 (enum gdb_agent_op): Fix common/ includes.
377 2019-01-21 Tom Tromey <tom@tromey.com>
379 * tracepoint.c: Fix includes.
380 * remote-utils.c: Fix includes.
381 * linux-x86-low.c: Fix includes.
383 2019-01-01 Joel Brobecker <brobecker@adacore.com>
385 * gdbreplay.c (gdbreplay_version): Update copyright year in
387 * server.c (gdbserver_version): Likewise.
389 2018-12-05 Alan Hayward <alan.hayward@arm.com>
391 * linux-low.c (add_lwp): Switch ordering.
393 2018-11-29 Tom Tromey <tom@tromey.com>
395 * win32-low.c (win32_join): Take pid, not process.
396 * target.h (struct target_ops) <join>: Change argument type.
397 (join_inferior): Change argument name.
398 * spu-low.c (spu_join): Take pid, not process.
399 * server.c (handle_detach): Preserve pid before destroying
401 * lynx-low.c (lynx_join): Take pid, not process.
402 * linux-low.c (linux_join): Take pid, not process.
404 2018-11-23 Alan Hayward <alan.hayward@arm.com>
406 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
407 (aarch64_cannot_fetch_register): Likewise.
408 (struct linux_target_ops): Update references.
410 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
412 * linux-ppc-low.c: Include nat/linux-ptrace.h.
414 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
416 * configure.srv (ipa_ppc_linux_regobj): Add
417 powerpc-isa207-htm-vsx32l-ipa.o and
418 powerpc-isa207-htm-vsx64l-ipa.o.
419 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
420 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
421 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
422 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
423 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
424 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
425 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
426 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
427 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
428 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
429 (init_registers_powerpc_isa207_htm_vsx32l)
430 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
431 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
432 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
433 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
434 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
435 (ppc_store_tm_ctarregset): New functions.
436 (ppc_regsets): Add entries for HTM regsets.
437 (ppc_arch_setup): Set htm in features struct when needed. Set
438 sizes for the HTM regsets.
439 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
440 (initialize_low_arch): Call
441 init_registers_powerpc_isa207_htm_vsx32l and
442 init_registers_powerpc_isa207_htm_vsx64l.
443 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
444 PPC_TDESC_ISA207_HTM_VSX.
445 (initialize_low_tracepoint): Call
446 init_registers_powerpc_isa207_htm_vsx32l and
447 init_registers_powerpc_isa207_htm_vsx64l.
449 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
451 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
452 rs6000/power-linux-pmu.xml to srv_xmlfiles.
453 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
454 (ppc_store_pmuregset): New functions.
455 (ppc_regsets): Add entries for ebb and pmu regsets.
456 (ppc_arch_setup): Set isa207 in features struct if the ebb and
457 pmu regsets are available. Set sizes for these regsets.
459 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
461 * configure.srv (ipa_ppc_linux_regobj): Add
462 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
463 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
464 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
465 rs6000/powerpc-isa207-vsx32l.xml, and
466 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
467 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
468 <PPC_TDESC_ISA207_VSX>: New enum value.
469 (init_registers_powerpc_isa207_vsx32l): Declare.
470 (init_registers_powerpc_isa207_vsx64l): Declare.
471 * linux-ppc-low.c (ppc_fill_tarregset): New function.
472 (ppc_store_tarregset): New function.
473 (ppc_regsets): Add entry for the TAR regset.
474 (ppc_arch_setup): Set isa207 in features struct when needed. Set
475 size for the TAR regsets.
476 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
477 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
478 and init_registers_powerpc_isa207_vsx64l.
479 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
480 (initialize_low_tracepoint): Call
481 init_registers_powerpc_isa207_vsx32l and
482 init_registers_powerpc_isa207_vsx64l.
484 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
485 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
487 * configure.srv (ipa_ppc_linux_regobj): Add
488 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
489 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
490 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
491 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
492 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
493 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
494 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
495 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
496 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
497 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
498 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
499 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
500 (ppc_hwcap): Add comment.
501 (ppc_hwcap2): New global.
502 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
503 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
504 (ppc_regsets): Add entries for the DSCR and PPR regsets.
505 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
506 when needed. Set sizes for the the DSCR and PPR regsets.
507 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
508 (initialize_low_arch): Call
509 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
510 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
511 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
512 PPC_TDESC_ISA205_PPR_DSCR_VSX.
513 (initialize_low_tracepoint): Call
514 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
515 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
517 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
519 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
521 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
522 Simon Marchi <simark@simark.ca>
524 * acinclude.m4: Include "../selftest.m4".
525 * configure: Regenerate.
526 * configure.ac: Use "GDB_AC_SELFTEST".
527 * configure.srv: Use "$enable_unittests" instead of
528 "$development" when checking whether unit tests have been
530 * server.c (captured_main): Update message informing that
531 selftests have been disabled.
533 2018-10-04 Tom Tromey <tom@tromey.com>
535 * configure: Rebuild.
537 2018-10-04 Tom Tromey <tom@tromey.com>
539 * server.c (handle_status): Rename inner "thread".
540 (process_serial_event): Declare "res" in 'm' case.
541 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
542 (iterate_over_lwps): Rename inner "thread".
543 (linux_qxfer_libraries_svr4): Rename inner "len".
544 * gdbthread.h (find_thread_in_random): Rename inner "thread".
546 2018-10-01 Gary Benson <gbenson@redhat.com>
548 * gdb_proc_service.h: Moved common code to
549 common/gdb_proc_service.h.
551 2018-10-01 Gary Benson <gbenson@redhat.com>
553 * gdb_proc_service.h: Synchronize comments and whitespace with
554 GDB's version of this file.
556 2018-09-25 Tom Tromey <tom@tromey.com>
558 * configure: Rebuild.
559 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
561 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
563 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
564 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
565 ($(IPA_LIB)): Sort IPA_OBJS.
567 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
569 * Makefile.in: Remove references to $(ADD_DEPS).
571 2018-09-16 Tom Tromey <tom@tromey.com>
573 * remote-utils.c (remote_open): Use GNU style for metasyntactic
575 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
578 2018-09-05 Tom Tromey <tom@tromey.com>
580 * configure: Rebuild.
582 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
585 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
587 2018-08-27 Tom Tromey <tom@tromey.com>
590 * configure: Rebuild.
592 2018-08-27 Tom Tromey <tom@tromey.com>
594 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
595 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
596 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
597 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
598 (s390x_emit_stack_adjust): Add casts to unsigned char.
600 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
604 * server.h (struct client_state) <disable_randomization>:
607 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
609 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
611 (mips_supply_ptrace_register): Likewise.
613 2018-07-22 Tom Tromey <tom@tromey.com>
615 * configure: Rebuild.
617 2018-07-22 Tom Tromey <tom@tromey.com>
619 * win32-low.c (win32_create_inferior): Remove unused variables.
620 * gdbreplay.c (remote_open): Remove unused variable.
621 * remote-utils.c (remote_prepare): Remove unused variable.
622 * x86-tdesc.h (X86_TDESC_H): Define.
623 (amd64_expedite_regs): Define conditionally.
624 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
625 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
626 * remote-utils.c (readchar): Remove unused variable.
628 2018-07-13 Pedro Alves <palves@redhat.com>
630 * linux-low.c (linux_kill): Change parameter to process_info
631 pointer instead of pid. Adjust.
632 * lynx-low.c (lynx_kill): Likewise.
633 * nto-low.c (nto_kill): Likewise.
634 * spu-low.c (spu_kill): Likewise.
635 * win32-low.c (win32_kill): Likewise.
636 * server.c (handle_v_kill, kill_inferior_callback)
637 (detach_or_kill_for_exit): Adjust.
638 * target.c (kill_inferior): Change parameter to process_info
639 pointer instead of pid. Adjust.
640 * target.h (struct target_ops) <kill>: Change parameter to
641 process_info pointer instead of pid. Adjust all implementations
643 (kill_inferior): Likewise.
645 2018-07-13 Pedro Alves <palves@redhat.com>
647 * linux-low.c (linux_detach, linux_join): Change parameter to
648 process_info pointer instead of pid. Adjust.
649 * lynx-low.c (lynx_detach, lynx_join): Likewise.
650 * nto-low.c (nto_detach): Likewise.
651 * spu-low.c (spu_detach, spu_join): Likewise.
652 * win32-low.c (win32_detach, win32_join): Likewise.
653 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
654 * target.h (struct target_ops) <detach, join>: Change parameter to
655 process_info pointer instead of pid. Adjust all implementations
657 (detach_inferior, join_inferior): Rename 'pid' parameter to
660 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
661 Jan Kratochvil <jan.kratochvil@redhat.com>
662 Paul Fertser <fercerpav@gmail.com>
663 Tsutomu Seki <sekiriki@gmail.com>
665 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
666 (OBS): Add 'common/netstuff.o'.
667 (GDBREPLAY_OBS): Likewise.
668 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
669 (remote_open): Implement support for IPv6
671 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
673 (handle_accept_event): Accept connections from IPv6 sources.
674 (remote_prepare): Handle IPv6-style hostnames; implement
675 support for IPv6 connections.
676 (remote_open): Implement support for printing connections from
679 2018-07-11 Pedro Alves <palves@redhat.com>
682 * mem-break.c (any_persistent_commands): Add process_info
683 parameter and use it instead of relying on the current process.
684 Change return type to bool.
685 * mem-break.h (any_persistent_commands): Add process_info
686 parameter and change return type to bool.
687 * server.c (handle_detach): Remove require_running_or_return call.
688 Look up the process_info for the process we're about to detach.
689 If not found, return back error to GDB. Adjust
690 any_persistent_commands call to pass down a process pointer.
692 2018-07-11 Pedro Alves <palves@redhat.com>
694 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
695 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
696 instead of collect_register_by_name.
697 * regcache.c (regcache_raw_get_unsigned_by_name): New.
698 * regcache.h (regcache_raw_get_unsigned_by_name): New.
700 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
701 Pedro Alves <palves@redhat.com>
703 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
705 2018-07-03 Tom Tromey <tom@tromey.com>
707 * linux-low.c: Update.
708 * lynx-low.c: Update.
709 * mem-break.c: Update.
711 * remote-utils.c: Update.
715 * win32-low.c: Update.
717 2018-07-03 Tom Tromey <tom@tromey.com>
721 2018-07-03 Tom Tromey <tom@tromey.com>
723 * linux-low.c: Update.
725 2018-07-03 Tom Tromey <tom@tromey.com>
729 2018-07-03 Tom Tromey <tom@tromey.com>
731 * linux-low.c: Update.
732 * linux-mips-low.c: Update.
733 * lynx-low.c: Update.
735 * remote-utils.c: Update.
739 * thread-db.c: Update.
741 2018-07-03 Tom Tromey <tom@tromey.com>
743 * linux-low.c: Update.
744 * linux-mips-low.c: Update.
745 * lynx-low.c: Update.
746 * mem-break.c: Update.
748 * remote-utils.c: Update.
752 * tracepoint.c: Update.
754 2018-07-03 Tom Tromey <tom@tromey.com>
756 * linux-low.c: Update.
757 * linux-ppc-low.c: Update.
758 * linux-x86-low.c: Update.
759 * proc-service.c: Update.
762 * thread-db.c: Update.
763 * win32-low.c: Update.
765 2018-07-03 Tom Tromey <tom@tromey.com>
767 * linux-low.c: Update.
768 * lynx-low.c: Update.
770 * remote-utils.c: Update.
772 * thread-db.c: Update.
773 * win32-low.c: Update.
775 2018-06-29 Joel Brobecker <brobecker@adacore.com>
777 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
778 parameter in call to 'amd64_create_target_description'.
780 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
782 * x86-tdesc.h: Remove executable permission flag.
784 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
786 * configure.ac: Remove AC_PREREQ, add missing quoting.
787 * configure: Re-generate.
788 * config.in: Re-generate.
789 * aclocal.m4: Re-generate.
791 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
793 * tracepoint.h (current_traceframe): Remove declaration.
795 2018-06-18 Alan Hayward <alan.hayward@arm.com>
797 * linux-aarch64-low.c (is_sve_tdesc): New function.
798 (aarch64_sve_regs_copy_to_regcache): Likewise.
799 (aarch64_sve_regs_copy_from_regcache): Likewise.
800 (aarch64_regs_info): Add SVE checks.
801 (initialize_low_arch): Initialize SVE.
803 2018-06-18 Alan Hayward <alan.hayward@arm.com>
805 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
807 2018-06-11 Alan Hayward <alan.hayward@arm.com>
809 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
810 (initialize_low_tracepoint): Likewise
811 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
812 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
814 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
816 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
818 2018-06-11 Alan Hayward <alan.hayward@arm.com>
820 * server.h (PBUFSIZ): Increase size
822 2018-06-11 Alan Hayward <alan.hayward@arm.com>
824 * regcache.c (regcache::raw_compare): New function.
825 * regcache.h (regcache::raw_compare): New declaration.
827 2018-06-11 Alan Hayward <alan.hayward@arm.com>
829 * regcache.c (new_register_cache): Use new.
830 (free_register_cache): Use delete.
831 (register_data): Use const.
832 (supply_register): Move body inside regcache.
833 (regcache::raw_supply): New override function.
834 (collect_register): Move body inside regcache.
835 (regcache::raw_collect): New override function.
836 (regcache::get_register_status): New override function.
837 * regcache.h (struct regcache): Inherit from reg_buffer_common.
839 2018-06-09 Tom Tromey <tom@tromey.com>
841 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
843 (event_queue): Use std::queue.
844 (gdb_event_xfree): Remove.
845 (initialize_event_loop, process_event, wait_for_event): Update.
847 2018-06-08 Stan Cox <scox@redhat.com>
849 * win32-low.c (win32_create_inferior): last_ptid and last_status
850 moved to client_state.
852 2018-06-08 Pedro Alves <palves@redhat.com>
854 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
855 common/common-exceptions.o, common/common-utils.o,
856 common/errors.o, common/print-utils.o and utils.o.
857 * gdbreplay.c: Include "common-defs.h" instead of the two
858 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
859 string.h or alloca.h.
860 (perror_with_name): Delete.
861 (remote_open): Use xstrdup instead of strdup.
862 (main): Rename to ...
863 (captured_main): ... this.
866 2018-06-08 Tom Tromey <tom@tromey.com>
868 * linux-low.c (linux_low_read_btrace): Update.
870 2018-06-04 Stan Cox <scox@redhat.com>
872 * server.h (struct client_state): New.
873 * server.c (cont_thread, general_thread, multi_process)
874 (report_fork_events, report_vfork_events, report_exec_events)
875 (report_thread_events, swbreak_feature, hwbreak_feature)
876 (vCont_supported, disable_randomization, pass_signals)
877 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
878 Moved to client_state.
879 * remote-utils.c (remote_debug, noack_mode)
880 (transport_is_reliable): Moved to client_state.
881 * tracepoint.c (current_traceframe): Moved to client_state.
884 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
885 linux-low.c, remote-utils.h, target.c: Use client_state.
887 2018-05-31 Alan Hayward <alan.hayward@arm.com>
889 * configure.srv: Add new c/h file.
891 2018-05-31 Alan Hayward <alan.hayward@arm.com>
893 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
896 2018-05-25 Maciej W. Rozycki <macro@mips.com>
898 * gdb.arch/mips-fpregset-core.exp: New test.
899 * gdb.arch/mips-fpregset-core.c: New test source.
901 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
904 * hostio.c (require_int): Do not report overflow for integers
905 between 0xfffffff and 0x7fffffff.
907 2018-05-22 Maciej W. Rozycki <macro@mips.com>
909 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
910 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
911 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
913 (the_low_target): Wire them.
915 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
917 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
918 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
919 mode. Call collect_register_by_name with vscr using
920 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
921 (ppc_store_vrregset): Add and set vscr_offset variable as in
922 ppc_fill_vrregset. Call supply_register_by_name with vscr using
925 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
927 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
928 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
929 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
931 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
933 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
934 (ppc_store_vsxregset): Likewise.
935 (ppc_fill_vrregset): Likewise.
936 (ppc_store_vrregset): Likewise.
937 (ppc_fill_evrregset): Likewise.
938 (ppc_store_evrregset): Likewise.
939 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
940 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
943 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
945 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
946 wordsize of the inferior. Call ppc_linux_target_wordsize.
948 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
950 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
951 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
952 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
953 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
954 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
955 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
956 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
957 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
958 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
959 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
960 (tdesc_powerpc_e500l): Remove.
961 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
962 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
963 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
964 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
966 (ppc_arch_setup): Remove target description matching code. Fill a
967 ppc_linux_features struct and call ppc_linux_match_description
970 2018-05-22 Maciej W. Rozycki <macro@mips.com>
972 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
973 width of the requested register exceeds the width of the
975 (mips_cannot_store_register): Likewise.
977 2018-05-21 Maciej W. Rozycki <macro@mips.com>
979 * linux-mips-low.c (mips_fetch_register): New function. Update
981 (mips_store_gregset): Supply 0 rather than $restart for $zero.
982 (the_low_target): Wire `mips_fetch_register'.
984 2018-05-10 Joel Brobecker <brobecker@adacore.com>
986 * lynx-i386-low.c (LYNXOS_178): New macro.
987 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
988 the layout on LynxOS-178.
989 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
990 handle floating point registers that are not supported by
993 2018-05-10 Tom Tromey <tom@tromey.com>
995 * configure: Rebuild.
997 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1000 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1001 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1002 Use it to set the expedite_regs field in the given tdesc.
1003 * x86-tdesc.h: New file.
1004 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1005 Adjust following the addition of the new expedite_regs parameter
1006 to init_target_desc.
1007 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1008 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1009 (i386_linux_read_description, amd64_linux_read_description):
1010 Adjust following the addition of the new expedite_regs parameter
1011 to init_target_desc.
1012 * lynx-i386-low.c: #include "x86-tdesc.h".
1013 (lynx_i386_arch_setup): Adjust following the addition of the new
1014 expedite_regs parameter to init_target_desc.
1015 * nto-x86-low.c: #include "x86-tdesc.h".
1016 (nto_x86_arch_setup): Adjust following the addition of the new
1017 expedite_regs parameter to init_target_desc.
1018 * win32-i386-low.c: #include "x86-tdesc.h".
1019 (i386_arch_setup): Adjust following the addition of the new
1020 expedite_regs parameter to init_target_desc.
1022 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1025 * win32-low.c (win32_create_inferior): Add call to my_wait
1026 setting last_status global.
1028 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1031 * win32-low.c (create_process): Only call gdb_tilde_expand if
1032 inferior_cwd is not NULL.
1034 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1036 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1037 registers to the cache if their values have changed.
1038 (i387_xsave_to_cache): Provide default values for x87 control
1039 registers when these features are available, but disabled.
1040 * regcache.c (supply_register_by_name_zeroed): New function.
1041 * regcache.h (supply_register_by_name_zeroed): Declare new
1044 2018-05-07 Tom Tromey <tom@tromey.com>
1046 * configure: Rebuild.
1048 2018-05-04 Tom Tromey <tom@tromey.com>
1050 * configure: Rebuild.
1052 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1053 Pedro Alves <palves@redhat.com>
1055 * linux-aarch64-low.c (aarch64_stopped_data_address):
1058 2018-04-27 Tom Tromey <tom@tromey.com>
1060 * configure: Rebuild.
1062 2018-04-23 Tom Tromey <tom@tromey.com>
1064 * configure: Rebuild.
1066 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1068 * Makefile.in (depcomp): Add "..".
1069 (all_deps_files): New and use it.
1071 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1073 * configure.srv (aarch64*-*-linux*): Don't include xml.
1074 (i[34567]86-*-cygwin*): Likewise.
1075 (i[34567]86-*-linux*): Likewise.
1076 (i[34567]86-*-lynxos*): Likewise.
1077 (i[34567]86-*-mingw32ce*): Likewise.
1078 (i[34567]86-*-mingw*): Likewise.
1079 (i[34567]86-*-nto*): Likewise.
1080 (tic6x-*-uclinux): Likewise.
1081 (x86_64-*-linux*): Likewise.
1082 (x86_64-*-mingw*): Likewise.
1083 (x86_64-*-cygwin*): Likewise.
1085 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1087 * tdesc.c: Remove xml parameter.
1089 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1091 * server.c (get_features_xml): Remove cast.
1092 * tdesc.c (void target_desc::accept): Fill in function.
1093 (tdesc_get_features_xml): Remove old xml creation.
1094 (print_xml_feature::visit_pre): Add xml vistor.
1095 * tdesc.h (struct target_desc): Make xmltarget mutable.
1096 (tdesc_get_features_xml): Remove declaration.
1098 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1100 * tdesc.c (tdesc_architecture_name): Add new function.
1101 (tdesc_osabi_name): Likewise.
1102 (tdesc_get_features_xml): Use new functions.
1104 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1106 * tdesc.c (tdesc_create_flags): Remove.
1107 (tdesc_add_flag): Likewise.
1108 (tdesc_named_type): Likewise.
1109 (tdesc_create_union): Likewise.
1110 (tdesc_create_struct): Likewise.
1111 (tdesc_create_vector): Likewise.
1112 (tdesc_add_bitfield): Likewise.
1113 (tdesc_add_field): Likewise.
1114 (tdesc_set_struct_size): Likewise.
1116 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1118 * tdesc.c (~target_desc): Remove implictly deleted items.
1119 (init_target_desc): Iterate all features.
1120 (tdesc_get_features_xml): Use vector.
1121 (tdesc_create_feature): Create feature.
1122 * tdesc.h (tdesc_feature) Remove
1123 (target_desc): Add features.
1125 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1127 * Makefile.in: Add common/tdesc.c
1128 * tdesc.c (init_target_desc): init all reg_defs from register
1130 (tdesc_create_reg): Create tdesc_reg.
1131 * tdesc.h (tdesc_feature): Add register vector.
1133 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1135 * tdesc.h (struct target_desc) <features>: Change type to
1136 std::vector<std::string>.
1137 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1139 (tdesc_get_features_xml): Likewise.
1140 (tdesc_create_feature): Likewise.
1142 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1144 * regcache.c (find_register_by_number): Return a ref.
1145 (find_regno): Use references.
1146 (register_size): Likewise.
1147 (register_data): Likewise.
1148 * tdesc.c (target_desc::~target_desc): Remove free calls.
1149 (target_desc::operator==): Use std::vector compare.
1150 (init_target_desc): Use reference.
1151 (tdesc_create_reg): Use reg constructors.
1152 * tdesc.h (struct target_desc): Replace pointer with object.
1154 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1156 * regcache.c (find_register_by_number): Make static.
1157 (find_regno): Use find_register_by_number
1158 * regcache.h (struct reg): Remove declaration.
1160 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1162 * tdesc.c (target_desc::~target_desc): Move to here.
1163 (target_desc::operator==): Likewise.
1164 * tdesc.h (target_desc::~target_desc): Move from here.
1165 (target_desc::operator==): Likewise.
1167 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1169 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1171 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1173 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1175 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1176 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1177 and init_registers_s390_gs_linux64.
1179 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1181 * linux-s390-low.c (s390_fill_gs): Remove function.
1182 (s390_fill_gsbc): Remove function.
1183 (s390_regsets): Set fill functions for the guarded storage regsets
1186 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1188 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1189 the word size. Add comment.
1190 (s390_get_wordsize): New function.
1191 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1192 pswm with it. Instead, use s390_get_wordsize to determine the
1193 word size first and derive the correct tdesc from that directly.
1195 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1197 * Makefile.in: Include silent-rules.mk.
1198 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1199 (COMPILE): Add ECHO_CXX.
1200 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1201 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1202 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1203 (version-generated.c): Add ECHO_GEN.
1204 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1205 (IPAGENT_COMPILE): Add ECHO_CXX.
1206 (%-generated.c): Add ECHO_REGDAT.
1208 2018-03-14 Tom Tromey <tom@tromey.com>
1211 * ax.c (ax_printf): Special case for NULL.
1213 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1215 * linux-low.c (linux_qxfer_libraries_svr4): Use
1216 xml_escape_text_append.
1218 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1220 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1222 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1224 * server.c (handle_general_set): Remove unnecessary xstrdup.
1226 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1228 * server.c (parse_debug_format_options): Adjust to
1229 delim_string_to_char_ptr_vec changes.
1230 * thread-db.c (thread_db_load_search): Adjust to
1231 dirnames_to_char_ptr_vec changes.
1233 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1235 * target.h (target_enable_btrace, target_disable_btrace)
1236 (target_read_btrace, target_read_btrace_conf): Turn macro into
1237 inline function. Throw error if target method is not defined.
1238 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1239 check for btrace target method. Be prepared to handle exceptions
1240 from btrace target methods.
1242 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1244 * server.c (captured_main): Change order of error message printed
1245 when the current working directory cannot be found.
1247 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1249 * server.c: Include "filenames.h" and "pathstuff.h".
1250 (program_name): Delete variable.
1251 (program_path): New anonymous class.
1252 (get_exec_wrapper): Use "program_path" instead of
1254 (handle_v_run): Likewise.
1255 (captured_main): Likewise.
1256 (process_serial_event): Likewise.
1258 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1260 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1261 (OBJS): Add "pathstuff.o".
1262 * server.c (current_directory): New global variable.
1263 (captured_main): Initialize "current_directory".
1265 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1267 * tdesc.c: Use common/tdesc.h.
1268 * tdesc.h: Likewise.
1270 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1271 Simon Marchi <simon.marchi@ericsson.com>
1273 * Makefile.in: Switch order of make rules.
1275 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1277 * Makefile.in: Add common directory in build.
1278 * configure.ac: Add common reference.
1279 * configure: Regenerate.
1281 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1283 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1284 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1285 * spu-low.c (spu_target_ops): Likewise.
1286 * win32-low.c (win32_target_ops): Likewise.
1287 * server.c (supported_btrace_packets): Report packets unconditionally.
1288 * target.h (target_ops) <supports_btrace>: Remove.
1289 (target_supports_btrace): Remove.
1291 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1293 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1294 (handle_btrace_disable): Change return type to void. Use exceptions
1296 (handle_btrace_general_set): Catch exception and copy message to
1299 2018-02-08 Tom Tromey <tom@tromey.com>
1301 * linux-low.c (install_software_single_step_breakpoints): Use
1302 make_scoped_restore.
1303 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1304 (do_restore_current_thread_cleanup): Remove.
1305 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1308 2018-02-08 Tom Tromey <tom@tromey.com>
1310 * mem-break.c (set_raw_breakpoint_at): Use
1311 gdb::unique_xmalloc_ptr.
1313 2018-01-30 Pedro Alves <palves@redhat.com>
1316 * target.c (target_terminal::terminal_state): Rename to ...
1317 (target_terminal::m_terminal_state): ... this.
1319 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1321 * linux-low.c (handle_extended_wait): Surround call to
1322 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1324 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1326 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1327 linux_ptrace_attach_fail_reason_string now returning an
1329 (linux_attach): Likewise.
1330 * thread-db.c (attach_thread): Likewise.
1332 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1335 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1336 checking for fs_base/gs_base fields in struct user_regs_struct.
1337 * configure: Regenerate.
1339 2018-01-16 Yao Qi <yao.qi@linaro.org>
1342 * linux-low.c (fetch_register): Call supply_register instead of
1345 2018-01-08 Yao Qi <yao.qi@linaro.org>
1346 Simon Marchi <simon.marchi@ericsson.com>
1348 * Makefile.in (OBS): Remove selftest.o.
1349 * configure.ac: Set srv_selftest_objs if $development is true.
1350 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1351 * configure: Re-generated.
1352 * server.c (captured_main): Wrap variable selftest_filter with
1355 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1357 * server.c (parse_debug_format_options): Return std::string.
1358 (handle_monitor_command, captured_main): Adjust.
1360 2018-01-05 Pedro Alves <palves@redhat.com>
1363 * server.c (captured_main): Pass quiet=false to
1364 save_original_signals_state.
1366 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1368 * gdbreplay.c (gdbreplay_version): Update copyright year in
1370 * server.c (gdbserver_version): Likewise.
1372 2017-12-08 Tom Tromey <tom@tromey.com>
1374 * ax.c (ax_printf): Update.
1376 2017-12-07 Yao Qi <yao.qi@linaro.org>
1378 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1379 aarch64_linux_read_description.
1380 * linux-amd64-ipa.c (idx2mask): New array.
1381 (get_ipa_tdesc): Move idx2mask out.
1382 (initialize_low_tracepoint): Initialize target descriptions.
1383 * linux-i386-ipa.c (idx2mask): New array.
1384 (get_ipa_tdesc): Move idx2mask out.
1385 (initialize_low_tracepoint): Initialize target descriptions.
1387 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1389 * tdesc.c (struct tdesc_type): Change return type.
1390 (tdesc_add_flag): Change parameter type.
1391 (tdesc_add_bitfield): Likewise.
1392 (tdesc_add_field): Likewise.
1393 (tdesc_set_struct_size): Likewise.
1395 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1397 * regcache.c (registers_to_string): Remove unused variable.
1399 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1401 * inferiors.c (for_each_inferior_with_data): Remove.
1402 * inferiors.h (for_each_inferior_with_data): Remove.
1403 * server.c (handle_qxfer_threads_worker): Change parameter type.
1404 (handle_qxfer_threads_proper): Use for_each_thread.
1406 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1408 * inferiors.c (for_each_inferior): Remove.
1409 (clear_inferiors): Use for_each_thread.
1410 * inferiors.h (for_each_inferior): Remove.
1411 * linux-low.c (linux_wait_for_event_filtered): Use
1413 (linux_stabilize_threads): Likewise.
1414 * regcache.c (regcache_release): Likewise.
1415 * server.c (gdb_wants_all_threads_stopped): Likewise.
1416 (clear_pending_status_callback): Remove.
1417 (handle_status): Use for_each_thread.
1418 (captured_main): Likewise.
1419 * win32-low.c (child_init_thread_list): Likewise.
1420 (win32_clear_inferiors): Likewise.
1421 (fake_breakpoint_event): Likewise.
1423 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1425 * inferiors.h (find_inferior): Remove.
1426 * inferiors.c (find_inferior): Remove.
1428 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1430 * linux-low.c (resume_status_pending_p): Update comment.
1431 (need_step_over_p): Update comment.
1433 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1435 * linux-low.c (proceed_one_lwp): Return void, change parameter
1437 (unsuspend_and_proceed_one_lwp): Likewise.
1438 (proceed_all_lwps): Use for_each_thread.
1439 (unstop_all_lwps): Likewise.
1441 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1443 * linux-low.c (linux_resume_one_thread): Return void, take
1445 (linux_resume): Use for_each_thread.
1447 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1449 * linux-low.c (send_sigstop_callback): Return void, change
1450 parameter type. Rename to...
1451 (send_sigstop): ... this.
1452 (suspend_and_send_sigstop_callback): Return void, change parameter
1454 (suspend_and_send_sigstop): ... this.
1455 (stop_all_lwps): Use for_each_thread.
1457 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1459 * linux-low.c (lwp_running): Return bool, remove unused
1461 (linux_stabilize_threads): Use find_thread.
1463 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1465 * linux-low.c (select_singlestep_lwp_callback): Remove.
1466 (count_events_callback): Remove.
1467 (select_event_lwp_callback): Remove.
1468 (select_event_lwp): Use find_thread/for_each_thread.
1470 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1472 * linux-low.c (not_stopped_callback): Return bool, take filter
1474 (linux_wait_for_event_filtered): Use find_thread.
1475 (linux_wait_1): Likewise.
1477 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1479 * linux-low.c (same_lwp): Remove.
1480 (find_lwp_pid): Use find_thread.
1482 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1484 * linux-low.c (delete_lwp_callback): Remove.
1485 (linux_mourn): Use for_each_thread.
1487 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1489 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1490 args parameter, don't check for pid.
1491 (linux_detach): Use for_each_thread.
1493 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1495 * linux-low.c (struct counter): Remove.
1496 (second_thread_of_pid_p): Remove.
1497 (last_thread_of_process_p): Use find_thread.
1499 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1501 * inferiors.c (find_inferior_in_random): Remove.
1502 * inferiors.h (find_inferior_in_random): Remove.
1503 * linux-low.c (status_pending_p_callback): Return bool, accept
1504 parameter ptid directly.
1505 (linux_wait_for_event_filtered): Use find_thread_in_random.
1506 (linux_wait_1): Likewise.
1508 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1510 * inferiors.c (find_inferior_id): Remove.
1511 (find_thread_ptid): Move implemention from find_inferior_id to
1513 * inferiors.h (find_inferior_id): Remove.
1514 * server.c (handle_status): Use find_thread_ptid.
1515 (process_serial_event): Likewise.
1516 * thread-db.c (find_one_thread): Likewise.
1517 (thread_db_thread_handle): Likewise.
1518 * win32-low.c (thread_rec): Likewise.
1519 (child_delete_thread): Likewise.
1520 (win32_thread_alive): Likewise.
1521 (get_child_debug_event): Likewise.
1523 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1525 * linux-mips-low.c (update_watch_registers_callback): Return
1526 void, remove pid_p parameter, don't check for pid.
1527 (mips_insert_point, mips_remove_point): Use for_each_thread.
1529 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1531 * lynx.low (lynx_delete_thread_callback): Remove.
1532 (lynx_mourn): Use for_each_thread.
1534 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1536 * regcache.c (regcache_invalidate_one): Remove.
1537 (regcache_invalidate_pid): use for_each_thread.
1539 2017-11-26 Tom Tromey <tom@tromey.com>
1541 * linux-low.c (linux_create_inferior): Update.
1543 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1545 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1547 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1549 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1550 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1551 * linux-aarch64-tdesc-selftest.c: New file.
1552 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1554 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1556 * configure.srv: Add new file.
1557 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1558 * linux-aarch64-tdesc-selftest.c: New file.
1559 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1561 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1563 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1564 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1565 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1567 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1569 * configure.srv: Add new files.
1570 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1571 aarch64_linux_read_description.
1572 * linux-aarch64-low.c (aarch64_linux_read_description):
1573 Merge with aarch64_arch_setup.
1574 (aarch64_arch_setup): Call aarch64_linux_read_description.
1575 * linux-aarch64-tdesc.c: New file.
1576 * linux-aarch64-tdesc.h: New file.
1578 2017-11-24 Yao Qi <yao.qi@linaro.org>
1580 * configure.srv: Set $srv_regobj for tic6x-linux.
1581 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1582 (tic6x_read_description): Move some code to tic6x_arch_setup.
1583 (tic6x_tdesc_test): New function.
1584 (initialize_low_arch): Call selftests::register_test.
1586 2017-11-22 Yao Qi <yao.qi@linaro.org>
1588 * remote-utils.c (prepare_resume_reply): Use memcpy.
1590 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1592 * linux-low.c (kill_one_lwp_callback): Return void, take
1593 argument directly, don't filter on pid.
1594 (linux_kill): Use for_each_thread.
1596 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1598 * linux-low.c (need_step_over_p): Return bool, remove dummy
1600 (linux_resume, proceed_all_lwps): Use find_thread.
1602 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1604 * linux-low.c (resume_status_pending_p): Return bool, remove
1606 (linux_resume): Use find_thread.
1608 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1610 * linux-low.c (struct thread_resume_array): Remove.
1611 (linux_set_resume_request): Return void, take arguments
1613 (linux_resume): Use for_each_thread.
1615 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1617 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1618 return bool, remove data argument.
1619 (linux_stabilize_threads): Use find_thread.
1621 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1623 * linux-low.c (unsuspend_one_lwp): Remove.
1624 (unsuspend_all_lwps): Use for_each_thread, inline code from
1627 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1629 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1630 * linux-low.c (struct iterate_over_lwps_args): Remove.
1631 (iterate_over_lwps_filter): Remove.
1632 (iterate_over_lwps): Use find_thread.
1634 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1636 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1637 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1638 code from reset_lwp_ptrace_options_callback.
1640 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1642 * linux-arm-low.c (struct update_registers_data): Remove.
1643 (update_registers_callback): Return void, take arguments
1644 directly, don't check thread's pid.
1645 (arm_insert_point, arm_remove_point): Use for_each_thread.
1647 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1649 * win32-low.c (continue_one_thread): Return void, take argument
1651 (child_continue): Use for_each_thread.
1653 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1655 * win32-i386-low.c (update_debug_registers_callback): Rename
1657 (update_debug_registers): ... this, return void, remove pid_p arg.
1658 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1660 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1662 * inferiors.h (struct process_info): Add constructor, initialize
1664 <syscalls_to_catch>: Change type to std::vector<int>.
1665 * inferiors.c (add_process): Allocate process_info with new.
1666 (remove_process): Free process_info with delete.
1667 * linux-low.c (handle_extended_wait): Adjust.
1668 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1669 * server.c (handle_general_set): Adjust.
1671 2017-11-16 Pedro Alves <palves@redhat.com>
1673 * remote-utils.c (remote_close): Block SIGIO signals instead of
1674 uninstalling the SIGIO handler.
1676 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1678 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1680 2017-11-16 Yao Qi <yao.qi@linaro.org>
1682 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1683 (tic6x_store_gregset): Likewise.
1684 (tic6x_usrregs_info): Move it up.
1686 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1688 * Makefile.in: Update arch rules.
1689 * configure.srv: Explicitly mark arch/ files.
1691 2017-11-13 Andreas Schwab <schwab@suse.de>
1693 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1695 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1697 2017-11-06 Pedro Alves <palves@redhat.com>
1699 * config.in, configure: Regenerate.
1701 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1703 * target.c (struct thread_search): Remove.
1704 (thread_search_callback): Remove.
1705 (prepare_to_access_memory): Use for_each_thread instead of
1706 find_inferior. Inline code from thread_search_callback.
1708 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1710 * server.c (struct visit_actioned_threads_data): Remove.
1711 (visit_actioned_threads): Change prototype to take arguments
1713 (resume): Use find_thread instead of find_inferior.
1715 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1717 * server.c (queue_stop_reply_callback): Change prototype, return
1719 (find_status_pending_thread_callback): Remove.
1720 (handle_status): Replace find_inferior with find_thread and
1723 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1725 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1727 (aarch64_store_gregset): Likewise.
1728 (aarch64_fill_fpregset): Likewise.
1729 (aarch64_store_fpregset): Likewise.
1731 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1733 * gdbthread.h (find_thread, for_each_thread): New functions.
1734 * inferiors.c (thread_of_pid): Remove.
1735 (find_any_thread_of_pid): Use find_thread.
1736 * linux-low.c (num_lwps): Use for_each_thread.
1738 2017-10-17 Yao Qi <yao.qi@linaro.org>
1740 * Makefile.in: Remove one rule.
1741 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1743 2017-10-17 Yao Qi <yao.qi@linaro.org>
1745 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1746 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1748 2017-10-17 Yao Qi <yao.qi@linaro.org>
1750 * configure.srv: Rename arm.o with arch/arm.o.
1752 2017-10-17 Yao Qi <yao.qi@linaro.org>
1754 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1755 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1756 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1757 (arch-i386.o, arch-amd64.o): Remove rules.
1758 (arch/%.o): New rule.
1759 Update POSTCOMPILE and COMPILE.pre.
1760 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1761 * configure: Re-generated.
1762 * configure.srv: Replace arch-i386.o with arch/i386.o.
1763 Replace arch-amd64.o with arch/amd64.o.
1765 2017-10-16 Yao Qi <yao.qi@linaro.org>
1767 * configure: Regenerated.
1769 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1771 * inferiors.h: (struct inferior_list): Remove.
1772 (struct inferior_list_entry); Remove.
1773 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1774 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1775 get_first_inferior): Remove.
1776 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1777 find_inferior_id, find_inferior_in_random): Change signature.
1778 * inferiors.c (all_threads): Change type to
1779 std::list<thread_info *>.
1780 (get_thread): Remove macro.
1781 (find_inferior, find_inferior_id): Change signature, implement
1783 (find_inferior_in_random): Change signature, implement using
1784 find_thread_in_random.
1785 (for_each_inferior, for_each_inferior_with_data): Change
1786 signature, implement using for_each_thread.
1787 (add_inferior_to_list, remove_inferior): Remove.
1788 (add_thread, get_first_thread, thread_of_pid,
1789 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1790 (get_first_inferior, one_inferior_p, clear_inferior_list):
1792 (clear_inferiors, get_thread_process): Update.
1793 * gdbthread.h: Include <list>.
1794 (struct thread_info) <entry>: Remove field.
1796 (all_threads): Change type to std::list<thread_info *>.
1797 (get_first_inferior): Add doc.
1798 (find_thread, for_each_thread, find_thread_in_random): New
1800 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1801 * linux-arm-low.c (update_registers_callback): Update.
1802 * linux-low.c (second_thread_of_pid_p): Update.
1803 (kill_one_lwp_callback, linux_detach_lwp_callback,
1804 delete_lwp_callback, status_pending_p_callback, same_lwp,
1805 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1806 iterate_over_lwps, not_stopped_callback,
1807 resume_stopped_resumed_lwps, count_events_callback,
1808 select_singlestep_lwp_callback, select_event_lwp_callback,
1809 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1810 suspend_and_send_sigstop_callback, wait_for_sigstop,
1811 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1812 lwp_running, linux_set_resume_request, resume_status_pending_p,
1813 need_step_over_p, start_step_over, linux_resume_one_thread,
1814 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1815 reset_lwp_ptrace_options_callback): Update.
1816 * linux-mips-low.c (update_watch_registers_callback): Update.
1817 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1819 (free_register_cache_thread_one): Remove.
1820 (regcache_release): Update.
1821 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1822 handle_qxfer_threads_worker): Update.
1823 (handle_query): Update, use list iterator.
1824 (visit_actioned_threads, handle_pending_status,
1825 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1826 clear_pending_status_callback, set_pending_status_callback,
1827 find_status_pending_thread_callback, handle_status,
1828 process_serial_event): Update.
1829 * target.c (thread_search_callback): Update.
1830 * thread-db.c (thread_db_get_tls_address): Update.
1831 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1833 * win32-i386-low.c (update_debug_registers_callback): Update.
1834 * win32-low.c (delete_thread_info, child_delete_thread,
1835 continue_one_thread, suspend_one_thread,
1836 get_child_debug_event): Adjust.
1838 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1840 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1841 * inferiors.h: Include <list>.
1842 (struct process_info) <entry>: Remove field.
1844 (pid_of): Change macro to function.
1845 (ptid_of, lwpid_of): Remove macro.
1846 (all_processes): Change type to std::list<process_info *>.
1847 (ALL_PROCESSES): Remove macro.
1848 (for_each_process, find_process): New function.
1849 * inferiors.c (all_processes): Change type to
1850 std::list<process_info *>.
1851 (find_thread_process): Adjust.
1852 (add_process): Likewise.
1853 (remove_process): Likewise.
1854 (find_process_pid): Likewise.
1855 (get_first_process): Likewise.
1856 (started_inferior_callback): Remove.
1857 (have_started_inferiors_p): Adjust.
1858 (attached_inferior_callback): Remove.
1859 (have_attached_inferiors_p): Adjust.
1860 * linux-low.c (check_zombie_leaders): Likewise.
1861 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1862 (x86_linux_update_xmltarget): Adjust.
1863 * server.c (handle_query): Likewise.
1864 (gdb_reattached_process): Remove.
1865 (handle_status): Adjust.
1866 (kill_inferior_callback): Likewise.
1867 (detach_or_kill_inferior): Remove.
1868 (print_started_pid): Likewise.
1869 (print_attached_pid): Likewise.
1870 (detach_or_kill_for_exit): Update.
1871 (process_serial_event): Likewise.
1872 * linux-arm-low.c (arm_new_fork): Likewise.
1874 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1876 * dll.h: Include <list>.
1877 (struct dll_info): Add constructor.
1878 <entry>: Remove field.
1879 (all_dlls): Change type to std::list<dll_info>.
1880 * dll.c: Include <algorithm>.
1881 (get_dll): Remove macro.
1882 (all_dlls): Change type to std::list<dll_info *>.
1883 (free_one_dll): Remove.
1884 (match_dll): Likewise.
1885 (loaded_dll): Adjust.
1886 (unloaded_dll): Adjust to all_dlls type change, use
1887 std::find_if. Inline code from match_dll.
1888 (clear_dlls): Adjust to all_dlls type change.
1889 * server.c (emit_dll_description): Remove.
1890 (handle_qxfer_libraries): Adjust to all_dlls type change,
1891 integrate emit_dll_description's functionality.
1893 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1895 * linux-low.h (struct linux_target_ops) <delete_process>: New
1897 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1898 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1899 (struct linux_target_ops): Add delete_process callback.
1900 * linux-arm-low.c (arm_delete_process): New.
1901 (struct linux_target_ops): Add delete_process callback.
1902 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1903 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1904 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1905 * linux-mips-low.c (mips_linux_delete_process): New.
1906 (struct linux_target_ops): Add delete_process callback.
1907 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1908 * linux-s390-low.c (struct linux_target_ops): Likewise.
1909 * linux-sh-low.c (struct linux_target_ops): Likewise.
1910 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1911 * linux-tile-low.c (struct linux_target_ops): Likewise.
1912 * linux-x86-low.c (x86_linux_delete_process): New.
1913 (struct linux_target_ops): Add delete_process callback.
1914 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1916 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1918 * linux-aarch64-low.c (the_low_target): Add thread delete
1920 * linux-arm-low.c (arm_delete_thread): New function.
1921 (the_low_target): Add thread delete callback.
1922 * linux-bfin-low.c (the_low_target): Likewise.
1923 * linux-crisv32-low.c (the_low_target): Likewise.
1924 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1926 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1928 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1929 * linux-mips-low.c (mips_linux_delete_thread): New function.
1930 (the_low_target): Add thread delete callback.
1931 * linux-ppc-low.c (the_low_target): Likewise.
1932 * linux-s390-low.c (the_low_target): Likewise.
1933 * linux-sh-low.c (the_low_target): Likewise.
1934 * linux-tic6x-low.c (the_low_target): Likewise.
1935 * linux-tile-low.c (the_low_target): Likewise.
1936 * linux-x86-low.c (the_low_target): Likewise.
1937 * linux-xtensa-low.c (the_low_target): Likewise.
1939 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1941 * win32-low.c: Include "common-inferior.h".
1943 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1945 * inferiors.c (set_inferior_cwd): New function.
1946 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1947 (handle_query): Inform that QSetWorkingDir is supported.
1948 * win32-low.c (create_process): Pass the inferior's cwd to
1951 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1953 * inferiors.c (current_inferior_cwd): New global variable.
1954 (get_inferior_cwd): New function.
1955 * inferiors.h (struct process_info) <cwd>: New field.
1957 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1959 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1960 (OBS): Add gdb_tilde_expand.o.
1962 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1964 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1965 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1967 2017-09-29 Pedro Alves <palves@redhat.com>
1969 * ax.c (gdb_parse_agent_expr): Constify.
1970 * ax.h (gdb_parse_agent_expr): Constify.
1971 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1973 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1974 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1975 * remote-utils.h (read_ptid): Constify.
1976 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1977 (process_point_options, process_serial_event): Constify.
1978 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1979 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1980 (cmd_qtbuffer): Constify.
1982 2017-09-29 Pedro Alves <palves@redhat.com>
1984 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1987 2017-09-29 Pedro Alves <palves@redhat.com>
1989 * linux-low.c (handle_extended_wait): Pass parent thread instead
1990 of process to thread_db_notice_clone.
1991 * linux-low.h (thread_db_notice_clone): Replace parent process
1992 parameter with parent thread parameter.
1993 * thread-db.c (find_one_thread): Add comment.
1994 (thread_db_notice_clone): Replace parent process parameter with
1995 parent thread parameter. Temporarily switch to the parent thread.
1997 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1999 * gdbthread.h: Include "common-gdbthread.h".
2000 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2001 "if" when validating the ptid.
2002 * remote-utils.c: Include "gdbthread.h".
2003 (prepare_resume_reply): Use "switch_to_thread".
2004 * target.c (done_accessing_memory): Likewise.
2006 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2008 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2009 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2010 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2011 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2012 s390x-gs-linux64-ipa.o to ipa_obj.
2013 * linux-s390-low.c (HWCAP_S390_GS): New define.
2014 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2016 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2017 (s390_arch_setup): Check for guarded-storage support and choose
2019 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2020 init_registers_s390x_gs_linux64.
2021 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2023 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2024 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2026 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2028 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2030 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2032 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2033 (thread_db_thread_handle): Declare.
2034 * linux-low.c (linux_target_ops): Initialize thread_handle.
2035 * server.c (handle_qxfer_threads_worker): Add support for
2037 * target.h (struct target_ops): Add new function pointer,
2039 (target_thread_handle): Define.
2040 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2042 (thread_db_thread_handle): New function.
2044 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2046 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2047 * linux-low.h (thread_db_notice_clone): Declare.
2048 * thread-db.c (thread_db_notice_clone): New function.
2050 2017-09-21 Pedro Alves <palves@redhat.com>
2052 * server.c (gdb_read_memory, handle_status, process_serial_event)
2053 (handle_serial_event, handle_target_event): Adjust to
2054 set_desired_thread prototype change.
2055 * target.c (set_desired_thread): Remove 'use_general' parameter
2057 * target.h (set_desired_thread): Remove 'use_general' parameter.
2059 2017-09-20 Tom Tromey <tom@tromey.com>
2061 * target.c (target_terminal::terminal_state): Define.
2062 (target_terminal::init): Rename from target_terminal_init.
2063 (target_terminal::inferior): Rename from
2064 target_terminal_inferior.
2065 (target_terminal::ours): Rename from target_terminal_ours.
2066 (target_terminal::ours_for_output, target_terminal::info): New.
2068 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2070 * server.c (accumulate_file_name_length): Remove.
2071 (emit_dll_description): Adjust to std::string change.
2072 (handle_qxfer_libraries): Use std::string to hold document.
2074 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2076 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2077 return type of xml_escape_text.
2078 * server.c (emit_dll_description): Likewise.
2080 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2082 * server.c (captured_main): Accept argument for --selftest.
2083 Update run_tests call.
2084 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2085 when registering selftests.
2087 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2089 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2090 instead of "VEC" for "target_desc.reg_defs".
2091 (regcache_cpy): Likewise.
2092 (registers_to_string): Likewise.
2093 (registers_from_string): Likewise.
2094 (find_regno): Likewise.
2095 (supply_regblock): Likewise.
2096 (regcache_raw_read_unsigned): Likewise.
2097 * tdesc.c (init_target_desc): Likewise.
2098 (tdesc_create_reg): Likewise.
2099 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2100 (struct target_desc) <reg_defs>: Convert to "std::vector".
2101 (target_desc): Do not initialize "reg_defs".
2102 (~target_desc): Update code to use "std::vector" instead of "VEC"
2103 for "target_desc.reg_defs".
2104 (operator==): Likewise.
2106 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2108 * inferiors.h (thread_to_gdb_id): Remove.
2109 * inferiors.c (thread_to_gdb_id): Remove.
2110 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2111 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2112 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2114 * nto-low.c (nto_fetch_registers, nto_store_registers,
2115 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2117 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2119 * inferiors.h (gdb_id_to_thread_id): Remove.
2120 * inferiors.c (gdb_id_to_thread_id): Remove.
2121 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2122 removal. Move pid declaration closer to where it's used.
2124 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2126 * server.c (handle_detach): New function.
2127 (process_serial_event): Move code out, call handle_detach.
2129 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2131 * server.c (require_running): Rename to ...
2132 (require_running_or_return): ... this ...
2133 (require_running_or_break): ... and this.
2134 (handle_query, process_serial_event): Adjust.
2136 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2138 * linux-low.c (linux_set_resume_request): Remove unused
2141 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2143 * server.c (first_thread_of): Remove.
2144 (process_serial_event): Replace usage of first_thread_of with
2145 find_any_thread_of_pid.
2146 * tracepoint.c (same_process_p): Remove.
2147 (gdb_agent_about_to_close): Replace usage of same_process_p with
2148 find_any_thread_of_pid.
2149 * linux-x86-low.c (same_process_callback): Remove.
2150 (x86_arch_setup_process_callback): Replace usage of
2151 same_process_callback with find_any_thread_of_pid.
2152 * thread-db.c (any_thread_of): Remove.
2153 (switch_to_process): Replace usage of any_thread_of with
2154 find_any_thread_of_pid.
2155 * inferiors.c (thread_pid_matches_callback): Remove.
2156 (find_thread_process): Adjust to use find_any_thread_of_pid.
2158 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2160 * regcache.c (get_thread_regcache): Guard calls to "memset"
2163 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2165 * linux-low.c (handle_extended_wait): Use
2166 "allocate_target_description" instead of "XNEW".
2167 * linux-x86-low.c (initialize_low_arch): Likewise.
2169 2017-09-05 Yao Qi <yao.qi@linaro.org>
2171 * configure.srv (srv_i386_regobj): Remove.
2172 (srv_amd64_regobj): Remove.
2173 (srv_regobj): Set it to "" for x86 non-linux targets.
2174 * linux-x86-tdesc.c (i386_linux_read_description):
2175 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2176 (init_registers_i386): Remove the declaration.
2177 (tdesc_i386): Remove the declaration.
2178 (lynx_i386_arch_setup): Call i386_create_target_description.
2179 * nto-x86-low.c: Likewise.
2180 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2181 [!__x86_64__]: include arch/i386.h.
2182 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2184 2017-09-05 Yao Qi <yao.qi@linaro.org>
2186 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2187 i386/amd64-XXX-linux from it.
2189 2017-09-05 Yao Qi <yao.qi@linaro.org>
2191 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2193 (ipa_amd64_linux_regobj): Remove.
2194 (ipa_x32_linux_regobj): Remove.
2196 2017-09-05 Yao Qi <yao.qi@linaro.org>
2198 * Makefile.in (arch-amd64.o): New rule.
2199 * configure.srv: Append arch-amd64.o.
2200 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2201 (get_ipa_tdesc): Call amd64_linux_read_description.
2202 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2203 and init_registers_amd64_XXX.
2204 * linux-x86-low.c (x86_linux_read_description): Call
2205 amd64_linux_read_description.
2206 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2207 (initialize_low_arch): Don't call init_registers_x32_XXX and
2208 init_registers_amd64_XXX.
2209 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2210 and tdesc_amd64_XXX.
2211 [__x86_64__] (amd64_tdesc_test): New function.
2212 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2213 and init_registers_amd64_XXX.
2214 * linux-x86-tdesc.c: Include arch/amd64.h.
2215 (xcr0_to_tdesc_idx): New function.
2216 (i386_linux_read_description): New function.
2217 (amd64_get_ipa_tdesc_idx): New function.
2218 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2219 (amd64_get_ipa_tdesc): Declare.
2221 2017-09-05 Yao Qi <yao.qi@linaro.org>
2223 * configure.srv (srv_i386_linux_xmlfiles): Remove
2224 i386/i386-XXX-linux.xml from it.
2226 2017-09-05 Yao Qi <yao.qi@linaro.org>
2228 * configure.srv: Set srv_i386_linux_regobj empty if $development
2230 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2231 initialize_low_tdesc.
2232 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2233 with #if initialize_low_tdesc.
2234 * linux-x86-tdesc-selftest.c: New file.
2235 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2237 2017-09-05 Yao Qi <yao.qi@linaro.org>
2239 * Makefile.in (arch-i386.o): New rule.
2240 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2241 (x86_64-*-linux*): Likewise.
2242 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2243 include arch/i386.h.
2244 (i386_linux_read_description): Remove code and call
2245 i386_create_target_description.
2246 * tdesc.c (allocate_target_description): New function.
2247 * tdesc.h (set_tdesc_architecture): Remove declaration.
2248 (set_tdesc_osabi): Likewise.
2250 2017-09-05 Yao Qi <yao.qi@linaro.org>
2252 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2253 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2254 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2256 * server.c (get_features_xml): Call tdesc_get_features_xml.
2257 * tdesc.c (set_tdesc_architecture): New function.
2258 (set_tdesc_osabi): New function.
2259 (tdesc_get_features_xml): New function.
2260 (tdesc_create_feature): Add an argument.
2261 * tdesc.h (struct target_desc) <features>: New field.
2262 <arch, osabi>: New field.
2263 (~target_desc): xfree features, arch, and osabi.
2264 (target_desc::oerator==): Don't compare .xmltarget.
2265 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2266 (set_tdesc_osabi): Likewise.
2267 (tdesc_get_features_xml): Likewise.
2269 2017-09-05 Yao Qi <yao.qi@linaro.org>
2271 * linux-x86-tdesc.c: Include selftest.h.
2272 (i386_tdesc_test): New function.
2273 (initialize_low_tdesc): Call selftests::register_test.
2274 * tdesc.h: Include regdef.h.
2275 (target_desc): Override operator == and !=.
2277 2017-09-05 Yao Qi <yao.qi@linaro.org>
2279 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2280 (ipa_obj): Likewise.
2281 * linux-i386-ipa.c: Include common/x86-xstate.h
2282 (get_ipa_tdesc): Call i386_linux_read_description.
2283 (initialize_low_tracepoint): Don't call init_registers_XXX
2284 functions, call initialize_low_tdesc instead.
2285 * linux-x86-low.c (x86_linux_read_description): Call
2286 i386_linux_read_description.
2287 (initialize_low_arch): Don't call init_registers_i386_XXX
2288 functions, call initialize_low_tdesc.
2289 * linux-x86-tdesc.c: New file.
2290 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2291 (i386_get_ipa_tdesc_idx): Declare.
2292 (i386_get_ipa_tdesc): Declare.
2293 (initialize_low_tdesc): Declare.
2295 2017-09-05 Yao Qi <yao.qi@linaro.org>
2297 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2300 2017-09-05 Yao Qi <yao.qi@linaro.org>
2302 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2303 * regcache.c (get_thread_regcache): Use VEC_length.
2304 (init_register_cache): Likewise.
2305 (regcache_cpy): Likewise.
2306 (registers_to_string): Iterate reg_defs via VEC_iterate.
2307 (find_regno): Likewise.
2308 (find_register_by_number): Use VEC_index.
2309 (register_size): Call find_register_by_number.
2310 (register_data): Call find_register_by_number.
2311 (supply_regblock): Use VEC_length.
2312 (regcache_raw_read_unsigned): Likewise.
2313 * tdesc.c (init_target_desc): Iterate reg_defs via
2315 (default_description): Update initializer.
2316 (copy_target_description): Don't update field num_registers.
2317 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2318 <num_registers>: Remove.
2320 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2322 * Makefile.in (.SECONDARY): Define target.
2324 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2326 * linux-low.c (linux_wait_1): Adjust.
2327 * server.c (queue_stop_reply_callback): Adjust.
2329 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2331 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2332 QEnvironmentUnset and QEnvironmentReset packets.
2333 (handle_query): Inform remote that QEnvironmentHexEncoded,
2334 QEnvironmentUnset and QEnvironmentReset are supported.
2336 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2338 * inferiors.h (inferior_target_data): Rename to ...
2339 (thread_target_data): ... this.
2340 (inferior_regcache_data): Rename to ...
2341 (thread_regcache_data): ... this.
2342 (set_inferior_regcache_data): Rename to ...
2343 (set_thread_regcache_data): ... this.
2344 * inferiors.c (inferior_target_data): Rename to ...
2345 (thread_target_data): ... this.
2346 (inferior_regcache_data): Rename to ...
2347 (thread_regcache_data): ... this.
2348 (set_inferior_regcache_data): Rename to ...
2349 (set_thread_regcache_data): ... this.
2350 (free_one_thread): Update.
2351 * linux-low.h (get_thread_lwp): Update.
2352 * regcache.c (get_thread_regcache): Update.
2353 (regcache_invalidate_thread): Update.
2354 (free_register_cache_thread): Update.
2355 * win32-i386-low.c (update_debug_registers_callback): Update.
2356 (win32_get_current_dr): Update.
2357 * win32-low.c (thread_rec): Update.
2358 (delete_thread_info): Update.
2359 (continue_one_thread): Update.
2360 (suspend_one_thread): Update.
2362 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2364 * inferiors.c (set_inferior_target_data): Remove.
2365 * inferiors.h (set_inferior_target_data): Remove.
2367 2017-08-18 Yao Qi <yao.qi@linaro.org>
2369 * Makefile.in (OBS): Add selftest.o.
2370 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2371 * configure, config.in: Re-generated.
2372 * server.c: Include common/sefltest.h.
2373 (captured_main): Handle option --selftest.
2375 2017-08-09 Yao Qi <yao.qi@linaro.org>
2377 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2378 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2379 i386-avx-mpx.o and i386-mmx.o.
2380 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2381 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2382 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2383 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2384 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2385 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2386 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2387 i386/amd64-avx-mpx.xml.
2389 2017-08-09 Yao Qi <yao.qi@linaro.org>
2391 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2392 and x32-avx-avx512.o.
2393 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2394 i386/x32-avx-avx512.xml.
2396 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2398 * tracepoint.h (enum class fast_tpoint_collect_result): New
2400 (fast_tracepoint_collecting): Change return type to
2401 fast_tpoint_collect_result.
2402 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2403 * linux-low.h: Include tracepoint.h.
2404 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2405 fast_tpoint_collect_result.
2406 * linux-low.c (handle_tracepoints): Adjust.
2407 (linux_fast_tracepoint_collecting): Change return type to
2408 fast_tpoint_collect_result.
2409 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2410 linux_wait_1, stuck_in_jump_pad_callback,
2411 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2412 proceed_one_lwp): Adjust to type change.
2414 2017-07-10 Yao Qi <yao.qi@linaro.org>
2416 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2418 2017-06-29 Yao Qi <yao.qi@linaro.org>
2420 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2422 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2424 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2426 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2428 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2430 * linux-low.c (linux_create_inferior): Adjust code to access the
2431 environment information via 'gdb_environ' class.
2432 * lynx-low.c (lynx_create_inferior): Likewise.
2433 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2434 (get_environ): Return a pointer to 'our_environ'.
2435 (captured_main): Initialize 'our_environ'.
2436 * server.h (get_environ): Adjust prototype.
2437 * spu-low.c (spu_create_inferior): Adjust code to access the
2438 environment information via 'gdb_environ' class.
2440 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2442 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2443 usage of "register" keyword.
2445 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2447 * configure: Re-generate.
2449 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2451 * configure: Re-generate.
2453 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2455 * Makefile.in (COMPILE.pre): Add "-x c++".
2457 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2459 * fork-child.c: Conditionally include <signal.h>.
2461 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2463 * server.c (handle_general_set): Handle new packet
2464 "QStartupWithShell".
2465 (handle_query): Add "QStartupWithShell" to the list of supported
2467 (gdbserver_usage): Add help text explaining the
2468 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2470 (captured_main): Recognize and act upon the presence of the new
2473 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2474 Pedro Alves <palves@redhat.com>
2476 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2477 * configure: Regenerate.
2478 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2480 (i[34567]86-*-lynxos*): Likewise.
2481 (spu*-*-*): Likewise.
2482 * fork-child.c: New file.
2483 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2485 (linux_ptrace_fun): New function.
2486 (linux_create_inferior): Adjust function prototype to reflect
2487 change on "target.h". Adjust function code to use
2489 (linux_request_interrupt): Delete "signal_pid".
2490 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2491 (lynx_ptrace_fun): New function.
2492 (lynx_create_inferior): Adjust function prototype to reflect
2493 change on "target.h". Adjust function code to use
2495 * nto-low.c (nto_create_inferior): Adjust function prototype and
2496 code to reflect change on "target.h". Update comments.
2497 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2498 "common-terminal.h" and "environ.h".
2499 (terminal_fd): Moved to fork-child.c.
2500 (old_foreground_pgrp): Likewise.
2501 (restore_old_foreground_pgrp): Likewise.
2502 (last_status): Make it global.
2503 (last_ptid): Likewise.
2504 (our_environ): New variable.
2505 (startup_with_shell): Likewise.
2506 (program_name): Likewise.
2507 (program_argv): Rename to...
2508 (program_args): ...this.
2509 (wrapper_argv): New variable.
2510 (start_inferior): Delete function.
2511 (get_exec_wrapper): New function.
2512 (get_exec_file): Likewise.
2513 (get_environ): Likewise.
2514 (prefork_hook): Likewise.
2515 (post_fork_inferior): Likewise.
2516 (postfork_hook): Likewise.
2517 (postfork_child_hook): Likewise.
2518 (handle_v_run): Update code to deal with arguments coming from the
2519 remote host. Update calls from "start_inferior" to
2521 (captured_main): Likewise. Initialize environment variable. Call
2523 * server.h (post_fork_inferior): New prototype.
2524 (get_environ): Likewise.
2525 (last_status): Declare.
2526 (last_ptid): Likewise.
2527 (signal_pid): Likewise.
2528 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2529 (spu_ptrace_fun): New function.
2530 (spu_create_inferior): Adjust function prototype to reflect change
2531 on "target.h". Adjust function code to use "fork_inferior".
2532 * target.c (target_terminal_init): New function.
2533 (target_terminal_inferior): Likewise.
2534 (target_terminal_ours): Likewise.
2535 * target.h: Include <vector>.
2536 (struct target_ops) <create_inferior>: Update prototype.
2537 (create_inferior): Update macro.
2538 * utils.c (gdb_flush_out_err): New function.
2539 * win32-low.c (win32_create_inferior): Adjust function prototype
2540 and code to reflect change on "target.h".
2542 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2544 * inferiors.c (switch_to_thread): New function.
2546 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2548 * Makefile.in (SFILE): Add "common/job-control.c".
2549 (OBS): Add "job-control.o".
2551 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2553 * Makefile: Remove "@host_makefile_frag@".
2555 2017-05-05 Pedro Alves <palves@redhat.com>
2557 * configure: Regenerate.
2559 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2561 * configure: Regenerate.
2563 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2565 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2566 software_single_step change of return type to
2567 std::vector<CORE_ADDR>.
2568 * linux-low.c (install_software_single_step_breakpoints):
2570 * linux-low.h (install_software_single_step_breakpoints):
2573 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2575 * remote-utils.c: Include "gdb_termios.h" instead of
2577 * terminal.h: Delete file.
2579 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2581 * server.c: Include <vector>.
2582 <program_argv, wrapper_argv>: Convert to std::vector.
2583 (start_inferior): Rewrite function to use C++.
2584 (handle_v_run): Likewise. Update code that calculates the argv
2585 based on the vRun packet; use C++.
2586 (captured_main): Likewise.
2588 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2590 * server.c (handle_v_cont): Initialize thread_resume::thread
2593 2017-04-05 Pedro Alves <palves@redhat.com>
2595 * configure: Regenerate.
2597 2017-04-05 Pedro Alves <palves@redhat.com>
2599 * gdbreplay.c (sync_error): Constify.
2600 * linux-x86-low.c (push_opcode): Constify.
2602 2017-04-05 Pedro Alves <palves@redhat.com>
2604 * win32-low.c (get_child_debug_event)
2605 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2606 Report TARGET_WAITKIND_SPURIOUS instead.
2608 2017-04-05 Pedro Alves <palves@redhat.com>
2610 * remote-utils.c (remote_prepare, remote_open): Constify.
2611 * remote-utils.h (remote_prepare, remote_open): Constify.
2612 * server.c (captured_main): Constify 'port' handling.
2614 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2616 * Makefile.in (clean): Clear .deps.
2618 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2620 * .gitignore: Remove generated files, replace with wildcard.
2621 * (clean): Replace removal of generated files with wildcard.
2622 (version.c): Replace with...
2623 (version-generated.c): ...this.
2624 (xml-builtin.c): Replace with...
2625 (xml-builtin-generated.c): ...this.
2626 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2627 (%.c: *regformats*): Replace with...
2628 (%-generated.c: *regformats*): ...this.
2630 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2632 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2633 (xtensa_fill_gregset): Call collect_register_by_name for
2635 (xtensa_store_gregset): Call supply_register_by_name for
2638 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2640 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2641 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2642 (xtensa_store_gregset): Call supply_register for all registers in
2643 a0_regnum..a0_regnum + C0_NREGS range.
2645 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2647 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2648 (ax-ipa.o: ax.c): Remove.
2649 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2650 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2651 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2652 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2653 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2655 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2657 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2658 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2659 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2660 (errors-ipa.o: ../common/errors.c): Remove.
2661 (format-ipa.o: ../common/format.c): Remove.
2662 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2664 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2666 * Makefile.in (%-ipa.o: %.c): New rule.
2667 (tracepoint-ipa.o: tracepoint.c): Remove.
2668 (utils-ipa.o: utils.c): Remove.
2669 (remote-utils-ipa.o: remote-utils.c): Remove.
2670 (regcache-ipa.o: regcache.c): Remove.
2671 (i386-linux-ipa.o: i386-linux.c): Remove.
2672 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2673 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2674 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2675 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2676 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2677 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2678 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2679 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2680 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2681 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2682 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2683 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2684 (aarch64-ipa.o: aarch64.c): Remove.
2685 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2686 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2687 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2688 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2689 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2690 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2691 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2692 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2693 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2694 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2695 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2696 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2697 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2698 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2699 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2700 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2701 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2702 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2703 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2704 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2705 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2706 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2707 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2708 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2709 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2710 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2711 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2712 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2713 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2714 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2715 (tdesc-ipa.o: tdesc.c): Remove.
2716 (x32-linux-ipa.o: x32-linux.c): Remove.
2717 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2718 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2720 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2722 * Makefile.in (%.o: ../arch/%.c): New rule.
2723 (arm.o: ../arch/arm.c): Remove.
2724 (arm-linux.o: ../arch/arm-linux.c): Remove.
2725 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2726 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2728 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2730 * Makefile.in (%.o: ../nat/%.c): New rule.
2731 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2732 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2733 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2734 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2735 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2736 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2737 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2738 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2739 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2740 (linux-personality.o: ../nat/linux-personality.c): Remove.
2741 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2742 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2743 (x86-linux.o: ../nat/x86-linux.c): Remove.
2744 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2745 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2747 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2749 * Makefile.in (%.o: ../common/%.c): New rule.
2750 (signals.o: ../common/signals.c): Remove.
2751 (print-utils.o: ../common/print-utils.c): Remove.
2752 (rsp-low.o: ../common/rsp-low.c): Remove.
2753 (common-utils.o: ../common/common-utils.c): Remove.
2754 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2755 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2756 (vec.o: ../common/vec.c): Remove.
2757 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2758 (xml-utils.o: ../common/xml-utils.c): Remove.
2759 (ptid.o: ../common/ptid.c): Remove.
2760 (buffer.o: ../common/buffer.c): Remove.
2761 (format.o: ../common/format.c): Remove.
2762 (filestuff.o: ../common/filestuff.c): Remove.
2763 (agent.o: ../common/agent.c): Remove.
2764 (errors.o: ../common/errors.c): Remove.
2765 (environ.o: ../common/environ.c): Remove.
2766 (common-debug.o: ../common/common-debug.c): Remove.
2767 (cleanups.o: ../common/cleanups.c): Remove.
2768 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2769 (fileio.o: ../common/fileio.c): Remove.
2770 (common-regcache.o: ../common/common-regcache.c): Remove.
2771 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2772 (new-op.o: ../common/new-op.c): Remove.
2773 (btrace-common.o: ../common/btrace-common.c): Remove.
2775 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2777 * Makefile.in (%.o: ../target/%.c): New rule.
2778 (waitstatus.o: ../target/waitstatus.c): Remove.
2780 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2783 (%.c: ../regformats/%.dat,
2784 (%.c: ../regformats/arm/%.dat,
2785 (%.c: ../regformats/i386/%.dat,
2786 (%.c: ../regformats/rs6000/%.dat): New rules.
2787 (aarch64.c): Remove.
2788 (reg-arm.c): Remove.
2789 (arm-with-iwmmxt.c): Remove.
2790 (arm-with-vfpv2.c): Remove.
2791 (arm-with-vfpv3.c): Remove.
2792 (arm-with-neon.c): Remove.
2793 (reg-bfin.c): Remove.
2794 (reg-cris.c): Remove.
2795 (reg-crisv32.c): Remove.
2797 (i386-linux.c): Remove.
2798 (i386-avx.c): Remove.
2799 (i386-avx-linux.c): Remove.
2800 (i386-avx-avx512.c): Remove.
2801 (i386-avx-avx512-linux.c): Remove.
2802 (i386-mpx.c): Remove.
2803 (i386-mpx-linux.c): Remove.
2804 (i386-avx-mpx-avx512-pku.c): Remove.
2805 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2806 (i386-avx-mpx.c): Remove.
2807 (i386-avx-mpx-linux.c): Remove.
2808 (i386-mmx.c): Remove.
2809 (i386-mmx-linux.c): Remove.
2810 (reg-ia64.c): Remove.
2811 (reg-m32r.c): Remove.
2812 (reg-m68k.c): Remove.
2814 (mips-linux.c): Remove.
2815 (mips-dsp-linux.c): Remove.
2816 (mips64-linux.c): Remove.
2817 (mips64-dsp-linux.c): Remove.
2818 (nios2-linux.c): Remove.
2819 (powerpc-32.c): Remove.
2820 (powerpc-32l.c): Remove.
2821 (powerpc-altivec32l.c): Remove.
2822 (powerpc-cell32l.c): Remove.
2823 (powerpc-vsx32l.c): Remove.
2824 (powerpc-isa205-32l.c): Remove.
2825 (powerpc-isa205-altivec32l.c): Remove.
2826 (powerpc-isa205-vsx32l.c): Remove.
2827 (powerpc-e500l.c): Remove.
2828 (powerpc-64l.c): Remove.
2829 (powerpc-altivec64l.c): Remove.
2830 (powerpc-cell64l.c): Remove.
2831 (powerpc-vsx64l.c): Remove.
2832 (powerpc-isa205-64l.c): Remove.
2833 (powerpc-isa205-altivec64l.c): Remove.
2834 (powerpc-isa205-vsx64l.c): Remove.
2835 (s390-linux32.c): Remove.
2836 (s390-linux32v1.c): Remove.
2837 (s390-linux32v2.c): Remove.
2838 (s390-linux64.c): Remove.
2839 (s390-linux64v1.c): Remove.
2840 (s390-linux64v2.c): Remove.
2841 (s390-te-linux64.c): Remove.
2842 (s390-vx-linux64.c): Remove.
2843 (s390-tevx-linux64.c): Remove.
2844 (s390x-linux64.c): Remove.
2845 (s390x-linux64v1.c): Remove.
2846 (s390x-linux64v2.c): Remove.
2847 (s390x-te-linux64.c): Remove.
2848 (s390x-vx-linux64.c): Remove.
2849 (s390x-tevx-linux64.c): Remove.
2850 (tic6x-c64xp-linux.c): Remove.
2851 (tic6x-c64x-linux.c): Remove.
2852 (tic6x-c62x-linux.c): Remove.
2854 (reg-sparc64.c): Remove.
2855 (reg-spu.c): Remove.
2857 (amd64-linux.c): Remove.
2858 (amd64-avx.c): Remove.
2859 (amd64-avx-linux.c): Remove.
2860 (amd64-avx-avx512.c): Remove.
2861 (amd64-avx-avx512-linux.c): Remove.
2862 (amd64-mpx.c): Remove.
2863 (amd64-mpx-linux.c): Remove.
2864 (amd64-avx-mpx-avx512-pku.c): Remove.
2865 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2866 (amd64-avx-mpx.c): Remove.
2867 (amd64-avx-mpx-linux.c): Remove.
2869 (x32-linux.c): Remove.
2870 (x32-avx.c): Remove.
2871 (x32-avx-linux.c): Remove.
2872 (x32-avx-avx512.c): Remove.
2873 (x32-avx-avx512-linux.c): Remove.
2874 (reg-xtensa.c): Remove.
2875 (reg-tilegx.c): Remove.
2876 (reg-tilegx32.c): Remove.
2878 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2880 * Makefile.in (SFILES): Add "common/environ.c".
2881 (OBJS): Add "common/environ.h".
2883 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2885 * configure.ac: Check if the fs_base and gs_base members of
2886 `struct user_regs_struct' exist.
2887 * config.in: Regenerated.
2888 * configure: Likewise.
2890 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2892 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2894 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2895 (get_next_pcs_syscall_next_pc): Likewise.
2897 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2899 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2900 * nto-x86-low.c: Likewise.
2902 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2904 * Makefile.in: Include disable-implicit-rules.mk.
2906 2016-11-23 Pedro Alves <palves@redhat.com>
2908 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2909 (debug_vprintf): Use std::chrono::steady_clock instead of
2910 gettimeofday. Use '.' instead of ':'.
2911 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2912 (get_timestamp): Use std::chrono::steady_clock instead of
2915 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2917 * Makefile.in: Fix whitespace formatting.
2919 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2921 * Makefile.in (SFILES, OBS): Flatten list and order
2924 2016-11-23 Pedro Alves <palves@redhat.com>
2926 * event-loop.c (handle_file_event): Use warning.
2927 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2928 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2931 2016-11-23 Pedro Alves <palves@redhat.com>
2933 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2935 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2936 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2937 debug_printf and debug_flush for debug output.
2938 * server.c (handle_general_set): Likewise.
2939 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2942 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2944 * Makefile.in (.c.o): Replace rule with ...
2945 (%.o: %.c): ... this one.
2947 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2949 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2950 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2952 * configure.ac: Remove checks for the make program.
2953 * configure: Re-generate.
2955 2016-10-28 Pedro Alves <palves@redhat.com>
2957 * Makefile.in (CXX_DIALECT): Get from configure.
2958 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2959 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2960 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2961 * config.in: Regenerate.
2962 * configure: Regenerate.
2964 2016-10-27 Yao Qi <yao.qi@linaro.org>
2966 * linux-low.c (linux_supports_range_stepping): Return true if
2967 can_software_single_step return true.
2969 2016-10-27 Yao Qi <yao.qi@linaro.org>
2971 * inferiors.c (find_inferior_in_random): New function.
2972 * inferiors.h (find_inferior_in_random): Declare.
2973 * linux-low.c (linux_wait_for_event_filtered): Call
2974 find_inferior_in_random instead of find_inferior.
2976 2016-10-27 Yao Qi <yao.qi@linaro.org>
2978 * linux-low.c (linux_wait_1): If single-step breakpoints are
2979 inserted, remove them.
2981 2016-10-26 Pedro Alves <palves@redhat.com>
2983 * linux-low.c (handle_extended_wait): Link parent/child fork
2985 (linux_wait_1): Unlink them.
2986 (linux_set_resume_request): Ignore resume requests for
2987 already-resumed and unhandled fork child threads.
2988 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2989 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2991 (handle_v_requests) <vCont>: Don't call require_running.
2992 * server.h (in_queued_stop_replies): New declaration.
2994 2016-10-24 Yao Qi <yao.qi@linaro.org>
2997 * linux-aarch64-low.c (append_insns): Cast the return value to
3000 2016-10-10 Yao Qi <yao.qi@linaro.org>
3002 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3004 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3006 * target.c (target_supports_multi_process): New function, moved
3008 * target.h (target_supports_multi_process): ... here. Remove
3011 2016-10-05 Tom Tromey <tom@tromey.com>
3014 * tracepoint.c (handle_tracepoint_bkpts): Check
3015 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3017 2016-10-05 Yao Qi <yao.qi@linaro.org>
3019 * configure.srv: Update the path of arm-*.xml files.
3021 2016-10-05 Terry Guo <terry.guo@arm.com>
3022 Yao Qi <yao.qi@linaro.org>
3024 * Makefile.in: Adjust the path of rules.
3025 * configure.srv: Update the path of xml files.
3026 * regformats/arm-with-iwmmxt.dat: Regenerated.
3027 * regformats/arm-with-neon.dat: Likewise.
3028 * regformats/arm-with-vfpv2.dat: Likewise.
3029 * regformats/arm-with-vfpv3.dat Likewise.
3031 2016-09-30 Yao Qi <yao.qi@linaro.org>
3034 * target.c (target_stop_and_wait): Don't call
3035 target_continue_no_signal, use resume_stop instead.
3037 2016-09-26 Yao Qi <yao.qi@linaro.org>
3039 * linux-low.c (linux_wait_1): Call debug_exit.
3041 2016-09-23 Pedro Alves <palves@redhat.com>
3043 * Makefile.in (SFILES): Add common/new-op.c.
3044 (OBS): Add common/new-op.o.
3045 (new-op.o): New rule.
3047 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3049 * .gitinore: Ignore more files.
3051 2016-09-21 Yao Qi <yao.qi@linaro.org>
3053 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3056 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3058 * server.c (start_inferior): Call target_mourn_inferior instead of
3059 mourn_inferior; pass ptid_t argument to it.
3061 (handle_target_event): Likewise.
3062 * target.c (target_mourn_inferior): New function.
3063 * target.h (mourn_inferior): Delete macro.
3065 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3067 * linux-low.c (lwp_is_stepping): New function.
3069 2016-09-06 Carl Love <cel@us.ibm.com>
3071 * server.c (start_inferior): Fixed comment, requested comment change
3072 didn't get updated correctly. Removed reference to ptrace () call as
3073 it is only true on Linux systems.
3075 2016-09-06 Carl Love <cel@us.ibm.com>
3077 * server.c (start_inferior): Do not call
3078 function target_post_create_inferior () if the
3079 inferior process has already exited.
3081 2016-09-05 Pedro Alves <palves@redhat.com>
3083 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3084 (COMPILE.pre, CC_LD): Use CXX directly.
3085 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3086 * acinclude.m4: Don't include build-with-cxx.m4.
3087 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3088 * configure: Regenerate.
3090 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3093 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3094 call writing data to own_buf.
3096 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3098 * target.c (mywait): Call target_wait instead of
3100 (target_wait): New function.
3102 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3104 * server.c (start_inferior): New variable 'ptid'. Replace calls
3105 to the_target->resume by target_continue{,_no_signal}, depending
3107 * target.c (target_stop_and_wait): Call target_continue_no_signal
3108 instead of the_target->resume.
3109 (target_continue): New function.
3111 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3113 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3115 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3118 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3120 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3121 * linux-arm-low.c (ps_get_thread_area): Likewise.
3122 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3123 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3124 * linux-mips-low.c (ps_get_thread_area): Likewise.
3125 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3126 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3127 * linux-x86-low.c (ps_get_thread_area): Likewise.
3128 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3130 2016-08-19 Pedro Alves <palves@redhat.com>
3132 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3134 2016-08-19 Pedro Alves <palves@redhat.com>
3136 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3137 comment. Use memcpy instead of casting through unsigned long.
3139 2016-08-19 Pedro Alves <palves@redhat.com>
3141 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3142 allocating around 0x80000000.
3144 2016-08-19 Pedro Alves <palves@redhat.com>
3147 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3148 (x32-avx512-linux-ipa.o): New rules.
3149 * configure.ac (x86_64-*-linux*): New x32 check.
3150 * configure.srv (ipa_x32_linux_regobj): New.
3151 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3152 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3154 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3156 * configure: Regenerate.
3158 2016-08-09 Pedro Alves <palves@redhat.com>
3161 * Makefile.in (OBS): Add signals-state-save-restore.o.
3162 (signals-state-save-restore.o): New rule.
3163 * config.in: Regenerate.
3164 * configure: Regenerate.
3165 * linux-low.c: Include "signals-state-save-restore.h".
3166 (linux_create_inferior): Call
3167 restore_original_signals_state.
3168 * server.c: Include "dispositions-save-restore.h".
3169 (captured_main): Call save_original_signals_state.
3171 2016-08-05 Pedro Alves <palves@redhat.com>
3173 * configure: Regenerate.
3175 2016-08-04 Yao Qi <yao.qi@linaro.org>
3177 * linux-low.c (regsets_fetch_inferior_registers): Check
3178 errno is ESRCH or not.
3180 2016-08-02 Yao Qi <yao.qi@linaro.org>
3182 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3183 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3184 (thread_db_load_search): Update.
3185 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3186 td_ta_set_event and td_ta_event_getmsg.
3188 2016-07-26 Pedro Alves <palves@redhat.com>
3191 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3192 of unsigned long for 64-bit registers and use uint32_t instead of
3193 unsigned int for 32-bit registers.
3195 2016-07-26 Pedro Alves <palves@redhat.com>
3197 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3200 2016-07-21 Tom Tromey <tom@tromey.com>
3202 * configure: Rebuild.
3204 2016-07-21 Yao Qi <yao.qi@linaro.org>
3206 * mem-break.c (find_gdb_breakpoint): Cast bp to
3207 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3209 2016-07-21 Yao Qi <yao.qi@linaro.org>
3211 * server.c (handle_v_requests): Support s and S actions
3212 if target_supports_software_single_step return true.
3214 2016-07-21 Yao Qi <yao.qi@linaro.org>
3216 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3217 is resume_step, call maybe_hw_step.
3218 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3220 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3222 (proceed_one_lwp): If resume request is resume_step, install
3223 reinsert breakpoints and call maybe_hw_step.
3225 2016-07-21 Yao Qi <yao.qi@linaro.org>
3227 * linux-low.c (proceed_one_lwp): Declare.
3228 (linux_resume_one_thread): Remove local variable 'step'.
3229 Lift code enqueue signal. Call proceed_one_lwp instead of
3230 linux_resume_one_lwp.
3232 2016-07-21 Yao Qi <yao.qi@linaro.org>
3234 * linux-low.c (linux_resume_one_thread): Call
3235 enqueue_pending_signal.
3237 2016-07-21 Yao Qi <yao.qi@linaro.org>
3239 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3240 * inferiors.c (do_restore_current_thread_cleanup): New function.
3241 (make_cleanup_restore_current_thread): Likewise.
3242 * linux-low.c (install_software_single_step_breakpoints): Call
3243 make_cleanup_restore_current_thread. Switch current_thread to
3246 2016-07-21 Yao Qi <yao.qi@linaro.org>
3248 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3249 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3250 (clone_one_breakpoint): Likewise.
3251 (delete_reinsert_breakpoints): Change parameter to thread.
3253 (has_reinsert_breakpoints): Likewise.
3254 (uninsert_reinsert_breakpoints): Likewise.
3255 (reinsert_reinsert_breakpoints): Likewise.
3256 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3257 (delete_reinsert_breakpoints): Likewise.
3258 (reinsert_reinsert_breakpoints): Likewise.
3259 (uninsert_reinsert_breakpoints): Likewise.
3260 (has_reinsert_breakpoints): Likewise.
3262 2016-07-21 Yao Qi <yao.qi@linaro.org>
3264 * inferiors.c (get_thread_process): Make parameter const.
3265 * inferiors.h (get_thread_process): Update declaration.
3266 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3267 Add new parameters child_thread and parent_thread. Callers
3269 * mem-break.h (clone_all_breakpoints): Update declaration.
3271 2016-07-21 Yao Qi <yao.qi@linaro.org>
3273 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3274 <command_list, handler>: Remove.
3275 (struct gdb_breakpoint): New.
3276 (struct other_breakpoint): New.
3277 (struct reinsert_breakpoint): New.
3278 (is_gdb_breakpoint): New function.
3279 (any_persistent_commands): Update command_list if
3280 is_gdb_breakpoint returns true.
3281 (set_breakpoint): Create breakpoints according to their types.
3282 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3283 (set_gdb_breakpoint_1): Likewise.
3284 (set_gdb_breakpoint): Likewise.
3285 (clear_breakpoint_conditions): Change parameter type to
3286 'struct gdb_breakpoint *'.
3287 (clear_breakpoint_commands): Likewise.
3288 (clear_breakpoint_conditions_and_commands): Likewise.
3289 (add_condition_to_breakpoint): Likewise.
3290 (add_breakpoint_condition): Likewise.
3291 (add_commands_to_breakpoint): Likewise.
3292 (check_breakpoints): Check other_breakpoint.
3293 (clone_one_breakpoint): Clone breakpopint according to its type.
3294 * mem-break.h (struct gdb_breakpoint): Declare.
3295 (set_gdb_breakpoint): Update declaration.
3296 (clear_breakpoint_conditions_and_commands): Likewise.
3297 (add_breakpoint_condition): Likewise.
3298 (add_breakpoint_commands): Likewise.
3299 * server.c (process_point_options): Change parameter type to
3300 'struct gdb_breakpoint *'.
3302 2016-07-21 Yao Qi <yao.qi@linaro.org>
3304 * mem-break.c (set_breakpoint_at): Rename it to ...
3305 (set_breakpoint_type_at): ... it.
3306 (set_breakpoint_at): Call set_breakpoint_type_at.
3307 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3308 * mem-break.h (set_breakpoint_at): Update comments.
3310 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3312 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3314 (nios2_store_gregset): Likewise.
3316 2016-07-01 Pedro Alves <palves@redhat.com>
3317 Antoine Tremblay <antoine.tremblay@ericsson.com>
3319 * linux-low.c: Change interface to take the target lwp_info
3320 pointer directly and return void. Handle detaching from a zombie
3322 (linux_detach_lwp_callback): New function.
3323 (linux_detach): Detach from the leader thread after detaching from
3326 2016-06-28 Yao Qi <yao.qi@linaro.org>
3328 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3329 for variable new_offset.
3330 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3331 (aarch64_ftrace_insn_reloc_cb): Likewise.
3332 (aarch64_ftrace_insn_reloc_tb): Likewise.
3333 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3334 PRIx64 instead of PRIx32.
3336 2016-06-28 Yao Qi <yao.qi@linaro.org>
3338 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3339 (the_low_target): Install arm_get_syscall_trapinfo.
3341 2016-06-28 Yao Qi <yao.qi@linaro.org>
3343 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3345 (the_low_target): Install aarch64_get_syscall_trapinfo.
3347 2016-06-28 Yao Qi <yao.qi@linaro.org>
3349 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3351 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3352 Remove parameter sysno.
3353 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3356 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3358 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3359 (s390_emit_ne_goto): Likewise.
3360 (s390_emit_lt_goto): Likewise.
3361 (s390_emit_le_goto): Likewise.
3362 (s390_emit_gt_goto): Likewise.
3363 (s390_emit_ge_goto): Likewise.
3364 (s390x_emit_eq_goto): Likewise.
3365 (s390x_emit_ne_goto): Likewise.
3366 (s390x_emit_lt_goto): Likewise.
3367 (s390x_emit_le_goto): Likewise.
3368 (s390x_emit_gt_goto): Likewise.
3369 (s390x_emit_ge_goto): Likewise.
3370 (s390_emit_ops_impl): Mark variable static.
3371 (s390x_emit_ops): Likewise.
3373 2016-06-17 Yao Qi <yao.qi@linaro.org>
3375 * linux-low.c (handle_extended_wait): Call
3376 uninsert_reinsert_breakpoints for the parent process. Remove
3377 reinsert breakpoints from the child process. Reinsert them to
3378 the parent process when vfork is done.
3379 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3380 (reinsert_reinsert_breakpoints): New function.
3381 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3382 (reinsert_reinsert_breakpoints): Declare.
3384 2016-06-17 Yao Qi <yao.qi@linaro.org>
3386 * linux-low.c (handle_extended_wait): If the parent is doing
3387 step-over, remove the reinsert breakpoints from the forked child.
3389 2016-06-17 Yao Qi <yao.qi@linaro.org>
3391 * linux-low.c (unsuspend_all_lwps): Declare.
3392 (linux_low_filter_event): If thread exited, call finish_step_over.
3393 If step-over is finished, unsuspend other threads.
3395 2016-06-17 Yao Qi <yao.qi@linaro.org>
3397 * linux-low.c (linux_resume_one_lwp_throw): Assert
3398 has_reinsert_breakpoints returns false.
3399 * mem-break.c (delete_disabled_breakpoints): Assert
3400 bp type isn't reinsert_breakpoint.
3402 2016-06-17 Yao Qi <yao.qi@linaro.org>
3404 * linux-low.c (maybe_hw_step): New function.
3405 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3406 (finish_step_over): Switch current_thread to lwp temporarily,
3407 and assert has_reinsert_breakpoints returns true.
3408 (proceed_one_lwp): Call maybe_hw_step.
3409 * mem-break.c (has_reinsert_breakpoints): New function.
3410 * mem-break.h (has_reinsert_breakpoints): Declare.
3412 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3414 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3416 2016-05-17 Yao Qi <yao.qi@linaro.org>
3418 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3419 instead of find_inferior.
3421 2016-05-05 Yao Qi <yao.qi@linaro.org>
3423 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3424 Initialize res to zero.
3426 2016-05-05 Yao Qi <yao.qi@linaro.org>
3428 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3431 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3433 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3434 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3435 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3437 2016-04-28 Par Olsson <par.olsson@windriver.com>
3438 Simon Marchi <simon.marchi@ericsson.com>
3440 * tracepoint.c (write_inferior_int8): New function.
3441 (cmd_qtenable_disable): Write enable flag using
3442 write_inferior_int8.
3444 2016-04-25 Yao Qi <yao.qi@linaro.org>
3446 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3447 (need_step_over_p): Return zero if the LWP has pending signals
3448 can be delivered on software single step target.
3450 2016-04-25 Yao Qi <yao.qi@linaro.org>
3452 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3453 return instead of error.
3455 2016-04-22 Yao Qi <yao.qi@linaro.org>
3457 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3460 2016-04-22 Yao Qi <yao.qi@linaro.org>
3462 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3463 signal when stepping over breakpoint with software single
3466 2016-04-21 Pedro Alves <palves@redhat.com>
3468 * linux-s390-low.c (s390_collect_ptrace_register)
3469 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3471 (s390_check_regset): Use void * instead of gdb_byte *.
3473 2016-04-20 Pedro Alves <palves@redhat.com>
3475 * configure: Renegerate.
3477 2016-04-20 Yao Qi <yao.qi@linaro.org>
3479 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3480 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3482 (arm_store_gregset): Likewise.
3484 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3486 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3487 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3488 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3489 (amd64-avx-mpx-linux.c): New rules.
3490 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3491 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3492 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3493 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3494 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3495 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3496 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3497 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3498 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3499 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3500 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3501 * linux-x86-low.c (x86_linux_read_description): Add case for
3502 X86_XSTATE_AVX_MPX_MASK.
3503 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3504 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3505 init_registers_i386_avx_mpx_linux.
3506 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3507 (initialize_low_tracepoint): Call
3508 init_registers_i386_avx_mpx_linux.
3509 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3510 (initialize_low_tracepoint): Call
3511 init_registers_amd64_avx_mpx_linux.
3512 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3513 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3514 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3517 2016-04-18 Pedro Alves <palves@redhat.com>
3519 * configure: Regenerate.
3521 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3523 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3524 (aarch64_emit_sub): Likewise.
3526 2016-04-12 Pedro Alves <palves@redhat.com>
3528 * utils.c (prepare_to_throw_exception): Delete.
3530 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3532 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3534 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3536 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3538 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3540 * linux-aarch64-ipa.c: Add <elf.h> include.
3541 * linux-ppc-ipa.c: Add <elf.h> include.
3542 * linux-s390-ipa.c: Add <elf.h> include.
3544 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3546 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3547 (get_raw_reg_ptr): Likewise.
3548 (get_trace_state_variable_value_ptr): Likewise.
3549 (set_trace_state_variable_value_ptr): Likewise.
3550 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3553 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3554 Marcin Kościelnicki <koriakin@0x04.net>
3557 * linux-ppc-low.c (emit_insns): New function.
3558 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3559 (ppc_emit_prologue): New function.
3560 (ppc_emit_epilogue): New function.
3561 (ppc_emit_add): New function.
3562 (ppc_emit_sub): New function.
3563 (ppc_emit_mul): New function.
3564 (ppc_emit_lsh): New function.
3565 (ppc_emit_rsh_signed): New function.
3566 (ppc_emit_rsh_unsigned): New function.
3567 (ppc_emit_ext): New function.
3568 (ppc_emit_zero_ext): New function.
3569 (ppc_emit_log_not): New function.
3570 (ppc_emit_bit_and): New function.
3571 (ppc_emit_bit_or): New function.
3572 (ppc_emit_bit_xor): New function.
3573 (ppc_emit_bit_not): New function.
3574 (ppc_emit_equal): New function.
3575 (ppc_emit_less_signed): New function.
3576 (ppc_emit_less_unsigned): New function.
3577 (ppc_emit_ref): New function.
3578 (ppc_emit_const): New function.
3579 (ppc_emit_reg): New function.
3580 (ppc_emit_pop): New function.
3581 (ppc_emit_stack_flush): New function.
3582 (ppc_emit_swap): New function.
3583 (ppc_emit_stack_adjust): New function.
3584 (ppc_emit_call): New function.
3585 (ppc_emit_int_call_1): New function.
3586 (ppc_emit_void_call_2): New function.
3587 (ppc_emit_if_goto): New function.
3588 (ppc_emit_goto): New function.
3589 (ppc_emit_eq_goto): New function.
3590 (ppc_emit_ne_goto): New function.
3591 (ppc_emit_lt_goto): New function.
3592 (ppc_emit_le_goto): New function.
3593 (ppc_emit_gt_goto): New function.
3594 (ppc_emit_ge_goto): New function.
3595 (ppc_write_goto_address): New function.
3596 (ppc_emit_ops_impl): New static variable.
3597 (ppc64v1_emit_prologue): New function.
3598 (ppc64v2_emit_prologue): New function.
3599 (ppc64_emit_epilogue): New function.
3600 (ppc64_emit_add): New function.
3601 (ppc64_emit_sub): New function.
3602 (ppc64_emit_mul): New function.
3603 (ppc64_emit_lsh): New function.
3604 (ppc64_emit_rsh_signed): New function.
3605 (ppc64_emit_rsh_unsigned): New function.
3606 (ppc64_emit_ext): New function.
3607 (ppc64_emit_zero_ext): New function.
3608 (ppc64_emit_log_not): New function.
3609 (ppc64_emit_bit_and): New function.
3610 (ppc64_emit_bit_or): New function.
3611 (ppc64_emit_bit_xor): New function.
3612 (ppc64_emit_bit_not): New function.
3613 (ppc64_emit_equal): New function.
3614 (ppc64_emit_less_signed): New function.
3615 (ppc64_emit_less_unsigned): New function.
3616 (ppc64_emit_ref): New function.
3617 (ppc64_emit_const): New function.
3618 (ppc64v1_emit_reg): New function.
3619 (ppc64v2_emit_reg): New function.
3620 (ppc64_emit_pop): New function.
3621 (ppc64_emit_stack_flush): New function.
3622 (ppc64_emit_swap): New function.
3623 (ppc64v1_emit_call): New function.
3624 (ppc64v2_emit_call): New function.
3625 (ppc64v1_emit_int_call_1): New function.
3626 (ppc64v2_emit_int_call_1): New function.
3627 (ppc64v1_emit_void_call_2): New function.
3628 (ppc64v2_emit_void_call_2): New function.
3629 (ppc64_emit_if_goto): New function.
3630 (ppc64_emit_eq_goto): New function.
3631 (ppc64_emit_ne_goto): New function.
3632 (ppc64_emit_lt_goto): New function.
3633 (ppc64_emit_le_goto): New function.
3634 (ppc64_emit_gt_goto): New function.
3635 (ppc64_emit_ge_goto): New function.
3636 (ppc64v1_emit_ops_impl): New static variable.
3637 (ppc64v2_emit_ops_impl): New static variable.
3638 (ppc_emit_ops): New function.
3639 (linux_low_target): Wire in ppc_emit_ops.
3641 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3642 Marcin Kościelnicki <koriakin@0x04.net>
3645 * Makefile.in: Add powerpc-*-ipa.o
3646 * configure.srv: Add ipa_obj for powerpc*-linux.
3647 * linux-ppc-ipa.c: New file.
3648 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3650 (PPC_FIELD): New macro.
3651 (PPC_SEXT): New macro.
3652 (PPC_OP6): New macro.
3653 (PPC_BO): New macro.
3654 (PPC_LI): New macro.
3655 (PPC_BD): New macro.
3656 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3657 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3658 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3659 (ppc_get_thread_area): New function.
3660 (is_elfv2_inferior): New function.
3661 (gen_ds_form): New function.
3662 (GEN_STD): New macro.
3663 (GEN_STDU): New macro.
3664 (GEN_LD): New macro.
3665 (GEN_LDU): New macro.
3666 (gen_d_form): New function.
3667 (GEN_ADDI): New macro.
3668 (GEN_ADDIS): New macro.
3669 (GEN_LI): New macro.
3670 (GEN_LIS): New macro.
3671 (GEN_ORI): New macro.
3672 (GEN_ORIS): New macro.
3673 (GEN_LWZ): New macro.
3674 (GEN_STW): New macro.
3675 (GEN_STWU): New macro.
3676 (gen_xfx_form): New function.
3677 (GEN_MFSPR): New macro.
3678 (GEN_MTSPR): New macro.
3679 (GEN_MFCR): New macro.
3680 (GEN_MTCR): New macro.
3681 (GEN_SYNC): New macro.
3682 (GEN_LWSYNC): New macro.
3683 (gen_x_form): New function.
3684 (GEN_OR): New macro.
3685 (GEN_MR): New macro.
3686 (GEN_LWARX): New macro.
3687 (GEN_STWCX): New macro.
3688 (GEN_CMPW): New macro.
3689 (gen_md_form): New function.
3690 (GEN_RLDICL): New macro.
3691 (GEN_RLDICR): New macro.
3692 (gen_i_form): New function.
3694 (GEN_BL): New macro.
3695 (gen_b_form): New function.
3696 (GEN_BNE): New macro.
3697 (GEN_LOAD): New macro.
3698 (GEN_STORE): New macro.
3699 (gen_limm): New function.
3700 (gen_atomic_xchg): New function.
3701 (gen_call): New function.
3702 (ppc_relocate_instruction): New function.
3703 (ppc_install_fast_tracepoint_jump_pad): New function.
3704 (ppc_get_min_fast_tracepoint_insn_len): New function.
3705 (ppc_get_ipa_tdesc_idx): New function.
3706 (the_low_target): Wire in the new functions.
3707 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3709 * linux-ppc-tdesc.h: New file.
3711 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3713 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3714 (alloc_jump_pad_buffer): New function.
3715 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3716 (alloc_jump_pad_buffer): New function.
3717 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3718 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3719 (alloc_jump_pad_buffer): New function.
3720 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3721 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3722 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3723 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3725 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3727 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3728 * linux-amd64-ipa.c: Likewise.
3729 * linux-i386-ipa.c: Likewise.
3730 * linux-s390-ipa.c: Likewise.
3731 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3732 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3733 set_trace_state_variable_value_ptr.
3734 (struct ipa_sym_addresses): Likewise.
3735 (symbol_list): Likewise.
3736 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3737 accessing gdb_collect directly.
3738 (gdb_collect_ptr_type): New typedef.
3739 (get_raw_reg_ptr_type): New typedef.
3740 (get_trace_state_variable_value_ptr_type): New typedef.
3741 (set_trace_state_variable_value_ptr_type): New typedef.
3742 (gdb_collect_ptr): New global.
3743 (get_raw_reg_ptr): New global.
3744 (get_trace_state_variable_value_ptr): New global.
3745 (set_trace_state_variable_value_ptr): New global.
3746 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3747 accessing get_raw_reg directly.
3748 (get_get_tsv_func_addr): Likewise for
3749 get_trace_state_variable_value_ptr.
3750 (get_set_tsv_func_addr): Likewise for
3751 set_trace_state_variable_value_ptr.
3752 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3754 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3756 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3758 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3760 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3762 (relocate_instruction): Remove own_buf.
3763 * server.c (own_buf): Make global.
3764 (handle_v_requests): Make global.
3765 * server.h (own_buf): New declaration.
3766 (handle_v_requests): New prototype.
3768 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3771 * linux-s390-low.c (add_insns): New function.
3772 (s390_emit_prologue): New function.
3773 (s390_emit_epilogue): New function.
3774 (s390_emit_add): New function.
3775 (s390_emit_sub): New function.
3776 (s390_emit_mul): New function.
3777 (s390_emit_lsh): New function.
3778 (s390_emit_rsh_signed): New function.
3779 (s390_emit_rsh_unsigned): New function.
3780 (s390_emit_ext): New function.
3781 (s390_emit_log_not): New function.
3782 (s390_emit_bit_and): New function.
3783 (s390_emit_bit_or): New function.
3784 (s390_emit_bit_xor): New function.
3785 (s390_emit_bit_not): New function.
3786 (s390_emit_equal): New function.
3787 (s390_emit_less_signed): New function.
3788 (s390_emit_less_unsigned): New function.
3789 (s390_emit_ref): New function.
3790 (s390_emit_if_goto): New function.
3791 (s390_emit_goto): New function.
3792 (s390_write_goto_address): New function.
3793 (s390_emit_litpool): New function.
3794 (s390_emit_const): New function.
3795 (s390_emit_call): New function.
3796 (s390_emit_reg): New function.
3797 (s390_emit_pop): New function.
3798 (s390_emit_stack_flush): New function.
3799 (s390_emit_zero_ext): New function.
3800 (s390_emit_swap): New function.
3801 (s390_emit_stack_adjust): New function.
3802 (s390_emit_set_r2): New function.
3803 (s390_emit_int_call_1): New function.
3804 (s390_emit_void_call_2): New function.
3805 (s390_emit_eq_goto): New function.
3806 (s390_emit_ne_goto): New function.
3807 (s390_emit_lt_goto): New function.
3808 (s390_emit_le_goto): New function.
3809 (s390_emit_gt_goto): New function.
3810 (s390_emit_ge_goto): New function.
3811 (s390x_emit_prologue): New function.
3812 (s390x_emit_epilogue): New function.
3813 (s390x_emit_add): New function.
3814 (s390x_emit_sub): New function.
3815 (s390x_emit_mul): New function.
3816 (s390x_emit_lsh): New function.
3817 (s390x_emit_rsh_signed): New function.
3818 (s390x_emit_rsh_unsigned): New function.
3819 (s390x_emit_ext): New function.
3820 (s390x_emit_log_not): New function.
3821 (s390x_emit_bit_and): New function.
3822 (s390x_emit_bit_or): New function.
3823 (s390x_emit_bit_xor): New function.
3824 (s390x_emit_bit_not): New function.
3825 (s390x_emit_equal): New function.
3826 (s390x_emit_less_signed): New function.
3827 (s390x_emit_less_unsigned): New function.
3828 (s390x_emit_ref): New function.
3829 (s390x_emit_if_goto): New function.
3830 (s390x_emit_const): New function.
3831 (s390x_emit_call): New function.
3832 (s390x_emit_reg): New function.
3833 (s390x_emit_pop): New function.
3834 (s390x_emit_stack_flush): New function.
3835 (s390x_emit_zero_ext): New function.
3836 (s390x_emit_swap): New function.
3837 (s390x_emit_stack_adjust): New function.
3838 (s390x_emit_int_call_1): New function.
3839 (s390x_emit_void_call_2): New function.
3840 (s390x_emit_eq_goto): New function.
3841 (s390x_emit_ne_goto): New function.
3842 (s390x_emit_lt_goto): New function.
3843 (s390x_emit_le_goto): New function.
3844 (s390x_emit_gt_goto): New function.
3845 (s390x_emit_ge_goto): New function.
3846 (s390_emit_ops): New function.
3847 (struct linux_target_ops): Fill in emit_ops hook.
3849 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3852 * Makefile.in: Add s390 IPA files.
3853 * configure.srv: Build IPA for s390.
3854 * linux-s390-ipa.c: New file.
3855 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3856 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3857 (tdesc_s390_linux32): Likewise.
3858 (init_registers_s390_linux32v1): Likewise.
3859 (tdesc_s390_linux32v1): Likewise.
3860 (init_registers_s390_linux32v2): Likewise.
3861 (tdesc_s390_linux32v2): Likewise.
3862 (init_registers_s390_linux64): Likewise.
3863 (tdesc_s390_linux64): Likewise.
3864 (init_registers_s390_linux64v1): Likewise.
3865 (tdesc_s390_linux64v1): Likewise.
3866 (init_registers_s390_linux64v2): Likewise.
3867 (tdesc_s390_linux64v2): Likewise.
3868 (init_registers_s390_te_linux64): Likewise.
3869 (tdesc_s390_te_linux64): Likewise.
3870 (init_registers_s390_vx_linux64): Likewise.
3871 (tdesc_s390_vx_linux64): Likewise.
3872 (init_registers_s390_tevx_linux64): Likewise.
3873 (tdesc_s390_tevx_linux64): Likewise.
3874 (init_registers_s390x_linux64): Likewise.
3875 (tdesc_s390x_linux64): Likewise.
3876 (init_registers_s390x_linux64v1): Likewise.
3877 (tdesc_s390x_linux64v1): Likewise.
3878 (init_registers_s390x_linux64v2): Likewise.
3879 (tdesc_s390x_linux64v2): Likewise.
3880 (init_registers_s390x_te_linux64): Likewise.
3881 (tdesc_s390x_te_linux64): Likewise.
3882 (init_registers_s390x_vx_linux64): Likewise.
3883 (tdesc_s390x_vx_linux64): Likewise.
3884 (init_registers_s390x_tevx_linux64): Likewise.
3885 (tdesc_s390x_tevx_linux64): Likewise.
3886 (have_hwcap_s390_vx): New static variable.
3887 (s390_arch_setup): Fill have_hwcap_s390_vx.
3888 (s390_get_thread_area): New function.
3889 (s390_ft_entry_gpr_esa): New const.
3890 (s390_ft_entry_gpr_zarch): New const.
3891 (s390_ft_entry_misc): New const.
3892 (s390_ft_entry_fr): New const.
3893 (s390_ft_entry_vr): New const.
3894 (s390_ft_main_31): New const.
3895 (s390_ft_main_64): New const.
3896 (s390_ft_exit_fr): New const.
3897 (s390_ft_exit_vr): New const.
3898 (s390_ft_exit_misc): New const.
3899 (s390_ft_exit_gpr_esa): New const.
3900 (s390_ft_exit_gpr_zarch): New const.
3901 (append_insns): New function.
3902 (s390_relocate_instruction): New function.
3903 (s390_install_fast_tracepoint_jump_pad): New function.
3904 (s390_get_min_fast_tracepoint_insn_len): New function.
3905 (s390_get_ipa_tdesc_idx): New function.
3906 (struct linux_target_ops): Wire in the above functions.
3907 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3908 * linux-s390-tdesc.h: New file.
3910 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3912 * linux-s390-low.c (s390_supports_tracepoints): New function.
3913 (struct linux_target_ops): Fill supports_tracepoints hook.
3915 2016-03-18 Yao Qi <yao.qi@linaro.org>
3917 * linux-low.c (lwp_signal_can_be_delivered): New function.
3918 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3920 2016-03-18 Yao Qi <yao.qi@linaro.org>
3922 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3923 0 if signal is enqueued. Remove 'signal' from one debugging
3924 message. Move one debugging message to some lines below.
3925 Remove code setting 'signal' to 0.
3927 2016-03-18 Yao Qi <yao.qi@linaro.org>
3929 * linux-low.c (linux_low_filter_event): Remove redundant
3930 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3932 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3934 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3935 (struct linux_target_ops): Wire in the above.
3937 2016-03-03 Yao Qi <yao.qi@linaro.org>
3939 * linux-low.c: Update comments to start_step_over.
3941 2016-03-03 Yao Qi <yao.qi@linaro.org>
3944 * linux-low.c (handle_extended_wait): Set child suspended
3945 if event_lwp->bp_reinsert isn't zero.
3947 2016-03-02 Yao Qi <yao.qi@linaro.org>
3949 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3950 enqueue_pending_signal.
3952 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3954 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3957 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3959 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3960 (s390_regmap_3264) [!__s390x__]: New global.
3961 (s390_collect_ptrace_register): Skip map entries containing -1.
3962 (s390_supply_ptrace_register): Ditto.
3963 (s390_fill_gprs_high): New function.
3964 (s390_store_gprs_high): New function.
3965 (s390_regsets): Add NT_S390_HIGH_GPRS.
3966 (s390_get_hwcap): Enable on 31-bit.
3967 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3968 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3969 Detect NT_S390_HIGH_GPRS.
3970 (s390_usrregs_info_3264): Enable on 31-bit.
3971 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3972 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3974 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3977 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3978 * configure.srv: Ditto.
3979 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3980 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3981 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3982 (init_registers_amd64_linux): Remove prototype.
3983 (tdesc_amd64_linux): Remove declaration.
3984 (get_ipa_tdesc): New function.
3985 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3986 initialize remaining tdescs.
3987 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3988 (init_registers_i386_linux): Remove prototype.
3989 (tdesc_i386_linux): Remove declaration.
3990 (get_ipa_tdesc): New function.
3991 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3992 initialize remaining tdescs.
3993 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3994 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3995 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3996 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3997 (x86_get_ipa_tdesc_idx): New function.
3998 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3999 * linux-x86-tdesc.h: New file.
4000 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4001 (target_get_ipa_tdesc_idx): New macro.
4002 * tracepoint.c (ipa_tdesc_idx): New macro.
4003 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4004 (symbol_list): Add ipa_tdesc_idx.
4005 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4006 (ipa_tdesc): Remove.
4007 (ipa_tdesc_idx): New variable.
4008 (get_context_regcache): Use get_ipa_tdesc.
4009 (gdb_collect): Ditto.
4011 * tracepoint.h (get_ipa_tdesc): New prototype.
4012 (ipa_tdesc): Remove.
4014 2016-02-24 Pedro Alves <palves@redhat.com>
4016 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4017 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4018 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4019 Factor out common code between the USE_SIGTRAP_SIGINFO and
4020 !USE_SIGTRAP_SIGINFO blocks.
4021 (linux_low_filter_event): Call save_stop_reason instead of
4022 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4024 (linux_wait_1): Update comments.
4026 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4028 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4029 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4030 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4031 ppc_insert_point, ppc_remove_point.
4033 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4035 * linux-s390-low.c (s390_supports_z_point_type): New function.
4036 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4038 2016-02-16 Yao Qi <yao.qi@linaro.org>
4040 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4041 PC. Get pc from regcache_read_pc.
4043 2016-02-12 Yao Qi <yao.qi@linaro.org>
4045 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4046 or linux_get_pc_32bit.
4047 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4049 2016-02-12 Yao Qi <yao.qi@linaro.org>
4051 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4052 arm_linux_get_next_pcs_fixup.
4054 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4056 * tracepoint.c (x_tracepoint_action_download): Change
4057 write_inferior_data_ptr to write_inferior_data_pointer.
4058 (cmd_qtstart): Likewise.
4059 (write_inferior_data_ptr): Remove.
4060 (download_agent_expr): Change write_inferior_data_ptr to
4061 write_inferior_data_pointer.
4062 (download_tracepoint_1): Likewise.
4063 (download_tracepoint): Likewise.
4064 (download_trace_state_variables): Likewise.
4066 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4067 Marcin Kościelnicki <koriakin@0x04.net>
4069 * tracepoint.c (struct tracepoint_action_ops): Remove.
4070 (struct tracepoint_action): Remove ops.
4071 (m_tracepoint_action_download, r_tracepoint_action_download)
4072 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4073 size and offset accordingly.
4074 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4075 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4076 (tracepoint_action_send, tracepoint_action_download): New functions.
4077 Helpers for trace action handlers.
4078 (add_tracepoint_action): Remove setup actions ops.
4079 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4081 2016-02-10 Yao Qi <yao.qi@linaro.org>
4083 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4085 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4087 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4089 * configure: Regenerate.
4091 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4093 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4094 void * to gdb_byte *.
4095 * linux-low.c (siginfo_fixup): Likewise.
4096 (linux_xfer_siginfo): Likewise.
4097 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4099 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4101 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4103 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4105 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4107 * linux-x86-low.c [__x86_64__]: Include
4108 "nat/amd64-linux-siginfo.h".
4109 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4110 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4111 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4112 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4113 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4114 (cpt_si_fd, si_timerid, si_overrun): Move from
4115 nat/amd64-linux-siginfo.c.
4116 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4118 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4120 * server.c (skip_to_semicolon): Remove.
4121 (process_point_options): Use strchrnul instead of
4124 2016-01-26 Yao Qi <yao.qi@linaro.org>
4126 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4127 * linux-low.c (install_software_single_step_breakpoints): Don't
4128 call regcache_read_pc.
4129 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4132 2016-01-26 Yao Qi <yao.qi@linaro.org>
4134 * linux-low.c (install_software_single_step_breakpoints): Call
4135 regcache_read_pc instead of get_pc.
4137 2016-01-26 Yao Qi <yao.qi@linaro.org>
4139 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4140 (unblock_async_io): Rename to ...
4141 (block_unblock_async_io): ... it. New function.
4142 (enable_async_io): Don't install SIGIO handler. Unblock it
4144 (disable_async_io): Don't ignore SIGIO. Block it instead.
4145 (initialize_async_io): Install SIGIO handler. Don't call
4148 2016-01-26 Yao Qi <yao.qi@linaro.org>
4150 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4151 first character is '\003', call *the_target->request_interrupt.
4153 2016-01-25 Yao Qi <yao.qi@linaro.org>
4155 * remote-utils.c (new_thread_notify): Remove.
4156 (dead_thread_notify): Likewise.
4157 * remote-utils.h (new_thread_notify): Remove declaration.
4158 (dead_thread_notify): Likewise.
4160 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4162 * gdb.trace/pending.exp: Fix expected message on continue.
4164 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4166 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4167 it works properly on big-endian machines where sizeof (CORE_ADDR)
4170 2016-01-21 Pedro Alves <palves@redhat.com>
4172 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4173 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4174 * configure: Regenerate.
4176 2016-01-21 Yao Qi <yao.qi@linaro.org>
4178 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4179 is_thumb and set it according to CPSR saved on the stack.
4180 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4181 arm_sigreturn_next_pc.
4183 2016-01-18 Yao Qi <yao.qi@linaro.org>
4185 * linux-low.c (linux_set_pc_64bit): New function.
4186 (linux_get_pc_64bit): New function.
4187 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4189 * linux-sparc-low.c (debug_threads): Remove declaration.
4190 (sparc_get_pc): Remove.
4191 (the_low_target): Use linux_get_pc_64bit instead of
4193 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4194 (the_low_target): Use linux_get_pc_64bit and
4197 2016-01-18 Yao Qi <yao.qi@linaro.org>
4199 * linux-arm-low.c (debug_threads): Remove declaration.
4200 (arm_get_pc, arm_set_pc): Remove.
4201 (the_low_target): Use linux_get_pc_32bit and
4203 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4204 (the_low_target): Use linux_get_pc_32bit and
4206 * linux-cris-low.c (debug_threads): Remove declaration.
4207 (cris_get_pc, cris_set_pc,): Remove.
4208 (the_low_target): Use linux_get_pc_32bit and
4210 * linux-crisv32-low.c (debug_threads): Remove declaration.
4211 (cris_get_pc, cris_set_pc): Remove.
4212 (the_low_target): Use linux_get_pc_32bit and
4214 * linux-low.c: Include inttypes.h.
4215 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4216 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4217 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4218 (the_low_target): Use linux_get_pc_32bit and
4220 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4221 (the_low_target): Use linux_get_pc_32bit and
4223 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4224 (the_low_target): Use linux_get_pc_32bit and
4226 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4227 (the_low_target): Use linux_get_pc_32bit and
4229 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4230 (the_low_target): Use linux_get_pc_32bit and
4233 2016-01-18 Gary Benson <gbenson@redhat.com>
4235 * configure.ac (AC_FUNC_FORK): New check.
4236 * config.in: Regenerate.
4237 * configure: Likewise.
4239 2016-01-14 Yao Qi <yao.qi@linaro.org>
4241 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4242 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4243 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4244 arm_get_next_pcs_ctor.
4246 2016-01-12 Josh Stone <jistone@redhat.com>
4247 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4249 * inferiors.h: Include "gdb_vecs.h".
4250 (struct process_info): Add syscalls_to_catch.
4251 * inferiors.c (remove_process): Free syscalls_to_catch.
4252 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4253 syscall_return stops.
4254 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4255 * server.c (handle_general_set): Handle QCatchSyscalls.
4256 (handle_query): Report support for QCatchSyscalls.
4257 * target.h (struct target_ops): Add supports_catch_syscall.
4258 (target_supports_catch_syscall): New macro.
4259 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4260 (struct lwp_info): Add syscall_state.
4261 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4262 Maintain syscall_state and syscalls_to_catch across exec.
4263 (get_syscall_trapinfo): New function, proxy to the_low_target.
4264 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4265 (linux_low_filter_event): Toggle syscall_state entry/return for
4266 syscall traps, and set it ignored for all others.
4267 (gdb_catching_syscalls_p): New function.
4268 (gdb_catch_this_syscall_p): New function.
4269 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4270 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4271 (linux_supports_catch_syscall): New function.
4272 (linux_target_ops): Install it.
4273 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4274 (the_low_target): Install it.
4276 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4278 * acinclude.m4: Include new ../warning.m4 file.
4279 * configure: Regenerated.
4280 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4282 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4284 * ax.c (is_goto_target): Mark static.
4285 * linux-low.c (register_addr): Likewise.
4286 (linux_fetch_registers, linux_store_registers): Likewise.
4287 * mem-break.c (any_persistent_commands): Fix old prototype.
4288 (add_commands_to_breakpoint): Mark static.
4289 * regcache.c (find_register_by_name): Delete unused func.
4290 * remote-utils.c (hex_or_minus_one): Mark static.
4291 * server.c (monitor_show_help): Mark static.
4292 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4293 handle_v_requests): Likewise.
4295 2016-01-12 Pedro Alves <palves@redhat.com>
4297 Remove use of the registered trademark symbol throughout.
4299 2016-01-08 Yao Qi <yao.qi@linaro.org>
4301 * remote-utils.c (getpkt): If c is '\003', call target hook
4304 2016-01-06 Yao Qi <yao.qi@linaro.org>
4306 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4307 linux-aarch32-low.c.
4308 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4309 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4310 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4311 (thumb2_breakpoint): Declare.
4312 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4313 linux-aarch32-low.h.
4314 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4315 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4316 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4318 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4320 * gdbreplay.c (gdbreplay_version): Change copyright year in
4322 * server.c (gdbserver_version): Likewise.
4324 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4326 * server.c (crc32_table): Delete.
4327 (crc32): Use libiberty's xcrc32 function.
4329 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4331 * lynx-low.c (lynx_delete_thread_callback): New function.
4332 (lynx_mourn): Properly delete our process and all of its
4333 threads. Remove call to clear_inferiors.
4335 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4337 * target.c (thread_search_callback): Add check that
4338 the thread_stopped target callback is not NULL before
4341 2015-12-21 Yao Qi <yao.qi@linaro.org>
4343 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4346 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4348 * server.c (handle_query): Call target_supports_software_single_step.
4350 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4352 * linux-low.c (single_step): New function.
4353 (linux_resume_one_lwp_throw): Call single_step.
4354 (start_step_over): Likewise.
4356 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4358 * Makefile.in (SFILES): Append arch/arm-linux.c,
4359 arch/arm-get-next-pcs.c.
4360 (arm-linux.o): New rule.
4361 (arm-get-next-pcs.o): New rule.
4362 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4364 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4365 to linux-aarch32-low.c.
4366 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4367 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4368 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4369 (thumb2_breakpoint_len): Likewise.
4370 (arm_is_thumb_mode): Make non-static.
4371 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4372 from linux-aarch32-low.c.
4373 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4374 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4375 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4376 (thumb2_breakpoint_len): Likewise.
4377 (arm_is_thumb_mode): New declaration.
4378 * linux-arm-low.c: Include arch/arm-linux.h
4379 aarch/arm-get-next-pcs.h, sys/syscall.h.
4380 (get_next_pcs_ops): New struct.
4381 (get_next_pcs_addr_bits_remove): New function.
4382 (get_next_pcs_is_thumb): New function.
4383 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4384 (arm_sigreturn_next_pc): Likewise.
4385 (get_next_pcs_syscall_next_pc): Likewise.
4386 (arm_gdbserver_get_next_pcs): Likewise.
4387 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4389 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4390 * server.h: Include gdb_vecs.h.
4392 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4394 * Makefile.in (SFILES): Append common/common-regcache.c.
4395 (OBS): Append common-regcache.o.
4396 (common-regcache.o): New rule.
4397 * regcache.c (init_register_cache): Initialize cache to
4399 (regcache_raw_read_unsigned): New function.
4400 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4401 register_status enum.
4403 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4405 * linux-aarch64-low.c (the_low_targets): Rename
4406 breakpoint_reinsert_addr to get_next_pcs.
4407 * linux-arm-low.c (the_low_targets): Likewise.
4408 * linux-bfin-low.c (the_low_targets): Likewise.
4409 * linux-cris-low.c (the_low_targets): Likewise.
4410 * linux-crisv32-low.c (the_low_targets): Likewise.
4411 * linux-low.c (can_software_single_step): Likewise.
4412 (install_software_single_step_breakpoints): New function.
4413 (start_step_over): Use install_software_single_step_breakpoints.
4414 * linux-low.h: New CORE_ADDR vector.
4415 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4417 * linux-mips-low.c (the_low_targets): Likewise.
4418 * linux-nios2-low.c (the_low_targets): Likewise.
4419 * linux-sparc-low.c (the_low_targets): Likewise.
4421 2015-12-17 Pedro Alves <palves@redhat.com>
4423 * linux-low.c (linux_kill_one_lwp): Remove references to
4425 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4427 (linux_init_signals): Delete.
4428 (initialize_low): Adjust.
4429 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4431 2015-12-16 Pedro Alves <palves@redhat.com>
4433 * configure.ac (compiler warning flags): When testing a
4434 -Wno-foo option, check whether -Wfoo works instead.
4435 * configure: Regenerate.
4437 2015-12-11 Don Breazeal <donb@codesourcery.com>
4439 * server.c (process_serial_event): Don't exit from gdbserver
4440 in remote mode if there are still active inferiors.
4442 2015-12-11 Yao Qi <yao.qi@linaro.org>
4444 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4445 arm_breakpoint_at if the process is 32-bit.
4447 2015-12-11 Yao Qi <yao.qi@linaro.org>
4449 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4452 2015-12-07 Yao Qi <yao.qi@linaro.org>
4454 * configure.srv: Append arm.o to srv_tgtobj for
4455 aarch64*-*-linux* target.
4456 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4457 from linux-arm-low.c.
4458 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4459 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4460 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4461 (thumb2_breakpoint_len): Likewise.
4462 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4463 (arm_breakpoint_kinds): Likewise.
4464 (arm_breakpoint_kind_from_pc): Likewise.
4465 (arm_sw_breakpoint_from_kind): Likewise.
4466 (arm_breakpoint_kind_from_current_state): Likewise.
4467 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4468 (arm_sw_breakpoint_from_kind): Declare.
4469 (arm_breakpoint_kind_from_current_state): Declare.
4470 (arm_breakpoint_at): Declare.
4471 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4472 arm_sw_breakpoint_from_kind if process is 32-bit.
4473 (aarch64_breakpoint_kind_from_pc): New function.
4474 (aarch64_breakpoint_kind_from_current_state): New function.
4475 (the_low_target): Initialize fields breakpoint_kind_from_pc
4476 and breakpoint_kind_from_current_state.
4477 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4478 linux-aarch32-low.c.
4479 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4480 (arm_breakpoint, arm_breakpoint_len): Likewise.
4481 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4482 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4483 (arm_is_thumb_mode): Likewise.
4484 (arm_breakpoint_at): Likewise.
4485 (arm_breakpoint_kind_from_pc): Likewise.
4486 (arm_sw_breakpoint_from_kind): Likewise.
4487 (arm_breakpoint_kind_from_current_state): Likewise.
4490 2015-08-04 Yao Qi <yao.qi@linaro.org>
4492 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4493 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4494 * server.c (extended_protocol): Remove "static".
4495 * server.h (extended_protocol): Declare it.
4497 2015-12-04 Josh Stone <jistone@redhat.com>
4499 * target.h (struct target_ops) <arch_setup>: Rename to ...
4500 (struct target_ops) <post_create_inferior>: ... this.
4501 (target_arch_setup): Rename to ...
4502 (target_post_create_inferior): ... this, calling post_create_inferior.
4503 * server.c (start_inferior): Update target_arch_setup calls to
4504 target_post_create_inferior.
4505 * linux-low.c (linux_low_ptrace_options): Forward declare.
4506 (linux_arch_setup): Update its comment for general use.
4507 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4508 (struct linux_target_ops): Use linux_post_create_inferior.
4509 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4510 to post_create_inferior.
4511 * nto-low.c (struct nto_target_ops): Likewise.
4512 * spu-low.c (struct spu_target_ops): Likewise.
4513 * win32-low.c (struct win32_target_ops): Likewise.
4515 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4517 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4519 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4521 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4522 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4523 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4524 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4525 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4526 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4527 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4528 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4529 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4530 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4531 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4532 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4534 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4536 * linux-low.c (linux_look_up_symbols): Don't call
4537 linux_supports_traceclone.
4538 * linux-low.h (thread_db_init): Remove use_events argument.
4539 * thread-db.c (thread_db_use_event): Remove global variable.
4540 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4541 (struct thread_db) <td_create_bp>: Remove field.
4542 (thread_db_create_event): Remove function.
4543 (thread_db_enable_reporting): Likewise.
4544 (find_one_thread): Don't check for thread_db_use_events.
4545 (attach_thread): Likewise.
4546 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4547 (try_thread_db_load_1): Don't check for thread_db_use_events.
4548 (thread_db_init): Remove use_events argument and thread events
4550 (remove_thread_event_breakpoints): Remove function.
4551 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4553 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4555 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4557 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4558 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4559 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4560 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4561 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4563 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4565 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4566 * linux-low.c (can_hardware_single_step): Use
4567 supports_hardware_single_step.
4568 (can_software_single_step): New function.
4569 (start_step_over): Call can_software_single_step.
4570 (linux_supports_hardware_single_step): New function.
4571 (struct target_ops) <supports_software_single_step>: Initialize.
4572 * linux-low.h (struct linux_target_ops)
4573 <supports_hardware_single_step>: Initialize.
4574 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4575 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4576 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4577 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4578 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4579 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4580 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4581 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4582 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4583 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4585 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4586 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4588 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4589 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4590 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4593 * target.h (struct target_ops): <supports_software_single_step>:
4595 (target_supports_software_single_step): New macro.
4597 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4599 * linux-low.c (linux_wait_1): Fix pc advance condition.
4600 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4601 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4603 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4605 * linux-arm-low.c (arm_is_thumb_mode): New function.
4606 (arm_breakpoint_at): Use arm_is_thumb_mode.
4607 (arm_breakpoint_kind_from_current_state): New function.
4608 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4610 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4611 (linux_breakpoint_kind_from_current_state): New function.
4612 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4613 * linux-low.h (struct linux_target_ops)
4614 <breakpoint_kind_from_current_state>: New field.
4615 * target.h (struct target_ops): Likewise.
4616 (target_breakpoint_kind_from_current_state): New macro.
4618 2015-11-30 Pedro Alves <palves@redhat.com>
4620 * linux-low.c (linux_resume): Wake up the event loop before
4623 2015-11-30 Pedro Alves <palves@redhat.com>
4625 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4627 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4629 * target.c (struct thread_search): New structure.
4630 (thread_search_callback): New function.
4631 (prev_general_thread): New global.
4632 (prepare_to_access_memory, done_accessing_memory): New functions.
4633 * target.h (prepare_to_access_memory, done_accessing_memory):
4634 Replace macros with function declarations.
4636 2015-11-30 Pedro Alves <palves@redhat.com>
4639 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4640 report TARGET_WAITKIND_NO_RESUMED.
4641 * remote-utils.c (prepare_resume_reply): Handle
4642 TARGET_WAITKIND_NO_RESUMED.
4643 * server.c (report_no_resumed): New global.
4644 (handle_query) <qSupported>: Handle "no-resumed+". Report
4645 "no-resumed+" support.
4646 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4647 return error if the client doesn't support no-resumed events.
4648 (push_stop_notification): New function.
4649 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4650 events if the client supports them.
4652 2015-11-30 Pedro Alves <palves@redhat.com>
4654 * linux-low.c (thread_still_has_status_pending_p): Don't check
4656 (lwp_resumed): New function.
4657 (status_pending_p_callback): Return early if the LWP is not
4658 supposed to be resumed.
4660 2015-11-30 Pedro Alves <palves@redhat.com>
4662 * linux-low.c (handle_extended_wait): Assert that the LWP's
4663 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4664 thread create events, leave the new child's status pending.
4665 (linux_low_filter_event): If GDB wants to hear about thread exit
4666 events, leave the LWP marked dead and don't delete it.
4667 (linux_wait_for_event_filtered): Don't check for thread exit.
4668 (filter_exit_event): New function.
4669 (linux_wait_1): Use it, when returning an exit event.
4670 (linux_resume_one_lwp_throw): Assert that the LWP's
4671 waitstatus is TARGET_WAITKIND_IGNORE.
4672 * remote-utils.c (prepare_resume_reply): Handle
4673 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4674 * server.c (report_thread_events): New global.
4675 (handle_general_set): Handle QThreadEvents.
4676 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4677 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4678 TARGET_WAITKIND_THREAD_EXITED.
4679 * server.h (report_thread_events): Declare.
4681 2015-11-30 Pedro Alves <palves@redhat.com>
4683 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4684 the thread's last_resume_kind was resume_stop.
4686 2015-11-30 Pedro Alves <palves@redhat.com>
4688 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4691 2015-11-30 Pedro Alves <palves@redhat.com>
4693 * server.c (handle_v_requests): Handle vCtrlC.
4695 2015-11-30 Pedro Alves <palves@redhat.com>
4697 * gdbthread.h (find_any_thread_of_pid): Declare.
4698 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4700 * server.c (handle_query): If current_thread is NULL, look for
4701 another thread of the selected process.
4703 2015-11-26 Daniel Colascione <dancol@dancol.org>
4704 Simon Marchi <simon.marchi@ericsson.com>
4706 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4707 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4709 * target.h (struct target_ops) <thread_name>: New field.
4710 (target_thread_name): New macro.
4712 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4714 * regcache.h (regcache_invalidate_pid): Add declaration.
4715 * regcache.c (regcache_invalidate_pid): New function, extracted
4716 from regcache_invalidate.
4717 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4718 Add trivial documentation comment.
4719 * lynx-low.c: Use regcache_invalidate_pid instead of
4720 regcache_invalidate.
4722 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4724 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4725 and Elf64_auxv_t if the target is Android.
4727 2015-11-22 Doug Evans <xdje42@gmail.com>
4729 * target.h: #include <sys/types.h>.
4731 2015-11-19 Pedro Alves <palves@redhat.com>
4733 * linux-low.c (linux_process_qsupported): Change prototype.
4735 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4737 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4738 and adjust to loop over all features.
4739 * server.c (handle_query) <qSupported>: Adjust to call
4740 target_process_qsupported once, passing it a vector of unprocessed
4742 * target.h (struct target_ops) <process_qsupported>: Change
4744 (target_process_qsupported): Adjust.
4746 2015-11-19 Pedro Alves <palves@redhat.com>
4748 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4750 * configure: Regenerate.
4752 2015-11-19 Pedro Alves <palves@redhat.com>
4754 * configure: Regenerate.
4756 2015-11-19 Yao Qi <yao.qi@linaro.org>
4758 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4761 2015-11-19 Yao Qi <yao.qi@linaro.org>
4763 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4764 (struct aarch64_operand): Move enum out.
4766 2015-11-19 Yao Qi <yao.qi@linaro.org>
4768 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4769 struct user_fpsimd_state *.
4770 (aarch64_store_fpregset): Likewise.
4772 2015-11-19 Yao Qi <yao.qi@linaro.org>
4774 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4775 struct user_pt_regs *.
4776 (aarch64_store_gregset): Likewise.
4778 2015-11-18 Pedro Alves <palves@redhat.com>
4780 * Makefile.in (all_object_files): Add $IPA_OBJS.
4782 2015-11-17 Pedro Alves <palves@redhat.com>
4784 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4785 GDB_SIGNAL_0 and gdb_signal_to_string.
4787 2015-11-17 Pedro Alves <palves@redhat.com>
4789 * win32-low.c (handle_output_debug_string): Remove parameter.
4790 (win32_kill): Remove our_status local and adjust call to
4791 handle_output_debug_string.
4792 (get_child_debug_event): Adjust call to
4793 handle_output_debug_string.
4795 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4797 * linux-mips-low.c (mips_fill_gregset): Add cast.
4798 (mips_store_gregset): Likewise.
4799 (mips_fill_fpregset): Likewise.
4800 (mips_store_fpregset): Likewise.
4802 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4804 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4807 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4809 * linux-mips-low.c (mips_linux_new_thread): Change type of
4810 watch_type to enum target_hw_bp_type.
4812 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4814 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4815 Change return type to arm_hwbp_type.
4817 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4819 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4820 (arm_store_gregset): Likewise.
4821 * linux-arm-low.c (arm_get_hwcap): Likewise.
4822 (arm_read_description): Likewise.
4824 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4826 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4828 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4830 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4831 (ppc_fill_vsxregset): Likewise.
4832 (ppc_store_vsxregset): Likewise.
4833 (ppc_fill_vrregset): Likewise.
4834 (ppc_store_vrregset): Likewise.
4835 (ppc_fill_evrregset): Likewise.
4836 (ppc_store_evrregset): Likewise.
4838 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4840 * linux-ppc-low.c (ppc_usrregs_info): Remove
4841 forward-declaration.
4842 (ppc_arch_setup): Move lower in file.
4844 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4846 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4847 (ps_pdwrite): Likewise.
4849 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4851 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4852 to after assert checks.
4854 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4856 * proc-service.c (ps_pdread): Add/adjust casts.
4857 (ps_pdwrite): Add/adjust casts.
4859 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4861 * server.c (handle_search_memory_1): Cast return value of
4864 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4866 * server.c (write_qxfer_response): Change type of data to
4869 2015-10-29 Pedro Alves <palves@redhat.com>
4871 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4873 2015-10-29 Pedro Alves <palves@redhat.com>
4875 * tracepoint.c (clear_installed_tracepoints): Add casts.
4877 2015-10-29 Pedro Alves <palves@redhat.com>
4879 * server.c (handle_v_cont, process_serial_event): Add enum
4880 gdb_signal casts to signal parsing code.
4882 2015-10-29 Pedro Alves <palves@redhat.com>
4884 * linux-low.h (NULL_REGSET): Define.
4885 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4886 * linux-arm-low.c (arm_regsets): Likewise.
4887 * linux-crisv32-low.c (cris_regsets): Likewise.
4888 * linux-m68k-low.c (m68k_regsets): Likewise.
4889 * linux-mips-low.c (mips_regsets): Likewise.
4890 * linux-nios2-low.c (nios2_regsets): Likewise.
4891 * linux-ppc-low.c (ppc_regsets): Likewise.
4892 * linux-s390-low.c (s390_regsets): Likewise.
4893 * linux-sh-low.c (sh_regsets): Likewise.
4894 * linux-sparc-low.c (sparc_regsets): Likewise.
4895 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4896 * linux-tile-low.c (tile_regsets): Likewise.
4897 * linux-x86-low.c (x86_regsets): Likewise.
4898 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4900 2015-10-29 Pedro Alves <palves@redhat.com>
4902 * linux-low.h (NULL_REGSET): Define.
4903 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4904 * linux-arm-low.c (arm_regsets): Likewise.
4905 * linux-crisv32-low.c (cris_regsets): Likewise.
4906 * linux-m68k-low.c (m68k_regsets): Likewise.
4907 * linux-mips-low.c (mips_regsets): Likewise.
4908 * linux-nios2-low.c (nios2_regsets): Likewise.
4909 * linux-ppc-low.c (ppc_regsets): Likewise.
4910 * linux-s390-low.c (s390_regsets): Likewise.
4911 * linux-sh-low.c (sh_regsets): Likewise.
4912 * linux-sparc-low.c (sparc_regsets): Likewise.
4913 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4914 * linux-tile-low.c (tile_regsets): Likewise.
4915 * linux-x86-low.c (x86_regsets): Likewise.
4916 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4918 2015-10-26 Doug Evans <dje@google.com>
4920 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4922 2015-10-26 Doug Evans <dje@google.com>
4924 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4926 2015-10-26 Doug Evans <dje@google.com>
4928 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4930 (attach_thread, find_new_threads_callback): Ditto.
4932 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4934 * mem-break.h (set_breakpoint_data): Remove.
4936 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4938 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4939 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4940 (initialize_low): Remove set_breakpoint_data call.
4941 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4942 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4943 (initialize_low): Remove set_breakpoint_data call.
4944 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4945 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4946 (initialize_low): Remove set_breakpoint_data call.
4948 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4950 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4951 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4952 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4953 * target.h (target_breakpoint_kind_from_pc): New macro.
4955 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4957 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4958 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4959 the default breakpoint kind.
4961 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4963 * linux-arm-low.c (arm_supports_z_point_type): Add software
4966 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4968 * linux-arm-low.c: Refactor breakpoint definitions.
4969 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4970 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4972 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4974 * Makefile.in: Add arm.c/o.
4975 * configure.srv: Likewise.
4976 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4977 (arm_breakpoint_kind_from_pc): New function.
4978 (arm_sw_breakpoint_from_kind): Return proper kind.
4979 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4981 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4983 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4985 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4986 (struct raw_breakpoint) <size>: Remove.
4987 (struct raw_breakpoint) <kind>: Add.
4988 (bp_size): New function.
4989 (bp_opcode): Likewise.
4990 (find_raw_breakpoint_at): Adjust for kind.
4991 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4992 (remove_memory_breakpoint): Adjust for kind call bp_size.
4993 (set_raw_breakpoint_at): Adjust for kind.
4994 (set_breakpoint): Likewise.
4995 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4996 (delete_raw_breakpoint): Adjust for kind.
4997 (delete_breakpoint): Likewise.
4998 (find_gdb_breakpoint): Likewise.
4999 (set_gdb_breakpoint_1): Likewise.
5000 (set_gdb_breakpoint): Likewise.
5001 (delete_gdb_breakpoint_1): Likewise.
5002 (delete_gdb_breakpoint): Likewise.
5003 (uninsert_raw_breakpoint): Likewise.
5004 (reinsert_raw_breakpoint): Likewise.
5005 (set_breakpoint_data): Remove.
5006 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5007 (check_mem_read): Adjust for kind call bp_size.
5008 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5009 (clone_one_breakpoint): Adjust for kind.
5010 * mem-break.h (set_gdb_breakpoint): Likewise.
5011 (delete_gdb_breakpoint): Likewise.
5012 * server.c (process_serial_event): Likewise.
5014 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5016 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5017 (struct linux_target_ops) <breakpoint>: Remove.
5018 (struct linux_target_ops) <breakpoint_len>: Remove.
5019 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5020 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5021 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5022 (arm_sw_breakpoint_from_kind): New function.
5023 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5024 (struct linux_target_ops) <breakpoint>: Remove.
5025 (struct linux_target_ops) <breakpoint_len>: Remove.
5026 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5027 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5028 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5029 (struct linux_target_ops) <breakpoint>: Remove.
5030 (struct linux_target_ops) <breakpoint_len>: Remove.
5031 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5032 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5033 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5034 (struct linux_target_ops) <breakpoint>: Remove.
5035 (struct linux_target_ops) <breakpoint_len>: Remove.
5036 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5037 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5038 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5039 and sw_breakpoint_from_kind to increment the pc.
5040 (linux_breakpoint_kind_from_pc): New function.
5041 (linux_sw_breakpoint_from_kind): New function.
5042 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5043 (initialize_low): Call breakpoint_kind_from_pc and
5044 sw_breakpoint_from_kind to replace breakpoint_data/len.
5045 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5047 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5048 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5049 (struct linux_target_ops) <breakpoint>: Remove.
5050 (struct linux_target_ops) <breakpoint_len>: Remove.
5051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5053 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5054 (struct linux_target_ops) <breakpoint>: Remove.
5055 (struct linux_target_ops) <breakpoint_len>: Remove.
5056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5058 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5059 (struct linux_target_ops) <breakpoint>: Remove.
5060 (struct linux_target_ops) <breakpoint_len>: Remove.
5061 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5062 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5063 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5064 (struct linux_target_ops) <breakpoint>: Remove.
5065 (struct linux_target_ops) <breakpoint_len>: Remove.
5066 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5067 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5068 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5069 (struct linux_target_ops) <breakpoint>: Remove.
5070 (struct linux_target_ops) <breakpoint_len>: Remove.
5071 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5072 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5073 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5074 (struct linux_target_ops) <breakpoint>: Remove.
5075 (struct linux_target_ops) <breakpoint_len>: Remove.
5076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5078 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5079 (struct linux_target_ops) <breakpoint>: Remove.
5080 (struct linux_target_ops) <breakpoint_len>: Remove.
5081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5083 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5084 (struct linux_target_ops) <breakpoint>: Remove.
5085 (struct linux_target_ops) <breakpoint_len>: Remove.
5086 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5088 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5089 (struct linux_target_ops) <breakpoint>: Remove.
5090 (struct linux_target_ops) <breakpoint_len>: Remove.
5091 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5092 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5093 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5094 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5095 (struct linux_target_ops) <breakpoint>: Remove.
5096 (struct linux_target_ops) <breakpoint_len>: Remove.
5097 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5098 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5099 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5100 (struct linux_target_ops) <breakpoint>: Remove.
5101 (struct linux_target_ops) <breakpoint_len>: Remove.
5102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5103 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5105 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5107 * linux-cris-low.c (cris_get_pc): Remove void arg.
5109 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5111 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5114 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5116 * inferiors.c (thread_pid_matches_callback): New function.
5117 (find_thread_process): New function.
5118 (remove_thread): Reset current_thread.
5119 (remove_process): Assert threads have been removed first.
5121 2015-10-15 Yao Qi <yao.qi@linaro.org>
5123 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5125 (aarch64_remove_point): Likewise.
5126 * regcache.c (regcache_register_size): New function.
5128 2015-10-12 Yao Qi <yao.qi@linaro.org>
5130 * linux-aarch64-low.c: Update all callers as emit_load_store
5131 is renamed to aarch64_emit_load_store.
5133 2015-10-12 Yao Qi <yao.qi@linaro.org>
5135 * linux-aarch64-low.c: Update all callers of function renaming
5136 from emit_insn to aarch64_emit_insn.
5138 2015-10-12 Yao Qi <yao.qi@linaro.org>
5140 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5141 arch/aarch64-insn.h.
5142 (struct aarch64_memory_operand): Likewise.
5144 (emit_insn): Move to arch/aarch64-insn.c.
5145 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5146 (emit_load_store): Move to arch/aarch64-insn.c.
5147 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5148 (can_encode_int32): Remove.
5150 2015-10-12 Yao Qi <yao.qi@linaro.org>
5152 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5153 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5154 (aarch64_relocate_instruction): Likewise.
5155 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5156 (struct aarch64_insn_visitor): Likewise.
5158 2015-10-12 Yao Qi <yao.qi@linaro.org>
5160 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5161 (struct aarch64_insn_visitor): New.
5162 (struct aarch64_insn_relocation_data): New.
5163 (aarch64_ftrace_insn_reloc_b): New function.
5164 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5165 (aarch64_ftrace_insn_reloc_cb): Likewise.
5166 (aarch64_ftrace_insn_reloc_tb): Likewise.
5167 (aarch64_ftrace_insn_reloc_adr): Likewise.
5168 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5169 (aarch64_ftrace_insn_reloc_others): Likewise.
5171 (aarch64_relocate_instruction): Use visitor.
5173 2015-10-12 Yao Qi <yao.qi@linaro.org>
5175 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5176 int. Add argument buf.
5177 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5178 aarch64_relocate_instruction.
5180 2015-10-12 Yao Qi <yao.qi@linaro.org>
5182 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5183 argument insn. Remove local variable insn. Don't call
5185 (aarch64_install_fast_tracepoint_jump_pad): Call
5188 2015-09-30 Yao Qi <yao.qi@linaro.org>
5190 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5191 (emit_load_store_pair): Likewise.
5193 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5195 * dll.c (match_dll): Add cast(s).
5196 (unloaded_dll): Likewise.
5197 * linux-low.c (second_thread_of_pid_p): Likewise.
5198 (delete_lwp_callback): Likewise.
5199 (count_events_callback): Likewise.
5200 (select_event_lwp_callback): Likewise.
5201 (linux_set_resume_request): Likewise.
5202 * server.c (accumulate_file_name_length): Likewise.
5203 (emit_dll_description): Likewise.
5204 (handle_qxfer_threads_worker): Likewise.
5205 (visit_actioned_threads): Likewise.
5206 * thread-db.c (any_thread_of): Likewise.
5207 * tracepoint.c (same_process_p): Likewise.
5208 (match_blocktype): Likewise.
5209 (build_traceframe_info_xml): Likewise.
5211 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5213 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5215 (gdb_unparse_agent_expr): Likewise.
5216 * hostio.c (require_data): Likewise.
5217 (handle_pread): Likewise.
5218 * linux-low.c (disable_regset): Likewise.
5219 (fetch_register): Likewise.
5220 (store_register): Likewise.
5221 (get_dynamic): Likewise.
5222 (linux_qxfer_libraries_svr4): Likewise.
5223 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5224 (set_fast_tracepoint_jump): Likewise.
5225 (uninsert_fast_tracepoint_jumps_at): Likewise.
5226 (reinsert_fast_tracepoint_jumps_at): Likewise.
5227 (validate_inserted_breakpoint): Likewise.
5228 (clone_agent_expr): Likewise.
5229 * regcache.c (init_register_cache): Likewise.
5230 * remote-utils.c (putpkt_binary_1): Likewise.
5231 (decode_M_packet): Likewise.
5232 (decode_X_packet): Likewise.
5233 (look_up_one_symbol): Likewise.
5234 (relocate_instruction): Likewise.
5235 (monitor_output): Likewise.
5236 * server.c (handle_search_memory): Likewise.
5237 (handle_qxfer_exec_file): Likewise.
5238 (handle_qxfer_libraries): Likewise.
5239 (handle_qxfer): Likewise.
5240 (handle_query): Likewise.
5241 (handle_v_cont): Likewise.
5242 (handle_v_run): Likewise.
5243 (captured_main): Likewise.
5244 * target.c (write_inferior_memory): Likewise.
5245 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5246 * tracepoint.c (init_trace_buffer): Likewise.
5247 (add_tracepoint_action): Likewise.
5248 (add_traceframe): Likewise.
5249 (add_traceframe_block): Likewise.
5250 (cmd_qtdpsrc): Likewise.
5251 (cmd_qtdv): Likewise.
5252 (cmd_qtstatus): Likewise.
5253 (response_source): Likewise.
5254 (response_tsv): Likewise.
5255 (cmd_qtnotes): Likewise.
5256 (gdb_collect): Likewise.
5257 (initialize_tracepoint): Likewise.
5259 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5261 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5262 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5263 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5265 (enum aarch64_condition_codes): New enum.
5266 (w0): New static global.
5269 (struct aarch64_memory_operand) <type>: New
5270 MEMORY_OPERAND_POSTINDEX type.
5271 (postindex_memory_operand): New helper function.
5272 (emit_ret): New function.
5273 (emit_load_store_pair): New function, factored out of emit_stp
5274 with support for MEMORY_OPERAND_POSTINDEX.
5275 (emit_stp): Rewrite using emit_load_store_pair.
5276 (emit_ldp): New function.
5277 (emit_load_store): Likewise.
5278 (emit_ldr): Mention post-index instruction in comment.
5279 (emit_ldrh): New function.
5280 (emit_ldrb): New function.
5281 (emit_ldrsw): Mention post-index instruction in comment.
5282 (emit_str): Likewise.
5283 (emit_subs): New function.
5284 (emit_cmp): Likewise.
5285 (emit_and): Likewise.
5286 (emit_orr): Likewise.
5287 (emit_orn): Likewise.
5288 (emit_eor): Likewise.
5289 (emit_mvn): Likewise.
5290 (emit_lslv): Likewise.
5291 (emit_lsrv): Likewise.
5292 (emit_asrv): Likewise.
5293 (emit_mul): Likewise.
5294 (emit_sbfm): Likewise.
5295 (emit_sbfx): Likewise.
5296 (emit_ubfm): Likewise.
5297 (emit_ubfx): Likewise.
5298 (emit_csinc): Likewise.
5299 (emit_cset): Likewise.
5300 (emit_nop): Likewise.
5301 (emit_ops_insns): New helper function.
5302 (emit_pop): Likewise.
5303 (emit_push): Likewise.
5304 (aarch64_emit_prologue): New function.
5305 (aarch64_emit_epilogue): Likewise.
5306 (aarch64_emit_add): Likewise.
5307 (aarch64_emit_sub): Likewise.
5308 (aarch64_emit_mul): Likewise.
5309 (aarch64_emit_lsh): Likewise.
5310 (aarch64_emit_rsh_signed): Likewise.
5311 (aarch64_emit_rsh_unsigned): Likewise.
5312 (aarch64_emit_ext): Likewise.
5313 (aarch64_emit_log_not): Likewise.
5314 (aarch64_emit_bit_and): Likewise.
5315 (aarch64_emit_bit_or): Likewise.
5316 (aarch64_emit_bit_xor): Likewise.
5317 (aarch64_emit_bit_not): Likewise.
5318 (aarch64_emit_equal): Likewise.
5319 (aarch64_emit_less_signed): Likewise.
5320 (aarch64_emit_less_unsigned): Likewise.
5321 (aarch64_emit_ref): Likewise.
5322 (aarch64_emit_if_goto): Likewise.
5323 (aarch64_emit_goto): Likewise.
5324 (aarch64_write_goto_address): Likewise.
5325 (aarch64_emit_const): Likewise.
5326 (aarch64_emit_call): Likewise.
5327 (aarch64_emit_reg): Likewise.
5328 (aarch64_emit_pop): Likewise.
5329 (aarch64_emit_stack_flush): Likewise.
5330 (aarch64_emit_zero_ext): Likewise.
5331 (aarch64_emit_swap): Likewise.
5332 (aarch64_emit_stack_adjust): Likewise.
5333 (aarch64_emit_int_call_1): Likewise.
5334 (aarch64_emit_void_call_2): Likewise.
5335 (aarch64_emit_eq_goto): Likewise.
5336 (aarch64_emit_ne_goto): Likewise.
5337 (aarch64_emit_lt_goto): Likewise.
5338 (aarch64_emit_le_goto): Likewise.
5339 (aarch64_emit_gt_goto): Likewise.
5340 (aarch64_emit_ge_got): Likewise.
5341 (aarch64_emit_ops_impl): New static global variable.
5342 (aarch64_emit_ops): New target function, return
5343 &aarch64_emit_ops_impl.
5344 (struct linux_target_ops): Install it.
5346 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5348 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5349 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5351 * linux-aarch64-ipa.c: New file.
5352 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5354 (aarch64_get_thread_area): New target method.
5355 (extract_signed_bitfield): New helper function.
5356 (aarch64_decode_ldr_literal): New function.
5357 (enum aarch64_opcodes): New enum.
5358 (struct aarch64_register): New struct.
5359 (struct aarch64_operand): New struct.
5360 (x0): New static global.
5369 (aarch64_register): New helper function.
5370 (register_operand): Likewise.
5371 (immediate_operand): Likewise.
5372 (struct aarch64_memory_operand): New struct.
5373 (offset_memory_operand): New helper function.
5374 (preindex_memory_operand): Likewise.
5375 (enum aarch64_system_control_registers): New enum.
5376 (ENCODE): New macro.
5377 (emit_insn): New helper function.
5378 (emit_b): New function.
5379 (emit_bcond): Likewise.
5380 (emit_cb): Likewise.
5381 (emit_tb): Likewise.
5382 (emit_blr): Likewise.
5383 (emit_stp): Likewise.
5384 (emit_ldp_q_offset): Likewise.
5385 (emit_stp_q_offset): Likewise.
5386 (emit_load_store): Likewise.
5387 (emit_ldr): Likewise.
5388 (emit_ldrsw): Likewise.
5389 (emit_str): Likewise.
5390 (emit_ldaxr): Likewise.
5391 (emit_stxr): Likewise.
5392 (emit_stlr): Likewise.
5393 (emit_data_processing_reg): Likewise.
5394 (emit_data_processing): Likewise.
5395 (emit_add): Likewise.
5396 (emit_sub): Likewise.
5397 (emit_mov): Likewise.
5398 (emit_movk): Likewise.
5399 (emit_mov_addr): Likewise.
5400 (emit_mrs): Likewise.
5401 (emit_msr): Likewise.
5402 (emit_sevl): Likewise.
5403 (emit_wfe): Likewise.
5404 (append_insns): Likewise.
5405 (can_encode_int32_in): New helper function.
5406 (aarch64_relocate_instruction): New function.
5407 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5408 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5409 (struct linux_target_ops): Install aarch64_get_thread_area,
5410 aarch64_install_fast_tracepoint_jump_pad and
5411 aarch64_get_min_fast_tracepoint_insn_len.
5413 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5415 * Makefile.in (aarch64-insn.o): New rule.
5416 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5418 2015-09-21 Yao Qi <yao.qi@linaro.org>
5420 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5422 2015-09-21 Yao Qi <yao.qi@linaro.org>
5424 * tracepoint.c (max_jump_pad_size): Remove.
5426 2015-09-18 Yao Qi <yao.qi@linaro.org>
5428 * linux-aarch64-low.c: Don't include sys/uio.h.
5429 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5431 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5433 * tracepoint.c (eval_result_type): Change prototype.
5434 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5436 2015-09-15 Pedro Alves <palves@redhat.com>
5438 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5439 Check whether to report exec events instead of checking whether
5440 multiprocess is enabled.
5442 2015-09-15 Pedro Alves <palves@redhat.com>
5445 * remote-utils.c (prepare_resume_reply): Merge
5446 TARGET_WAITKIND_VFORK_DONE switch case with the
5447 TARGET_WAITKIND_FORKED case.
5449 2015-09-15 Yao Qi <yao.qi@linaro.org>
5451 * server.c (handle_query): Check string comparison using
5452 "else if" instead of "if".
5454 2015-09-15 Yao Qi <yao.qi@linaro.org>
5456 * server.c (vCont_supported): New global variable.
5457 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5458 matches. Append ";vContSupported+" to own_buf.
5459 (handle_v_requests): Append ";s;S" to own_buf if target supports
5460 hardware single step or vCont_supported is false.
5461 (capture_main): Set vCont_supported to zero.
5463 2015-09-15 Yao Qi <yao.qi@linaro.org>
5465 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5467 (linux_supports_hardware_single_step): ... New function.
5468 (linux_target_ops): Update.
5469 * lynx-low.c (lynx_target_ops): Set field
5470 supports_hardware_single_step to target_can_do_hardware_single_step.
5471 * nto-low.c (nto_target_ops): Likewise.
5472 * spu-low.c (spu_target_ops): Likewise.
5473 * win32-low.c (win32_target_ops): Likewise.
5474 * target.c (target_can_do_hardware_single_step): New function.
5475 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5476 Remove. <supports_hardware_single_step>: New field.
5477 (target_supports_conditional_breakpoints): Remove.
5478 (target_supports_hardware_single_step): New macro.
5479 (target_can_do_hardware_single_step): Declare.
5480 * server.c (handle_query): Use target_supports_hardware_single_step
5481 instead of target_supports_conditional_breakpoints.
5483 2015-09-15 Yao Qi <yao.qi@linaro.org>
5485 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5487 (struct linux_target_ops the_low_target): Install
5488 aarch64_linux_siginfo_fixup.
5490 2015-09-11 Don Breazeal <donb@codesourcery.com>
5491 Luis Machado <lgustavo@codesourcery.com>
5493 * linux-low.c (linux_mourn): Static declaration.
5494 (linux_arch_setup): Move in front of
5495 handle_extended_wait.
5496 (linux_arch_setup_thread): New function.
5497 (handle_extended_wait): Handle exec events. Call
5498 linux_arch_setup_thread. Make event_lwp argument a
5499 pointer-to-a-pointer.
5500 (check_zombie_leaders): Do not check stopped threads.
5501 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5502 (linux_low_filter_event): Add lwp and thread for exec'ing
5503 non-leader thread if leader thread has been deleted.
5504 Refactor code into linux_arch_setup_thread and call it.
5505 Pass child lwp pointer by reference to handle_extended_wait.
5506 (linux_wait_for_event_filtered): Update comment.
5507 (linux_wait_1): Prevent clobbering exec event status.
5508 (linux_supports_exec_events): New function.
5509 (linux_target_ops) <supports_exec_events>: Initialize new member.
5510 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5512 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5513 * server.c (report_exec_events): New global variable.
5514 (handle_query): Handle qSupported query for exec-events feature.
5515 (captured_main): Initialize report_exec_events.
5516 * server.h (report_exec_events): Declare new global variable.
5517 * target.h (struct target_ops) <supports_exec_events>: New
5519 (target_supports_exec_events): New macro.
5520 * win32-low.c (win32_target_ops) <supports_exec_events>:
5521 Initialize new member.
5523 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5525 * linux-low.c (linux_low_enable_btrace): Remove.
5526 (linux_target_ops): Replace linux_low_enable_btrace with
5527 linux_enable_btrace.
5529 2015-09-03 Yao Qi <yao.qi@linaro.org>
5531 * linux-aarch64-low.c (aarch64_insert_point): Call
5532 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5535 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5537 * linux-low.c (check_stopped_by_breakpoint): Use
5538 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5540 2015-08-27 Pedro Alves <palves@redhat.com>
5542 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5544 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5546 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5547 the XNEW-family equivalent.
5548 (compile_bytecodes): Likewise.
5549 * dll.c (loaded_dll): Likewise.
5550 * event-loop.c (append_callback_event): Likewise.
5551 (create_file_handler): Likewise.
5552 (create_file_event): Likewise.
5553 * hostio.c (handle_open): Likewise.
5554 * inferiors.c (add_thread): Likewise.
5555 (add_process): Likewise.
5556 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5557 * linux-arm-low.c (arm_new_process): Likewise.
5558 (arm_new_thread): Likewise.
5559 * linux-low.c (add_to_pid_list): Likewise.
5560 (linux_add_process): Likewise.
5561 (handle_extended_wait): Likewise.
5562 (add_lwp): Likewise.
5563 (enqueue_one_deferred_signal): Likewise.
5564 (enqueue_pending_signal): Likewise.
5565 (linux_resume_one_lwp_throw): Likewise.
5566 (linux_resume_one_thread): Likewise.
5567 (linux_read_memory): Likewise.
5568 (linux_write_memory): Likewise.
5569 * linux-mips-low.c (mips_linux_new_process): Likewise.
5570 (mips_linux_new_thread): Likewise.
5571 (mips_add_watchpoint): Likewise.
5572 * linux-x86-low.c (initialize_low_arch): Likewise.
5573 * lynx-low.c (lynx_add_process): Likewise.
5574 * mem-break.c (set_raw_breakpoint_at): Likewise.
5575 (set_breakpoint): Likewise.
5576 (add_condition_to_breakpoint): Likewise.
5577 (add_commands_to_breakpoint): Likewise.
5578 (clone_agent_expr): Likewise.
5579 (clone_one_breakpoint): Likewise.
5580 * regcache.c (new_register_cache): Likewise.
5581 * remote-utils.c (look_up_one_symbol): Likewise.
5582 * server.c (queue_stop_reply): Likewise.
5583 (start_inferior): Likewise.
5584 (queue_stop_reply_callback): Likewise.
5585 (handle_target_event): Likewise.
5586 * spu-low.c (fetch_ppc_memory): Likewise.
5587 (store_ppc_memory): Likewise.
5588 * target.c (set_target_ops): Likewise.
5589 * thread-db.c (thread_db_load_search): Likewise.
5590 (try_thread_db_load_1): Likewise.
5591 * tracepoint.c (add_tracepoint): Likewise.
5592 (add_tracepoint_action): Likewise.
5593 (create_trace_state_variable): Likewise.
5594 (cmd_qtdpsrc): Likewise.
5595 (cmd_qtro): Likewise.
5596 (add_while_stepping_state): Likewise.
5597 * win32-low.c (child_add_thread): Likewise.
5598 (get_image_name): Likewise.
5600 2015-08-25 Yao Qi <yao.qi@linaro.org>
5602 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5604 2015-08-25 Yao Qi <yao.qi@linaro.org>
5606 * Makefile.in (aarch64-linux.o): New rule.
5607 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5609 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5610 (aarch64_init_debug_reg_state): Make it extern.
5611 (aarch64_linux_prepare_to_resume): Remove.
5613 2015-08-25 Yao Qi <yao.qi@linaro.org>
5615 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5616 lwp_arch_private_info and ptid_of_lwp.
5618 2015-08-25 Yao Qi <yao.qi@linaro.org>
5620 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5621 Find proc_info by find_process_pid. All callers updated.
5623 2015-08-25 Yao Qi <yao.qi@linaro.org>
5625 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5627 (debug_reg_change_callback): Remove.
5628 (aarch64_notify_debug_reg_change): Remove.
5630 2015-08-25 Yao Qi <yao.qi@linaro.org>
5632 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5633 Call current_lwp_ptid.
5635 2015-08-25 Yao Qi <yao.qi@linaro.org>
5637 * linux-aarch64-low.c (debug_reg_change_callback): Use
5640 2015-08-25 Yao Qi <yao.qi@linaro.org>
5642 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5644 2015-08-25 Yao Qi <yao.qi@linaro.org>
5646 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5648 2015-08-25 Yao Qi <yao.qi@linaro.org>
5650 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5653 2015-08-25 Yao Qi <yao.qi@linaro.org>
5655 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5657 (debug_reg_change_callback): Remove argument entry and add argument
5658 lwp. Remove local variable thread. Don't print thread id in the
5659 debugging output. Don't check whether pid of thread equals to pid.
5660 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5661 iterate_over_lwps instead find_inferior.
5663 2015-08-24 Pedro Alves <palves@redhat.com>
5665 * inferiors.c (get_first_process): New function.
5666 * inferiors.h (get_first_process): New declaration.
5667 * remote-utils.c (read_ptid): Default to the first process in the
5668 list, instead of to the current thread's process.
5670 2015-08-24 Pedro Alves <palves@redhat.com>
5672 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5673 * event-loop.c: Likewise.
5674 * remote-utils.c: Likewise.
5675 * tracepoint.c: Likewise.
5677 2015-08-24 Pedro Alves <palves@redhat.com>
5679 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5682 2015-08-21 Pedro Alves <palves@redhat.com>
5684 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5685 instead of literal 1.
5687 2015-08-21 Pedro Alves <palves@redhat.com>
5689 * tdesc.c (default_description): Explicitly zero-initialize.
5691 2015-08-21 Pedro Alves <palves@redhat.com>
5694 * inferiors.c (remove_thread): Discard any pending stop reply for
5696 * server.c (remove_all_on_match_pid): Rename to ...
5697 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5699 (discard_queued_stop_replies): Change parameter to a ptid. Now
5701 (handle_v_kill, kill_inferior_callback, captured_main)
5702 (process_serial_event): Adjust.
5703 * server.h (discard_queued_stop_replies): Declare.
5705 2015-08-21 Pedro Alves <palves@redhat.com>
5707 * linux-low.c (wait_for_sigstop): Always switch to no thread
5708 selected if the previously current thread dies.
5709 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5710 process instead of the current thread's.
5711 * remote-utils.c (input_interrupt): Don't check if there's no
5713 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5714 current thread to the general thread fails, error out.
5715 (handle_qxfer_auxv, handle_qxfer_libraries)
5716 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5717 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5718 (handle_query): Check if there's a thread selected instead of
5719 checking whether there's any thread in the thread list.
5720 (handle_qxfer_threads, handle_qxfer_btrace)
5721 (handle_qxfer_btrace_conf): Don't error out early if there's no
5722 thread in the thread list.
5723 (handle_v_cont, myresume): Don't set the current thread to the
5725 (process_serial_event) <Hg handling>: Also set thread_id if the
5726 previous general thread is still alive.
5727 (process_serial_event) <g/G handling>: If setting the current
5728 thread to the general thread fails, error out.
5729 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5730 thread's lwp instead of the current thread's.
5731 * target.c (set_desired_thread): If the desired thread was not
5732 found, leave the current thread pointing to NULL. Return an int
5733 (boolean) indicating success.
5734 * target.h (set_desired_thread): Change return type to int.
5736 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5738 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5739 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5741 (ps_get_thread_area): New function.
5743 2015-08-19 Gary Benson <gbenson@redhat.com>
5745 * hostio.c (handle_pread): Do not attempt to read more data
5746 than hostio_reply_with_data can fit in a packet.
5748 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5750 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5752 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5754 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5756 2015-08-06 Pedro Alves <palves@redhat.com>
5758 * tracepoint.c (expr_eval_result): Now an int.
5760 2015-08-06 Pedro Alves <palves@redhat.com>
5762 * gdbthread.h (struct regcache): Forward declare.
5763 (struct thread_info) <regcache_data>: Now a struct regcache
5765 * inferiors.c (inferior_regcache_data)
5766 (set_inferior_regcache_data): Now work with struct regcache
5768 * inferiors.h (struct regcache): Forward declare.
5769 (inferior_regcache_data, set_inferior_regcache_data): Now work
5770 with struct regcache pointers.
5771 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5772 (free_register_cache_thread): Remove struct regcache pointer
5775 2015-08-06 Pedro Alves <palves@redhat.com>
5777 * server.c (captured_main): On error, print the exception message
5778 to stderr, and if run_once is set, throw a quit.
5780 2015-08-06 Pedro Alves <palves@redhat.com>
5782 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5785 2015-08-06 Pedro Alves <palves@redhat.com>
5787 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5788 reading beyond the passed in buffer length.
5790 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5792 * tracepoint.c (symbol_list) <required>: Remove.
5794 2015-08-06 Pedro Alves <palves@redhat.com>
5796 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5797 count if stopping and suspending threads.
5798 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5799 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5800 (linux_detach): Complete an ongoing step-over.
5801 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5803 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5804 (linux_wait_1): If passing a signal to the inferior after
5805 finishing a step-over, unsuspend and re-resume all lwps. If we
5806 see a single-step event but the thread should be continuing, don't
5807 pass the trap to gdb.
5808 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5809 internal_error instead of gdb_assert.
5810 (enqueue_pending_signal): New function.
5811 (check_ptrace_stopped_lwp_gone): Add debug output.
5812 (start_step_over): Use internal_error instead of gdb_assert.
5813 (complete_ongoing_step_over): New function.
5814 (linux_resume_one_thread): Don't resume a suspended thread.
5815 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5818 2015-08-06 Pedro Alves <palves@redhat.com>
5820 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5821 (linux_thread_alive): Use lwp_is_marked_dead.
5822 (extended_event_reported): Delete.
5823 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5824 instead of extended_event_reported.
5825 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5827 (lwp_is_marked_dead): New function.
5828 (lwp_running): Use lwp_is_marked_dead.
5829 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5832 2015-08-06 Pedro Alves <palves@redhat.com>
5834 * linux-low.c (linux_wait_1): Move fork event output out of the
5835 !report_to_gdb check. Pass event_child->waitstatus to
5836 target_waitstatus_to_string instead of ourstatus.
5838 2015-08-04 Yao Qi <yao.qi@linaro.org>
5840 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5841 if current_thread is 32 bit.
5843 2015-08-04 Yao Qi <yao.qi@linaro.org>
5845 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5846 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5847 * server.c (extended_protocol): Remove "static".
5848 * server.h (extended_protocol): Declare it.
5850 2015-08-04 Yao Qi <yao.qi@linaro.org>
5852 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5853 both aarch64 and aarch32.
5854 (aarch64_set_pc): Likewise.
5856 2015-08-04 Yao Qi <yao.qi@linaro.org>
5858 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5859 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5860 arm-with-neon.xml to srv_xmlfiles.
5861 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5862 (is_64bit_tdesc): New function.
5863 (aarch64_linux_read_description): New function.
5864 (aarch64_arch_setup): Call aarch64_linux_read_description.
5865 (regs_info): Rename to regs_info_aarch64.
5866 (aarch64_regs_info): Return right regs_info.
5867 (initialize_low_arch): Call initialize_low_arch_aarch32.
5869 2015-08-04 Yao Qi <yao.qi@linaro.org>
5871 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5872 * linux-aarch32-low.c: New file.
5873 * linux-aarch32-low.h: New file.
5874 * linux-arm-low.c (arm_fill_gregset): Move it to
5875 linux-aarch32-low.c.
5876 (arm_store_gregset): Likewise.
5877 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5878 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5879 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5880 (regs_info): Rename to regs_info_arm.
5881 (arm_regs_info): Return regs_info_aarch32 if
5882 have_ptrace_getregset is 1 and target description is
5883 arm_with_neon or arm_with_vfpv3.
5884 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5885 Call initialize_low_arch_aarch32 instead.
5887 2015-08-04 Yao Qi <yao.qi@linaro.org>
5889 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5890 * linux-low.c: ... here.
5891 * linux-low.h (have_ptrace_getregset): Declare it.
5893 2015-08-04 Pedro Alves <palves@redhat.com>
5895 * thread-db.c (struct thread_db): Use new typedefs.
5896 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5898 (disable_thread_event_reporting): Cast result of dlsym to
5899 destination function pointer type.
5900 (thread_db_mourn): Use td_ta_delete_ftype.
5902 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5904 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5906 (CDX_BREAKPOINT): Define for R2.
5907 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5908 (the_low_target): Add comments.
5910 2015-07-30 Yao Qi <yao.qi@linaro.org>
5912 * linux-arm-low.c (arm_hwcap): Remove it.
5913 (arm_read_description): New local variable arm_hwcap. Don't
5914 set arm_hwcap to zero.
5916 2015-07-30 Yao Qi <yao.qi@linaro.org>
5918 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5919 Use regcache->tdesc instead.
5920 (arm_store_wmmxregset): Likewise.
5921 (arm_fill_vfpregset): Likewise.
5922 (arm_store_vfpregset): Likewise.
5924 2015-07-30 Yao Qi <yao.qi@linaro.org>
5926 * linux-arm-low.c: Include arch/arm.h.
5927 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5928 (arm_store_gregset): Likewise.
5930 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5932 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5933 ptrace's 4th parameter.
5935 2015-07-27 Yao Qi <yao.qi@linaro.org>
5937 * configure.srv (case aarch64*-*-linux*): Don't set
5940 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5942 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5944 * linux-arm-low.c: Likewise.
5945 * linux-cris-low.c: Likewise.
5946 * linux-crisv32-low.c: Likewise.
5947 * linux-low.c: Likewise.
5948 * linux-m68k-low.c: Likewise.
5949 * linux-mips-low.c: Likewise.
5950 * linux-nios2-low.c: Likewise.
5951 * linux-s390-low.c: Likewise.
5952 * linux-sparc-low.c: Likewise.
5953 * linux-tic6x-low.c: Likewise.
5954 * linux-tile-low.c: Likewise.
5955 * linux-x86-low.c: Likewise.
5957 2015-07-24 Pedro Alves <palves@redhat.com>
5959 * config.in: Regenerate.
5960 * configure: Regenerate.
5962 2015-07-24 Pedro Alves <palves@redhat.com>
5964 * acinclude.m4: Include ../ptrace.m4.
5965 * configure.ac: Call GDB_AC_PTRACE.
5966 * config.in, configure: Regenerate.
5968 2015-07-24 Yao Qi <yao.qi@linaro.org>
5970 * linux-low.c (linux_create_inferior): Remove setting to
5971 proc->priv->new_inferior.
5972 (linux_attach): Likewise.
5973 (linux_low_filter_event): Likewise.
5974 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5976 2015-07-24 Yao Qi <yao.qi@linaro.org>
5978 * linux-low.c (linux_arch_setup): New function.
5979 (linux_low_filter_event): If proc->tdesc is NULL and
5980 proc->attached is true, call the_low_target.arch_setup.
5981 Otherwise, keep status pending, and return.
5982 (linux_resume_one_lwp_throw): Don't call get_pc if
5983 thread->while_stepping isn't NULL. Don't call
5984 get_thread_regcache if proc->tdesc is NULL.
5985 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5986 (linux_target_ops): Install arch_setup.
5987 * server.c (start_inferior): Call the_target->arch_setup.
5988 * target.h (struct target_ops) <arch_setup>: New field.
5989 (target_arch_setup): New marco.
5990 * lynx-low.c (lynx_target_ops): Update.
5991 * nto-low.c (nto_target_ops): Update.
5992 * spu-low.c (spu_target_ops): Update.
5993 * win32-low.c (win32_target_ops): Update.
5995 2015-07-24 Yao Qi <yao.qi@linaro.org>
5997 * linux-low.c (linux_add_process): Don't set
5998 proc->priv->new_inferior.
5999 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6000 (linux_attach): Likewise.
6002 2015-07-24 Yao Qi <yao.qi@linaro.org>
6004 * server.c (start_inferior): Code refactor.
6006 2015-07-24 Yao Qi <yao.qi@linaro.org>
6008 * server.c (process_serial_event): Set general_thread.
6010 2015-07-21 Yao Qi <yao.qi@linaro.org>
6012 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6013 aarch64_linux_get_debug_reg_capacity.
6015 2015-07-17 Yao Qi <yao.qi@linaro.org>
6017 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6018 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6019 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6020 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6021 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6022 (AARCH64_HWP_ALIGNMENT): Likewise.
6023 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6024 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6025 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6026 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6027 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6028 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6029 (struct aarch64_debug_reg_state): Likewise.
6030 (struct arch_lwp_info): Likewise.
6031 (aarch64_align_watchpoint): Likewise.
6032 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6033 (aarch64_watchpoint_length): Likewise.
6034 (aarch64_point_encode_ctrl_reg): Likewise
6035 (aarch64_point_is_aligned): Likewise.
6036 (aarch64_align_watchpoint): Likewise.
6037 (aarch64_linux_set_debug_regs):
6038 (aarch64_dr_state_insert_one_point): Likewise.
6039 (aarch64_dr_state_remove_one_point): Likewise.
6040 (aarch64_handle_breakpoint): Likewise.
6041 (aarch64_handle_aligned_watchpoint): Likewise.
6042 (aarch64_handle_unaligned_watchpoint): Likewise.
6043 (aarch64_handle_watchpoint): Likewise.
6045 2015-07-17 Yao Qi <yao.qi@linaro.org>
6047 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6048 and don't aarch64_get_debug_reg_state. All callers update.
6049 (aarch64_handle_aligned_watchpoint): Likewise.
6050 (aarch64_handle_unaligned_watchpoint): Likewise.
6051 (aarch64_handle_watchpoint): Likewise.
6052 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6053 (aarch64_remove_point): Likewise.
6055 2015-07-17 Yao Qi <yao.qi@linaro.org>
6057 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6059 (aarch64_handle_unaligned_watchpoint): Likewise.
6061 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6063 Revert the previous 3 commits:
6064 Move gdb_regex* to common/
6065 Move linux_find_memory_regions_full & co.
6066 gdbserver build-id attribute generator
6068 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6069 Jan Kratochvil <jan.kratochvil@redhat.com>
6071 gdbserver build-id attribute generator.
6072 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6073 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6074 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6076 (get_dynamic): Use find_pdhr to traverse program headers.
6077 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6078 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6079 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6080 (get_hex_build_id): New.
6081 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6082 to reply XML document.
6084 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6085 Jan Kratochvil <jan.kratochvil@redhat.com>
6087 * target.c: Include target/target-utils.h and fcntl.h.
6088 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6089 (target_fileio_read_stralloc): New functions.
6091 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6093 * Makefile.in (OBS): Add gdb_regex.o.
6095 * config.in: Rebuilt.
6096 * configure: Rebuilt.
6098 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6099 Jan Kratochvil <jan.kratochvil@redhat.com>
6101 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6102 * Makefile.in (OBS): Add target-utils.o.
6103 (linux-maps.o, target-utils.o): New.
6104 * configure.srv (srv_linux_obj): Add linux-maps.o.
6106 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6108 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6110 (the_low_target): Install it.
6112 2015-07-14 Pedro Alves <palves@redhat.com>
6114 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6115 Instead, ignore ECHILD, and throw an error for other errnos.
6117 2015-07-10 Pedro Alves <palves@redhat.com>
6119 * event-loop.c (struct callback_event) <data>: Change type to
6120 gdb_client_data instance instead of gdb_client_data pointer.
6121 (append_callback_event): Adjust.
6123 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6125 * linux-aarch64-low.c: Add comments for each linux_target_ops
6126 method. Remove comments already covered in target_ops and
6127 linux_target_ops definitions.
6128 (the_low_target): Add comments for each unimplemented method.
6130 2015-07-09 Yao Qi <yao.qi@linaro.org>
6132 * linux-aarch64-low.c (aarch64_regmap): Remove.
6133 (aarch64_usrregs_info): Remove.
6134 (regs_info): Set field usrregs to NULL.
6136 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6138 * linux-low.c: Include "rsp-low.h"
6139 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6140 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6141 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6142 (handle_btrace_enable_pt): New.
6143 (handle_btrace_general_set): Support "pt".
6144 (handle_btrace_conf_general_set): Support "pt:size".
6146 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6148 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6151 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6153 * linux-aarch64-low.c: Remove comment about endianness.
6154 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6155 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6158 2015-06-24 Gary Benson <gbenson@redhat.com>
6160 * linux-i386-ipa.c (stdint.h): Do not include.
6161 * lynx-i386-low.c (stdint.h): Likewise.
6162 * lynx-ppc-low.c (stdint.h): Likewise.
6163 * mem-break.c (stdint.h): Likewise.
6164 * thread-db.c (stdint.h): Likewise.
6165 * tracepoint.c (stdint.h): Likewise.
6166 * win32-low.c (stdint.h): Likewise.
6168 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6170 * server.c (write_qxfer_response): Update call to
6171 remote_escape_output.
6173 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6174 Jan Kratochvil <jan.kratochvil@redhat.com>
6176 Merge multiple hex conversions.
6177 * gdbreplay.c (tohex): Rename to 'fromhex'.
6178 (logchar): Use fromhex.
6180 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6182 * server.c (handle_qxfer_libraries): Set `version' attribute for
6185 2015-06-10 Gary Benson <gbenson@redhat.com>
6187 * target.h (struct target_ops) <multifs_open>: New field.
6188 <multifs_unlink>: Likewise.
6189 <multifs_readlink>: Likewise.
6190 * linux-low.c (nat/linux-namespaces.h): New include.
6191 (linux_target_ops): Initialize the_target->multifs_open,
6192 the_target->multifs_unlink and the_target->multifs_readlink.
6193 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6194 * hostio.c (hostio_fs_pid): New static variable.
6195 (hostio_handle_new_gdb_connection): New function.
6196 (handle_setfs): Likewise.
6197 (handle_open): Use the_target->multifs_open as appropriate.
6198 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6199 (handle_readlink): Use the_target->multifs_readlink as
6201 (handle_vFile): Handle vFile:setfs packets.
6202 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6203 after target_handle_new_gdb_connection.
6205 2015-06-10 Gary Benson <gbenson@redhat.com>
6207 * configure.ac (AC_CHECK_FUNCS): Add setns.
6208 * config.in: Regenerate.
6209 * configure: Likewise.
6210 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6211 (linux-namespaces.o): New rule.
6212 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6214 2015-06-09 Gary Benson <gbenson@redhat.com>
6216 * hostio.c (handle_open): Process mode argument with
6217 fileio_to_host_mode.
6219 2015-06-01 Yao Qi <yao.qi@linaro.org>
6221 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6222 * linux-x86-low.c: Likewise.
6224 2015-05-28 Don Breazeal <donb@codesourcery.com>
6226 * linux-low.c (handle_extended_wait): Initialize
6227 thread_info.last_resume_kind for new fork children.
6229 2015-05-15 Pedro Alves <palves@redhat.com>
6231 * target.h (target_handle_new_gdb_connection): Rewrite using if
6232 wrapped in do/while.
6234 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6236 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6237 * configure, config.in: Regenerate.
6238 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6241 2015-05-12 Don Breazeal <donb@codesourcery.com>
6243 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6244 PTRACE_EVENT_VFORK_DONE.
6245 (linux_low_ptrace_options, extended_event_reported): Add vfork
6247 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6248 and "vforkdone" for RSP 'T' Stop Reply Packet.
6249 * server.h (report_vfork_events): Declare
6252 2015-05-12 Don Breazeal <donb@codesourcery.com>
6254 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6255 (the_low_target) <new_fork>: Initialize new member.
6256 * linux-arm-low.c (arm_new_fork): New function.
6257 (the_low_target) <new_fork>: Initialize new member.
6258 * linux-low.c (handle_extended_wait): Call new target function
6260 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6261 * linux-mips-low.c (mips_add_watchpoint): New function
6262 extracted from mips_insert_point.
6263 (the_low_target) <new_fork>: Initialize new member.
6264 (mips_linux_new_fork): New function.
6265 (mips_insert_point): Call mips_add_watchpoint.
6266 * linux-x86-low.c (x86_linux_new_fork): New function.
6267 (the_low_target) <new_fork>: Initialize new member.
6269 2015-05-12 Don Breazeal <donb@codesourcery.com>
6271 * linux-low.c (handle_extended_wait): Implement return value,
6272 rename argument 'event_child' to 'event_lwp', handle
6273 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6274 (linux_low_ptrace_options): New function.
6275 (linux_low_filter_event): Call linux_low_ptrace_options,
6276 use different argument fo linux_enable_event_reporting,
6277 use return value from handle_extended_wait.
6278 (extended_event_reported): New function.
6279 (linux_wait_1): Call extended_event_reported and set
6280 status to report fork events.
6281 (linux_write_memory): Add pid to debug message.
6282 (reset_lwp_ptrace_options_callback): New function.
6283 (linux_handle_new_gdb_connection): New function.
6284 (linux_target_ops): Initialize new structure member.
6285 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6286 * lynx-low.c: Initialize new structure member.
6287 * remote-utils.c (prepare_resume_reply): Implement stop reason
6288 "fork" for "T" stop message.
6289 * server.c (handle_query): Call handle_new_gdb_connection.
6290 * server.h (report_fork_events): Declare global flag.
6291 * target.h (struct target_ops) <handle_new_gdb_connection>:
6293 (target_handle_new_gdb_connection): New macro.
6294 * win32-low.c: Initialize new structure member.
6296 2015-05-12 Don Breazeal <donb@codesourcery.com>
6298 * mem-break.c (APPEND_TO_LIST): Define macro.
6299 (clone_agent_expr): New function.
6300 (clone_one_breakpoint): New function.
6301 (clone_all_breakpoints): New function.
6302 * mem-break.h: Declare new functions.
6304 2015-05-12 Don Breazeal <donb@codesourcery.com>
6306 * linux-low.c (linux_supports_fork_events): New function.
6307 (linux_supports_vfork_events): New function.
6308 (linux_target_ops): Initialize new structure members.
6309 (initialize_low): Call linux_check_ptrace_features.
6310 * lynx-low.c (lynx_target_ops): Initialize new structure
6312 * server.c (report_fork_events, report_vfork_events):
6314 (handle_query): Add new features to qSupported packet and
6316 (captured_main): Initialize new global variables.
6317 * target.h (struct target_ops) <supports_fork_events>:
6319 <supports_vfork_events>: New member.
6320 (target_supports_fork_events): New macro.
6321 (target_supports_vfork_events): New macro.
6322 * win32-low.c (win32_target_ops): Initialize new structure
6325 2015-05-12 Gary Benson <gbenson@redhat.com>
6327 * server.c (handle_qxfer_exec_file): Use current process
6330 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6332 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6333 Remove HAVE_PTRACE_GETREGS conditionals.
6334 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6335 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6337 2015-05-08 Yao Qi <yao.qi@linaro.org>
6339 * linux-low.c (linux_supports_conditional_breakpoints): New
6341 (linux_target_ops): Install new target method.
6342 * lynx-low.c (lynx_target_ops): Install NULL hook for
6343 supports_conditional_breakpoints.
6344 * nto-low.c (nto_target_ops): Likewise.
6345 * spu-low.c (spu_target_ops): Likewise.
6346 * win32-low.c (win32_target_ops): Likewise.
6347 * server.c (handle_query): Check
6348 target_supports_conditional_breakpoints.
6349 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6351 (target_supports_conditional_breakpoints): New macro.
6353 2015-05-06 Pedro Alves <palves@redhat.com>
6356 * server.c (start_inferior): If the process exits, mourn it.
6358 2015-04-21 Gary Benson <gbenson@redhat.com>
6360 * hostio.c (fileio_open_flags_to_host): Factored out to
6361 fileio_to_host_openflags in common/fileio.c. Single use
6364 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6366 * linux-xtensa-low.c (xtensa_fill_gregset)
6367 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6370 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6372 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6373 (regs_info): Replace usrregs pointer with NULL.
6375 2015-04-17 Gary Benson <gbenson@redhat.com>
6377 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6378 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6379 * server.c (handle_qxfer_exec_file): New function.
6380 (qxfer_packets): Add exec-file entry.
6381 (handle_query): Report qXfer:exec-file:read as supported packet.
6383 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6385 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6387 2015-04-09 Gary Benson <gbenson@redhat.com>
6389 * hostio-errno.c (errno_to_fileio_error): Remove function.
6390 Update caller to use remote_fileio_to_fio_error.
6392 2015-04-09 Yao Qi <yao.qi@linaro.org>
6394 * linux-low.c (linux_insert_point): Call
6395 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6396 (linux_remove_point): Call remove_memory_breakpoint if type is
6398 * linux-x86-low.c (x86_insert_point): Don't call
6399 insert_memory_breakpoint.
6400 (x86_remove_point): Don't call remove_memory_breakpoint.
6402 2015-04-01 Pedro Alves <palves@redhat.com>
6403 Cleber Rosa <crosa@redhat.com>
6405 * server.c (gdbserver_usage): Reorganize and extend the usage
6408 2015-03-24 Pedro Alves <palves@redhat.com>
6410 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6411 output. Also dump TRAP_TRACE.
6412 (linux_low_filter_event): In debug output, distinguish a
6413 resume_stop SIGSTOP from a delayed SIGSTOP.
6415 2015-03-24 Gary Benson <gbenson@redhat.com>
6417 * linux-x86-low.c (x86_linux_new_thread): Moved to
6419 (x86_linux_prepare_to_resume): Likewise.
6421 2015-03-24 Gary Benson <gbenson@redhat.com>
6423 * Makefile.in (x86-linux-dregs.o): New rule.
6424 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6425 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6426 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6427 (x86_linux_dr_get): Likewise.
6428 (x86_linux_dr_set): Likewise.
6429 (update_debug_registers_callback): Likewise.
6430 (x86_linux_dr_set_addr): Likewise.
6431 (x86_linux_dr_get_addr): Likewise.
6432 (x86_linux_dr_set_control): Likewise.
6433 (x86_linux_dr_get_control): Likewise.
6434 (x86_linux_dr_get_status): Likewise.
6435 (x86_linux_update_debug_registers): Likewise.
6437 2015-03-24 Gary Benson <gbenson@redhat.com>
6439 * linux-x86-low.c (x86_linux_update_debug_registers):
6440 New function, factored out from...
6441 (x86_linux_prepare_to_resume): ...this.
6443 2015-03-24 Gary Benson <gbenson@redhat.com>
6445 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6446 (x86_linux_dr_set): Likewise.
6447 (update_debug_registers_callback): Likewise.
6448 (x86_linux_dr_set_addr): Likewise.
6449 (x86_linux_dr_get_addr): Likewise.
6450 (x86_linux_dr_set_control): Likewise.
6451 (x86_linux_dr_get_control): Likewise.
6452 (x86_linux_dr_get_status): Likewise.
6453 (x86_linux_prepare_to_resume): Likewise.
6455 2015-03-24 Gary Benson <gbenson@redhat.com>
6457 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6458 Use perror_with_name. Pass string through gettext.
6459 (x86_linux_dr_set): Likewise.
6461 2015-03-24 Gary Benson <gbenson@redhat.com>
6463 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6464 (x86_linux_dr_set_addr): ...this.
6465 (x86_dr_low_get_addr): Rename to...
6466 (x86_linux_dr_get_addr): ...this.
6467 (x86_dr_low_set_control): Rename to...
6468 (x86_linux_dr_set_control): ...this.
6469 (x86_dr_low_get_control): Rename to...
6470 (x86_linux_dr_get_control): ...this.
6471 (x86_dr_low_get_status): Rename to...
6472 (x86_linux_dr_get_status): ...this.
6473 (x86_dr_low): Update with new function names.
6475 2015-03-24 Gary Benson <gbenson@redhat.com>
6477 * Makefile.in (x86-linux.o): New rule.
6478 * configure.srv: Add x86-linux.o to relevant targets.
6479 * linux-low.c (lwp_set_arch_private_info): New function.
6480 (lwp_arch_private_info): Likewise.
6481 * linux-x86-low.c: Include nat/x86-linux.h.
6482 (arch_lwp_info): Removed structure.
6483 (update_debug_registers_callback):
6484 Use lwp_set_debug_registers_changed.
6485 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6486 and lwp_set_debug_registers_changed.
6487 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6489 2015-03-24 Gary Benson <gbenson@redhat.com>
6491 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6492 * linux-arm-low.c (arm_new_thread): Likewise.
6493 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6494 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6495 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6496 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6498 2015-03-24 Gary Benson <gbenson@redhat.com>
6500 * linux-low.c (ptid_of_lwp): New function.
6501 (lwp_is_stopped): Likewise.
6502 (lwp_stop_reason): Likewise.
6503 * linux-x86-low.c (update_debug_registers_callback):
6505 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6508 2015-03-24 Gary Benson <gbenson@redhat.com>
6510 * linux-low.h (linux_stop_lwp): Remove declaration.
6512 2015-03-24 Gary Benson <gbenson@redhat.com>
6514 * linux-low.h: Include nat/linux-nat.h.
6515 * linux-low.c (iterate_over_lwps_args): New structure.
6516 (iterate_over_lwps_filter): New function.
6517 (iterate_over_lwps): Likewise.
6518 * linux-x86-low.c (update_debug_registers_callback):
6519 Update signature to what iterate_over_lwps expects.
6520 Remove PID check that iterate_over_lwps now performs.
6521 (x86_dr_low_set_addr): Use iterate_over_lwps.
6522 (x86_dr_low_set_control): Likewise.
6524 2015-03-24 Gary Benson <gbenson@redhat.com>
6526 * linux-x86-low.c (x86_debug_reg_state): New function.
6527 (x86_linux_prepare_to_resume): Use the above.
6529 2015-03-24 Gary Benson <gbenson@redhat.com>
6531 * linux-low.c (current_lwp_ptid): New function.
6532 * linux-x86-low.c: Include nat/linux-nat.h.
6533 (x86_dr_low_get_addr): Use current_lwp_ptid.
6534 (x86_dr_low_get_control): Likewise.
6535 (x86_dr_low_get_status): Likewise.
6537 2015-03-20 Pedro Alves <palves@redhat.com>
6539 * tracepoint.c (cmd_qtstatus): Make "str" const.
6541 2015-03-20 Pedro Alves <palves@redhat.com>
6543 * server.c (handle_general_set): Make "req_str" const.
6545 2015-03-19 Pedro Alves <palves@redhat.com>
6547 * linux-low.c (linux_resume_one_lwp): Rename to ...
6548 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6549 instead call perror_with_name.
6550 (check_ptrace_stopped_lwp_gone): New function.
6551 (linux_resume_one_lwp): Reimplement as wrapper around
6552 linux_resume_one_lwp_throw that swallows errors if the LWP is
6555 2015-03-19 Pedro Alves <palves@redhat.com>
6557 * linux-low.c (count_events_callback, select_event_lwp_callback):
6558 No longer check whether the thread has resume_stop as last resume
6561 2015-03-19 Pedro Alves <palves@redhat.com>
6563 * linux-low.c (count_events_callback, select_event_lwp_callback):
6564 Use the lwp's status_pending_p field, not the thread's.
6566 2015-03-19 Pedro Alves <palves@redhat.com>
6568 * linux-low.c (select_event_lwp_callback): Update comments to
6569 no longer mention SIGTRAP.
6571 2015-03-18 Gary Benson <gbenson@redhat.com>
6573 * server.c (handle_query): Do not report vFile:fstat as supported.
6575 2015-03-11 Gary Benson <gbenson@redhat.com>
6577 * hostio.c (sys/types.h): New include.
6578 (sys/stat.h): Likewise.
6579 (common-remote-fileio.h): Likewise.
6580 (handle_fstat): New function.
6581 (handle_vFile): Handle vFile:fstat packets.
6583 2015-03-11 Gary Benson <gbenson@redhat.com>
6585 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6586 struct stat.st_blocks and struct stat.st_blksize.
6587 * configure: Regenerate.
6588 * config.in: Likewise.
6589 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6590 (OBS): Add common-remote-fileio.o.
6591 (common-remote-fileio.o): New rule.
6593 2015-03-09 Pedro Alves <palves@redhat.com>
6595 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6596 'struct sockaddr' pointer in 'accept' call.
6598 2015-03-09 Pedro Alves <palves@redhat.com>
6601 2015-03-07 Pedro Alves <palves@redhat.com>
6602 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6603 or <winsock2.h> here. Instead include "gdb_socket.h".
6604 (remote_open): Use union gdb_sockaddr_u.
6605 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6606 or <winsock2.h> here. Instead include "gdb_socket.h".
6607 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6608 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6610 (init_named_socket, gdb_agent_helper_thread): Use union
6613 2015-03-07 Pedro Alves <palves@redhat.com>
6615 * configure.ac (build_warnings): Move
6616 -Wdeclaration-after-statement to the C-specific set.
6617 * configure: Regenerate.
6619 2015-03-07 Pedro Alves <palves@redhat.com>
6621 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6622 or <winsock2.h> here. Instead include "gdb_socket.h".
6623 (remote_open): Use union gdb_sockaddr_u.
6624 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6625 or <winsock2.h> here. Instead include "gdb_socket.h".
6626 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6627 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6629 (init_named_socket, gdb_agent_helper_thread): Use union
6632 2015-03-07 Pedro Alves <palves@redhat.com>
6634 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6637 2015-03-06 Yao Qi <yao.qi@linaro.org>
6639 * linux-aarch64-low.c (aarch64_insert_point): Use
6640 show_debug_regs as a boolean.
6641 (aarch64_remove_point): Likewise.
6643 2015-03-05 Pedro Alves <palves@redhat.com>
6645 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6646 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6647 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6648 * nto-low.c (nto_target_ops): Likewise.
6649 * spu-low.c (spu_target_ops): Likewise.
6650 * win32-low.c (win32_target_ops): Likewise.
6652 2015-03-04 Pedro Alves <palves@redhat.com>
6654 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6655 Decide whether a breakpoint triggered based on the SIGTRAP's
6657 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6658 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6659 (linux_low_filter_event): Check for breakpoints before checking
6661 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6663 (linux_stopped_by_sw_breakpoint)
6664 (linux_supports_stopped_by_sw_breakpoint)
6665 (linux_stopped_by_hw_breakpoint)
6666 (linux_supports_stopped_by_hw_breakpoint): New functions.
6667 (linux_target_ops): Install new target methods.
6669 2015-03-04 Pedro Alves <palves@redhat.com>
6671 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6672 * server.c (swbreak_feature, hwbreak_feature): New globals.
6673 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6674 (captured_main): Clear swbreak_feature and hwbreak_feature.
6675 * server.h (swbreak_feature, hwbreak_feature): Declare.
6676 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6677 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6678 supports_stopped_by_hw_breakpoint>: New fields.
6679 (target_supports_stopped_by_sw_breakpoint)
6680 (target_stopped_by_sw_breakpoint)
6681 (target_supports_stopped_by_hw_breakpoint)
6682 (target_stopped_by_hw_breakpoint): Declare.
6684 2015-03-04 Pedro Alves <palves@redhat.com>
6686 enum lwp_stop_reason -> enum target_stop_reason
6687 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6688 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6689 (linux_wait_1, stuck_in_jump_pad_callback)
6690 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6691 (linux_stopped_by_watchpoint):
6692 * linux-low.h (enum lwp_stop_reason): Delete.
6693 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6694 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6696 2015-03-04 Yao Qi <yao.qi@linaro.org>
6698 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6700 2015-03-03 Gary Benson <gbenson@redhat.com>
6702 * hostio.c (handle_vFile): Fix prefix lengths.
6704 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6706 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6709 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6711 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6712 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6713 (clean): Add "rm -f" for above C files.
6714 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6715 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6716 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6717 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6718 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6719 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6720 (init_registers_s390x_vx_linux64)
6721 (init_registers_s390x_tevx_linux64)
6722 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6723 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6725 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6726 (s390_store_vxrs_high): New functions.
6727 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6729 (s390_arch_setup): Add logic for selecting one of the new target
6730 descriptions. Activate the new vector regsets if applicable.
6731 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6732 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6733 and init_registers_s390x_tevx_linux64.
6735 2015-03-01 Pedro Alves <palves@redhat.com>
6737 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6740 2015-02-27 Pedro Alves <palves@redhat.com>
6742 * linux-x86-low.c (u_debugreg_offset): New function.
6743 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6745 2015-02-27 Pedro Alves <palves@redhat.com>
6747 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6748 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6749 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6750 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6751 (ps_lsetfpregs, ps_getpid)
6752 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6753 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6754 (ps_lsetxregs, ps_plog): Declare.
6756 2015-02-27 Pedro Alves <palves@redhat.com>
6758 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6759 IP_AGENT_EXPORT_FUNC.
6760 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6761 IP_AGENT_EXPORT_FUNC.
6762 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6763 (IP_AGENT_EXPORT): Delete.
6764 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6765 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6766 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6767 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6768 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6769 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6770 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6771 (traceframe_read_count, traceframe_write_count)
6772 (traceframes_created, trace_state_variables, get_raw_reg)
6773 (get_trace_state_variable_value, set_trace_state_variable_value)
6774 (ust_loaded, helper_thread_id, cmd_buf): Use
6775 IPA_SYM_EXPORTED_NAME.
6776 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6777 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6778 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6779 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6780 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6781 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6782 EXTERN_C_PUSH/EXTERN_C_POP.
6783 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6784 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6785 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6786 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6787 (traceframe_write_count, traceframe_read_count)
6788 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6789 (about_to_request_buffer_space, get_trace_state_variable_value)
6790 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6791 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6792 EXTERN_C_PUSH/EXTERN_C_POP.
6793 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6794 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6795 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6796 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6797 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6798 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6799 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6800 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6802 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6803 (IP_AGENT_EXPORT_VAR_DECL): Define.
6805 (gdb_agent_get_raw_reg): Declare.
6807 2015-02-27 Tom Tromey <tromey@redhat.com>
6808 Pedro Alves <palves@redhat.com>
6810 Rename symbols whose names are reserved C++ keywords throughout.
6812 2015-02-27 Pedro Alves <palves@redhat.com>
6814 * Makefile.in (COMPILER): New, get it from autoconf.
6815 (CXX): Get from autoconf instead.
6816 (COMPILE.pre): Use COMPILER.
6817 (CC-LD): Rename to ...
6818 (CC_LD): ... this. Use COMPILER.
6819 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6820 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6821 * acinclude.m4: Include build-with-cxx.m4.
6822 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6823 Disable -Werror by default if building in C++ mode.
6824 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6825 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6826 the C++ compiler. Save/restore CXXFLAGS too.
6827 * configure: Regenerate.
6829 2015-02-27 Pedro Alves <palves@redhat.com>
6831 * acinclude.m4: Include libiberty.m4.
6832 * configure.ac: Call libiberty_INIT.
6833 * config.in, configure: Regenerate.
6835 2015-02-26 Pedro Alves <palves@redhat.com>
6837 * linux-low.c (linux_wait_1): When incrementing the PC past a
6838 program breakpoint always use the_low_target.breakpoint_len as
6839 increment, rather than the maximum between that and
6840 the_low_target.decr_pc_after_break.
6842 2015-02-23 Pedro Alves <palves@redhat.com>
6844 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6845 thread was doing a step-over; always adjust the PC if
6846 we stepped over a permanent breakpoint.
6847 (linux_wait_1): If we stepped over breakpoint that was on top of a
6848 permanent breakpoint, manually advance the PC past it.
6850 2015-02-23 Pedro Alves <palves@redhat.com>
6852 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6854 (x86_fill_gregset, x86_store_gregset): Use it when handling
6857 2015-02-20 Pedro Alves <palves@redhat.com>
6859 * thread-db.c: Include "nat/linux-procfs.h".
6860 (thread_db_init): Skip listing new threads if the kernel supports
6861 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6863 2015-02-20 Pedro Alves <palves@redhat.com>
6865 * linux-low.c (status_pending_p_callback): Use ptid_match.
6867 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6869 PR breakpoints/16812
6870 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6871 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6872 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6874 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6876 PR breakpoints/15956
6877 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6879 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6881 * linux-low.c (linux_low_btrace_conf): Print size.
6882 * server.c (handle_btrace_conf_general_set): New.
6883 (hanle_general_set): Call handle_btrace_conf_general_set.
6884 (handle_query): Report Qbtrace-conf:bts:size as supported.
6886 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6888 * linux-low.c (linux_low_enable_btrace): Update parameters.
6889 (linux_low_btrace_conf): New.
6890 (linux_target_ops)<to_btrace_conf>: Initialize.
6891 * server.c (current_btrace_conf): New.
6892 (handle_btrace_enable): Rename to ...
6893 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6894 to target_enable_btrace. Update comment. Update users.
6895 (handle_qxfer_btrace_conf): New.
6896 (qxfer_packets): Add btrace-conf entry.
6897 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6898 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6899 (target_ops)<read_btrace_conf>: New.
6900 (target_enable_btrace): Update parameters.
6901 (target_read_btrace_conf): New.
6903 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6905 * server.c (handle_btrace_general_set): Remove call to
6906 target_supports_btrace.
6907 (supported_btrace_packets): New.
6908 (handle_query): Call supported_btrace_packets.
6909 * target.h: include btrace-common.h.
6910 (btrace_target_info): Removed.
6911 (supports_btrace, target_supports_btrace): Update parameters.
6913 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6915 * Makefile.in (SFILES): Add common/btrace-common.c.
6916 (OBS): Add common/btrace-common.o.
6917 (btrace-common.o): Add build rules.
6918 * linux-low: Include btrace-common.h.
6919 (linux_low_read_btrace): Use struct btrace_data. Call
6920 btrace_data_init and btrace_data_fini.
6922 2015-02-06 Pedro Alves <palves@redhat.com>
6924 * thread-db.c (find_new_threads_callback): Add debug output.
6926 2015-02-04 Pedro Alves <palves@redhat.com>
6928 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6929 (resume_stopped_resumed_lwps): New function.
6930 (linux_wait_for_event_filtered): Use it.
6932 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6934 * Makefile.in (SFILES): Add linux-personality.c.
6935 (linux-personality.o): New rule.
6936 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6937 list of objects to be built.
6938 * linux-low.c: Include nat/linux-personality.h.
6939 (linux_create_inferior): Remove code to disable address space
6940 randomization (moved to ../nat/linux-personality.c). Create
6941 cleanup to disable address space randomization.
6943 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6945 * Makefile.in (posix-strerror.o): New rule.
6946 (mingw-strerror.o): Likewise.
6947 * configure: Regenerated.
6948 * configure.ac: Source file ../common/common.host. Initialize new
6949 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6951 2015-01-14 Yao Qi <yao@codesourcery.com>
6953 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6954 (ppc-linux.o): New rule.
6955 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6956 * configure.ac: AC_CHECK_FUNCS(getauxval).
6957 * config.in: Re-generated.
6958 * configure: Re-generated.
6959 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6960 ppc64_64bit_inferior_p
6962 2015-01-14 Yao Qi <yao@codesourcery.com>
6964 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6965 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6966 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6967 (PT_ORIG_R3, PT_TRAP): Likewise.
6968 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6969 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6970 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6972 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6974 * i387-fp.c (i387_cache_to_xsave): In look over
6975 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6976 zmmh_low_space field by use of zmmh_high_space.
6978 2015-01-09 Pedro Alves <palves@redhat.com>
6980 * linux-low.c (step_over_bkpt): Move higher up in the file.
6981 (handle_extended_wait): Don't store the stop_pc here.
6982 (get_stop_pc): Adjust comments and rename to ...
6983 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6984 stopped for a software breakpoint or hardware breakpoint.
6985 (thread_still_has_status_pending_p): New function.
6986 (status_pending_p_callback): Use
6987 thread_still_has_status_pending_p. If the event is no longer
6988 interesting, resume the LWP.
6989 (handle_tracepoints): Add assert.
6990 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6991 (wstatus_maybe_breakpoint): New function.
6992 (cancel_breakpoint): Delete function.
6993 (check_stopped_by_watchpoint): New function, factored out from
6994 linux_low_filter_event.
6995 (lp_status_maybe_breakpoint): Delete function.
6996 (linux_low_filter_event): Remove filter_ptid argument.
6997 Leave thread group exits pending here. Store the LWP's stop PC.
6998 Always leave events pending.
6999 (linux_wait_for_event_filtered): Pull all events out of the
7000 kernel, and leave them all pending.
7001 (count_events_callback, select_event_lwp_callback): Consider all
7003 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7004 (select_event_lwp): Only give preference to the stepping LWP in
7005 all-stop mode. Adjust comments.
7006 (ignore_event): New function.
7007 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7008 references to cancel_breakpoints. Adjust to renames. Also give
7009 equal priority to all LWPs that have had events in non-stop mode.
7010 If reporting a software breakpoint event, unadjust the LWP's PC.
7011 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7012 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7014 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7015 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7016 (linux_stopped_by_watchpoint): Adjust.
7017 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7018 * linux-low.h (enum lwp_stop_reason): New.
7019 (struct lwp_info) <stop_pc>: Adjust comment.
7020 <stopped_by_watchpoint>: Delete field.
7021 <stop_reason>: New field.
7022 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7023 * mem-break.c (software_breakpoint_inserted_here)
7024 (hardware_breakpoint_inserted_here): New function.
7025 * mem-break.h (software_breakpoint_inserted_here)
7026 (hardware_breakpoint_inserted_here): Declare.
7027 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7028 (cancel_breakpoints): Delete.
7029 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7030 (upload_fast_traceframes): Remove references to
7033 2015-01-09 Pedro Alves <palves@redhat.com>
7035 * thread-db.c (find_new_threads_callback): Ignore thread if the
7036 kernel thread ID is -1.
7038 2015-01-09 Pedro Alves <palves@redhat.com>
7040 * linux-low.c (linux_attach_fail_reason_string): Move to
7041 nat/linux-ptrace.c, and rename.
7042 (linux_attach_lwp): Update comment.
7043 (attach_proc_task_lwp_callback): New function.
7044 (linux_attach): Adjust to rename and use
7045 linux_proc_attach_tgid_threads.
7046 (linux_attach_fail_reason_string): Delete declaration.
7048 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7050 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7051 * server.c (gdbserver_version): Likewise.
7053 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7055 * remote-utils.c: Include ctype.h.
7056 (input_interrupt): Explicitly handle the case when the char
7057 received is the NUL byte. Improve the printing of non-ASCII
7060 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7062 * linux-low.c (linux_low_filter_event): Update call to
7063 linux_enable_event_reporting following the addition of
7064 a new parameter to that function.
7066 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7069 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7070 (AARCH64_FPCR_REGNO): Likewise.
7071 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7072 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7073 (aarch64_store_fpregset): Likewise.
7075 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7077 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7078 Remove FIXME comment about assumption about N.
7080 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7082 * configure.ac: If large-file support is disabled in GDBserver,
7083 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7084 * configure: Regenerate.
7086 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7088 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7089 warning upon ENODATA from ptrace.
7090 * linux-s390-low.c (s390_store_tdb): New.
7091 (s390_regsets): Add regset for NT_S390_TDB.
7093 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7095 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7096 without a fill_function.
7097 * linux-s390-low.c (s390_fill_last_break): Remove.
7098 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7099 (s390_arch_setup): Use regset's size instead of fill_function for
7102 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7104 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7105 the regset's store function when ptrace returned an error.
7106 * regcache.c (get_thread_regcache): Invalidate register cache
7107 before fetching inferior's registers.
7109 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7111 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7112 while-loop as for-loop.
7113 (regsets_store_inferior_registers): Likewise.
7115 2014-11-28 Yao Qi <yao@codesourcery.com>
7117 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7118 * config.in, configure: Re-generate.
7119 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7122 2014-11-21 Yao Qi <yao@codesourcery.com>
7124 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7125 (AC_CHECK_HEADERS): Remove malloc.h.
7126 * configure: Re-generated.
7127 * config.in: Re-generated.
7128 * server.h: Don't include alloca.h and malloc.h.
7129 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7130 Don't include malloc.h.
7132 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7134 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7135 corresponding ERRNO check in same block.
7137 2014-11-12 Pedro Alves <palves@redhat.com>
7139 * server.c (cont_thread): Update comment.
7140 (start_inferior, attach_inferior): No longer clear cont_thread.
7141 (handle_v_cont): No longer set cont_thread.
7142 (captured_main): Clear cont_thread each time a GDB connects.
7144 2014-11-12 Pedro Alves <palves@redhat.com>
7146 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7147 thread, and don't resume all threads if the Hc thread has exited.
7149 2014-11-12 Pedro Alves <palves@redhat.com>
7151 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7152 the process group instead of to a specific LWP.
7154 2014-10-15 Pedro Alves <palves@redhat.com>
7157 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7159 (arm_set_thread_context): Delete.
7160 (the_low_target): Adjust.
7161 * win32-i386-low.c (debug_registers_changed)
7162 (debug_registers_used): Delete.
7163 (update_debug_registers_callback): New function.
7164 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7165 needing to update their debug registers.
7166 (win32_get_current_dr): New function.
7167 (x86_dr_low_get_addr, x86_dr_low_get_control)
7168 (x86_dr_low_get_status): Fetch the debug register from the thread
7170 (i386_initial_stuff): Adjust.
7171 (i386_get_thread_context): Remove current_event parameter. Don't
7172 clear debug_registers_changed nor copy DR values to
7174 (i386_set_thread_context): Delete.
7175 (i386_prepare_to_resume): New function.
7176 (i386_thread_added): Mark the thread as needing to update irs
7178 (the_low_target): Remove i386_set_thread_context and install
7179 i386_prepare_to_resume.
7180 * win32-low.c (win32_get_thread_context): Adjust.
7181 (win32_set_thread_context): Use SetThreadContext
7183 (win32_prepare_to_resume): New function.
7184 (win32_require_context): New function, factored out from ...
7185 (thread_rec): ... this.
7186 (continue_one_thread): Call win32_prepare_to_resume on each thread
7187 we're about to continue.
7188 (win32_resume): Call win32_prepare_to_resume on the event thread.
7189 * win32-low.h (struct win32_thread_info)
7190 <debug_registers_changed>: New field.
7191 (struct win32_target_ops): Change prototype of set_thread_context,
7192 delete set_thread_context and add prepare_to_resume.
7193 (win32_require_context): New declaration.
7195 2014-10-08 Gary Benson <gbenson@redhat.com>
7197 * server.h: Do not include common-exceptions.h.
7199 2014-10-08 Gary Benson <gbenson@redhat.com>
7201 * server.h: Do not include cleanups.h.
7203 2014-09-30 James Hogan <james.hogan@imgtec.com>
7205 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7208 2014-09-23 Yao Qi <yao@codesourcery.com>
7210 * linux-low.c (lp_status_maybe_breakpoint): New function.
7211 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7212 (count_events_callback): Likewise.
7213 (select_event_lwp_callback): Likewise.
7214 (cancel_breakpoints_callback): Likewise.
7216 2014-09-19 Don Breazeal <donb@codesourcery.com>
7218 * linux-low.c (handle_extended_wait): Call
7219 linux_ptrace_get_extended_event.
7220 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7221 linux_is_extended_waitstatus.
7223 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7225 * Makefile.in (CPPFLAGS): Define.
7226 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7227 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7229 2014-09-16 Gary Benson <gbenson@redhat.com>
7231 * inferiors.h (current_inferior): Renamed as...
7232 (current_thread): New variable. All uses updated.
7233 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7234 (maybe_move_out_of_jump_pad): Likewise.
7235 (cancel_breakpoint): Likewise.
7236 (linux_low_filter_event): Likewise.
7237 (wait_for_sigstop): Likewise.
7238 (linux_resume_one_lwp): Likewise.
7239 (need_step_over_p): Likewise.
7240 (start_step_over): Likewise.
7241 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7242 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7243 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7244 and save_inferior as saved_thread.
7245 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7247 (regcache_invalidate_thread): Likewise.
7248 * remote-utils.c (prepare_resume_reply): Likewise.
7249 * thread-db.c (thread_db_get_tls_address): Likewise.
7250 (disable_thread_event_reporting): Likewise.
7251 (remove_thread_event_breakpoints): Likewise.
7252 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7254 * target.h (set_desired_inferior): Renamed as...
7255 (set_desired_thread): New declaration. All uses updated.
7256 * server.c (myresume): Updated comment to reference thread instead
7258 (handle_serial_event): Likewise.
7259 (handle_target_event): Likewise.
7261 2014-09-12 Tom Tromey <tromey@redhat.com>
7262 Gary Benson <gbenson@redhat.com>
7264 * regcache.h: Include common-regcache.h.
7265 (regcache_read_pc): Don't declare.
7266 * regcache.c (get_thread_regcache_for_ptid): New function.
7268 2014-09-11 Tom Tromey <tromey@redhat.com>
7269 Gary Benson <gbenson@redhat.com>
7271 * symbol.c: New file.
7272 * Makefile.in (SFILES): Add symbol.c.
7273 (OBS): Add symbol.o.
7275 2014-09-11 Gary Benson <gbenson@redhat.com>
7277 * target.c (target_stop_ptid, target_continue_ptid): New
7280 2014-09-11 Tom Tromey <tromey@redhat.com>
7281 Gary Benson <gbenson@redhat.com>
7283 * target.h: Include target/target.h.
7284 * target.c (target_read_memory, target_read_uint32)
7285 (target_write_memory): New functions.
7287 2014-09-11 Gary Benson <gbenson@redhat.com>
7289 * server.h (debug_hw_points): Don't declare.
7290 * server.c (debug_hw_points): Don't define. Replace all uses
7291 with show_debug_regs.
7292 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7293 all uses with show_debug_regs.
7295 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7297 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7298 endianness into account.
7299 (ppc_supply_ptrace_register): Likewise.
7301 2014-09-03 James Hogan <james.hogan@imgtec.com>
7303 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7304 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7306 2014-09-03 Gary Benson <gbenson@redhat.com>
7308 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7309 ALL_DEBUG_ADDRESS_REGISTERS.
7311 2014-09-02 Gary Benson <gbenson@redhat.com>
7313 * i386-low.h: Renamed as...
7314 * x86-low.h: New file. All type, function and variable name
7315 prefixes changed from "i386_" to "x86_". All references updated.
7316 * i386-low.c: Renamed as...
7317 * x86-low.c: New file. All type, function and variable name
7318 prefixes changed from "i386_" to "x86_". All references updated.
7320 2014-09-02 Gary Benson <gbenson@redhat.com>
7322 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7323 (x86_linux_new_thread): Likewise.
7325 2014-08-29 Gary Benson <gbenson@redhat.com>
7327 * server.h (setjmp.h): Do not include.
7328 (toplevel): Do not declare.
7329 (common-exceptions.h): Include.
7330 (cleanups.h): Likewise.
7331 * server.c (toplevel): Do not define.
7332 (exit_code): New static global.
7333 (detach_or_kill_for_exit_cleanup): New function.
7334 (main): New function. Original main renamed to...
7335 (captured_main): New function.
7336 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7338 2014-08-29 Gary Benson <gbenson@redhat.com>
7340 * Makefile.in (SFILES): Add common/common-exceptions.c.
7341 (OBS): Add common-exceptions.o.
7342 (common-exceptions.o): New rule.
7343 * utils.c (prepare_to_throw_exception): New function.
7345 2014-08-29 Gary Benson <gbenson@redhat.com>
7347 * config.in: Regenerate.
7348 * configure: Likewise.
7350 2014-08-29 Gary Benson <gbenson@redhat.com>
7352 * Makefile.in (SFILES): Add common/cleanups.c.
7354 (cleanups.o): New rule.
7356 2014-08-29 Gary Benson <gbenson@redhat.com>
7358 * utils.c (internal_vwarning): New function.
7360 2014-08-28 Gary Benson <gbenson@redhat.com>
7362 * utils.h (fatal): Remove declaration.
7363 * utils.c (fatal): Remove function.
7365 2014-08-28 Gary Benson <gbenson@redhat.com>
7367 * tracepoint.c (gdb_agent_init): Replace fatal with
7369 (initialize_tracepoint): Likewise.
7371 2014-08-28 Gary Benson <gbenson@redhat.com>
7373 * remote-utils.c (remote_prepare): Replace fatal with error.
7375 2014-08-28 Gary Benson <gbenson@redhat.com>
7377 * linux-low.c (linux_async): Replace fatal with warning.
7379 (linux_start_non_stop): Return -1 if linux_async failed.
7381 2014-08-28 Gary Benson <gbenson@redhat.com>
7383 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7385 (i386_dr_low_get_addr): Remove vague comment.
7386 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7389 2014-08-28 Gary Benson <gbenson@redhat.com>
7391 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7392 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7394 (linux_resume_one_lwp): Likewise.
7395 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7397 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7398 with internal_error.
7399 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7400 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7401 (find_register_by_name): Replace fatal with internal_error.
7402 (find_regno): Likewise.
7403 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7404 * thread-db.c (thread_db_create_event): Likewise.
7405 (thread_db_load_search): Likewise.
7406 (try_thread_db_load_1): Likewise.
7407 * tracepoint.c (get_jump_space_head): Replace fatal with
7409 (claim_trampoline_space): Likewise.
7410 (have_fast_tracepoint_trampoline_buffer): Likewise.
7411 (cmd_qtstart): Likewise.
7412 (stop_tracing): Likewise.
7413 (fast_tracepoint_collecting): Likewise.
7414 (target_malloc): Likewise.
7415 (download_tracepoint): Likewise.
7416 (download_trace_state_variables): Replace check with gdb_assert.
7417 (upload_fast_traceframes): Replace fatal with internal_error.
7419 2014-08-19 Tom Tromey <tromey@redhat.com>
7420 Gary Benson <gbenson@redhat.com>
7422 * Makefile.in (SFILES): Add common/common-debug.c.
7423 (OBS): Add common-debug.o.
7424 (common-debug.o): New rule.
7425 * debug.h (debug_printf): Don't declare.
7426 * debug.c (debug_printf): Renamed and rewritten as...
7427 (debug_vprintf): New function.
7429 2014-08-19 Gary Benson <gbenson@redhat.com>
7431 * utils.h: Do not include print-utils.h.
7433 2014-08-19 Tom Tromey <tromey@redhat.com>
7434 Gary Benson <gbenson@redhat.com>
7436 * server.h: Add static assertion.
7437 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7439 2014-08-19 Tom Tromey <tromey@redhat.com>
7440 Gary Benson <gbenson@redhat.com>
7442 * Makefile.in (SFILES): Add common/errors.c.
7443 (OBS): Add errors.o.
7444 (IPA_OBS): Add errors-ipa.o.
7445 (errors.o): New rule.
7446 (errors-ipa.o): Likewise.
7447 * utils.h (perror_with_name, error, warning): Don't declare.
7448 * utils.c (warning): Renamed and rewritten as...
7449 (vwarning): New function.
7450 (error): Renamed and rewritten as...
7451 (verror): New function.
7452 (internal_error): Renamed and rewritten as...
7453 (internal_verror): New function.
7455 2014-08-07 Gary Benson <gbenson@redhat.com>
7457 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7458 * configure: Regenerate.
7459 * config.in: Likewise.
7460 * server.h: Do not include errno.h.
7461 * event-loop.c: Likewise.
7462 * hostio-errno.c: Likewise.
7463 * linux-low.c: Likewise.
7464 * remote-utils.c: Likewise.
7465 * spu-low.c: Likewise.
7466 * utils.c: Likewise.
7467 * gdbreplay.c: Unconditionally include errno.h.
7469 2014-08-07 Gary Benson <gbenson@redhat.com>
7471 * server.h: Do not include string.h.
7472 * event-loop.c: Likewise.
7473 * linux-low.c: Likewise.
7474 * regcache.c: Likewise.
7475 * remote-utils.c: Likewise.
7476 * spu-low.c: Likewise.
7477 * utils.c: Likewise.
7479 2014-08-07 Gary Benson <gbenson@redhat.com>
7481 * server.h: Do not include gdb_assert.h.
7483 2014-08-07 Gary Benson <gbenson@redhat.com>
7485 * server.h: Do not include common-utils.h.
7487 2014-08-07 Gary Benson <gbenson@redhat.com>
7489 * server.h: Do not include ptid.h.
7490 * notif.h: Likewise.
7492 2014-08-07 Gary Benson <gbenson@redhat.com>
7494 * server.h: Do not include gdb_locale.h.
7496 2014-08-07 Gary Benson <gbenson@redhat.com>
7498 * server.h: Do not include gdb/signals.h.
7499 * win32-low.c: Likewise.
7501 2014-08-07 Gary Benson <gbenson@redhat.com>
7503 * server.h: Do not include pathmax.h.
7505 2014-08-07 Gary Benson <gbenson@redhat.com>
7507 * server.h: Do not include libiberty.h.
7508 * linux-bfin-low.c: Likewise.
7510 2014-08-07 Gary Benson <gbenson@redhat.com>
7512 * server.h: Do not include ansidecl.h.
7514 2014-08-07 Gary Benson <gbenson@redhat.com>
7516 * linux-x86-low.c: Do not include stddef.h.
7517 * lynx-ppc-low.c: Likewise.
7518 * tracepoint.c: Likewise.
7520 2014-08-07 Gary Benson <gbenson@redhat.com>
7522 * server.h: Do not include stdarg.h.
7523 * nto-low.c: Likewise.
7525 2014-08-07 Gary Benson <gbenson@redhat.com>
7527 * server.h: Do not include stdlib.h.
7528 * inferiors.c: Likewise.
7529 * linux-low.c: Likewise.
7530 * regcache.c: Likewise.
7531 * spu-low.c: Likewise.
7532 * tracepoint.c: Likewise.
7533 * utils.c: Likewise.
7535 2014-08-07 Gary Benson <gbenson@redhat.com>
7537 * server.h: Do not include stdio.h.
7538 * linux-low.c: Likewise.
7539 * remote-utils.c: Likewise.
7540 * spu-low.c: Likewise.
7541 * utils.c: Likewise.
7542 * wincecompat.c: Likewise.
7544 2014-08-06 Gary Benson <gbenson@redhat.com>
7546 * regcache.c (init_register_cache): Move conditionals inside if.
7548 2014-08-06 Gary Benson <gbenson@redhat.com>
7550 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7552 2014-07-31 Gary Benson <gbenson@redhat.com>
7554 * ax.h: Do not include server.h.
7555 * gdbthread.h: Likewise.
7556 * lynx-low.h: Likewise.
7557 * notif.h: Likewise.
7559 2014-07-30 Gary Benson <gbenson@redhat.com>
7561 * server.h: Include common-defs.h.
7562 Do not include config.h or build-gnulib-gdbserver/config.h.
7564 2014-07-30 Gary Benson <gbenson@redhat.com>
7566 * hostio-errno.c: Move server.h to top of includes list.
7567 * inferiors.c: Likewise.
7568 * linux-x86-low.c: Likewise.
7569 * notif.c: Include server.h.
7571 2014-07-24 Tom Tromey <tromey@redhat.com>
7572 Gary Benson <gbenson@redhat.com>
7574 * server.h (CORE_ADDR): Now unsigned.
7576 2014-07-16 Pedro Alves <palves@redhat.com>
7578 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7580 2014-07-15 Pedro Alves <palves@redhat.com>
7582 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7585 2014-07-11 Pedro Alves <palves@redhat.com>
7587 * linux-low.c (kill_wait_lwp): New function, based on
7588 kill_one_lwp_callback, but use my_waitpid directly.
7589 (kill_one_lwp_callback, linux_kill): Use it.
7591 2014-06-23 Pedro Alves <palves@redhat.com>
7593 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7594 before setting DR0..DR3.
7596 2014-06-20 Gary Benson <gbenson@redhat.com>
7598 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7599 * configure: Regenerated.
7600 * config.in: Likewise.
7602 2014-06-20 Gary Benson <gbenson@redhat.com>
7604 * Makefile.in (SFILES): Update locations for files moved
7606 (object file files): Reordered.
7608 2014-06-20 Gary Benson <gbenson@redhat.com>
7610 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7611 (i386_dr_low_set_addr): Likewise.
7612 (i386_dr_low_get_addr): Likewise.
7613 (i386_dr_low_can_set_control): Likewise.
7614 (i386_dr_low_set_control): Likewise.
7615 (i386_dr_low_get_control): Likewise.
7616 (i386_dr_low_get_status): Likewise.
7617 (i386_get_debug_register_length): Likewise.
7618 * linux-x86-low.c (i386_dr_low_set_addr):
7619 Changed signature. Made static.
7620 (i386_dr_low_get_addr): Likewise.
7621 (i386_dr_low_set_control): Likewise.
7622 (i386_dr_low_get_control): Likewise.
7623 (i386_dr_low_get_status): Likewise.
7624 (i386_dr_low): New global variable.
7625 * win32-i386-low.c (i386_dr_low_set_addr):
7626 Changed signature. Made static.
7627 (i386_dr_low_get_addr): Likewise.
7628 (i386_dr_low_set_control): Likewise.
7629 (i386_dr_low_get_control): Likewise.
7630 (i386_dr_low_get_status): Likewise.
7631 (i386_dr_low): New global variable.
7633 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7635 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7636 * Makefile.in (AR, AR_FLAGS): Define.
7637 * configure: Regenerate.
7639 2014-06-19 Gary Benson <gbenson@redhat.com>
7641 * Makefile.in (i386-dregs.o): New rule.
7642 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7643 * i386-low.c (target.h): Remove include.
7644 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7645 (DR_CONTROL_SHIFT): Likewise.
7646 (DR_CONTROL_SIZE): Likewise.
7647 (DR_RW_EXECUTE): Likewise.
7648 (DR_RW_WRITE): Likewise.
7649 (DR_RW_READ): Likewise.
7650 (DR_RW_IORW): Likewise.
7651 (DR_LEN_1): Likewise.
7652 (DR_LEN_2): Likewise.
7653 (DR_LEN_4): Likewise.
7654 (DR_LEN_8): Likewise.
7655 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7656 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7657 (DR_ENABLE_SIZE): Likewise.
7658 (DR_LOCAL_SLOWDOWN): Likewise.
7659 (DR_GLOBAL_SLOWDOWN): Likewise.
7660 (DR_CONTROL_RESERVED): Likewise.
7661 (I386_DR_CONTROL_MASK): Likewise.
7662 (I386_DR_VACANT): Likewise.
7663 (I386_DR_LOCAL_ENABLE): Likewise.
7664 (I386_DR_GLOBAL_ENABLE): Likewise.
7665 (I386_DR_DISABLE): Likewise.
7666 (I386_DR_SET_RW_LEN): Likewise.
7667 (I386_DR_GET_RW_LEN): Likewise.
7668 (I386_DR_WATCH_HIT): Likewise.
7669 (i386_wp_op_t): Likewise.
7670 (i386_show_dr): Likewise.
7671 (i386_length_and_rw_bits): Likewise.
7672 (i386_insert_aligned_watchpoint): Likewise.
7673 (i386_remove_aligned_watchpoint): Likewise.
7674 (i386_handle_nonaligned_watchpoint): Likewise.
7675 i386_update_inferior_debug_regs(): Likewise.
7676 (i386_dr_insert_watchpoint): Likewise.
7677 (i386_dr_remove_watchpoint): Likewise.
7678 (i386_dr_region_ok_for_watchpoint): Likewise.
7679 (i386_dr_stopped_data_address): Likewise.
7680 (i386_dr_stopped_by_watchpoint): Likewise.
7682 2014-06-19 Gary Benson <gbenson@redhat.com>
7684 * i386-low.c (i386_dr_show): Renamed to
7685 i386_show_dr and made static. All uses updated.
7686 (i386_dr_length_and_rw_bits): Renamed to
7687 i386_length_and_rw_bits and made static.
7689 (i386_dr_insert_aligned_watchpoint): Renamed to
7690 i386_insert_aligned_watchpoint and made static.
7692 (i386_dr_remove_aligned_watchpoint): Renamed to
7693 i386_remove_aligned_watchpoint and made static.
7695 (i386_dr_update_inferior_debug_regs): Renamed to
7696 i386_update_inferior_debug_regs and made static.
7699 2014-06-18 Gary Benson <gbenson@redhat.com>
7701 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7702 (i386_dr_low_can_set_control): Likewise.
7703 (i386_get_debug_register_length): Likewise.
7704 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7705 (i386_dr_low_can_set_control): Likewise.
7706 (i386_get_debug_register_length): Likewise.
7708 2014-06-17 Gary Benson <gbenson@redhat.com>
7710 * i386-low.h (i386-dregs.h): New include.
7711 (DR_FIRSTADDR): Now in i386-dregs.h.
7712 (DR_LASTADDR): Likewise.
7713 (DR_NADDR): Likewise.
7714 (DR_STATUS): Likewise.
7715 (DR_CONTROL): Likewise.
7716 (i386_debug_reg_state): Likewise.
7717 (i386_dr_insert_watchpoint): Likewise.
7718 (i386_dr_remove_watchpoint): Likewise.
7719 (i386_dr_region_ok_for_watchpoint): Likewise.
7720 (i386_dr_stopped_data_address): Likewise.
7721 (i386_dr_stopped_by_watchpoint): Likewise.
7722 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7724 2014-06-18 Gary Benson <gbenson@redhat.com>
7726 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7727 i386_dr_insert_watchpoint.
7728 (i386_low_remove_watchpoint): Renamed to
7729 i386_dr_remove_watchpoint.
7730 (i386_low_region_ok_for_watchpoint): Renamed to
7731 i386_dr_region_ok_for_watchpoint.
7732 (i386_low_stopped_data_address): Renamed to
7733 i386_dr_stopped_data_address.
7734 (i386_low_stopped_by_watchpoint): Renamed to
7735 i386_dr_stopped_by_watchpoint.
7736 * i386-low.c (i386_show_dr): Renamed to
7737 i386_dr_show and made nonstatic. All uses updated.
7738 (i386_length_and_rw_bits): Renamed to
7739 i386_dr_length_and_rw_bits and made nonstatic.
7741 (i386_insert_aligned_watchpoint): Renamed to
7742 i386_dr_insert_aligned_watchpoint and made nonstatic.
7744 (i386_remove_aligned_watchpoint): Renamed to
7745 i386_dr_remove_aligned_watchpoint and made nonstatic.
7747 (i386_update_inferior_debug_regs): Renamed to
7748 i386_dr_update_inferior_debug_regs and made nonstatic.
7750 (i386_low_insert_watchpoint): Renamed to
7751 i386_dr_insert_watchpoint. All uses updated.
7752 (i386_low_remove_watchpoint): Renamed to
7753 i386_dr_remove_watchpoint. All uses updated.
7754 (i386_low_region_ok_for_watchpoint): Renamed to
7755 i386_dr_region_ok_for_watchpoint. All uses updated.
7756 (i386_low_stopped_data_address): Renamed to
7757 i386_dr_stopped_data_address. All uses updated.
7758 (i386_low_stopped_by_watchpoint): Renamed to
7759 i386_dr_stopped_by_watchpoint. All uses updated.
7761 2014-06-18 Gary Benson <gbenson@redhat.com>
7763 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7764 (i386_dr_low_can_set_control): Likewise.
7765 (i386_insert_aligned_watchpoint): New check.
7767 2014-06-18 Gary Benson <gbenson@redhat.com>
7769 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7772 2014-06-18 Gary Benson <gbenson@redhat.com>
7774 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7775 instead of fatal and error.
7776 (i386_handle_nonaligned_watchpoint): Likewise.
7778 2014-06-18 Gary Benson <gbenson@redhat.com>
7780 * i386-low.c (i386_get_debug_register_length): New macro.
7781 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7782 (i386_show_dr): Use debug_printf instead of fprintf. Use
7783 phex to format values.
7785 2014-06-18 Gary Benson <gbenson@redhat.com>
7787 * i386-low.h: Comment changes.
7788 * i386-low.c: Likewise.
7790 2014-06-18 Gary Benson <gbenson@redhat.com>
7792 * i386-low.c: Whitespace changes.
7794 2014-06-12 Tom Tromey <tromey@redhat.com>
7796 * utils.c (freeargv): Remove.
7798 2014-06-12 Tom Tromey <tromey@redhat.com>
7800 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7801 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7802 (parse_debug_format_options): Likewise.
7803 (gdbserver_usage): Likewise.
7804 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7805 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7806 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7808 ($(LIBGNU)): Depend on libiberty.
7809 (all-lib): Recurse into all subdirs.
7810 (install-only): Invoke "install" target in subdirs.
7811 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7813 * configure: Rebuild.
7814 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7815 for vasprintf, vsnprintf, or gettimeofday.
7816 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7819 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7821 * development.sh: Delete.
7822 * Makefile.in (config.status): Adjust dependency on development.sh.
7823 * configure.ac: Adjust development.sh source call.
7824 * configure: Regenerate.
7826 2014-06-02 Pedro Alves <palves@redhat.com>
7828 * ax.c (gdb_free_agent_expr): New function.
7829 * ax.h (gdb_free_agent_expr): New declaration.
7830 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7832 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7834 (clear_breakpoint_conditions_and_commands): New function.
7835 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7836 (clear_breakpoint_conditions_and_commands): New declaration.
7838 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7840 * linux-aarch64-low.c (asm/ptrace.h): Include.
7842 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7844 Fix TLS access for -static -pthread.
7845 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7846 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7847 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7849 2014-05-20 Pedro Alves <palves@redhat.com>
7851 * linux-aarch64-low.c (aarch64_insert_point)
7852 (aarch64_remove_point): No longer check whether the type is
7853 supported here. Adjust to new interface.
7854 (the_low_target): Install aarch64_supports_z_point_type as
7855 supports_z_point_type method.
7856 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7857 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7858 instead of a Z packet char. Adjust.
7859 (arm_supports_z_point_type): New function.
7860 (arm_insert_point, arm_remove_point): Adjust to new interface.
7861 (the_low_target): Install arm_supports_z_point_type.
7862 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7863 (cris_insert_point, cris_remove_point): Adjust to new interface.
7864 Don't check whether the type is supported here.
7865 (the_low_target): Install cris_supports_z_point_type.
7866 * linux-low.c (linux_supports_z_point_type): New function.
7867 (linux_insert_point, linux_remove_point): Adjust to new interface.
7868 * linux-low.h (struct linux_target_ops) <insert_point,
7869 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7870 raw_breakpoint pointer parameter.
7871 <supports_z_point_type>: New method.
7872 * linux-mips-low.c (mips_supports_z_point_type): New function.
7873 (mips_insert_point, mips_remove_point): Adjust to new interface.
7874 Use mips_supports_z_point_type.
7875 (the_low_target): Install mips_supports_z_point_type.
7876 * linux-ppc-low.c (the_low_target): Install NULL as
7877 supports_z_point_type method.
7878 * linux-s390-low.c (the_low_target): Install NULL as
7879 supports_z_point_type method.
7880 * linux-sparc-low.c (the_low_target): Install NULL as
7881 supports_z_point_type method.
7882 * linux-x86-low.c (x86_supports_z_point_type): New function.
7883 (x86_insert_point): Adjust to new insert_point interface. Use
7884 insert_memory_breakpoint. Adjust to new
7885 i386_low_insert_watchpoint interface.
7886 (x86_remove_point): Adjust to remove_point interface. Use
7887 remove_memory_breakpoint. Adjust to new
7888 i386_low_remove_watchpoint interface.
7889 (the_low_target): Install x86_supports_z_point_type.
7890 * lynx-low.c (lynx_target_ops): Install NULL as
7891 supports_z_point_type callback.
7892 * nto-low.c (nto_supports_z_point_type): New.
7893 (nto_insert_point, nto_remove_point): Adjust to new interface.
7894 (nto_target_ops): Install nto_supports_z_point_type.
7895 * mem-break.c: Adjust intro comment.
7896 (struct raw_breakpoint) <raw_type, size>: New fields.
7897 <inserted>: Update comment.
7898 <shlib_disabled>: Delete field.
7899 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7900 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7901 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7902 (raw_bkpt_type_to_target_hw_bp_type): New function.
7903 (find_enabled_raw_code_breakpoint_at): New function.
7904 (find_raw_breakpoint_at): New type and size parameters. Use them.
7905 (insert_memory_breakpoint): New function, based off
7906 set_raw_breakpoint_at.
7907 (remove_memory_breakpoint): New function.
7908 (set_raw_breakpoint_at): Reimplement.
7909 (set_breakpoint): New, based on set_breakpoint_at.
7910 (set_breakpoint_at): Reimplement.
7911 (delete_raw_breakpoint): Go through the_target->remove_point
7912 instead of assuming memory breakpoints.
7913 (find_gdb_breakpoint_at): Delete.
7914 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7915 (find_gdb_breakpoint): New function.
7916 (set_gdb_breakpoint_at): Delete.
7917 (z_type_supported): New function.
7918 (set_gdb_breakpoint_1): New function, loosely based off
7919 set_gdb_breakpoint_at.
7920 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7921 (delete_gdb_breakpoint_at): Delete.
7922 (delete_gdb_breakpoint_1): New function, loosely based off
7923 delete_gdb_breakpoint_at.
7924 (delete_gdb_breakpoint): New function.
7925 (clear_gdb_breakpoint_conditions): Rename to ...
7926 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7928 (add_condition_to_breakpoint): Make static.
7929 (add_breakpoint_condition): Take a struct breakpoint pointer
7930 instead of an address. Adjust.
7931 (gdb_condition_true_at_breakpoint): Rename to ...
7932 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7934 (gdb_condition_true_at_breakpoint): Reimplement.
7935 (add_breakpoint_commands): Take a struct breakpoint pointer
7936 instead of an address. Adjust.
7937 (gdb_no_commands_at_breakpoint): Rename to ...
7938 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7939 parameter. Return true if no breakpoint was found. Change debug
7941 (gdb_no_commands_at_breakpoint): Reimplement.
7942 (run_breakpoint_commands): Rename to ...
7943 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7944 and change return type to boolean.
7945 (run_breakpoint_commands): New function.
7946 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7947 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7948 breakpoint. Go through the_target->remove_point instead of
7949 assuming memory breakpoint.
7950 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7951 software and hardware breakpoints.
7952 (reinsert_raw_breakpoint): Go through the_target->insert_point
7953 instead of assuming memory breakpoint.
7954 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7955 software and hardware breakpoints.
7956 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7957 Check both software and hardware breakpoints.
7958 (validate_inserted_breakpoint): Assert the breakpoint is a
7959 software breakpoint. Set the inserted flag to -1 instead of
7960 setting shlib_disabled.
7961 (delete_disabled_breakpoints): Adjust.
7962 (validate_breakpoints): Only validate software breakpoints.
7963 Adjust to inserted flag change.
7964 (check_mem_read, check_mem_write): Skip breakpoint types other
7965 than software breakpoints. Adjust to inserted flag change.
7966 * mem-break.h (enum raw_bkpt_type): New enum.
7967 (raw_breakpoint, struct process_info): Forward declare.
7968 (Z_packet_to_target_hw_bp_type): Delete declaration.
7969 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7970 (set_gdb_breakpoint, delete_gdb_breakpoint)
7971 (clear_breakpoint_conditions): New declarations.
7972 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7973 (breakpoint_inserted_here): Update comment.
7974 (add_breakpoint_condition, add_breakpoint_commands): Replace
7975 address parameter with a breakpoint pointer parameter.
7976 (gdb_breakpoint_here): Update comment.
7977 (delete_gdb_breakpoint_at): Delete.
7978 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7979 * server.c (process_point_options): Take a struct breakpoint
7980 pointer instead of an address. Adjust.
7981 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7982 delete_gdb_breakpoint.
7983 * spu-low.c (spu_target_ops): Install NULL as
7984 supports_z_point_type method.
7985 * target.h: Include mem-break.h.
7986 (struct target_ops) <prepare_to_access_memory>: Update comment.
7987 <supports_z_point_type>: New field.
7988 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7989 instead of a char. Also take a raw breakpoint pointer.
7990 * win32-arm-low.c (the_low_target): Install NULL as
7991 supports_z_point_type.
7992 * win32-i386-low.c (i386_supports_z_point_type): New function.
7993 (i386_insert_point, i386_remove_point): Adjust to new interface.
7994 (the_low_target): Install i386_supports_z_point_type.
7995 * win32-low.c (win32_supports_z_point_type): New function.
7996 (win32_insert_point, win32_remove_point): Adjust to new interface.
7997 (win32_target_ops): Install win32_supports_z_point_type.
7998 * win32-low.h (struct win32_target_ops):
7999 <supports_z_point_type>: New method.
8000 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8001 instead of a char. Also take a raw breakpoint pointer.
8003 2014-05-20 Pedro Alves <palves@redhat.com>
8005 * mem-break.h: Include break-common.h.
8006 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8007 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8008 (Z_packet_to_target_hw_bp_type): New declaration.
8009 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8010 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8011 (Z_PACKET_ACCESS_WP): Delete macros.
8012 (Z_packet_to_hw_type): Delete function.
8013 * i386-low.h: Don't include break-common.h here.
8014 (Z_packet_to_hw_type): Delete declaration.
8015 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8016 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8017 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8018 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8019 * linux-aarch64-low.c: Don't include break-common.h here.
8020 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8021 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8022 (Z_packet_to_target_hw_bp_type): Delete function.
8023 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8025 (mips_insert_point, mips_remove_point): Use
8026 Z_packet_to_target_hw_bp_type.
8028 2014-05-20 Pedro Alves <palves@redhat.com>
8030 * linux-aarch64-low.c: Include break-common.h.
8031 (enum target_point_type): Delete.
8032 (Z_packet_to_point_type): Rename to ...
8033 (Z_packet_to_target_hw_bp_type): ... this, and return a
8034 target_hw_bp_type instead.
8035 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8036 instead of an enum target_point_type.
8037 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8039 (aarch64_dr_state_insert_one_point)
8040 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8041 (aarch64_handle_aligned_watchpoint)
8042 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8043 Take an enum target_hw_bp_type instead of an enum
8045 (aarch64_supports_z_point_type): New function.
8046 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8047 use Z_packet_to_target_hw_bp_type.
8049 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8051 * configure.ac: Only use -Werror by default when DEVELOPMENT
8053 * configure: Regenerate.
8055 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8057 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8058 * linux-x86-low.c (X86_64_USER_REGS): New.
8059 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8061 2014-04-28 Yao Qi <yao@codesourcery.com>
8063 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8066 2014-04-25 Pedro Alves <palves@redhat.com>
8069 * linux-low.c (linux_attach_fail_reason_string): New function.
8070 (linux_attach_lwp): Delete.
8071 (linux_attach_lwp_1): Rename to ...
8072 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8073 argument. Remove "initial" parameter. Return int instead of
8074 void. Don't error or warn here.
8075 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8076 failure to attach to the tgid. Call warning when failing to
8078 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8079 argument. Remove "initial" parameter. Return int instead of
8080 void. Don't error or warn here.
8081 (linux_attach_fail_reason_string): New declaration.
8082 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8083 interface change. Use linux_attach_fail_reason_string.
8085 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8086 Walfred Tedeschi <walfred.tedeschi@intel.com>
8088 * Makefile.in: Added rules to handle new files
8089 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8090 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8091 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8092 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8093 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8094 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8096 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8097 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8098 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8099 i386/x32-avx512.xml.
8100 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8101 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8102 i386/x32-avx512-linux.xml.
8103 * i387-fp.c (num_avx512_k_registers): New constant for number
8105 (num_avx512_zmmh_low_registers): New constant for number of
8106 lower ZMM registers (0-15).
8107 (num_avx512_zmmh_high_registers): New constant for number of
8108 higher ZMM registers (16-31).
8109 (num_avx512_ymmh_registers): New contant for number of higher
8110 YMM registers (ymm16-31 added by avx521 on x86_64).
8111 (num_avx512_xmm_registers): New constant for number of higher
8112 XMM registers (xmm16-31 added by AVX512 on x86_64).
8113 (struct i387_xsave): Add space for AVX512 registers.
8114 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8115 Add code to handle AVX512 registers.
8116 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8117 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8118 prototypei from generated file.
8119 (tdesc_amd64_avx512_linux): Likewise.
8120 (init_registers_x32_avx512_linux): Likewise.
8121 (tdesc_x32_avx512_linux): Likewise.
8122 (init_registers_i386_avx512_linux): Likewise.
8123 (tdesc_i386_avx512_linux): Likewise.
8124 (x86_64_regmap): Add AVX512 registers.
8125 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8127 (initialize_low_arch): Add code to initialize AVX512 registers.
8129 2014-04-23 Pedro Alves <palves@redhat.com>
8131 * mem-break.c (find_gdb_breakpoint_at): Make static.
8132 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8134 2014-04-23 Pedro Alves <palves@redhat.com>
8136 * i386-low.c: Don't include break-common.h here.
8137 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8138 prototype to take target_hw_bp_type as argument instead of a Z
8140 * i386-low.h: Include break-common.h here.
8141 (Z_packet_to_hw_type): Declare.
8142 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8144 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8145 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8146 (x86_remove_point): Convert the packet number to a
8147 target_hw_bp_type before calling i386_low_remove_watchpoint.
8148 * win32-i386-low.c (i386_insert_point): Convert the packet number
8149 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8150 (i386_remove_point): Convert the packet number to a
8151 target_hw_bp_type before calling i386_low_remove_watchpoint.
8153 2014-04-23 Pedro Alves <palves@redhat.com>
8155 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8157 2014-04-10 Pedro Alves <palves@redhat.com>
8159 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8160 Check if the condition or command is NULL before checking if the
8161 breakpoint is known. On success, return true.
8162 * mem-break.h (add_breakpoint_condition): Document return.
8163 (add_breakpoint_commands): Add describing comment.
8164 * server.c (skip_to_semicolon): New function.
8165 (process_point_options): Use it.
8167 2014-04-09 Pedro Alves <palves@redhat.com>
8169 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8172 2014-02-27 Pedro Alves <palves@redhat.com>
8175 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8177 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8179 (last_thread_of_process_p): Take a PID argument instead of a
8181 (linux_wait_for_lwp): Delete.
8182 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8184 (linux_low_filter_event): New function, party factored out from
8185 linux_wait_for_event.
8186 (linux_wait_for_event): Rename to ...
8187 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8188 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8189 sigsuspend. Check for zombie leaders.
8190 (linux_wait_for_event): Reimplement as wrapper around
8191 linux_wait_for_event_filtered.
8192 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8193 a normal or signal exit is seen, it's the whole process exiting.
8194 (wait_for_sigstop): No longer a for_each_inferior callback.
8195 Rewrite on top of linux_wait_for_event_filtered.
8196 (stop_all_lwps): Call wait_for_sigstop directly.
8197 * server.c (resume, handle_target_event): Handle
8198 TARGET_WAITKIND_NO_RESUMED.
8200 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8202 * win32-low.c (psapi_get_dll_name,
8203 * win32_CreateToolhelp32Snapshot): Delete.
8204 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8205 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8207 (handle_load_dll): Add function description.
8208 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8210 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8212 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8214 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8215 base address when calling win32_add_one_solib.
8216 (handle_load_dll): Delete local variable load_addr.
8217 Remove 0x1000 offset applied to DLL base address when calling
8218 win32_add_one_solib.
8219 (handle_unload_dll): Add comment.
8221 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8223 * win32-low.c (win32_add_all_dlls): Renames
8224 win32_ensure_ntdll_loaded. Rewrite function documentation.
8225 Adjust implementation to always load all DLLs.
8226 Add 0x1000 offset to DLL base address when calling
8227 win32_add_one_solib.
8228 (child_initialization_done): New static global.
8229 (do_initial_child_stuff): Set child_initialization_done to
8230 zero during child initialization, and 1 after. Replace call
8231 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8233 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8234 (handle_unload_dll): Add function documentation.
8235 (get_child_debug_event): Ignore load and unload DLL events
8236 during child initialization.
8238 2014-02-20 Doug Evans <dje@google.com>
8240 Remove global all_lwps.
8241 * inferiors.h (ptid_of): Move here from linux-low.h.
8242 (pid_of, lwpid_of): Ditto.
8243 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8244 parameter is a struct thread_info * now.
8245 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8246 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8247 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8249 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8250 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8251 * linux-arm-low.c (update_registers_callback): Update, "entry"
8252 parameter is a struct thread_info * now.
8253 Fetch lwpid from current_inferior directly.
8254 (arm_insert_point): Pass &all_threads to find_inferior instead of
8256 (arm_remove_point): Ditto.
8257 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8258 (arm_prepare_to_resume): Fetch pid from thread.
8259 (arm_read_description): Fetch lwpid from current_inferior directly.
8260 * linux-low.c (all_lwps): Delete.
8261 (delete_lwp): Delete call to remove_inferior.
8262 (handle_extended_wait): Fetch lwpid from thread.
8263 (add_lwp): Don't set lwp->entry.id. Remove call to
8264 add_inferior_to_list.
8265 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8266 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8267 (kill_one_lwp_callback): Ditto.
8268 (linux_kill): Don't dereference NULL pointer.
8269 Fetch ptid,lwpid from thread.
8270 (get_detach_signal): Fetch ptid from thread.
8271 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8272 Simplify call to regcache_invalidate_thread.
8273 (delete_lwp_callback): Update, "entry" parameter is a
8274 struct thread_info * now. Fetch pid from thread.
8275 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8276 (status_pending_p_callback): Update, "entry" parameter is a
8277 struct thread_info * now. Fetch ptid from thread.
8278 (find_lwp_pid): Update, "entry" parameter is a
8279 struct thread_info * now.
8280 (linux_wait_for_lwp): Fetch pid from thread.
8281 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8282 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8283 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8284 (dequeue_one_deferred_signal): Ditto.
8285 (cancel_breakpoint): Fetch ptid from current_inferior.
8286 (linux_wait_for_event): Pass &all_threads to find_inferior,
8287 not &all_lwps. Fetch ptid, lwpid from thread.
8288 (count_events_callback): Update, "entry" parameter is a
8289 struct thread_info * now.
8290 (select_singlestep_lwp_callback): Ditto.
8291 (select_event_lwp_callback): Ditto.
8292 (cancel_breakpoints_callback): Ditto.
8293 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8295 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8296 (unsuspend_one_lwp): Update, "entry" parameter is a
8297 struct thread_info * now.
8298 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8300 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8301 Fetch lwpid from thread, not lwp.
8302 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8303 Pass &all_threads to find_inferior, not &all_lwps.
8304 (send_sigstop): Fetch lwpid from thread, not lwp.
8305 (send_sigstop_callback): Update, "entry" parameter is a
8306 struct thread_info * now.
8307 (suspend_and_send_sigstop_callback): Ditto.
8308 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8309 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8310 struct thread_info * now.
8311 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8313 (lwp_running): Update, "entry" parameter is a
8314 struct thread_info * now.
8315 (stop_all_lwps): Fetch ptid from thread.
8316 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8317 (linux_resume_one_lwp): Fetch lwpid from thread.
8318 (linux_set_resume_request): Update, "entry" parameter is a
8319 struct thread_info * now. Fetch pid, lwpid from thread.
8320 (resume_status_pending_p): Update, "entry" parameter is a
8321 struct thread_info * now.
8322 (need_step_over_p): Ditto. Fetch lwpid from thread.
8323 (start_step_over): Fetch lwpid from thread.
8324 (linux_resume_one_thread): Update, "entry" parameter is a
8325 struct thread_info * now. Fetch lwpid from thread.
8326 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8327 (proceed_one_lwp): Update, "entry" parameter is a
8328 struct thread_info * now. Fetch lwpid from thread.
8329 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8330 struct thread_info * now.
8331 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8332 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8333 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8335 (regsets_store_inferior_registers): Ditto.
8336 (fetch_register, store_register): Ditto.
8337 (linux_read_memory, linux_write_memory): Ditto.
8338 (linux_request_interrupt): Ditto.
8339 (linux_read_auxv): Ditto.
8340 (linux_xfer_siginfo): Ditto.
8341 (linux_qxfer_spu): Ditto.
8342 (linux_qxfer_libraries_svr4): Ditto.
8343 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8344 moved to inferiors.h.
8346 (get_thread_lwp): Update.
8347 (struct lwp_info): Delete member "entry". Simplify comment for
8350 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8351 current_inferior directly.
8352 (update_watch_registers_callback): Update, "entry" parameter is a
8353 struct thread_info * now. Fetch pid from thread.
8354 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8355 (mips_insert_point): Fetch lwpid from current_inferior.
8356 Pass &all_threads to find_inferior, not &all_lwps.
8357 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8358 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8360 (mips_stopped_data_address): Ditto.
8361 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8363 * linux-tile-low.c (tile_arch_setup): Ditto.
8364 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8365 (update_debug_registers_callback): Update, "entry" parameter is a
8366 struct thread_info * now. Fetch pid from thread.
8367 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8368 Pass &all_threads to find_inferior, not &all_lwps.
8369 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8370 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8371 Pass &all_threads to find_inferior, not &all_lwps.
8372 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8373 (i386_dr_low_get_status): Ditto.
8374 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8375 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8376 (x86_linux_read_description): Ditto.
8377 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8379 2014-02-20 Doug Evans <dje@google.com>
8381 * inferiors.c (get_first_inferior): Fix buglet.
8383 2014-02-19 Doug Evans <dje@google.com>
8385 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8386 * inferiors.c (add_thread): Change result type to struct thread_info *.
8387 All callers updated.
8388 (add_lwp): Call add_thread here instead of in callers.
8389 All callers updated.
8390 * linux-low.h (get_lwp_thread): Rewrite.
8391 (struct lwp_info): New member "thread".
8393 2014-02-19 Doug Evans <dje@google.com>
8395 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8396 All callers updated.
8398 2014-02-19 Doug Evans <dje@google.com>
8400 * inferiors.c (add_thread): Fix whitespace.
8402 2014-02-19 Doug Evans <dje@google.com>
8404 * dll.c (clear_dlls): Replace accessing list implemention details
8406 * gdbthread.h (get_first_thread): Declare.
8407 * inferiors.c (for_each_inferior_with_data): New function.
8408 (get_first_thread): New function.
8409 (find_thread_ptid): Simplify.
8410 (get_first_inferior): New function.
8411 (clear_list): Delete.
8412 (one_inferior_p): New function.
8413 (clear_inferior_list): New function.
8414 (clear_inferiors): Update.
8415 * inferiors.h (for_each_inferior_with_data): Declare.
8416 (clear_inferior_list): Declare.
8417 (one_inferior_p): Declare.
8418 (get_first_inferior): Declare.
8419 * linux-low.c (linux_wait_for_event): Replace accessing list
8420 implemention details with API function.
8421 * server.c (target_running): Ditto.
8422 (accumulate_file_name_length): New function.
8423 (emit_dll_description): New function.
8424 (handle_qxfer_libraries): Replace accessing list implemention
8425 details with API function.
8426 (handle_qxfer_threads_worker): New function.
8427 (handle_qxfer_threads_proper): Replace accessing list implemention
8428 details with API function.
8429 (handle_query): Ditto.
8430 (visit_actioned_threads_callback_ftype): New typedef.
8431 (visit_actioned_threads_data): New struct.
8432 (visit_actioned_threads): Rewrite to be find_inferior callback.
8433 (resume): Call find_inferior.
8434 (handle_status): Replace accessing list implemention
8435 details with API function.
8436 (process_serial_event): Replace accessing list implemention details
8438 * target.c (set_desired_inferior): Replace accessing list implemention
8439 details with API function.
8440 * tracepoint.c (same_process_p): New function.
8441 (gdb_agent_about_to_close): Replace accessing list implemention
8442 details with API function.
8443 * win32-low.c (child_delete_thread): Replace accessing list
8444 implemention details with API function.
8445 (match_dll_by_basename): New function.
8446 (dll_is_loaded_by_basename): New function.
8447 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8448 details call to dll_is_loaded_by_basename.
8450 2014-02-19 Doug Evans <dje@google.com>
8452 * dll.h (struct dll_info): Add comment.
8453 * gdbthread.h (struct thread_info): Add comment.
8454 (current_ptid): Simplify.
8455 * inferiors.c (add_process): Update.
8456 (remove_process): Update.
8457 * inferiors.h (struct process_info): Rename member "head" to "entry".
8458 * linux-low.c (delete_lwp): Update.
8460 (last_thread_of_process_p): Update.
8461 (kill_one_lwp_callback, linux_kill): Update.
8462 (status_pending_p_callback): Update.
8463 (wait_for_sigstop): Update. Simplify read of ptid.
8464 (start_step_over): Update.
8465 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8466 (get_lwp_thread): Update.
8467 (struct lwp_info): Rename member "head" to "entry".
8468 * regcache.h (inferior_list_entry): Delete.
8469 * server.c (kill_inferior_callback): Update.
8470 (detach_or_kill_inferior_callback): Update.
8471 (print_started_pid): Update.
8472 (print_attached_pid): Update.
8473 (process_serial_event): Simplify read of ptid.
8474 * thread-db.c (thread_db_create_event): Update.
8475 (thread_db_get_tls_address): Update.
8476 * win32-low.c (current_inferior_ptid): Simplify.
8478 2014-02-19 Tom Tromey <tromey@redhat.com>
8480 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8482 (target_supports_btrace): Update.
8484 2014-02-14 Yao Qi <yao@codesourcery.com>
8486 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8487 (rsp-low-ipa.o): New target.
8489 2014-02-12 Tom Tromey <tromey@redhat.com>
8491 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8492 convert_ascii_to_int.
8493 * regcache.c (registers_to_string): Likewise.
8494 * remote-utils.c (decode_M_packet): Likewise.
8495 * server.c (process_serial_event): Likewise.
8497 2014-02-12 Tom Tromey <tromey@redhat.com>
8499 * server.c (handle_query, handle_v_run): Use hex2bin, not
8501 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8503 2014-02-12 Tom Tromey <tromey@redhat.com>
8505 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8506 convert_int_to_ascii.
8507 * regcache.c (registers_to_string, collect_register_as_string):
8509 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8511 * server.c (process_serial_event): Likewise.
8512 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8513 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8515 2014-02-12 Tom Tromey <tromey@redhat.com>
8517 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8518 bin2hex, not hexify.
8519 * tracepoint.c (cmd_qtstatus): Likewise.
8521 2014-02-12 Tom Tromey <tromey@redhat.com>
8523 * remote-utils.c (monitor_output): Pass explicit length to
8526 2014-02-12 Tom Tromey <tromey@redhat.com>
8528 * tracepoint.c: Include rsp-low.h.
8529 * server.c: Include rsp-low.h.
8530 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8531 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8533 * remote-utils.c: Include rsp-low.h.
8534 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8535 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8536 (convert_int_to_ascii, convert_ascii_to_int): Move to
8538 * regcache.c: Include rsp-low.h.
8539 * ax.c: Include rsp-low.h.
8540 * Makefile.in (SFILES): Add common/rsp-low.c.
8541 (OBS): Add rsp-low.o.
8542 (rsp-low.o): New target.
8544 2014-02-12 Tom Tromey <tromey@redhat.com>
8546 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8547 Include print-utils.h.
8548 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8549 (plongest, thirty_two, phex_nz): Remove.
8550 * Makefile.in (SFILES): Add common/print-utils.c.
8551 (OBS): Add print-utils.o.
8552 (print-utils-ipa.o): New target.
8553 (print-utils.o): New target.
8554 (IPA_OBJS): Add print-utils-ipa.o.
8556 2014-02-06 Tom Tromey <tromey@redhat.com>
8558 * Makefile.in (SFILES): Fix indentation.
8560 2014-02-05 Doug Evans <dje@google.com>
8562 * linux-low.c (linux_wait_for_event): Improve comment.
8563 (linux_wait_1): Keep current_inferior in sync with event_child.
8565 2014-01-22 Doug Evans <dje@google.com>
8567 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8569 2014-01-22 Doug Evans <dje@google.com>
8571 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8572 * configure: Regenerate.
8573 * config.in: Regenerate.
8574 * Makefile.in (SFILES): Add debug.c.
8576 * debug.c: New file.
8577 * debug.h: New file.
8578 * linux-aarch64-low.c (*): Update all debugging printfs to use
8579 debug_printf instead of fprintf.
8580 * linux-arm-low.c (*): Ditto.
8581 * linux-cris-low.c (*): Ditto.
8582 * linux-crisv32-low.c (*): Ditto.
8583 * linux-m32r-low.c (*): Ditto.
8584 * linux-sparc-low.c (*): Ditto.
8585 * linux-x86.c (*): Ditto.
8586 * linux-low.c (*): Ditto.
8587 (linux_wait_1): Add calls to debug_enter, debug_exit.
8588 (linux_wait): Remove redundant debugging printf.
8589 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8590 (linux_resume, unstop_all_lwps): Ditto.
8591 * mem-break.c (*): Update all debugging printfs to use
8592 debug_printf instead of fprintf.
8593 * remote-utils.c (*): Ditto.
8594 * thread-db.c (*): Ditto.
8595 * server.c #include <ctype.h>, "gdb_vecs.h".
8596 (debug_threads): Moved to debug.c.
8597 (*): Update all debugging printfs to use debug_printf instead of
8599 (start_inferior): Replace call to fflush with call to debug_flush.
8600 (monitor_show_help): Mention set debug-format.
8601 (parse_debug_format_options): New function.
8602 (handle_monitor_command): Handle "monitor set debug-format".
8603 (gdbserver_usage): Mention --debug-format.
8604 (main): Parse --debug-format.
8605 * server.h (debug_threads): Declaration moved to debug.h.
8607 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8608 trace_debug_1 that uses debug_printf.
8609 (tracepoint_look_up_symbols): Update all debugging printfs to use
8610 debug_printf instead of fprintf.
8612 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8614 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8617 2014-01-17 Pedro Alves <palves@redhat.com>
8620 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8621 defined after including gdb_proc_service.h.
8623 2014-01-16 Doug Evans <dje@google.com>
8625 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8626 (match_dll): Use it.
8628 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8630 * target.h (target_ops) <read_btrace>: Change parameters and
8631 return type to allow error reporting.
8632 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8633 trace reading errors on.
8634 * linux-low.c (linux_low_read_btrace): Pass trace reading
8636 (linux_low_disable_btrace): New.
8638 2014-01-15 Doug Evans <dje@google.com>
8640 * inferiors.c (thread_id_to_gdb_id): Delete.
8641 * inferiors.h (thread_id_to_gdb_id): Delete.
8643 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8645 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8646 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8649 2014-01-08 Pedro Alves <palves@redhat.com>
8651 * server.c (handle_status): Don't discard previous queued stop
8652 replies or thread's pending status here.
8653 (main) <disconnection>: Do it here instead.
8655 2014-01-08 Pedro Alves <palves@redhat.com>
8657 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8658 * server.c (visit_actioned_threads, handle_pending_status): New
8660 (handle_v_cont): Factor out parts to ...
8661 (resume): ... this new function. If in all-stop, and a thread
8662 being resumed has a pending status, report it without actually
8664 (myresume): Adjust to use the new 'resume' function.
8665 (clear_pending_status_callback, set_pending_status_callback)
8666 (find_status_pending_thread_callback): New functions.
8667 (handle_status): Handle the case of multiple threads having
8668 interesting statuses to report. Report threads' real last signal
8669 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8670 with an interesting thread to report the status for, instead of
8671 always reporting the status of the first thread.
8673 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8675 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8676 * gdbreplay.c (gdbreplay_version): Likewise.
8678 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8680 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8681 iov.iov_len with the real length in use.
8683 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8685 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8686 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8687 for all targets that use win32-low.c.
8688 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8689 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8691 2013-12-13 Pedro Alves <palves@redhat.com>
8693 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8694 if equal to TARGET_WAITKIND_LOADED.
8695 * win32-low.c (cached_status): New static global.
8696 (win32_wait): Add declaration.
8697 (do_initial_child_stuff): Flush all initial pending debug events
8698 up to the initial breakpoint.
8699 (win32_wait): If CACHED_STATUS was set, return that instead
8700 of doing a real wait. Remove the code resuming the execution
8701 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8702 during the initial phase. Also remove the code changing
8703 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8704 TARGET_WAITKIND_STOPPED.
8706 2013-12-11 Yao Qi <yao@codesourcery.com>
8708 * notif.c (handle_notif_ack): Return 0 if no notification
8711 2013-11-20 Doug Evans <dje@google.com>
8713 * linux-low.c (linux_set_resume_request): Fix comment.
8715 2013-11-20 Doug Evans <dje@google.com>
8717 * linux-low.c (resume_status_pending_p): Tweak comment.
8719 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8721 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8722 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8723 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8724 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8725 (srv_amd64_regobj): Add amd64-mpx.o.
8726 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8727 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8728 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8729 * i387-fp.c (num_pl_bnd_register) Added constant.
8730 (num_pl_bnd_cfg_registers) Added constant.
8731 (struct i387_xsave) Added reserved area and MPX fields.
8732 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8733 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8735 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8736 (init_registers_amd64_mpx_linux): Declare new function.
8737 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8738 (x86_64_regmap): Add MPX registers.
8739 (x86_linux_read_description): Add MPX case.
8740 (initialize_low_arch): Initialize MPX targets.
8742 2013-11-18 Tom Tromey <tromey@redhat.com>
8744 * configure: Rebuild.
8745 * configure.ac: Don't check for stdlib.h.
8746 * gdbreplay.c: Unconditionally include stdlib.h.
8748 2013-11-18 Tom Tromey <tromey@redhat.com>
8750 * config.in: Rebuild.
8751 * configure: Rebuild.
8752 * configure.ac: Don't use AC_HEADER_DIRENT.
8754 2013-11-18 Tom Tromey <tromey@redhat.com>
8756 * server.h: Don't check HAVE_STRING_H.
8757 * gdbreplay.c: Don't check HAVE_STRING_H.
8758 * configure: Rebuild.
8760 2013-11-18 Tom Tromey <tromey@redhat.com>
8762 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8765 2013-11-08 Tom Tromey <tromey@redhat.com>
8767 * configure, config.in: Rebuild.
8768 * configure.ac: Remove unused configury.
8770 2013-11-08 Tom Tromey <tromey@redhat.com>
8772 * acinclude.m4: Include common.m4, codeset.m4.
8773 * configure, config.in: Rebuild.
8774 * configure.ac: Use GDB_AC_COMMON.
8776 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8778 * linux-s390-low.c (HWCAP_S390_TE): New define.
8779 (s390_arch_setup): Consider the TE field in the HWCAP for
8780 determining 'have_regset_tdb'.
8782 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8785 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8788 2013-10-02 Pedro Alves <palves@redhat.com>
8790 * server.c (process_serial_event): Don't output "GDBserver
8791 exiting" if GDB is connected through stdio.
8792 * target.c (mywait): Likewise, be silent if GDB is connected
8795 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8797 * lynx-low.c (lynx_add_threads_after_attach): New function.
8798 (lynx_attach): Remove call to add_thread. Add call to
8799 lynx_add_threads_after_attach instead.
8801 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8803 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8804 * config.in, configure: Regenerated.
8806 2013-09-18 Yao Qi <yao@codesourcery.com>
8809 * server.c (start_inferior): Clear 'resume_info'.
8811 2013-09-16 Jiong Wang <jiwang@tilera.com>
8813 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8816 2013-09-16 Jiong Wang <jiwang@tilera.com>
8818 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8819 linux-tile-low.o to srv_tgtobj.
8821 2013-09-16 Will Newton <will.newton@linaro.org>
8823 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8826 2013-09-06 Pedro Alves <palves@redhat.com>
8828 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8829 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8830 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8831 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8832 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8833 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8835 2013-09-06 Pedro Alves <palves@redhat.com>
8837 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8838 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8840 2013-09-06 Pedro Alves <palves@redhat.com>
8842 * linux-amd64-ipa.c: Include tracepoint.h.
8843 * linux-i386-ipa.c: Include tracepoint.h.
8845 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8847 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8848 (ps_get_thread_area): New function.
8850 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8852 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8853 (initialize_low_arch): Call init_registers_crisv32 rather than
8854 init_register_crisv32.
8856 2013-09-05 Pedro Alves <palves@redhat.com>
8858 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8860 * hostio.h: ... this new file.
8861 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8862 win32-low.c: Include hostio.h.
8864 2013-09-05 Pedro Alves <palves@redhat.com>
8866 * server.h (gdb_client_data, handler_func, callback_handler_func)
8867 (delete_file_handler, add_file_handler, append_callback_event)
8868 (delete_callback_event, start_event_loop, initialize_event_loop):
8869 Move to event-loop.h and include it.
8870 * event-loop.h: New file.
8872 2013-09-05 Pedro Alves <palves@redhat.com>
8874 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8875 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8876 (loaded_dll, unloaded_dll): Move to ...
8877 * dll.h: ... this new file.
8878 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8880 2013-09-05 Pedro Alves <palves@redhat.com>
8882 * server.h (current_process, get_thread_process, all_processes)
8883 (add_inferior_to_list, for_each_inferior, current_inferior)
8884 (remove_inferior, add_process, remove_process, find_process_pid)
8885 (have_started_inferiors_p, have_attached_inferiors_p)
8886 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8887 (clear_inferiors, find_inferior, find_inferior_id)
8888 (inferior_target_data, set_inferior_target_data)
8889 (inferior_regcache_data, set_inferior_regcache_data): Move to
8890 inferiors.h, and include it.
8891 * inferiors.h: New file.
8893 2013-09-05 Pedro Alves <palves@redhat.com>
8895 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8899 2013-09-05 Pedro Alves <palves@redhat.com>
8901 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8903 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8904 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8905 (handle_tracepoint_general_set, handle_tracepoint_query)
8906 (tracepoint_finished_step, tracepoint_was_hit)
8907 (release_while_stepping_state_list, current_traceframe)
8908 (in_readonly_region, traceframe_read_mem)
8909 (fetch_traceframe_registers, traceframe_read_sdata)
8910 (traceframe_read_info, struct fast_tpoint_collect_status)
8911 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8912 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8913 (supply_fast_tracepoint_registers)
8914 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8915 (ipa_tdesc, claim_trampoline_space)
8916 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8917 (agent_mem_read, agent_get_trace_state_variable_value)
8918 (agent_set_trace_state_variable_value, agent_tsv_read)
8919 (agent_mem_read_string, get_raw_reg_func_addr)
8920 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8921 * tracepoint.h: ... this new file.
8923 2013-09-05 Pedro Alves <palves@redhat.com>
8925 * server.h (perror_with_name, error, fatal, warning, paddress)
8926 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8928 * utils.h: New file.
8930 2013-09-05 Pedro Alves <palves@redhat.com>
8932 * server.h (remote_debug, noack_mode, transport_is_reliable)
8933 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8934 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8935 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8936 (write_enn, initialize_async_io, enable_async_io)
8937 (disable_async_io, check_remote_input_interrupt_request)
8938 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8939 (dead_thread_notify, prepare_resume_reply)
8940 (decode_address_to_semicolon, decode_address, decode_m_packet)
8941 (decode_M_packet, decode_X_packet, decode_xfer_write)
8942 (decode_search_memory_packet, unhexify, hexify)
8943 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8944 (look_up_one_symbol, relocate_instruction)
8945 (monitor_output): Move to remote-utils.h, and include it.
8946 * remote-utils.h: New file.
8948 2013-09-05 Pedro Alves <palves@redhat.com>
8950 * server.h (_): Delete.
8952 2013-09-02 Pedro Alves <palves@redhat.com>
8954 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8955 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8957 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8959 2013-09-02 Pierre Muller <muller@sourceware.org>
8961 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8962 or WriteProcessMemory complete successfully and handle
8963 ERROR_PARTIAL_COPY error.
8965 2013-09-02 Pedro Alves <palves@redhat.com>
8967 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8968 error instead of EIO.
8970 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8973 * linux-low.c: Include filestuff.h.
8974 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8975 * lynx-low.c: Include filestuff.h.
8976 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8977 * server.c: Include filestuff.h.
8978 (main): Call notice_open_fds.
8979 * spu-low.c: Include filestuff.h.
8980 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8982 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8984 * Makefile.in: Explain why ../target and ../nat are not
8985 listed as include file search paths.
8986 (linux-waitpid.o): New object file rule.
8987 * configure.srv (srv_native_linux_obj): New variable.
8988 Replace all occurrences of linux native object files with
8989 $srv_native_linux_obj.
8990 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8991 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8992 (linux_enable_event_reporting): Remove declaration.
8993 (my_waitpid): Moved to common/linux-waitpid.c.
8994 (linux_wait_for_event): Pass ptid when calling
8995 linux_enable_event_reporting.
8996 (linux_supports_tracefork_flag): Remove.
8997 (linux_enable_event_reporting): Likewise.
8998 (linux_tracefork_grandchild): Remove.
8999 (STACK_SIZE): Moved to common/linux-ptrace.c.
9000 (linux_tracefork_child): Remove.
9001 (linux_test_for_tracefork): Remove.
9002 (linux_look_up_symbols): Call linux_supports_traceclone.
9003 (initialize_low): Remove call to linux_test_for_tracefork.
9004 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9005 common/linux-ptrace.h.
9006 (PTRACE_TYPE_ARG4): Likewise.
9007 Include linux-ptrace.h.
9009 2013-08-21 Pedro Alves <palves@redhat.com>
9011 * config.in: Renegerate.
9013 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9015 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9016 (SFILES): Remove $(srcdir)/common/target-common.c and
9017 add $(srcdir)/target/waitstatus.c.
9018 (OBS): Remove target-common.o and add waitstatus.o.
9019 (server_h): Remove $(srcdir)/../common/target-common.h and
9020 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9021 and $(srcdir)/../target/waitstatus.h.
9022 (target-common.o): Remove.
9023 (waitstatus.o): New target object file.
9024 * target.h: Do not include target-common.h and
9025 include target/resume.h, target/wait.h and
9026 target/waitstatus.h.
9028 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9030 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9031 to PTRACE_TYPE_ARG3.
9032 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9033 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9035 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9036 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9038 2013-07-27 Jie Zhang <jie@codesourcery.com>
9039 Daniel Jacobowitz <dan@codesourcery.com>
9040 Yao Qi <yao@codesourcery.com>
9042 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9043 (mips-linux-watch.o): New rule.
9044 (mips_linux_watch_h): New variable.
9045 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9047 * linux-mips-low.c: Include mips-linux-watch.h.
9048 (struct arch_process_info, struct arch_lwp_info): New.
9049 (update_watch_registers_callback): New function.
9050 (mips_linux_new_process, mips_linux_new_thread) New functions.
9051 (mips_linux_prepare_to_resume, mips_insert_point): New
9053 (mips_remove_point, mips_stopped_by_watchpoint): New
9055 (rsp_bp_type_to_target_hw_bp_type): New function.
9056 (mips_stopped_data_address): New function.
9057 (the_low_target): Add watchpoint support functions.
9059 2013-07-27 Yao Qi <yao@codesourcery.com>
9061 * i386-low.c: Include break-common.h.
9062 (enum target_hw_bp_type): Remove.
9064 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9066 * Makefile.in (SFILES): /common/target-common.c.
9067 (OBS): Add target-common.o.
9068 (server_h): Add $(srcdir)/../common/target-common.h.
9069 (target-common.o): New target.
9070 * server.c (queue_stop_reply_callback): Free
9071 status string after use.
9072 * target.c (target_waitstatus_to_string): Remove.
9073 * target.h: Include target-common.h.
9074 (resume_kind): Likewise.
9075 (target_waitkind): Likewise.
9076 (target_waitstatus): Likewise.
9077 (TARGET_WNOHANG): Likewise.
9079 2013-07-04 Yao Qi <yao@codesourcery.com>
9081 * Makefile.in (host_alias): Use @host_noncanonical@.
9082 (target_alias): Use @target_noncanonical@.
9083 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9084 ACX_NONCANONICAL_HOST.
9085 * configure: Regenerated.
9088 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9090 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9091 * configure: Rebuild.
9092 * Makefile.in (version_host, version_target): Get from configure.
9093 (version.c): Use $(version_host) and $(version_target).
9095 2013-07-03 Pedro Alves <palves@redhat.com>
9097 * Makefile.in (config.status): Depend on development.sh.
9098 * acinclude.m4: Include libmcheck.m4.
9099 * configure: Regenerate.
9101 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9103 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9104 attribute inside the parentheses.
9105 (winapi_DebugSetProcessKillOnExit): Ditto.
9106 (winapi_DebugBreakProcess): Ditto.
9107 (winapi_GenerateConsoleCtrlEvent): Ditto.
9109 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9111 * notif.h (notif_event): Add a dummy member to avoid compiler
9114 2013-07-01 Pedro Alves <palves@redhat.com>
9116 * hostio.c (HOSTIO_PATH_MAX): Define.
9117 (require_filename, handle_open, handle_unlink, handle_readlink):
9120 2013-07-01 Pedro Alves <palves@redhat.com>
9122 * server.h: Include "pathmax.h".
9123 * linux-low.c: Don't include sys/param.h.
9124 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9126 * win32-low.c: Don't include sys/param.h.
9127 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9129 2013-07-01 Pedro Alves <palves@redhat.com>
9131 * event-loop.c: Don't check HAVE_UNISTD_H before including
9133 * gdbreplay.c: Likewise.
9134 * remote-utils.c: Likewise.
9135 * server.c: Likewise.
9136 * configure.ac: Don't check for unistd.h.
9137 * configure: Regenerate.
9139 2013-06-28 Tom Tromey <tromey@redhat.com>
9141 * Makefile.in (version.c): Use version.in, not
9144 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9146 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9147 * configure: Rebuild.
9148 * Makefile.in (version_host, version_target): Get from configure.
9149 (version.c): Use $(version_host) and $(version_target).
9151 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9153 Fix trace-status to output user name without trailing colon.
9154 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9156 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9158 Fix trace-status to output proper start-time and stop-time.
9159 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9160 output start time and stop time in hex as gdb expects.
9162 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9164 * tracepoint.c (build_traceframe_info_xml): Output trace state
9165 variables present in the trace buffer.
9167 2013-06-24 Tom Tromey <tromey@redhat.com>
9169 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9171 (version.o): Remove.
9172 * gdbreplay.c: Include version.h.
9173 (version, host_name): Don't declare.
9174 * server.h: Include version.h.
9175 (version, host_name): Don't declare.
9177 2013-06-12 Pedro Alves <palves@redhat.com>
9179 * linux-x86-low.c (linux_is_elf64): Delete global.
9180 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9181 with local linux_pid_exe_is_elf_64_file use.
9183 2013-06-11 Pedro Alves <palves@redhat.com>
9185 * linux-low.c (regset_disabled, disable_regset): New functions.
9186 (regsets_fetch_inferior_registers)
9187 (regsets_store_inferior_registers): Use them.
9188 (initialize_regsets_info); Don't allocate the disabled_regsets
9190 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9193 2013-06-11 Pedro Alves <palves@redhat.com>
9195 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9198 2013-06-11 Pedro Alves <palves@redhat.com>
9200 * linux-x86-low.c (initialize_low_arch): Call
9201 init_registers_x32_avx_linux.
9203 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9205 Fix compatibility with Android Bionic.
9206 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9209 2013-06-07 Pedro Alves <palves@redhat.com>
9212 * Makefile.in (OBS): Add tdesc.o.
9213 (IPA_OBJS): Add tdesc-ipa.o.
9214 (tdesc-ipa.o): New rule.
9215 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9217 * linux-low.c (new_inferior): Delete.
9218 (disabled_regsets, num_regsets): Delete.
9219 (linux_add_process): Adjust to set the new per-process
9221 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9222 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9223 was a stop. When calling arch_setup, switch the current inferior
9224 to the thread that got an event.
9225 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9226 (regsets_fetch_inferior_registers)
9227 (regsets_store_inferior_registers): New regsets_info parameter.
9229 (linux_register_in_regsets): New regs_info parameter. Adjust to
9231 (register_addr, fetch_register, store_register): New usrregs_info
9232 parameter. Adjust to use it.
9233 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9234 parameter regs_info. Adjust to use it.
9235 (linux_fetch_registers): Get the current inferior's regs_info, and
9237 (linux_store_registers): Ditto.
9238 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9239 (initialize_low): Don't initialize the target_regsets here. Call
9240 initialize_low_arch.
9241 * linux-low.h (target_regsets): Delete declaration.
9242 (struct regsets_info): New.
9243 (struct usrregs_info): New.
9244 (struct regs_info): New.
9245 (struct process_info_private) <new_inferior>: New field.
9246 (struct linux_target_ops): Delete the num_regs, regmap, and
9247 regset_bitmap fields. New field regs_info.
9248 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9249 * i387-fp.c (num_xmm_registers): Delete.
9250 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9251 calls to new interface.
9252 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9253 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9254 Infer the number of xmm registers from the regcache's target
9256 * i387-fp.h (num_xmm_registers): Delete.
9257 * inferiors.c (add_thread): Don't install the thread's regcache
9259 * proc-service.c (gregset_info): Fetch the current inferior's
9260 regs_info. Adjust to use it.
9261 * regcache.c: Include tdesc.h.
9262 (register_bytes, reg_defs, num_registers)
9263 (gdbserver_expedite_regs): Delete.
9264 (get_thread_regcache): If the thread doesn't have a regcache yet,
9265 create one, instead of aborting gdbserver.
9266 (regcache_invalidate_one): Rename to ...
9267 (regcache_invalidate_thread): ... this.
9268 (regcache_invalidate_one): New.
9269 (regcache_invalidate): Only invalidate registers of the current
9271 (init_register_cache): Add target_desc parameter, and use it.
9272 (new_register_cache): Ditto. Assert the target description has a
9273 non zero registers_size.
9274 (regcache_cpy): Add assertions. Adjust.
9275 (realloc_register_cache, set_register_cache): Delete.
9276 (registers_to_string, registers_from_string): Adjust.
9277 (find_register_by_name, find_regno, find_register_by_number)
9278 (register_cache_size): Add target_desc parameter, and use it.
9279 (free_register_cache_thread, free_register_cache_thread_one)
9280 (regcache_release, register_cache_size): New.
9281 (register_size): Add target_desc parameter, and use it.
9282 (register_data, supply_register, supply_register_zeroed)
9283 (supply_regblock, supply_register_by_name, collect_register)
9284 (collect_register_as_string, collect_register_by_name): Adjust.
9285 * regcache.h (struct target_desc): Forward declare.
9286 (struct regcache) <tdesc>: New field.
9287 (init_register_cache, new_register_cache): Add target_desc
9289 (regcache_invalidate_thread): Declare.
9290 (regcache_invalidate_one): Delete declaration.
9291 (regcache_release): Declare.
9292 (find_register_by_number, register_cache_size, register_size)
9293 (find_regno): Add target_desc parameter.
9294 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9296 * remote-utils.c: Include tdesc.h.
9297 (outreg, prepare_resume_reply): Adjust.
9298 * server.c: Include tdesc.h.
9299 (gdbserver_xmltarget): Delete declaration.
9300 (get_features_xml, process_serial_event): Adjust.
9301 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9303 (struct process_info) <tdesc>: New field.
9304 (ipa_tdesc): Declare.
9305 * tdesc.c: New file.
9306 * tdesc.h: New file.
9307 * tracepoint.c: Include tdesc.h.
9308 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9309 (get_context_regcache): Adjust to pass ipa_tdesc down.
9310 (do_action_at_tracepoint): Adjust to get the register cache size
9311 from the context regcache's description.
9312 (traceframe_walk_blocks): Adjust to get the register cache size
9313 from the current trace frame's description.
9314 (traceframe_get_pc): Adjust to get current trace frame's
9315 description and pass it down.
9316 (gdb_collect): Adjust to get the register cache size from the
9318 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9319 (gdbserver_xmltarget): Delete.
9320 (initialize_low_tracepoint): Set the ipa's target description.
9321 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9322 (initialize_low_tracepoint): Set the ipa's target description.
9323 * linux-x86-low.c: Include tdesc.h.
9324 [__x86_64__] (is_64bit_tdesc): New.
9325 (ps_get_thread_area, x86_get_thread_area): Use it.
9326 (i386_cannot_store_register): Rename to ...
9327 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9328 (i386_cannot_fetch_register): Rename to ...
9329 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9330 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9332 (target_regsets): Rename to ...
9333 (x86_regsets): ... this.
9334 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9336 (x86_siginfo_fixup): Use is_64bit_tdesc.
9337 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9338 (tdesc_x32_avx_linux, tdesc_x32_linux)
9339 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9341 (x86_linux_update_xmltarget): Delete.
9342 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9343 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9344 (AMD64_LINUX_USER64_CS): New.
9345 (x86_linux_read_description): New, based on
9346 x86_linux_update_xmltarget.
9347 (same_process_callback): New.
9348 (x86_arch_setup_process_callback): New.
9349 (x86_linux_update_xmltarget): New.
9350 (x86_regsets_info): New.
9351 (amd64_linux_regs_info): New.
9352 (i386_linux_usrregs_info): New.
9353 (i386_linux_regs_info): New.
9354 (x86_linux_regs_info): New.
9355 (x86_arch_setup): Reimplement.
9356 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9357 (x86_emit_ops): Ditto.
9358 (the_low_target): Adjust. Install x86_linux_regs_info,
9359 x86_cannot_fetch_register, and x86_cannot_store_register.
9360 (initialize_low_arch): New.
9361 * linux-ia64-low.c (tdesc_ia64): Declare.
9362 (ia64_fetch_register): Adjust.
9363 (ia64_usrregs_info, regs_info): New globals.
9364 (ia64_regs_info): New function.
9365 (the_low_target): Adjust.
9366 (initialize_low_arch): New function.
9367 * linux-sparc-low.c (tdesc_sparc64): Declare.
9368 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9370 (sparc_arch_setup): New function.
9371 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9372 (the_low_target): Adjust.
9373 (initialize_low_arch): New function.
9374 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9375 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9376 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9377 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9378 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9379 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9380 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9381 (tdesc_powerpc_isa205_vsx64l): Declare.
9382 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9383 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9384 (ppc_set_pc, ppc_get_hwcap): Adjust.
9385 (ppc_usrregs_info): Forward declare.
9386 (!__powerpc64__) ppc_regmap_adjusted: New global.
9387 (ppc_arch_setup): Adjust to the current process'es target
9389 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9390 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9391 (ppc_store_evrregset): Adjust.
9392 (target_regsets): Rename to ...
9393 (ppc_regsets): ... this, and make static.
9394 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9395 (ppc_regs_info): New function.
9396 (the_low_target): Adjust.
9397 (initialize_low_arch): New function.
9398 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9399 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9400 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9401 (tdesc_s390x_linux64v2): Declare.
9402 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9403 (s390_fill_gregset, s390_store_last_break): Adjust.
9404 (target_regsets): Rename to ...
9405 (s390_regsets): ... this, and make static.
9406 (s390_get_pc, s390_set_pc): Adjust.
9407 (s390_get_hwcap): New target_desc parameter, and use it.
9408 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9409 (s390_arch_setup): Adjust to set the current process'es target
9410 description. Don't adjust the regmap.
9411 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9412 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9413 (regs_info_3264): New globals.
9414 (s390_regs_info): New function.
9415 (the_low_target): Adjust.
9416 (initialize_low_arch): New function.
9417 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9418 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9419 [__mips64] (init_registers_mips_linux)
9420 (init_registers_mips_dsp_linux): Delete defines.
9421 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9422 (have_dsp): New global.
9423 (mips_read_description): New, based on mips_arch_setup.
9424 (mips_arch_setup): Reimplement.
9425 (get_usrregs_info): New function.
9426 (mips_cannot_fetch_register, mips_cannot_store_register)
9427 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9428 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9429 (target_regsets): Rename to ...
9430 (mips_regsets): ... this, and make static.
9431 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9432 (dsp_regs_info, regs_info): New globals.
9433 (mips_regs_info): New function.
9434 (the_low_target): Adjust.
9435 (initialize_low_arch): New function.
9436 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9437 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9439 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9440 (arm_read_description): New, with bits factored from
9442 (arm_arch_setup): Reimplement.
9443 (target_regsets): Rename to ...
9444 (arm_regsets): ... this, and make static.
9445 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9446 (arm_regs_info): New function.
9447 (the_low_target): Adjust.
9448 (initialize_low_arch): New function.
9449 * linux-m68k-low.c (tdesc_m68k): Declare.
9450 (target_regsets): Rename to ...
9451 (m68k_regsets): ... this, and make static.
9452 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9453 (m68k_regs_info): New function.
9454 (m68k_arch_setup): New function.
9455 (the_low_target): Adjust.
9456 (initialize_low_arch): New function.
9457 * linux-sh-low.c (tdesc_sharch): Declare.
9458 (target_regsets): Rename to ...
9459 (sh_regsets): ... this, and make static.
9460 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9461 (sh_regs_info, sh_arch_setup): New functions.
9462 (the_low_target): Adjust.
9463 (initialize_low_arch): New function.
9464 * linux-bfin-low.c (tdesc_bfin): Declare.
9465 (bfin_arch_setup): New function.
9466 (bfin_usrregs_info, regs_info): New globals.
9467 (bfin_regs_info): New function.
9468 (the_low_target): Adjust.
9469 (initialize_low_arch): New function.
9470 * linux-cris-low.c (tdesc_cris): Declare.
9471 (cris_arch_setup): New function.
9472 (cris_usrregs_info, regs_info): New globals.
9473 (cris_regs_info): New function.
9474 (the_low_target): Adjust.
9475 (initialize_low_arch): New function.
9476 * linux-cris-low.c (tdesc_crisv32): Declare.
9477 (cris_arch_setup): New function.
9478 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9479 (cris_regs_info): New function.
9480 (the_low_target): Adjust.
9481 (initialize_low_arch): New function.
9482 * linux-m32r-low.c (tdesc_m32r): Declare.
9483 (m32r_arch_setup): New function.
9484 (m32r_usrregs_info, regs_info): New globals.
9485 (m32r_regs_info): Adjust.
9486 (initialize_low_arch): New function.
9487 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9488 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9489 (tic6x_usrregs_info): Forward declare.
9490 (tic6x_read_description): New function, based on ...
9491 (tic6x_arch_setup): ... this. Reimplement.
9492 (target_regsets): Rename to ...
9493 (tic6x_regsets): ... this, and make static.
9494 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9495 (tic6x_regs_info): New function.
9496 (the_low_target): Adjust.
9497 (initialize_low_arch): New function.
9498 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9499 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9500 (target_regsets): Rename to ...
9501 (xtensa_regsets): ... this, and make static.
9502 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9504 (xtensa_arch_setup, xtensa_regs_info): New functions.
9505 (the_low_target): Adjust.
9506 (initialize_low_arch): New function.
9507 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9508 (nios2_arch_setup): Set the current process'es tdesc.
9509 (target_regsets): Rename to ...
9510 (nios2_regsets): ... this.
9511 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9512 (nios2_regs_info): New function.
9513 (the_low_target): Adjust.
9514 (initialize_low_arch): New function.
9515 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9516 (aarch64_arch_setup): Set the current process'es tdesc.
9517 (target_regsets): Rename to ...
9518 (aarch64_regsets): ... this.
9519 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9520 (aarch64_regs_info): New function.
9521 (the_low_target): Adjust.
9522 (initialize_low_arch): New function.
9523 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9525 (target_regsets): Rename to ...
9526 (tile_regsets): ... this.
9527 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9528 (tile_regs_info): New function.
9529 (tile_arch_setup): Set the current process'es tdesc.
9530 (the_low_target): Adjust.
9531 (initialize_low_arch): New function.
9532 * spu-low.c (tdesc_spu): Declare.
9533 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9534 * win32-arm-low.c (tdesc_arm): Declare.
9535 (arm_arch_setup): New function.
9536 (the_low_target): Install arm_arch_setup instead of
9538 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9539 (init_windows_x86): Rename to ...
9540 (i386_arch_setup): ... this. Set `win32_tdesc'.
9541 (the_low_target): Adjust.
9542 * win32-low.c (win32_tdesc): New global.
9543 (child_add_thread): Don't create the thread cache here.
9544 (do_initial_child_stuff): Set the new process'es tdesc.
9545 * win32-low.h (struct target_desc): Forward declare.
9546 (win32_tdesc): Declare.
9547 * lynx-i386-low.c (tdesc_i386): Declare global.
9548 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9549 * lynx-low.c (lynx_tdesc): New global.
9550 (lynx_add_process): Set the new process'es tdesc.
9551 * lynx-low.h (struct target_desc): Forward declare.
9552 (lynx_tdesc): Declare global.
9553 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9554 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9555 * nto-low.c (nto_tdesc): New global.
9556 (do_attach): Set the new process'es tdesc.
9557 * nto-low.h (struct target_desc): Forward declare.
9558 (nto_tdesc): Declare.
9559 * nto-x86-low.c (tdesc_i386): Declare.
9560 (nto_x86_arch_setup): Set `nto_tdesc'.
9562 2013-06-04 Gary Benson <gbenson@redhat.com>
9564 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9565 to qSupported response when appropriate.
9566 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9567 with nonzero-length annex.
9568 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9569 arguments supplied in annex.
9571 2013-05-31 Doug Evans <dje@google.com>
9574 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9575 64 bits in 64-cross-32 environment.
9577 2013-05-28 Pedro Alves <palves@redhat.com>
9579 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9580 (aarch64-without-fpu.c): Delete rule.
9581 * configure.srv (aarch64*-*-linux*): Remove references to
9582 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9583 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9586 2013-05-24 Pedro Alves <palves@redhat.com>
9588 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9589 instead of strchr/decode_address. Error if the range isn't split
9590 with a ','. Don't assume there's be a ':' in the action.
9592 2013-05-23 Yao Qi <yao@codesourcery.com>
9593 Pedro Alves <palves@redhat.com>
9595 * linux-low.c (lwp_in_step_range): New function.
9596 (linux_wait_1): If the thread was range stepping and stopped
9597 outside the stepping range, report the stop to GDB. Otherwise,
9598 continue stepping. Add range stepping debug output.
9599 (linux_set_resume_request): Copy the step range from the resume
9601 (linux_supports_range_stepping): New.
9602 (linux_target_ops) <supports_range_stepping>: Set to
9603 linux_supports_range_stepping.
9604 * linux-low.h (struct linux_target_ops)
9605 <supports_range_stepping>: New field.
9606 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9607 * linux-x86-low.c (x86_supports_range_stepping): New.
9608 (the_low_target) <supports_range_stepping>: Set to
9609 x86_supports_range_stepping.
9610 * server.c (handle_v_cont): Handle 'r' action.
9611 (handle_v_requests): Append ";r" if the target supports range
9613 * target.h (struct thread_resume) <step_range_start,
9614 step_range_end>: New fields.
9615 (struct target_ops) <supports_range_stepping>:
9617 (target_supports_range_stepping): New macro.
9619 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9621 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9622 confusion in comment.
9624 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9626 * lynx-low.c (struct process_info_private): New type.
9627 (lynx_add_process): New function.
9628 (lynx_create_inferior, lynx_attach): Replace calls to
9629 add_process by calls to lynx_add_process.
9630 (lynx_resume): If PTID is null, then try using
9631 current_process()->private->last_wait_event_ptid.
9633 (lynx_clear_inferiors): Delete. The contents of that function
9634 has been inlined in lynx_mourn;
9635 (lynx_wait_1): Save the ptid in the process's private data.
9636 (lynx_mourn): Free the process' private data. Replace call
9637 to lynx_clear_inferiors by call to clear_inferiors.
9639 2013-05-17 Yao Qi <yao@codesourcery.com>
9641 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9644 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9646 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9647 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9648 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9649 PT_TEXT_END_ADDR guards. Update comments.
9650 (linux_target_op) <read_offsets>: Conditionally define to
9651 linux_read_offsets if the target is UCLIBC and if it defines
9652 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9654 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9655 Andrew Jenner <andrew@codesourcery.com>
9657 * Makefile.in (SFILES): Add linux-nios2-low.c.
9658 (clean): Add action to delete nios2-linux.c.
9659 (nios2-linux.c): New rule.
9660 * configure.srv: Add nios2*-*-linux*.
9661 * linux-nios2-low.c: New.
9663 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9665 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9667 2013-04-25 Hui Zhu <hui@codesourcery.com>
9670 * ax.c (ax_printf): Add fflush.
9672 2013-04-22 Tom Tromey <tromey@redhat.com>
9674 * Makefile.in (SFILES): Add filestuff.c.
9675 (OBS): Add filestuff.o.
9676 (filestuff.o): New target.
9677 * config.in, configure: Rebuild.
9678 * configure.ac: Check for fdwalk, pipe2.
9680 2013-04-17 Pedro Alves <palves@redhat.com>
9682 * configure.ac (USE_THREAD_DB): Delete variable.
9683 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9684 Don't AC_SUBST USE_THREAD_DB.
9685 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9686 * config.in, configure: Regenerate.
9688 2013-04-16 Pedro Alves <palves@redhat.com>
9690 * linux-low.h (struct lwp_info) <thread_known>: Move under
9691 the USE_THREAD_DB #ifdef.
9693 2013-04-16 Pedro Alves <palves@redhat.com>
9695 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9696 (linux-low.o): Delete rule.
9697 * linux-low.h: Always include "gdb_thread_db.h" instead of
9698 conditionally including thread_db.h.
9699 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9702 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9704 * Makefile.in (install-only): Fix make install regression.
9706 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9708 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9709 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9711 * gdbserver.1: Remove.
9713 2013-03-22 Pedro Alves <palves@redhat.com>
9715 * linux-low.c (handle_extended_wait): Don't call
9716 linux_enable_event_reporting.
9718 2013-03-15 Tony Theodore <tonyt@logyst.com>
9721 * Makefile.in (SHELL): Use @SHELL@.
9723 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9725 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9728 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9730 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9731 Remove extraneous NULL element.
9733 2013-03-13 Yao Qi <yao@codesourcery.com>
9735 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9736 'V' block in trace frame.
9738 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9740 * target.h (struct target_ops): Add btrace ops.
9741 (target_supports_btrace): New macro.
9742 (target_enable_btrace): New macro.
9743 (target_disable_btrace): New macro.
9744 (target_read_btrace): New macro.
9745 * gdbthread.h (struct thread_info): Add btrace field.
9746 * server.c: Include btrace-common.h.
9747 (handle_btrace_general_set): New function.
9748 (handle_btrace_enable): New function.
9749 (handle_btrace_disable): New function.
9750 (handle_general_set): Call handle_btrace_general_set.
9751 (handle_qxfer_btrace): New function.
9752 (struct qxfer qxfer_packets[]): Add btrace entry.
9753 * inferiors.c (remove_thread): Disable btrace.
9754 * linux-low: Include linux-btrace.h.
9755 (linux_low_enable_btrace): New function.
9756 (linux_low_read_btrace): New function.
9757 (linux_target_ops): Add btrace ops.
9758 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9759 Add srv_linux_btrace=yes.
9760 (x86_64-*-linux*): Add linux-btrace.o.
9761 Add srv_linux_btrace=yes.
9762 * configure.ac: Define HAVE_LINUX_BTRACE.
9763 * config.in: Regenerated.
9764 * configure: Regenerated.
9766 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9768 * server.c (handle_qxfer): Preserve error message if -3 is
9770 (qxfer): Document the -3 return value.
9772 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9774 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9775 (linux_btrace_h): New variable.
9776 (linux-btrace.o): New rule.
9778 2013-03-08 Stan Shebs <stan@codesourcery.com>
9779 Hafiz Abid Qadeer <abidh@codesourcery.com>
9781 * tracepoint.c (trace_buffer_size): New global.
9782 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9783 (init_trace_buffer): Change to one-argument function. Allocate
9784 trace buffer memory.
9785 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9786 handle QTBuffer:size packet.
9787 (cmd_bigqtbuffer_size): New function.
9788 (initialize_tracepoint): Call init_trace_buffer with
9789 DEFAULT_TRACE_BUFFER_SIZE.
9790 * server.c (handle_query): Add QTBuffer:size in the
9793 2013-03-07 Yao Qi <yao@codesourcery.com>
9795 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9796 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9798 (cmd_qtsp): Adjust condition. Do post increment.
9799 Set cur_action and cur_step_action back to 0.
9801 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9804 * linux-low.c (linux_write_memory): Return early success if LEN is
9807 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9809 * configure.srv: Add x86_64-*-cygwin* as target.
9811 2013-02-28 Tom Tromey <tromey@redhat.com>
9813 * configure.ac: Invoke AC_SYS_LARGEFILE.
9814 * configure, config.in: Rebuild.
9816 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9818 * win32-low.c: Throughout, fix format strings and casts of
9819 printf-like functions to avoid type related warnings on all
9821 (get_child_debug_event): Print dwDebugEventCode as hex since
9822 that's how it's usually documented.
9824 2013-02-28 Yao Qi <yao@codesourcery.com>
9826 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9829 2013-02-27 Jiong Wang <jiwang@tilera.com>
9831 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9832 (reg-tilegx32.c): New rule.
9833 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9834 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9835 different register info initializer according to elf class.
9836 (init_registers_tilgx32): New function. The tilegx32 register info
9838 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9839 (tile_store_gregset): Likewise.
9841 2013-02-27 Yao Qi <yao@codesourcery.com>
9843 * server.c (process_point_options): Print debug message when
9844 debug_threads is true.
9846 2013-02-26 Yao Qi <yao@codesourcery.com>
9848 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9850 2013-02-19 Pedro Alves <palves@redhat.com>
9851 Kai Tietz <ktietz@redhat.com>
9855 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9856 instead of strtoul to extract address from packet.
9857 (process_serial_event) <'z'>: Likewise.
9859 2013-02-18 Yao Qi <yao@codesourcery.com>
9861 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9863 2013-02-14 Pedro Alves <palves@redhat.com>
9867 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9868 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9870 2013-02-14 Pedro Alves <palves@redhat.com>
9872 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9874 2013-02-14 Pedro Alves <palves@redhat.com>
9876 * tracepoint.c (save_string): Delete.
9877 (add_tracepoint_action): Use savestring instead of save_string.
9879 2013-02-12 Pedro Alves <palves@redhat.com>
9881 * linux-xtensa-low.c: Ditto.
9882 * xtensa-xtregs.c: Ditto.
9884 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9886 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9889 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9891 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9892 aarch64_num_wp_regs and aarch64_num_bp_regs to
9893 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9895 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9897 * linux-aarch64-low.c (ps_get_thread_area): Replace
9898 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9900 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9901 Marcus Shawcroft <marcus.shawcroft@arm.com>
9902 Nigel Stephens <nigel.stephens@arm.com>
9903 Yufeng Zhang <yufeng.zhang@arm.com>
9905 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9906 (aarch64.c, aarch64-without-fpu.c): New targets.
9907 * configure.srv (aarch64*-*-linux*): New.
9908 * linux-aarch64-low.c: New file.
9910 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9912 * linux-low.c (handle_extended_wait, linux_create_inferior)
9913 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9914 (dequeue_one_deferred_signal, linux_resume_one_thread)
9915 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9916 (linux_tracefork_grandchild, linux_test_for_tracefork)
9917 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9918 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9919 where the argument is 0.
9921 2013-01-25 Yao Qi <yao@codesourcery.com>
9923 * event-loop.c: Include "queue.h".
9924 (gdb_event_p): New typedef.
9925 (struct gdb_event) <next_event>: Remove.
9926 (event_queue): Change to QUEUE(gdb_event_p).
9927 (async_queue_event): Remove.
9928 (gdb_event_xfree): New.
9929 (initialize_event_loop): New.
9930 (process_event): Use API from QUEUE.
9931 (wait_for_event): Likewise.
9932 * server.c (main): Call initialize_event_loop.
9933 * server.h (initialize_event_loop): Declare.
9935 2013-01-18 Yao Qi <yao@codesourcery.com>
9937 * ax.h (struct eval_agent_expr_context): New.
9938 (gdb_eval_agent_expr): Update declaration.
9939 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9940 TFRAME. Add new argument CTX.
9941 * server.h (struct eval_agent_expr_context): Declare.
9942 (agent_mem_read, agent_tsv_read): Update declaration.
9943 (agent_mem_read_string): Likewise.
9944 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9945 (add_traceframe_block): Add new argument TPOINT.
9946 Increase TPOINT->traceframe_usage.
9947 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9948 eval_tracepoint_agent_expr.
9949 (condition_true_at_tracepoint): Likewise.
9950 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9951 (agent_mem_read_string, agent_tsv_read): Likewise.
9953 2013-01-16 Yao Qi <yao@codesourcery.com>
9955 * linux-low.c (linux_resume_one_lwp): Don't check
9956 'lwp->bp_reinsert != 0'.
9958 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9959 Pedro Alves <palves@redhat.com>
9961 * lynx-low.c (ptrace_request_to_str): Define a temporary
9962 macro and use it to simplify this function's implementation.
9964 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9966 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9969 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9971 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9973 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9975 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9977 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9979 * lynx-low.c (lynx_resume): Use the resume_info parameter
9980 to determine the ptid for the lynx_ptrace call, unless
9981 it is equal to minus_one_ptid, in which case we use the
9982 ptid of the current_inferior.
9983 (lynx_wait_1): After having received a thread create/exit
9984 event, resume the inferior's execution using the signaling
9985 thread's ptid, rather than the old ptid.
9987 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9989 * lynx-low.c (lynx_resume): Delete variable ret.
9991 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9993 * gdbreplay.c (gdbreplay_version): Update copyright year.
9994 * server.c (gdbserver_version): Likewise.
9996 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9998 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10001 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10003 * lynx-low.c (ptrace_request_to_str): Add handling for
10004 PTRACE_GETTRACESIG.
10006 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10008 * lynx-low.c (lynx_attach): Delete variable new_process.
10010 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10012 * lynx-low.c (lynx_create_inferior): Delete variable
10015 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10017 * lynx-low.c (ptrace_request_to_str): Do not handle
10018 PTRACE_GETTHREADLIST if this macro does not exist.
10020 2012-12-15 Yao Qi <yao@codesourcery.com>
10022 * Makefile.in (OBS): Add notif.o.
10023 * notif.c, notif.h: New.
10024 * server.c: Include "notif.h".
10025 (struct vstop_notif) <next>: Remove.
10027 (queue_stop_reply): Update.
10028 (push_event, send_next_stop_reply): Remove.
10029 (discard_queued_stop_replies): Update.
10030 (notif_stop): New variable.
10031 (handle_v_stopped): Remove.
10032 (handle_v_requests): Don't call handle_v_stopped. Call
10033 handle_ack_notif instead.
10034 (queue_stop_reply_callback): Call notif_event_enque instead
10035 of queue_stop_reply.
10036 (handle_status): Don't call send_next_stop_reply, call
10037 notif_write_event instead.
10038 (kill_inferior_callback): Likewise.
10039 (detach_or_kill_inferior_callback): Likewise.
10040 (main): Call initialize_notif.
10041 (process_serial_event): Call QUEUE_is_empty.
10042 (handle_target_event): Call notif_push instead of push event.
10043 * server.h (push_event): Remove declaration.
10045 2012-12-10 Tom Tromey <tromey@redhat.com>
10047 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10048 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10051 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10052 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10053 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10054 (amd64-linux-ipa.o, ax.o): Rewrite.
10055 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10056 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10057 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10058 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10059 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10060 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10061 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10062 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10063 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10064 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10065 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10066 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10067 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10068 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10069 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10070 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10071 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10072 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10073 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10074 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10075 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10076 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10077 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10078 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10079 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10080 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10081 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10082 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10083 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10084 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10085 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10086 (reg-tilegx.o): Remove.
10087 (all_object_files): New macro.
10088 Include .deps files.
10089 * aclocal.m4, configure: Rebuild.
10090 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10091 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10092 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10094 2012-12-05 Tom Tromey <tromey@redhat.com>
10097 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10099 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10101 * configure.ac: Check for linux/perf_event.h.
10102 * config.in: Regenerated.
10103 * configure: Regenerated.
10105 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10107 * hostio.c (handle_readlink): Decrease buffer size
10108 parameter passed to readlink by one byte.
10110 2012-11-26 Yao Qi <yao@codesourcery.com>
10112 * configure.ac (build_warnings): Append '-Wempty-body'.
10113 * configure: Regenerated.
10114 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10117 2012-11-15 Pierre Muller <muller@sourceware.org>
10119 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10120 * config.in: Regenerate.
10121 * configure: Regenerate.
10122 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10123 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10124 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10125 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10127 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10128 instead of <sys/wait.h> header.
10129 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10131 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10133 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10134 (various make rules): Remove -DGDBSERVER
10136 2012-11-09 Yao Qi <yao@codesourcery.com>
10138 * spu-low.c (current_ptid): Move it to ..
10139 * gdbthread.h: ... here. New.
10140 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10141 * server.c (myresume, process_serial_event): Likewise.
10142 * thread-db.c (thread_db_find_new_threads): Likewise.
10143 * tracepoint.c (run_inferior_command): Likewise.
10145 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10147 * server.c (handle_search_memory_1): Include access length in
10150 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10152 * linux-crisv32-low.c: Fix compile errors.
10154 2012-09-04 Yao Qi <yao@codesourcery.com>
10156 * tracepoint.c (cmd_qtsv): Adjust debug message.
10157 Don't check CUR_TPOINT.
10159 2012-08-28 Yao Qi <yao@codesourcery.com>
10161 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10162 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10163 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10164 Remove declarations of xmalloc, xreallloc, xstrdup and
10166 * Makefile.in (libiberty_h): New.
10167 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10168 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10170 2012-08-23 Yao Qi <yao@codesourcery.com>
10172 * server.h: Remove declaration of 'xsnprintf'.
10174 2012-08-22 Keith Seitz <keiths@redhat.com>
10176 * server.h: Include build-gnulib-gbserver/config.h.
10177 * gdbreplay.c: Likewise.
10179 2012-08-08 Doug Evans <dje@google.com>
10181 * Makefile.in (SFILES): Add gdb_vecs.c.
10182 (OBS): Add gdb_vecs.o.
10183 (gdb_vecs_h, host_defs_h): New variables.
10184 (thread-db.o): Add $(gdb_vecs_h) dependency.
10185 (gdb_vecs.o): New rule.
10186 * thread-db.c: #include "gdb_vecs.h".
10187 (thread_db_load_search): Use a vector to iterate over path elements.
10188 Handle text appearing after "$pdir".
10190 * configure.ac: Add check for strstr.
10191 * config.in: Regenerate.
10192 * configure: Regenerate.
10194 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10196 * hostio.c (handle_pread): If pread fails, fall back to attempting
10198 (handle_pwrite): Likewise for pwrite.
10200 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10202 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10203 between unsupported TYPE and unimplementable ADDR/LEN combination.
10204 (arm_insert_point): Act on new return value.
10206 2012-07-31 Pedro Alves <palves@redhat.com>
10208 * server.c (process_point_options): Only skip tokens if we find
10209 one that is unrecognized. Don't treat 'X' specially while
10210 skipping unrecognized tokens.
10212 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10214 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10215 to 4-byte-align HW breakpoint addresses for Thumb.
10217 2012-07-27 Yao Qi <yao@codesourcery.com>
10221 * server.h: Declare gdb_agent_about_to_close.
10222 * target.c (kill_inferior): Include "agent.h".
10223 New. Send command 'kill'.
10224 * target.h (kill_inferior): Removed macro.
10225 * tracepoint.c (gdb_agent_about_to_close): New.
10226 (gdb_agent_helper_thread): Handle command 'close'.
10227 Wait endlessly until the inferior stops.
10228 Install gdb_agent_remove_socket to atexit hook.
10229 (agent_socket_name): New static variable.
10230 (gdb_agent_socket_init): Replace local variable 'name' with
10231 'agent_socket_name'.
10232 (gdb_agent_remove_socket): New.
10234 2012-07-27 Yao Qi <yao@codesourcery.com>
10236 * server.c (process_point_options): Stop at 'X' when parsing.
10238 2012-07-19 Michael Eager <eager@eagercon.com>
10240 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10242 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10243 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10244 hardware breakpoint.
10246 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10248 * gdbserver/linux-low.c (initialize_low): Call
10249 linux_ptrace_init_warnings.
10251 2012-07-02 Doug Evans <dje@google.com>
10253 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10256 2012-07-02 Stan Shebs <stan@codesourcery.com>
10258 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10259 (ax.o): Add it to build rule.
10261 (OBS): Add format.o.
10262 (IPA_OBS): Add format.o.
10263 * server.c (handle_query): Claim support for breakpoint commands.
10264 (process_point_options): Add command case.
10265 (process_serial_event): Leave running if there are printfs in
10267 * mem-break.h (any_persistent_commands): Declare.
10268 (add_breakpoint_commands): Declare.
10269 (gdb_no_commands_at_breakpoint): Declare.
10270 (run_breakpoint_commands): Declare.
10271 * mem-break.c (struct point_command_list): New struct.
10272 (struct breakpoint): New field command_list.
10273 (any_persistent_commands): New function.
10274 (add_commands_to_breakpoint): New function.
10275 (add_breakpoint_commands): New function.
10276 (gdb_no_commands_at_breakpoint): New function.
10277 (run_breakpoint_commands): New function.
10278 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10280 * ax.c: Include format.h.
10281 (ax_printf): New function.
10282 (gdb_eval_agent_expr): Add printf opcode.
10284 2012-06-13 Yao Qi <yao@codesourcery.com>
10286 * server.c (start_inferior): Remove duplicated writes to fields
10287 'last_resume_kind' and 'last_status' of 'current_inferior'.
10289 2012-06-12 Yao Qi <yao@codesourcery.com>
10290 Pedro Alves <palves@redhat.com>
10292 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10294 * server.c (handle_v_cont): Extend comment.
10296 2012-06-11 Yao Qi <yao@codesourcery.com>
10298 * linux-low.c (linux_attach): Add 'static'.
10300 2012-06-06 Yao Qi <yao@codesourcery.com>
10302 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10304 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10306 Fix gcc -flto compilation warning.
10307 * server.c (main): Make variable multi_mode and attach volatile.
10309 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10311 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10312 if the platform doesn't know about it.
10314 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10316 * Makefile.in (SFILES): Add linux-tile-low.c.
10317 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10318 * configure.srv: Handle tilegx-*-linux*.
10319 * linux-tile-low.c: New file.
10321 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10323 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10325 2012-05-24 Pedro Alves <palves@redhat.com>
10329 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10331 2012-05-24 Pedro Alves <palves@redhat.com>
10335 Replace target_signal with gdb_signal throughout.
10337 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10339 * linux-low.c (linux_store_registers): Avoid the copying sequence
10340 when no data has been retrieved by ptrace.
10342 2012-05-22 Will Deacon <will.deacon@arm.com>
10344 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10345 Include asm/ptrace.h.
10346 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10349 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10351 * linux-low.c (linux_store_registers): Don't re-retrieve data
10352 with ptrace that has already been obtained from /proc. Always
10353 copy any data retrieved with ptrace to the buffer supplied.
10355 2012-05-11 Yao Qi <yao@codesourcery.com>
10356 Pedro Alves <palves@redhat.com>
10358 * linux-low.c (enum stopping_threads_kind): New.
10359 (stopping_threads): Change type to `enum stopping_threads_kind'.
10360 (handle_extended_wait): If stopping and suspending threads, leave
10361 the new_lwp suspended too.
10362 (linux_wait_for_event): Adjust.
10363 (stop_all_lwps): Set `stopping_threads' to
10364 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10365 whether we're suspending threads or just stopping them. Assert no
10368 2012-04-29 Yao Qi <yao@codesourcery.com>
10370 * server.h: Move some code to ...
10371 * gdbthread.h: ... here. New.
10372 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10373 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10374 (nto-low.o, win32-low.o): Likewise.
10375 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10376 * regcache.c, remote-utils.c, server.c: Likewise.
10377 * target.c, tracepoint.c, win32-low.c: Likewise.
10379 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10381 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10382 (PTRACE_ARG4_TYPE): Likewise.
10383 (PTRACE_XFER_TYPE): Likewise.
10384 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10385 ptrace to PTRACE_ARG3_TYPE.
10386 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10387 (PTRACE_ARG4_TYPE): Likewise.
10388 (PTRACE_XFER_TYPE): Likewise.
10389 (linux_detach_one_lwp): Cast fourth argument of
10390 ptrace to long then PTRACE_ARG4_TYPE.
10391 (regsets_fetch_inferior_registers): Cast third argument of
10392 ptrace to long then PTRACE_ARG3_TYPE.
10393 (regsets_store_inferior_registers): Likewise.
10395 2012-04-20 Pedro Alves <palves@redhat.com>
10397 * configure: Regenerate.
10399 2012-04-19 Pedro Alves <palves@redhat.com>
10401 * Makefile.in (GNULIB_BUILDDIR): New.
10402 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10403 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10404 (all, install-only, uninstall, clean-info, all-lib, clean): No
10405 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10406 (maintainer-clean realclean distclean): Use subdir_do.
10408 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10409 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10410 * acinclude.m4: Include acx_configure_dir.m4.
10411 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10412 calls. Call AC_PROG_RANLIB. Configure gnulib using
10415 (GNULIB_STDINT_H): Adjust.
10416 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10417 * gdbreplay.c: Include build-gnulib/config.h.
10418 * server.h: Likewise.
10419 * aclocal.m4: Regenerate.
10420 * config.in: Regenerate.
10421 * configure: Regenerate.
10423 2012-04-19 Pedro Alves <palves@redhat.com>
10425 * Makefile.in (LIBGNU, INCGNU): Adjust.
10426 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10427 (all, install-only, uninstall, clean-info, all-lib, clean)
10428 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10429 * configure.ac: Adjust AC_OUTPUT output.
10430 * aclocal.m4: Regenerate.
10431 * configure: Regenerate.
10433 2012-04-19 Pedro Alves <palves@redhat.com>
10435 * Makefile.in (generated_files): New.
10436 (server_h): Remove the explicit dependency on config.h, and depend
10437 on $generated_files.
10439 2012-04-19 Pedro Alves <palves@redhat.com>
10441 * Makefile.in (INCGNU): Add -Ignulib.
10443 2012-04-19 Pedro Alves <palves@redhat.com>
10445 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10446 (INCGNU): ... this, and spell out -I here.
10447 (GNULIB_LIB): Rename to ...
10448 (LIBGNU): ... this.
10449 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10451 2012-04-19 Pedro Alves <palves@redhat.com>
10453 * config.in: Regenerate.
10455 2012-04-19 Pedro Alves <palves@redhat.com>
10457 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10458 * server.h (memmem): Remove declaration.
10459 * config.in: Regenerate.
10460 * configure: Regenerate.
10462 2012-04-19 Yao Qi <yao@codesourcery.com>
10464 * Makefile.in (SFILES): Add common/vec.c.
10468 2012-04-19 Yao Qi <yao@codesourcery.com>
10470 * remote-utils.c (prepare_resume_reply): Replace with macro
10471 target_core_of_thread.
10472 * server.c (handle_qxfer_threads_proper): Likewise.
10473 * target.h (traget_core_of_thread): New macro.
10475 2012-04-18 Pedro Alves <palves@redhat.com>
10477 * aclocal.m4: Regenerate.
10478 * configure: Regenerate.
10480 2012-04-16 Yao Qi <yao@codesourcery.com>
10482 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10483 duplicated on address.
10485 2012-04-16 Yao Qi <yao@codesourcery.com>
10487 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10488 (struct tracepoint_action_ops) <send>: New field.
10489 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10490 (agent_expr_send, x_tracepoint_action_send): New.
10491 (l_tracepoint_action_send): New.
10492 (cmd_qtdp): Download and install tracepoint
10493 according to `use_agent'.
10494 (run_inferior_command): Add one more parameter `len'.
10496 (tracepoint_send_agent): New.
10497 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10499 2012-04-16 Yao Qi <yao@codesourcery.com>
10501 * tracepoint.c (download_tracepoints): Moved to ...
10502 (cmd_qtstart): ... here.
10504 2012-04-14 Yao Qi <yao@codesourcery.com>
10506 * tracepoint.c: Include inttypes.h.
10507 (struct collect_memory_action): Use sized types.
10508 (struct tracepoint): Likewise.
10509 (cmd_qtdp, stop_tracing): Update print specifiers.
10510 (cmd_qtp, response_tracepoint): Likewise.
10511 (collect_data_at_tracepoint): Likewise.
10512 (collect_data_at_step): Likewise.
10514 2012-04-14 Yao Qi <yao@codesourcery.com>
10516 Import gnulib module inttypes.
10517 * aclocal.m4, config.in, configure: Regenerated.
10519 2012-04-14 Yao Qi <yao@codesourcery.com>
10521 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10522 Makefile and config.status at last.
10524 2012-04-13 Yao Qi <yao@codesourcery.com>
10526 * tracepoint.c: Include stdint.h unconditionally.
10528 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10530 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10531 on BFD_HAVE_SYS_PROCFS_TYPE.
10532 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10533 * configure: Regenerate.
10534 * config.in: Likewise.
10536 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10538 * Makefile.in (clean): Also remove x32.c x32-linux.c
10539 x32-avx.c x32-avx-linux.c.
10540 (x32.o): New target.
10542 (x32-linux.o): Likewise.
10543 (x32-linux.c): Likewise.
10544 (x32-avx.o): Likewise.
10545 (x32-avx.c): Likewise.
10546 (x32-avx-linux.o): Likewise.
10547 (x32-avx-linux.c): Likewise.
10549 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10550 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10551 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10552 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10553 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10554 i386/x32-avx-linux.xml.
10556 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10557 (init_registers_x32_avx_linux): Likwise.
10558 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10559 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10561 2012-04-13 Pedro Alves <palves@redhat.com>
10563 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10564 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10565 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10566 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10569 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10571 * linux-x86-low.c (compat_x32_clock_t): New.
10572 (compat_x32_siginfo_t): Likewise.
10573 (compat_x32_siginfo_from_siginfo): Likewise.
10574 (siginfo_from_compat_x32_siginfo): Likewise.
10575 (linux_is_elf64): Likewise.
10576 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10577 and siginfo_from_compat_x32_siginfo for x32.
10578 (x86_arch_setup): Set linux_is_elf64.
10580 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10583 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10585 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10586 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10587 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10588 compatible with process.
10590 2012-04-12 Yao Qi <yao@codesourcery.com>
10592 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10593 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10594 (install-only, install-info, clean): Handle sub dir gnulib.
10595 (all-lib, am--refresh): New targets.
10596 (memmem.o): Remove target.
10597 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10598 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10599 (AC_REPLACE_FUNCS): Remove memmem.
10600 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10601 (AC_OUTPUT): Generate Makefile in gnulib/.
10602 * aclocal.m4, config.in, configure: Regenerated.
10604 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10606 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10608 2012-04-05 Pedro Alves <palves@redhat.com>
10610 -Werror=strict-aliasing
10612 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10615 2012-04-04 Pedro Alves <palves@redhat.com>
10617 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10618 (sparc_store_gregset_from_stack, sparc_store_gregset)
10619 (sparc_breakpoint_at): Fix formatting.
10621 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10623 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10625 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10626 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10627 * config.in: Regenerate.
10628 * configure: Likewise.
10630 2012-03-29 Pedro Alves <palves@redhat.com>
10632 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10633 Correct ptrace arguments.
10635 2012-03-28 Pedro Alves <palves@redhat.com>
10637 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10638 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10639 (IA64_FR1_REGNUM): New defines.
10640 (ia64_fetch_register): New.
10641 (the_low_target): Install it.
10642 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10644 * linux-low.c (linux_fetch_registers): Try the
10645 the_low_target.fetch_register hook first.
10647 * linux-arm-low.c (the_low_target): Adjust.
10648 * linux-bfin-low.c (the_low_target): Adjust.
10649 * linux-cris-low.c (the_low_target): Adjust.
10650 * linux-crisv32-low.c (the_low_target): Adjust.
10651 * linux-m32r-low.c (the_low_target): Adjust.
10652 * linux-m68k-low.c (the_low_target): Adjust.
10653 * linux-mips-low.c (the_low_target): Adjust.
10654 * linux-ppc-low.c (the_low_target): Adjust.
10655 * linux-s390-low.c (the_low_target): Adjust.
10656 * linux-sh-low.c (the_low_target): Adjust.
10657 * linux-sparc-low.c (the_low_target): Adjust.
10658 * linux-tic6x-low.c (the_low_target): Adjust.
10659 * linux-x86-low.c (the_low_target): Adjust.
10660 * linux-xtensa-low.c (the_low_target): Adjust.
10662 2012-03-26 Pedro Alves <palves@redhat.com>
10664 * server.c (handle_qxfer_libraries): Don't bail early if
10665 the_target->qxfer_libraries_svr4 is not NULL.
10667 2012-03-26 Pedro Alves <palves@redhat.com>
10669 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10671 2012-03-23 Pedro Alves <palves@redhat.com>
10673 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10674 "library-list-svr4" element's start tag when the the DSO list is
10677 2012-03-23 Pedro Alves <palves@redhat.com>
10679 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10680 a variable whose type size is the same as the inferior's pointer
10683 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10685 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10687 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10688 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10689 * linux-low.h: Include <signal.h>.
10690 (struct siginfo): Remove forward declaration.
10691 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10694 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10696 * .gitignore: Ignore more files.
10698 2012-03-19 Pedro Alves <palves@redhat.com>
10699 Jan Kratochvil <jan.kratochvil@redhat.com>
10701 * server.c (cont_thread, general_thread): Add describing comments.
10702 (start_inferior): Clear `cont_thread'.
10703 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10706 2012-03-15 Yao Qi <yao@codesourcery.com>
10708 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10710 (cmd_qtdp): ... here.
10712 2012-03-15 Yao Qi <yao@codesourcery.com>
10714 * tracepoint.c (struct tracepoint_action_ops): New.
10715 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10716 (m_tracepoint_action_download): New.
10717 (r_tracepoint_action_download): New.
10718 (x_tracepoint_action_download): New.
10719 (l_tracepoint_action_download): New.
10720 (add_tracepoint_action): Install `action->ops' according type.
10721 (download_tracepoint_1): Move code `download' function pointer
10722 of various tracepoint_action_ops.
10724 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10726 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10727 linux_ptrace_attach_warnings.
10729 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10731 * Makefile.in (linux-ptrace.o): New.
10732 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10733 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10734 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10735 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10736 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10738 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10740 2012-03-08 Yao Qi <yao@codesourcery.com>
10741 Pedro Alves <palves@redhat.com>
10743 Fix PR server/13392.
10744 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10745 offset of JMP insn.
10746 * tracepoint.c (remove_tracepoint): New.
10747 (cmd_qtdp): Call remove_tracepoint when failed to install.
10749 2012-03-07 Pedro Alves <palves@redhat.com>
10751 * linux-low.c (get_detach_signal): New.
10752 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10753 Pass on pending signals to PTRACE_DETACH. Check the result of the
10755 * server.c (program_signals, program_signals_p): New.
10756 (handle_general_set): Handle QProgramSignals.
10757 * server.h (program_signals, program_signals_p): Declare.
10759 2012-03-05 Pedro Alves <palves@redhat.com>
10760 Jan Kratochvil <jan.kratochvil@redhat.com>
10762 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10765 2012-03-03 Yao Qi <yao@codesourcery.com>
10767 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10768 agent_look_up_symbols.
10770 2012-03-03 Yao Qi <yao@codesourcery.com>
10772 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10773 (linux-x86-low.o): Likewise.
10774 * server.h: Remove in_process_agent_loaded.
10775 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10779 2012-03-03 Yao Qi <yao@codesourcery.com>
10781 * tracepoint.c (gdb_agent_capability): New global.
10782 (in_process_agent_loaded_ust): Renamed to
10783 `in_process_agent_supports_ust'.
10785 (in_process_agent_supports_ust): Call agent_capability_check.
10786 (clear_installed_tracepoints): Assert that agent supports
10789 2012-03-03 Yao Qi <yao@codesourcery.com>
10791 * linux-low.c (linux_supports_agent): New.
10792 (linux_target_ops): Initialize field `supports_agent' with
10793 linux_supports_agent.
10794 * target.h (struct target_ops) <supports_agent>: New.
10795 (target_supports_agent): New macro.
10796 * server.c (handle_general_set): Handle packet 'QAgent'.
10797 (handle_query): Send `QAgent+'.
10798 * Makefile.in (server.o): Depends on agent.h.
10800 2012-03-03 Yao Qi <yao@codesourcery.com>
10802 * Makefile.in (OBS): Add agent.o.
10803 Add new rule for agent.o.
10804 Track dependence of tracepoint.c on agent.h.
10805 * tracepoint.c (run_inferior_command_1):
10806 (run_inferior_command): Call agent_run_command.
10807 (gdb_ust_connect_sync_socket): Deleted. Move it to
10809 (resume_thread, stop_thread): Likewise.
10810 (gdb_ust_socket_init): Renamed to ...
10811 (gdb_agent_socket_init): ... New.
10812 (gdb_ust_thread): Renamed to ...
10813 (gdb_agent_helper_thread): ... New.
10814 (gdb_ust_init): Move some code to ...
10815 (gdb_agent_init): ... here. New.
10816 [HAVE_UST]: Call gdb_ust_init.
10817 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10818 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10819 * config.in, configure: Regenerated.
10821 2012-03-02 Pedro Alves <palves@redhat.com>
10823 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10824 * linux-low.c (struct simple_pid_list): New.
10825 (stopped_pids): New a struct simple_pid_list pointer.
10826 (add_to_pid_list, pull_pid_from_list): New.
10827 (handle_extended_wait): Don't assume the first signal new children
10828 report is SIGSTOP. Adjust call to pull_pid_from_list.
10829 (linux_wait_for_lwp): Adjust.
10831 2012-03-02 Yao Qi <yao@codesourcery.com>
10833 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10836 2012-03-02 Yao Qi <yao@codesourcery.com>
10838 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10839 `stop_pc' and `tpoint'. Update caller.
10841 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10843 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10844 * linux-low.c (use_linux_regsets): New macro.
10845 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10846 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10847 (linux_register_in_regsets): New function.
10848 (usr_fetch_inferior_registers): Skip registers covered by
10850 (usr_store_inferior_registers): Likewise.
10851 (usr_fetch_inferior_registers): New macro.
10852 (usr_store_inferior_registers): Likewise.
10853 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10854 (linux_store_registers): Likewise.
10855 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10857 (init_registers_mips64_dsp_linux): Likewise.
10858 (init_registers_mips_linux): New macro.
10859 (init_registers_mips_dsp_linux): Likewise.
10860 (mips_dsp_num_regs): Likewise.
10861 (DSP_BASE, DSP_CONTROL): New fallback macros.
10862 (mips_base_regs): New macro.
10863 (mips_regmap): Use it. Fix the size.
10864 (mips_dsp_regmap): New variable.
10865 (mips_dsp_regset_bitmap): Likewise.
10866 (mips_arch_setup): New function.
10867 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10869 (mips_cannot_store_register): Likewise.
10870 (the_low_target): Update .arch_setup, .num_regs and .regmap
10871 initializers. Add .regset_bitmap initializer.
10872 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10874 * linux-bfin-low.c (the_low_target): Likewise.
10875 * linux-cris-low.c (the_low_target): Likewise.
10876 * linux-crisv32-low.c (the_low_target): Likewise.
10877 * linux-ia64-low.c (the_low_target): Likewise.
10878 * linux-m32r-low.c (the_low_target): Likewise.
10879 * linux-m68k-low.c (the_low_target): Likewise.
10880 * linux-ppc-low.c (the_low_target): Likewise.
10881 * linux-s390-low.c (the_low_target): Likewise.
10882 * linux-sh-low.c (the_low_target): Likewise.
10883 * linux-sparc-low.c (the_low_target): Likewise.
10884 * linux-tic6x-low.c (the_low_target): Likewise.
10885 * linux-x86-low.c (the_low_target): Likewise.
10886 * linux-xtensa-low.c (the_low_target): Likewise.
10887 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10888 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10889 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10891 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10892 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10894 2012-02-29 Yao Qi <yao@codesourcery.com>
10895 Pedro Alves <palves@redhat.com>
10897 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10898 `step_over_finished' is true.
10900 2012-02-27 Pedro Alves <palves@redhat.com>
10902 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10903 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10905 2012-02-27 Pedro Alves <palves@redhat.com>
10908 * linux-low.c (pid_is_stopped): New.
10909 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10911 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10913 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10916 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10918 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10920 2012-02-24 Luis Machado <lgustavo@codesourcery>
10922 * server.c (handle_query): Advertise support for target-side
10923 breakpoint condition evaluation.
10924 (process_point_options): New function.
10925 (process_serial_event): When inserting a breakpoint, check for
10926 a target-side condition that should be evaluated.
10928 * mem-break.c: Include regcache.h and ax.h.
10929 (point_cond_list_t): New data structure.
10930 (breakpoint) <cond_list>: New field.
10931 (find_gdb_breakpoint_at): Make non-static.
10932 (delete_gdb_breakpoint_at): Clear any target-side
10934 (clear_gdb_breakpoint_conditions): New function.
10935 (add_condition_to_breakpoint): Likewise.
10936 (add_breakpoint_condition): Likewise.
10937 (gdb_condition_true_at_breakpoint): Likewise.
10938 (gdb_breakpoint_here): Return result directly instead
10939 of going through a local variable.
10941 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10942 (clear_gdb_breakpoint_conditions): Likewise.
10943 (add_breakpoint_condition): Likewise.
10944 (gdb_condition_true_at_breakpoint): Likewise.
10946 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10947 (need_step_over_p): Take target-side breakpoint condition into
10950 2012-02-24 Luis Machado <lgustavo@codesourcery>
10952 * server.h: Include tracepoint.h.
10953 (agent_mem_read, agent_get_trace_state_variable_value,
10954 agent_set_trace_state_variable_value,
10955 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10956 get_set_tsv_func_addr): New prototypes.
10958 * ax.h: New include file.
10959 * ax.c: New source file.
10961 * tracepoint.c: Include ax.h.
10962 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10963 agent_expr, eval_result_type): Move to ax.h.
10964 (parse_agent_expr): Rename to ...
10965 (gdb_parse_agent_expr): ... this, make it non-static and move
10967 (unparse_agent_expr) Rename to ...
10968 (gdb_unparse_agent_expr): ... this, make it non-static and move
10970 (eval_agent_expr): Rename to ...
10971 (eval_tracepoint_agent_expr): ... this.
10972 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10973 forward declarations.
10974 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10975 (agent_get_trace_state_variable_value): New function.
10976 (agent_set_trace_state_variable_value): New function.
10977 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10978 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10979 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10980 (condition_true_at_tracepoint): Likewise.
10981 (parse_agent_expr): Rename to ...
10982 (gdb_parse_agent_expr): ... this and move to ax.c.
10983 (unparse_agent_expr): Rename to ...
10984 (gdb_unparse_agent_expr): ... this and move to ax.c.
10985 (gdb_agent_op_name): Move to ax.c.
10986 (eval_agent_expr): Rename to ...
10987 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10989 (eval_tracepoint_agent_expr): New function.
10990 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10992 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10994 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10995 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10996 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10997 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10998 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10999 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11000 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11001 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11002 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11003 (compile_bytecodes): Remove forward declaration.
11004 (is_goto_target): Move to ax.c.
11005 (compile_bytecodes): Move to ax.c and call
11006 agent_get_trace_state_variable_value (...) and
11007 agent_set_trace_state_variable_value (...).
11009 * Makefile.in: Update ax.c and IPA dependencies.
11011 2012-02-24 Pedro Alves <palves@redhat.com>
11013 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11014 (cmd_bigqtbuffer_circular): ... this. Only handle
11015 'QTBuffer:circular:'.
11016 (handle_tracepoint_general_set): Adjust.
11018 2012-02-16 Yao Qi <yao@codesourcery.com>
11020 * inferiors.c: Move code to ...
11021 * dll.c: .... here. New.
11022 * server.h: Declare clear_dlls.
11023 * Makefile.in (SFILES): Add dll.c.
11027 2012-02-11 Yao Qi <yao@codesourcery.com>
11029 * server.c: (handle_monitor_command): Add a new parameter
11031 (handle_query): Update caller.
11033 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11035 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11036 * configure, config.in: Regenerate.
11037 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11040 2012-02-02 Pedro Alves <palves@redhat.com>
11042 Try SIGKILL first, then PTRACE_KILL.
11043 * linux-low.c (linux_kill_one_lwp): New.
11044 (linux_kill_one_lwp): Rename to ...
11045 (kill_one_lwp_callback): ... this. Use the new
11046 linux_kill_one_lwp.
11048 2012-02-02 Pedro Alves <palves@redhat.com>
11050 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11053 2012-01-27 Pedro Alves <palves@redhat.com>
11055 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11056 (elf_64_file_p): Make static.
11057 (linux_pid_exe_is_elf_64_file): New.
11058 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11059 Delete declarations.
11060 (linux_pid_exe_is_elf_64_file): Declare.
11061 * linux-x86-low.c (x86_arch_setup): Use
11062 linux_pid_exe_is_elf_64_file.
11064 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11066 * linux-low.c (linux_wait_for_event_1): Rename to ...
11067 (linux_wait_for_event): ... here and merge it with former
11068 linux_wait_for_event - new variable wait_ptid, use it.
11069 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11071 2012-01-23 Pedro Alves <palves@redhat.com>
11073 * server.c (main): Avoid yet another case of infinite loop while
11074 detaching/killing after a longjmp.
11076 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11079 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11081 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11083 * hostio.c (handle_readlink): New function.
11084 (handle_vFile): Call it to handle "vFile:readlink" packets.
11086 2012-01-20 Pedro Alves <palves@redhat.com>
11087 Ulrich Weigand <ulrich.weigand@linaro.org>
11089 * server.c (handle_v_requests): Only support vAttach and vRun to
11090 start multiple processes when in extended protocol mode.
11092 2012-01-17 Pedro Alves <palves@redhat.com>
11094 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11095 memalign plus mprotect to allocate the scratch buffer.
11097 2012-01-13 Pedro Alves <palves@redhat.com>
11099 * server.c (attach_inferior): Clear `cont_thread'.
11101 2012-01-13 Pedro Alves <palves@redhat.com>
11103 * server.c (main): Avoid infinite loop while detaching/killing
11106 2012-01-09 Doug Evans <dje@google.com>
11108 * server.c (start_inferior): Set last_ptid in --wrapper case.
11110 2012-01-06 Yao Qi <yao@codesourcery.com>
11112 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11114 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11116 2012-01-04 Yao Qi <yao@codesourcery.com>
11118 * tracepoint.c (cmd_qtdp): Print debug message
11119 for static tracepoint.
11121 2012-01-04 Yao Qi <yao@codesourcery.com>
11123 * tracepoint.c (trace_vdebug): Differentiate debug message
11124 between gdbserver and IPA.
11126 2012-01-03 Yao Qi <yao@codesourcery.com>
11128 * tracepoint.c (tracepoint_was_hit): Don't collect for
11131 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11133 * terminal.h: Reformat copyright header.
11135 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11137 * server.c (gdbserver_version): Update copyright year.
11138 * gdbreplay.c (gdbreplay_version): Likewise.
11140 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11142 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11145 2011-12-18 Hui Zhu <teawater@gmail.com>
11146 * linux-low.c (linux_create_inferior): Save return value to ret.
11148 2011-12-18 Hui Zhu <teawater@gmail.com>
11150 * linux-low.c (linux_create_inferior): Save return value to ret.
11152 2011-12-16 Doug Evans <dje@google.com>
11154 * linux-low.c (linux_create_inferior): If stdio connection,
11155 redirect stdin from /dev/null, stdout to stderr.
11156 * remote-utils.c (remote_is_stdio): New static global.
11157 (remote_connection_is_stdio): New function.
11158 (remote_prepare): Handle stdio connection.
11159 (remote_open): Ditto.
11160 (remote_close): Don't close stdin for stdio connections.
11161 (read_prim,write_prim): New functions. Replace all calls to
11162 read/write to these.
11163 * server.c (main): Watch for "-" argument. Move call to
11164 remote_prepare before start_inferior.
11165 * server.h (STDIO_CONNECTION_NAME): New macro.
11166 (remote_connection_is_stdio): Declare.
11168 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11169 in debugging output.
11171 2011-12-15 Yao Qi <yao@codesourcery.com>
11173 * tracepoint.c: Include sys/syscall.h.
11174 (gdb_ust_thread): Remove preprocessor conditional.
11176 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11178 * linux-low.c (linux_detach_one_lwp): Call
11179 the_low_target.prepare_to_resume before detaching.
11181 2011-12-14 Yao Qi <yao@codesourcery.com>
11183 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11186 2011-12-14 Yao Qi <yao@codesourcery.com>
11188 * i386-low.c (i386_low_stopped_data_address): Initialize local
11189 variable `control'.
11191 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11195 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11196 DR_CONTROL unless necessary. Extend comments.
11197 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11198 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11200 2011-12-13 Yao Qi <yao@codesourcery.com>
11202 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11204 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11206 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11208 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11209 Print new debug message for such case.
11211 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11213 Fix overlapping memcpy.
11214 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11215 the read_inferior_memory transfer.
11216 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11217 write_inferior_memory transfer.
11218 (set_fast_tracepoint_jump): New variable buf. Use it for the
11219 read_inferior_memory and write_inferior_memory transfers.
11220 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11221 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11222 Use it for the write_inferior_memory transfer.
11223 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11226 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11228 * linux-low.c (fetch_register, store_register): Make code
11229 consistent, fix formatting.
11231 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11233 * linux-low.c (usr_store_inferior_registers): Factor out code
11234 to handle individual registers into...
11235 (store_register): ... this new function.
11237 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11239 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11240 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11241 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11242 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11243 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11244 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11245 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11246 (srv_xmlfiles): Add new XML files.
11248 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11250 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11251 (init_registers_s390_linux32v1): Add prototype.
11252 (init_registers_s390_linux32v2): Likewise.
11253 (init_registers_s390_linux64v1): Likewise.
11254 (init_registers_s390_linux64v2): Likewise.
11255 (init_registers_s390x_linux64v1): Likewise.
11256 (init_registers_s390x_linux64v2): Likewise.
11257 (s390_num_regs): Increment to 52.
11258 (s390_regmap): Add orig_r2 register.
11259 (s390_num_regs_3264): Increment to 68.
11260 (s390_regmap_3264): Add orig_r2 register.
11261 (s390_collect_ptrace_register): Handle orig_r2 register.
11262 (s390_supply_ptrace_register): Likewise.
11263 (s390_fill_last_break): New function.
11264 (s390_store_last_break): Likewise.
11265 (s390_fill_system_call): New function.
11266 (s390_store_system_call): Likewise.
11267 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11269 (s390_check_regset): New function.
11270 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11271 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11272 Update target_regsets for available register sets.
11274 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11275 Jan Kratochvil <jan.kratochvil@redhat.com>
11277 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11278 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11280 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11281 * linux-low.h (struct process_info_private): New member r_debug.
11282 * server.c (handle_qxfer_libraries): Call
11283 the_target->qxfer_libraries_svr4.
11284 (handle_qxfer_libraries_svr4): New function.
11285 (qxfer_packets): New entry "libraries-svr4".
11286 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11287 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11288 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11289 PACKET_qXfer_libraries_svr4.
11291 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11293 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11294 PSW address/mask between 8-byte and 16-byte formats.
11295 (s390_supply_ptrace_register): Likewise.
11296 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11297 basic addressing mode bit.
11299 2011-11-24 Stan Shebs <stan@codesourcery.com>
11301 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11303 2011-11-17 Stan Shebs <stan@codesourcery.com>
11305 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11306 (tracing_start_time): New global.
11307 (tracing_stop_time): New global.
11308 (tracing_user_name): New global.
11309 (tracing_notes): New global.
11310 (tracing_stop_note): New global.
11311 (cmd_qtstart): Set traceframe_usage, start_time.
11312 (stop_tracing): Set stop_time.
11313 (cmd_qtstatus): Report additional status.
11314 (cmd_qtp): New function.
11315 (handle_tracepoint_query): Call it.
11316 (cmd_qtnotes): New function.
11317 (handle_tracepoint_general_set): Call it.
11318 (get_timestamp): Rename from tsv_get_timestamp.
11320 2011-11-14 Stan Shebs <stan@codesourcery.com>
11321 Kwok Cheung Yeung <kcy@codesourcery.com>
11323 * linux-x86-low.c (small_jump_insn): New.
11324 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11325 trampoline and error message, build a trampoline and issue a small
11326 jump instruction to it.
11327 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11328 trampoline and error message.
11329 (x86_get_min_fast_tracepoint_insn_len): New.
11330 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11331 * linux-low.h (struct linux_target_ops): Add arguments to
11332 install_fast_tracepoint_jump_pad operation, add new operation.
11333 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11335 (linux_get_min_fast_tracepoint_insn_len): New function.
11336 (linux_target_op): Add new operation.
11337 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11338 (gdb_trampoline_buffer_end): Ditto.
11339 (gdb_trampoline_buffer_error): Ditto.
11340 (struct ipa_sym_addresses): Add fields for new IPA variables.
11341 (symbol_list): Add entries for new IPA variables.
11342 (struct tracepoint): Add fields to hold the address range of the
11343 trampoline used by the tracepoint.
11344 (trampoline_buffer_head): New static variable.
11345 (trampoline_buffer_tail): Ditto.
11346 (claim_trampoline_space): New function.
11347 (have_fast_tracepoint_trampoline_buffer): New function.
11348 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11350 (install_fast_tracepoint): Ditto, also add error buffer argument.
11351 (cmd_qtminftpilen): New function.
11352 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11353 (fast_tracepoint_from_trampoline_address): New function.
11354 (fast_tracepoint_collecting): Handle trampoline as part of jump
11356 (set_trampoline_buffer_space): New function.
11357 (initialize_tracepoint): Initialize new IPA variables.
11358 * target.h (struct target_ops): Add arguments to
11359 install_fast_tracepoint_jump_pad operation, add new
11360 get_min_fast_tracepoint_insn_len operation.
11361 (target_get_min_fast_tracepoint_insn_len): New.
11362 (install_fast_tracepoint_jump_pad): Add arguments.
11363 * server.h (IPA_BUFSIZ): Define.
11364 * linux-i386-ipa.c: Include extra header files.
11365 (initialize_fast_tracepoint_trampoline_buffer): New function.
11366 (initialize_low_tracepoint): Call it.
11367 * server.h (set_trampoline_buffer_space): Declare.
11368 (claim_trampoline_space): Ditto.
11369 (have_fast_tracepoint_trampoline_buffer): Ditto.
11371 2011-11-14 Yao Qi <yao@codesourcery.com>
11373 * server.c (handle_query): Handle InstallInTrace for qSupported.
11374 * tracepoint.c (add_tracepoint): Sort list.
11375 (install_tracepoint, download_tracepoint): New.
11376 (cmd_qtdp): Call them to install and download tracepoints.
11377 (sort_tracepoints): Removed.
11378 (cmd_qtstart): Update.
11380 2011-11-14 Yao Qi <yao@codesourcery.com>
11382 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11383 * mem-break.h: Declare.
11384 * tracepoint.c (cmd_qtstart): Move some code to ...
11385 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11387 (download_tracepoints): Move some code to ...
11388 (download_tracepoint_1): ... here. New.
11390 2011-11-08 Yao Qi <yao@codesourcery.com>
11392 * remote-utils.c (relocate_instruction): A comment fix.
11394 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11396 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11397 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11398 dr_status_mirror and dr_control_mirror from debug_reg_state.
11399 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11400 (i386_initial_stuff): Remove use of deleted globals.
11401 (i386_get_thread_context, i386_set_thread_context,
11402 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11403 from debug_reg_state.
11405 2011-11-05 Yao Qi <yao@codesourcery.com>
11407 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11408 address as TPOINT's.
11410 2011-11-02 Stan Shebs <stan@codesourcery.com>
11412 * tracepoint.c (agent_mem_read_string): New function.
11413 (eval_agent_expr): Call it for tracenz.
11414 * server.c (handle_query): Report support for tracenz.
11416 2011-11-02 Yao Qi <yao@codesourcery.com>
11418 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11420 2011-11-02 Yao Qi <yao@codesourcery.com>
11422 * target.h: Fix a typo in comment.
11424 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11426 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11427 clobber the breakpoints' shadows with fast tracepoint jumps.
11428 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11429 * target.c (write_inferior_memory): Also pass MYADDR down to
11432 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11434 * configure.ac: Check support for personality routine.
11435 * configure: Regenerate.
11436 * config.in: Likewise.
11437 * linux-low.c: Include <sys/personality.h>.
11438 Define ADDR_NO_RANDOMIZE if necessary.
11439 (linux_create_inferior): Disable address space randomization when
11440 forking inferior, if requested.
11441 (linux_supports_disable_randomization): New function.
11442 (linux_target_ops): Install it.
11443 * server.h (disable_randomization): Declare.
11444 * server.c (disable_randomization): New global variable.
11445 (handle_general_set): Handle QDisableRandomization.
11446 (handle_query): Likewise for qSupported.
11447 (main): Support --disable-randomization and --no-disable-randomization
11448 command line arguments.
11449 * target.h (struct target_ops): Add supports_disable_randomization.
11450 (target_supports_disable_randomization): New macro.
11452 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11454 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11456 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11457 [!PT_GETDSBT] (target_loadmap): New definition.
11458 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11459 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11460 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11461 and PT_GETDSBT to LINUX_LOADMAP.
11462 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11463 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11465 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11467 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11468 (arm_linux_hwbp_cap): New static variable.
11469 (arm_linux_get_hwbp_cap): Replace by ...
11470 (arm_linux_init_hwbp_cap): ... this new function.
11471 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11472 (arm_linux_get_hw_watchpoint_count): Likewise.
11473 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11474 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11475 (arm_prepare_to_resume): Use perror_with_name instead of error.
11477 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11479 * linux-arm-low.c: Include <signal.h>.
11480 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11481 (struct arm_linux_hwbp_cap): New data type.
11482 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11483 (struct arm_linux_hw_breakpoint): New data type.
11484 (MAX_BPTS, MAX_WPTS): Define.
11485 (struct arch_process_info, struct arch_lwp_info): New data types.
11486 (arm_linux_get_hwbp_cap): New function.
11487 (arm_linux_get_hw_breakpoint_count): Likewise.
11488 (arm_linux_get_hw_watchpoint_count): Likewise.
11489 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11490 (arm_hwbp_control_initialize): Likewise.
11491 (arm_hwbp_control_is_enabled): Likewise.
11492 (arm_hwbp_control_is_initialized): Likewise.
11493 (arm_hwbp_control_disable): Likewise.
11494 (arm_linux_hw_breakpoint_equal): Likewise.
11495 (arm_linux_hw_point_initialize): Likewise.
11496 (struct update_registers_data): New data structure.
11497 (update_registers_callback: New function.
11498 (arm_insert_point): Likewise.
11499 (arm_remove_point): Likewise.
11500 (arm_stopped_by_watchpoint): Likewise.
11501 (arm_stopped_data_address): Likewise.
11502 (arm_new_process): Likewise.
11503 (arm_new_thread): Likewise.
11504 (arm_prepare_to_resume): Likewise.
11505 (the_low_target): Register arm_insert_point, arm_remove_point,
11506 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11507 arm_new_thread, and arm_prepare_to_resume.
11509 2011-09-15 Stan Shebs <stan@codesourcery.com>
11511 * server.h (struct emit_ops): Add compare-goto fields.
11512 * tracepoint.c (gdb_agent_op_sizes): New table.
11513 (emit_eq_goto): New function.
11514 (emit_ne_goto): New function.
11515 (emit_lt_goto): New function.
11516 (emit_le_goto): New function.
11517 (emit_gt_goto): New function.
11518 (emit_ge_goto): New function.
11519 (is_goto_target): New function.
11520 (compile_bytecodes): Recognize special cases of compare-goto
11521 combinations and call specialized emitters for them.
11522 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11523 (amd64_emit_ne_goto): New function.
11524 (amd64_emit_lt_goto): New function.
11525 (amd64_emit_le_goto): New function.
11526 (amd64_emit_gt_goto): New function.
11527 (amd64_emit_ge_goto): New function.
11528 (amd64_emit_ops): Add the new functions.
11529 (i386_emit_eq_goto): New function.
11530 (i386_emit_ne_goto): New function.
11531 (i386_emit_lt_goto): New function.
11532 (i386_emit_le_goto): New function.
11533 (i386_emit_gt_goto): New function.
11534 (i386_emit_ge_goto): New function.
11535 (i386_emit_ops): Add the new functions.
11537 2011-09-08 Stan Shebs <stan@codesourcery.com>
11539 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11540 (i386_emit_epilogue): Restore %ebx.
11542 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11544 * server.c (step_thread): Remove definition.
11545 (process_serial_event): Don't handle Hs.
11546 * server.h (step_thread): Remove declaration.
11547 * target.c (set_desired_inferior): Remove use of step_thread.
11549 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11551 * linux-low.c: Include linux-procfs.h.
11552 (linux_attach_lwp_1): Update comments.
11553 (linux_attach): Scan for existing threads when attaching to a
11554 process that is the tgid.
11555 * Makefile.in: Update dependencies.
11557 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11559 * configure.srv: Add linux-procfs.o dependencies.
11561 2011-08-14 Yao Qi <yao@codesourcery.com>
11563 * target.h (struct target_ops): Fix indent.
11564 * win32-low.c (win32_target_ops): Fix comment.
11566 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11567 Yao Qi <yao@codesourcery.com>
11569 * Makefile.in (clean): Remove tic6x-*.c files.
11570 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11571 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11572 (tic6x-c64xp-linux.c): Likewise.
11573 * configure.srv: Add support for tic6x-*-uclinux.
11574 * linux-tic6x-low.c: New.
11575 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11577 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11578 Yao Qi <yao@codesourcery.com>
11580 * target.h (struct target_ops): Add read_loadmap.
11581 * linux-low.c (struct target_loadseg): New type.
11582 (struct target_loadmap): New type.
11583 (linux_read_loadmap): New function.
11584 (linux_target_ops): Add linux_read_loadmap.
11585 * server.c (handle_query): Support qXfer:fdpic:read packet.
11586 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11589 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11591 * win32-low.c: Include <stdint.h>.
11593 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11595 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11596 to the inferior here.
11597 (i386_remove_aligned_watchpoint): Ditto.
11598 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11599 fit part of the watchpoint in the debug registers.
11600 (i386_update_inferior_debug_regs): New.
11601 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11602 registers, and only update the inferior on success.
11603 (i386_low_remove_watchpoint): Ditto.
11605 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11607 * linux-low.c (compare_ints, unique, list_threads, show_process,
11608 linux_core_of_thread): Delete.
11609 (linux_target_ops): Change linux_core_of_thread to
11610 linux_common_core_of_thread.
11611 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11612 * utils.c (malloc_failure): Change type of argument.
11613 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11614 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11615 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11616 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11617 (IPA_OBJS): Add common-utils-ipa.o.
11618 (ptid_h, linux_osdata_h): New macros.
11619 (server_h): Add common/common-utils.h, common/xml-utils.h,
11620 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11622 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11623 ptid.o, buffer.o): New rules.
11624 (linux-low.o): Add common/linux-osdata.h as a dependency.
11625 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11626 * configure.ac: Add AC_HEADER_DIRENT check.
11627 * config.in: Regenerate.
11628 * configure: Regenerate.
11629 * remote-utils.c (xml_escape_text): Delete.
11630 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11631 buffer_xml_printf): Move to common/buffer.c.
11632 * server.c (main): Remove call to initialize_inferiors.
11633 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11634 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11635 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11636 internal_error, gdb_assert, gdb_assert_fail): Delete.
11637 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11638 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11640 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11641 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11642 initialize_inferiors): Delete.
11644 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11646 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11649 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11651 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11653 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11655 2011-05-26 Yao Qi <yao@codesourcery.com>
11657 * Makefile.in (thread-db.o): Track dependence to
11658 common/gdb_thread_db.h.
11659 * thread-db.c: include gdb_thread_db.h from right place.
11661 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11663 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11664 __FILE__ and __LINE__ to internal_error.
11666 2011-05-13 Doug Evans <dje@google.com>
11668 * thread-db.c (try_thread_db_load_from_sdir): New function.
11669 (try_thread_db_load_from_dir): New function.
11670 (thread_db_load_search): Handle $sdir, ignore $pdir.
11671 Remove trying of system directories if search of
11672 libthread-db-search-path fails, that is now done via $sdir.
11674 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11676 * server.c (handle_query): Add EnableDisableTracepoints to the list
11677 of supported features.
11678 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11680 (cmd_qtenable_disable): New.
11681 (cmd_qtstart): Install tracepoints even if disabled.
11682 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11683 receiving a QTEnable or QTDisable packet.
11684 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11685 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11687 (gdb_probe): Skip data collection if static tracepoint is disabled.
11689 2011-05-10 Doug Evans <dje@google.com>
11691 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11693 2011-05-04 Doug Evans <dje@google.com>
11695 * linux-low.c (linux_join): Skip process lookup.
11696 * spu-low.c (spu_join): Ditto.
11697 * server.c (join_inferiors_callback): Delete.
11698 (process_serial_event): For 'D' packet (detach) call join_inferior
11701 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11703 * README: Don't mention xscale*-*-linux*.
11704 * configure.srv (xscale*-*-linux*): Don't handle target.
11706 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11708 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11710 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11711 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11712 (i386_emit_void_call_2): Likewise.
11714 2011-04-26 Yao Qi <yao@codesourcery.com>
11716 * linux-low.c: Move common macros to linux-ptrace.h.
11717 Include linux-ptrace.h.
11718 * Makefile.in (linux_ptrace_h): New.
11719 (linux-low.o): Depends on linux-ptrace.h.
11721 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11723 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11724 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11725 (remote_prepare): New function with most of the TCP code from ...
11726 (remote_open): ... here. Detect PORT here unconditionally. Move also
11727 setting transport_is_reliable.
11728 * server.c (run_once): New variable.
11729 (gdbserver_usage): Document it.
11730 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11731 the first run if RUN_ONCE.
11732 * server.h (run_once, remote_prepare): New declarations.
11734 2011-04-19 Tom Tromey <tromey@redhat.com>
11736 * win32-low.c (handle_load_dll): Remove duplicate "the".
11738 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11740 Remove support for old Cygwin 1.5 versions.
11741 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11742 function to avoid warning.
11743 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11746 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11748 * gdbserver/server.h (Macro _): Define it if not available.
11750 2011-03-14 Michael Snyder <msnyder@vmware.com>
11752 * hostio.c (handle_close): Remove unnecessary null test.
11754 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11756 * Makefile.in (maintainer-clean realclean distclean): Remove
11757 "make ... subdir_do" command.
11759 2011-03-10 Michael Snyder <msnyder@vmware.com>
11761 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11763 * server.c (handle_v_run): Free alloced buffer on early return.
11765 2011-03-09 Yao Qi <yao@codesourcery.com>
11768 2011-03-04 Yao Qi <yao@codesourcery.com>
11770 * Makefile.in: Remove GNU make feature --directory.
11772 2011-03-05 Yao Qi <yao@codesourcery.com>
11774 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11775 (subdir_do): New make target. Copied from gdb/Makefile.
11776 (maintainer-clean, realclean, distclean, clean): Call corresponding
11777 make targets in common/Makefile.
11779 2011-02-11 Yao Qi <yao@codesourcery.com>
11781 * configure.ac: Call AC_PROG_RANLIB.
11782 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11783 * configure: Regenerate.
11785 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11787 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11789 2011-03-06 Yao Qi <yao@codesourcery.com>
11791 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11793 2011-03-05 Yao Qi <yao@codesourcery.com>
11795 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11796 (subdir_do): New make target. Copied from gdb/Makefile.
11797 (maintainer-clean, realclean, distclean, clean): Call corresponding
11798 make targets in common/Makefile.
11800 2011-03-04 Yao Qi <yao@codesourcery.com>
11802 * Makefile.in: Remove GNU make feature --directory.
11804 2011-03-04 Michael Snyder <msnyder@vmware.com>
11806 * server.c (queue_stop_reply): Call xmalloc not malloc.
11808 2011-03-02 Michael Snyder <msnyder@vmware.com>
11810 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11812 2011-02-28 Michael Snyder <msnyder@vmware.com>
11814 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11815 (cmd_qtframe): Ditto.
11816 (cmd_qtbuffer): Ditto.
11817 (cmd_bigqtbuffer): Ditto.
11819 * utils.c (decimal2str): Initialize 'width' to nine, then
11820 don't mess with it.
11822 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11824 * hostio.c (require_data): Free *data, not data.
11826 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11828 * hostio.c (require_data): Use free, not xfree.
11830 2011-02-27 Michael Snyder <msnyder@vmware.com>
11832 * server.c (handle_query): Discard unused value.
11834 * hostio.c (require_data): Free malloc memory before returning
11837 2011-02-26 Michael Snyder <msnyder@vmware.com>
11839 * linux-low.c (list_threads): Call closedir for dirent.
11841 2011-02-27 Michael Snyder <msnyder@vmware.com>
11843 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11844 a case statement falls through.
11846 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11848 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11851 2011-02-26 Michael Snyder <msnyder@vmware.com>
11853 * utils.c (decimal2str): Eliminate dead code and dead param.
11854 (pulongest): Drop dead param from call to decimal2str.
11857 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11859 Revert the following patch (not approved yet):
11860 2011-02-21 Hui Zhu <teawater@gmail.com>
11861 * tracepoint.c (tp_printf): New function.
11862 (eval_agent_expr): Handle gdb_agent_op_printf.
11864 2011-02-21 Hui Zhu <teawater@gmail.com>
11866 * tracepoint.c (tp_printf): New function.
11867 (eval_agent_expr): Handle gdb_agent_op_printf.
11869 2011-02-18 Tom Tromey <tromey@redhat.com>
11871 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11872 (tracepoint.o): Likewise.
11873 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11874 (gdb_agent_op_names): Likewise.
11876 2011-02-18 Tom Tromey <tromey@redhat.com>
11878 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11879 gdb_agent_op_rot>: New constants.
11880 (gdb_agent_op_names): Add pick and roll.
11881 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11884 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11886 * aclocal.m4: Regenerated with aclocal-1.11.1.
11888 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11890 * server.c (handle_qxfer_traceframe_info): New.
11891 (qxfer_packets): Register "traceframe-info".
11892 (handle_query): Report support for qXfer:traceframe-info:read+.
11893 * tracepoint.c (match_blocktype): New.
11894 (traceframe_find_block_type): Rename to ...
11895 (traceframe_walk_blocks): ... this. Add callback filter argument,
11897 (traceframe_find_block_type): New, reimplemented on top of
11898 traceframe_walk_blocks.
11899 (build_traceframe_info_xml): New.
11900 (traceframe_read_info): New.
11901 * server.h (traceframe_read_info): Declare.
11903 2011-02-11 Yao Qi <yao@codesourcery.com>
11905 * configure.ac: Call AC_PROG_RANLIB.
11906 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11907 * configure: Regenerate.
11909 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11911 * server.c (gdb_read_memory): Change return semantics to allow
11913 (handle_search_memory_1): Adjust.
11914 (process_serial_event) <'m' packet>: Handle partial transfers.
11915 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11917 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11919 * regcache.c (init_register_cache): Initialize
11920 regcache->register_status.
11921 (free_register_cache): Release regcache->register_status.
11922 (regcache_cpy): Copy register_status.
11923 (registers_to_string): Print 'x's for unavailable registers.
11924 (supply_register): Mark the register's status valid or
11925 unavailable, depending on whether a buffer was passed in or not.
11926 (supply_register_zeroed): New.
11927 (supply_regblock): Mark the registers' status valid or
11928 unavailable, depending on whether a buffer was passed in or not.
11929 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11930 (struct regcache): New `register_status' field.
11931 (supply_register_zeroed): Declare.
11932 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11933 supply_register_zeroed, rather than passing a NULL buffer to
11935 * tracepoint.c (fetch_traceframe_registers): Update comment.
11937 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11939 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11942 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11944 * server.h (decode_xfer_write): Change prototype.
11945 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11946 and don't extract the annex here.
11947 * server.c (decode_xfer_read): Remove `annex' parameter,
11948 and don't extract the annex here.
11949 (decode_xfer): New.
11950 (struct qxfer): New.
11951 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11952 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11953 (handle_qxfer_statictrace): New functions, abstracted out from
11954 handle_query, and made to use the struct qxfer interface.
11955 (handle_threads_qxfer_proper): Rename to ...
11956 (handle_qxfer_threads_proper): ... this.
11957 (handle_threads_qxfer): Rename to ...
11958 (handle_qxfer_threads): ... this. Adjust.
11959 (qxfer_packets): New array.
11960 (handle_qxfer): New function.
11961 (handle_query): Use handle_qxfer.
11963 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11965 * gdbreplay.c: Shorten lines of >= 80 columns.
11966 * linux-low.c: Ditto.
11967 * linux-ppc-low.c: Ditto.
11968 * linux-s390-low.c: Ditto.
11969 * linux-sparc-low.c: Ditto.
11970 * linux-x86-low.c: Ditto.
11971 * linux-xtensa-low.c: Ditto.
11972 * mem-break.c: Ditto.
11973 * nto-low.c: Ditto.
11974 * regcache.h: Ditto.
11975 * remote-utils.c: Ditto.
11978 * thread-db.c: Ditto.
11979 * tracepoint.c: Ditto.
11981 * win32-low.h: Ditto.
11983 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11985 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11988 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11990 * server.c (gdbserver_version): Update copyright year in version
11992 * gdbreplay.c (gdbreplay_version): Ditto.
11994 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11996 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11997 * linux-bfin-low.c: New file.
11998 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11999 PT_DATA_ADDR for BFIN targets.
12000 * Makefile.in (SFILES): Add linux-bfin-low.c.
12001 (clean): Remove reg-bfin.c.
12002 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12003 * README: Mention supported Blackfin targets.
12005 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12007 * .gitignore: New file.
12009 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12011 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12013 2010-10-22 Jie Zhang <jie@codesourcery.com>
12015 * Makefile.in: Add FLAGS_TO_PASS variable.
12016 (install): Remove dependency of install-only and recursively
12017 invoke make for install-only.
12019 2010-10-04 Doug Evans <dje@google.com>
12021 * Makefile.in (uninstall): Use $(DESTDIR).
12023 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12027 * linux-x86-low.c (compat_siginfo_from_siginfo)
12028 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12029 si_code is < 0. Check for si_code == SI_TIMER before checking for
12032 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12034 * lynx-i386-low.c: New file.
12035 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12037 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12039 * lynx-low.c (ptrace_request_to_str): Remove handling for
12040 request values that have been removed in LynxOS 5.x.
12042 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12044 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12047 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12049 * configure.ac: Add --enable-inprocess-agent option.
12050 * configure: Rebuilt.
12052 2010-09-06 Yao Qi <yao@codesourcery.com>
12054 * linux-low.c (linux_kill): Remove unused variable.
12055 (linux_stabilize_threads): Likewise.
12056 * server.c (start_inferior): Likewise.
12057 (queue_stop_reply_callback): Likewise.
12058 * tracepoint.c (do_action_at_tracepoint): Likewise.
12060 2010-09-06 Yao Qi <yao@codesourcery.com>
12062 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12065 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12067 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12069 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12071 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12074 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12076 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12077 gdbserver/lynx-ppc-low.c: New files.
12078 * Makefile.in (lynx_low_h): New variable.
12079 (lynx-low.o, lynx-ppc-low.o): New rules.
12080 * configure.ac: On LynxOS, link with -lnetinet.
12081 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12082 * configure: regenerate.
12084 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12086 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12087 * configure.ac: Add check for vasprintf and vsnprintf.
12088 * configure, config.in: Regenerate.
12089 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12091 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12093 * gdbreplay.c: Move include of alloca.h up, next to include of
12095 * server.h: Add include of malloc.h.
12096 * mem-break.c: Remove include of malloc.h.
12097 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12099 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12101 * Makefile.in (memmem.o): Build with -Wno-error.
12103 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12105 * utils.c (xsnprintf): Make non-static.
12106 * server.h: Add xsnprintf declaration.
12107 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12108 replace calls to snprintf by calls to xsnprintf throughout.
12110 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12112 * configure.ac: Add configure check for alloca.
12113 * configure, config.in: Regenerate.
12114 * server.h: Include alloca.h if it exists.
12115 * gdbreplay.c: Include alloca.h if it exists.
12117 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12119 * linux-low.c (__SIGRTMIN): Define if not already defined.
12120 (linux_create_inferior): Check for __ANDROID__ rather than
12122 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12123 are already deferred.
12124 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12125 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12126 stopped and already has a pending signal to report.
12127 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12128 a pending signal to report or is moving out of a jump pad.
12129 (linux_init_signals): Check for __ANDROID__ rather than
12132 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12134 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12135 debug_threads check. Avoid a linear search when not doing debug
12138 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12140 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12141 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12142 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12143 (process_event): Change local fd's type to gdb_fildes_t.
12144 (create_file_handler): Adjust prototype.
12145 (delete_file_handler): Adjust prototype.
12146 (handle_file_event): Adjust prototype. Use pfildes.
12147 (create_file_event): Adjsut prototype.
12148 * remote-utils.c (remote_desc, listen_desc): Change type to
12150 * server.h: New gdb_fildes_t typedef.
12151 [USE_WIN32API]: Include winsock2.h.
12152 (delete_file_handler, add_file_handler): Adjust prototypes.
12153 (pfildes): Declare.
12154 * utils.c (pfildes): New.
12156 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12158 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12159 * configure: Regenerate.
12161 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12163 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12164 (linux_done_accessing_memory): ... this.
12165 (linux_target_ops): Adjust.
12166 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12167 * nto-low.c (nto_target_ops): Adjust comment.
12168 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12169 * spu-low.c (spu_target_ops): Adjust comment.
12170 * target.h (target_ops): Rename unprepare_to_access_memory field
12171 to done_accessing_memory.
12172 (unprepare_to_access_memory): Rename to ...
12173 (done_accessing_memory): ... this.
12175 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12177 * linux-low.c (linux_prepare_to_access_memory): New.
12178 (linux_unprepare_to_access_memory): New.
12179 (linux_target_ops): Install them.
12180 * server.c (read_memory): Rename to ...
12181 (gdb_read_memory): ... this. Use
12182 prepare_to_access_memory/prepare_to_access_memory.
12183 (write_memory): Rename to ...
12184 (gdb_write_memory): ... this. Use
12185 prepare_to_access_memory/prepare_to_access_memory.
12186 (handle_search_memory_1): Adjust.
12187 (process_serial_event): Adjust.
12188 * target.h (struct target_ops): New fields
12189 prepare_to_access_memory and unprepare_to_access_memory.
12190 (prepare_to_access_memory, unprepare_to_access_memory): New.
12191 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12192 prepare_to_access_memory/prepare_to_access_memory.
12193 * nto-low.c (nto_target_ops): Adjust.
12194 * spu-low.c (spu_target_ops): Adjust.
12195 * win32-low.c (win32_target_ops): Adjust.
12197 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12199 * Makefile.in (WARN_CFLAGS): Get it from configure.
12200 (WERROR_CFLAGS): New.
12201 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12202 * configure.ac: Introduce --enable-werror, which adds -Werror to
12203 the compiler command line. Enabled by default. Disable with
12204 --disable-werror. Add -Wdeclaration-after-statement
12205 Wpointer-arith and -Wformat-nonliteral to warning flags.
12206 * configure: Regenerate.
12208 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12210 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12212 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12214 * gdbreplay.c (remote_error): New.
12216 (expect): Use gdbchar. Check for error reading from GDB.
12217 Clarify sync error output.
12218 (play): Check for errors writing to GDB.
12219 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12220 * remote-utils.c (getpkt): Check for errors writing to the remote
12223 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12225 * linux-low.c (linux_wait_1): Move non-debugging code out of
12226 `debug_threads' control.
12228 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12230 * linux-low.c (linux_wait_1): Don't set last_status here.
12231 * server.c (push_event, queue_stop_reply_callback): Assert we're
12232 not pushing a TARGET_WAITKIND_IGNORE event.
12233 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12234 (myresume, handle_target_event): Set the thread's last_resume_kind
12235 and last_status from the target returned status.
12237 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12241 * linux-x86-low.c (update_debug_registers_callback): New.
12242 (i386_dr_low_set_addr): Use it.
12243 (i386_dr_low_get_addr): New.
12244 (i386_dr_low_set_control): Use update_debug_registers_callback.
12245 (i386_dr_low_get_control): New.
12246 (i386_dr_low_get_status): Adjust.
12247 * linux-low.c (linux_stop_lwp): New.
12248 * linux-low.h (linux_stop_lwp): Declare.
12250 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12251 argument instead of a i386_debug_reg_state.
12252 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12253 a i386_debug_reg_state.
12254 (i386_insert_aligned_watchpoint): Adjust.
12255 (i386_remove_aligned_watchpoint): Adjust.
12256 (i386_low_stopped_data_address): Read the debug registers from the
12257 inferior instead of from the mirrors.
12258 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12259 (i386_dr_low_get_addr): Declare.
12260 (i386_dr_low_get_control): Declare.
12261 (i386_dr_low_get_status): Change prototype.
12263 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12264 (i386_dr_low_get_addr): New.
12265 (i386_dr_low_get_control): New.
12266 (i386_dr_low_get_status): Adjust prototype. Return
12268 (i386_initial_stuff): Clear dr_status_mirror and
12270 (i386_get_thread_context): Adjust.
12271 (i386_set_thread_context): Adjust.
12272 (i386_thread_added): Adjust.
12274 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12276 * linux-low.h (linux_thread_area): Delete declaration.
12278 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12280 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12281 after its termination.
12283 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12285 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12286 (gdb_wants_all_stopped): Delete.
12287 (linux_wait_1): Don't call them.
12288 * server.c (handle_v_cont): Tag all threads as want-stopped.
12289 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12290 stopped as "client-wants-stopped".
12292 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12294 * Makefile.in (signals_h): New.
12295 (server_h): Depend on it.
12296 (server.o): Don't depend on $(signals_def).
12297 (signals.o): Depend on $(signals_def).
12299 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12301 * Makefile.in (signals_def): New.
12302 (server_h): Append include/gdb/signals.h and signals_def.
12303 (server.o): Append signals_def.
12305 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12307 * server.c (handle_target_event): Use target_signal_to_host for
12308 resume_info.sig initialization.
12309 * target.h (struct thread_resume) <sig>: New comment.
12311 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12313 * server.c (handle_query): strcpy() the returned string from paddress()
12314 instead of sprintf().
12315 * utils.c (paddress): Return phex_nz().
12317 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12319 * server.c (handle_v_cont): Call mourn_inferior if process
12321 (myresume): Likewise.
12323 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12325 Static tracepoints, and integration with UST.
12327 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12328 * mem-break.c (uninsert_all_breakpoints)
12329 (reinsert_all_breakpoints): New.
12330 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12331 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12332 (gdb_agent_ust_loaded, helper_thread_id)
12333 (gdb_agent_helper_thread_id): New macros.
12334 (struct ipa_sym_addresses): Add addr_ust_loaded,
12335 addr_helper_thread_id, addr_cmd_buf.
12336 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12337 (in_process_agent_loaded_ust): New.
12338 (write_e_ust_not_loaded): New.
12339 (maybe_write_ipa_ust_not_loaded): New.
12340 (struct collect_static_trace_data_action): New.
12341 (enum tracepoint_type) <static_tracepoint>: New.
12342 (struct tracepoint) <handle>: Mention static tracepoints.
12343 (struct static_tracepoint_ctx): New.
12344 (CMD_BUF_SIZE): New.
12345 (add_tracepoint_action): Handle static tracepoint actions.
12346 (unprobe_marker_at): New.
12347 (clear_installed_tracepoints): Handle static tracepoints.
12348 (cmd_qtdp): Handle static tracepoints.
12349 (probe_marker_at): New.
12350 (cmd_qtstart): Handle static tracepoints.
12351 (response_tracepoint): Handle static tracepoints.
12352 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12353 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12354 (get_context_regcache): Handle static tracepoints.
12355 (do_action_at_tracepoint): Handle static tracepoint actions.
12356 (traceframe_find_block_type): Handle static trace data blocks.
12357 (traceframe_read_sdata): New.
12358 (download_tracepoints): Download static tracepoint actions.
12359 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12360 (GDB_PROBE_NAME): New.
12362 (GET_UST_SYM): New.
12365 (ust_marker_to_static_tracepoint): New.
12367 (collect_ust_data_at_tracepoint): New.
12368 (gdb_ust_probe): New.
12369 (UNIX_PATH_MAX, SOCK_DIR): New.
12370 (gdb_ust_connect_sync_socket): New.
12371 (resume_thread, stop_thread): New.
12372 (run_inferior_command): New.
12373 (init_named_socket): New.
12374 (gdb_ust_socket_init): New.
12375 (cstr_to_hexstr): New.
12377 (first_marker, next_marker): New.
12378 (response_ust_marker): New.
12379 (cmd_qtfstm, cmd_qtsstm): New.
12380 (unprobe_marker_at, probe_marker_at): New.
12381 (cmd_qtstmat, gdb_ust_thread): New.
12382 (gdb_ust_init): New.
12383 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12384 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12385 (ST_REGENTRY): New.
12386 (x86_64_st_collect_regmap): New.
12387 (X86_64_NUM_ST_COLLECT_GREGS): New.
12388 (AMD64_RIP_REGNUM): New.
12389 (supply_static_tracepoint_registers): New.
12390 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12391 (ST_REGENTRY): New.
12392 (i386_st_collect_regmap): New.
12393 (i386_NUM_ST_COLLECT_GREGS): New.
12394 (supply_static_tracepoint_registers): New.
12395 * server.c (handle_query): Handle qXfer:statictrace:read.
12396 <qSupported>: Report support for StaticTracepoints, and
12397 qXfer:statictrace:read features.
12398 * server.h (traceframe_read_sdata)
12399 (supply_static_tracepoint_registers): Declare.
12400 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12401 (unpack_varlen_hex): Include in IPA build.
12402 * Makefile.in (ustlibs, ustinc): New.
12403 (IPA_OBJS): Add remote-utils-ipa.o.
12404 ($(IPA_LIB)): Link -ldl and -lpthread.
12406 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12407 * config.in, configure: Regenerate.
12409 2010-06-20 Ian Lance Taylor <iant@google.com>
12410 Pedro Alves <pedro@codesourcery.com>
12412 * linux-x86-low.c (always_true): Delete.
12413 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12414 trying to fool the compiler with always_true.
12416 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12418 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12419 conditions in gdbserver.
12421 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12423 * spu-low.c (spu_read_memory): Wrap around local store limit.
12424 (spu_write_memory): Likewise.
12426 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12428 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12429 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12431 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12433 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12434 uses with LONGEST uses.
12436 2010-06-14 Stan Shebs <stan@codesourcery.com>
12437 Pedro Alves <pedro@codesourcery.com>
12441 * linux-x86-low.c: Include limits.h.
12443 (always_true): New.
12446 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12447 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12448 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12449 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12450 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12451 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12452 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12453 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12454 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12455 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12456 (amd64_emit_void_call_2): New.
12457 (amd64_emit_ops): New.
12458 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12459 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12460 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12461 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12462 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12463 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12464 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12465 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12466 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12467 (i386_emit_stack_adjust, i386_emit_int_call_1)
12468 (i386_emit_void_call_2): New.
12469 (i386_emit_ops): New.
12470 (x86_emit_ops): New.
12471 (the_low_target): Install x86_emit_ops.
12472 * server.h (struct emit_ops): New.
12473 (get_raw_reg_func_addr): Declare.
12474 (current_insn_ptr, emit_error): Declare.
12475 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12476 (set_trace_state_variable_value): New defines.
12477 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12478 addr_get_trace_state_variable_value and
12479 addr_set_trace_state_variable_value.
12480 (symbol_list): New fields for get_raw_reg,
12481 get_trace_state_variable_value and set_trace_state_variable_value.
12482 (condfn): New typedef.
12483 (struct tracepoint): New field `compiled_cond'.
12484 (do_action_at_tracepoint): Clear compiled_cond.
12485 (get_trace_state_variable_value, set_trace_state_variable_value):
12487 (condition_true_at_tracepoint): If there's a compiled condition,
12489 (current_insn_ptr, emit_error): New globals.
12490 (struct bytecode_address): New.
12491 (get_raw_reg_func_addr): New.
12492 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12493 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12494 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12495 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12496 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12497 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12498 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12499 (compile_tracepoint_condition, compile_bytecodes): New.
12500 * target.h (emit_ops): Forward declare.
12501 (struct target_ops): New field emit_ops.
12502 (target_emit_ops): New.
12503 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12504 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12505 * linux-low.c (linux_emit_ops): New.
12506 (linux_target_ops): Install it.
12507 * linux-low.h (struct linux_target_ops): New field emit_ops.
12509 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12511 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12512 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12514 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12515 Stan Shebs <stan@codesourcery.com>
12517 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12518 (all): Depend on $(extra_libraries).
12519 (install-only): Install the IPA.
12520 (IPA_OBJS, IPA_LIB): New.
12521 (clean): Remove the IPA lib.
12522 (IPAGENT_CFLAGS): New.
12523 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12524 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12525 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12526 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12527 * configure.ac: Check for atomic builtins support in the compiler.
12528 (IPA_DEPFILES, extra_libraries): Define.
12529 * configure.srv (ipa_obj): Add description.
12530 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12531 (i[34567]86-*-linux*): Set ipa_obj.
12532 (x86_64-*-linux*): Set ipa_obj.
12533 * linux-low.c (stabilizing_threads): New.
12534 (supports_fast_tracepoints): New.
12535 (linux_detach): Stabilize threads before detaching.
12536 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12537 the lwp is either not stabilizing, or is moving out of a jump pad.
12538 (linux_fast_tracepoint_collecting): New.
12539 (maybe_move_out_of_jump_pad): New.
12540 (enqueue_one_deferred_signal): New.
12541 (dequeue_one_deferred_signal): New.
12542 (linux_wait_for_event_1): If moving out of a jump pad, defer
12543 pending signals to later.
12544 (linux_stabilize_threads): New.
12545 (linux_wait_1): Check if threads need moving out of jump pads, and
12547 (stuck_in_jump_pad_callback): New.
12548 (move_out_of_jump_pad_callback): New.
12549 (lwp_running): New.
12550 (linux_resume_one_lwp): Handle moving out of jump pads.
12551 (linux_set_resume_request): Dequeue deferred signals.
12552 (need_step_over_p): Also step over fast tracepoint jumps.
12553 (start_step_over): Also uninsert fast tracepoint jumps.
12554 (finish_step_over): Also reinsert fast tracepoint jumps.
12555 (linux_install_fast_tracepoint_jump): New.
12556 (linux_target_ops): Install linux_stabilize_threads and
12557 linux_install_fast_tracepoint_jump_pad.
12558 * linux-low.h (linux_target_ops) <get_thread_area,
12559 install_fast_tracepoint_jump_pad>: New fields.
12560 (struct lwp_info) <collecting_fast_tracepoint,
12561 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12562 (linux_get_thread_area): Declare.
12563 * linux-x86-low.c (jump_insn): New.
12564 (x86_get_thread_area): New.
12565 (append_insns): New.
12566 (push_opcode): New.
12567 (amd64_install_fast_tracepoint_jump_pad): New.
12568 (i386_install_fast_tracepoint_jump_pad): New.
12569 (x86_install_fast_tracepoint_jump_pad): New.
12570 (the_low_target): Install x86_get_thread_area and
12571 x86_install_fast_tracepoint_jump_pad.
12572 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12573 (struct fast_tracepoint_jump): New.
12574 (fast_tracepoint_jump_insn): New.
12575 (fast_tracepoint_jump_shadow): New.
12576 (find_fast_tracepoint_jump_at): New.
12577 (fast_tracepoint_jump_here): New.
12578 (delete_fast_tracepoint_jump): New.
12579 (set_fast_tracepoint_jump): New.
12580 (uninsert_fast_tracepoint_jumps_at): New.
12581 (reinsert_fast_tracepoint_jumps_at): New.
12582 (set_breakpoint_at): Use write_inferior_memory.
12583 (uninsert_raw_breakpoint): Use write_inferior_memory.
12584 (check_mem_read): Mask out fast tracepoint jumps.
12585 (check_mem_write): Mask out fast tracepoint jumps.
12586 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12587 (set_fast_tracepoint_jump): Declare.
12588 (delete_fast_tracepoint_jump)
12589 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12590 (reinsert_fast_tracepoint_jumps_at): Declare.
12591 * regcache.c: Don't compile many functions when building the
12592 in-process agent library.
12593 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12594 the register buffer in the heap.
12595 (free_register_cache): If the register buffer isn't owned by the
12596 regcache, don't free it.
12597 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12598 pre-existing register caches.
12599 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12601 (convert_ascii_to_int): : Constify `from' parameter type.
12602 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12603 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12604 the needed buffer in-place.
12605 (relocate_instruction): New.
12606 * server.c (handle_query) <qSymbols>: If the target supports
12607 tracepoints, give it a chance of looking up symbols. Report
12608 support for fast tracepoints.
12609 (handle_status): Stabilize threads.
12610 (process_serial_event): Adjust.
12611 * server.h (struct fast_tracepoint_jump): Forward declare.
12612 (struct process_info) <fast_tracepoint_jumps>: New field.
12613 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12614 (decode_X_packet, decode_M_packet): Adjust.
12615 (relocate_instruction): Declare.
12616 (in_process_agent_loaded): Declare.
12617 (tracepoint_look_up_symbols): Declare.
12618 (struct fast_tpoint_collect_status): Declare.
12619 (fast_tracepoint_collecting): Declare.
12620 (force_unlock_trace_buffer): Declare.
12621 (handle_tracepoint_bkpts): Declare.
12622 (initialize_low_tracepoint)
12623 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12624 * target.h (struct target_ops) <stabilize_threads,
12625 install_fast_tracepoint_jump_pad>: New fields.
12626 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12627 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12628 [HAVE_STDINT_H]: Include stdint.h.
12629 (trace_debug_1): Rename to ...
12630 (trace_vdebug): ... this.
12631 (trace_debug): Rename to ...
12632 (trace_debug_1): ... this. Add `level' parameter.
12633 (trace_debug): New.
12634 (ATTR_USED, ATTR_NOINLINE): New.
12635 (IP_AGENT_EXPORT): New.
12636 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12637 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12638 (about_to_request_buffer_space, trace_buffer_is_full)
12639 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12640 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12641 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12642 (traceframe_write_count, traceframes_created)
12643 (trace_state_variables)
12644 New renaming defines.
12645 (struct ipa_sym_addresses): New.
12646 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12647 (symbol_list): New.
12648 (ipa_sym_addrs): New.
12649 (all_tracepoint_symbols_looked_up): New.
12650 (in_process_agent_loaded): New.
12651 (write_e_ipa_not_loaded): New.
12652 (maybe_write_ipa_not_loaded): New.
12653 (tracepoint_look_up_symbols): New.
12654 (debug_threads) [IN_PROCESS_AGENT]: New.
12655 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12656 (UNKNOWN_SIDE_EFFECTS): New.
12657 (stop_tracing): New.
12658 (flush_trace_buffer): New.
12659 (stop_tracing_bkpt): New.
12660 (flush_trace_buffer_bkpt): New.
12661 (read_inferior_integer): New.
12662 (read_inferior_uinteger): New.
12663 (read_inferior_data_pointer): New.
12664 (write_inferior_data_pointer): New.
12665 (write_inferior_integer): New.
12666 (write_inferior_uinteger): New.
12667 (struct collect_static_trace_data_action): Delete.
12668 (enum tracepoint_type): New.
12669 (struct tracepoint) <type>: New field `type'.
12670 <actions_str, step_actions, step_actions_str>: Only include in
12672 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12673 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12674 (tracepoints): Use IP_AGENT_EXPORT.
12675 (last_tracepoint): Don't include in the IPA.
12676 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12677 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12678 (alloced_trace_state_variables): New.
12679 (trace_state_variables): Use IP_AGENT_EXPORT.
12680 (traceframe_t): Delete unused variable.
12681 (circular_trace_buffer): Don't include in the IPA.
12682 (trace_buffer_start): Delete.
12683 (struct trace_buffer_control): New.
12684 (trace_buffer_free): Delete.
12685 (struct ipa_trace_buffer_control): New.
12686 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12687 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12689 (trace_buffer_ctrl): New.
12690 (TRACE_BUFFER_CTRL_CURR): New.
12691 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12692 Reimplement as macros.
12693 (trace_buffer_wrap): Delete.
12694 (traceframe_write_count, traceframe_read_count)
12695 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12696 (struct tracepoint_hit_ctx) <type>: New field.
12697 (struct fast_tracepoint_ctx): New.
12698 (memory_barrier): New.
12700 (record_tracepoint_error): Update atomically in the IPA.
12701 (clear_inferior_trace_buffer): New.
12702 (about_to_request_buffer_space): New.
12703 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12704 updating the same buffer.
12705 (add_tracepoint): Default the tracepoint's type to trap
12706 tracepoint, and orig_size to -1.
12707 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12708 internal variables.
12709 (create_trace_state_variable): New parameter `gdb'. Handle it.
12710 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12711 (cmd_qtdp): Handle fast tracepoints.
12712 (cmd_qtdv): Adjust.
12713 (max_jump_pad_size): New.
12714 (gdb_jump_pad_head): New.
12715 (get_jump_space_head): New.
12716 (claim_jump_space): New.
12717 (sort_tracepoints): New.
12718 (MAX_JUMP_SIZE): New.
12719 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12721 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12722 support. Upload fast traceframes, and delete internal IPA
12724 (stop_tracing_handler): New.
12725 (flush_trace_buffer_handler): New.
12726 (cmd_qtstop): Upload fast tracepoints.
12727 (response_tracepoint): Handle fast tracepoints.
12728 (tracepoint_finished_step): Upload fast traceframes. Set the
12729 tracepoint hit context's tracepoint type.
12730 (handle_tracepoint_bkpts): New.
12731 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12732 type. Add comment about fast tracepoints.
12733 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12734 non-existing action_str field.
12735 (get_context_regcache): Handle fast tracepoints.
12736 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12738 (fast_tracepoint_from_jump_pad_address): New.
12739 (fast_tracepoint_from_ipa_tpoint_address): New.
12740 (collecting_t): New.
12741 (force_unlock_trace_buffer): New.
12742 (fast_tracepoint_collecting): New.
12744 (gdb_collect): New.
12745 (write_inferior_data_ptr): New.
12746 (target_tp_heap): New.
12747 (target_malloc): New.
12748 (download_agent_expr): New.
12750 (download_tracepoints): New.
12751 (download_trace_state_variables): New.
12752 (upload_fast_traceframes): New.
12753 (IPA_FIRST_TRACEFRAME): New.
12754 (IPA_NEXT_TRACEFRAME_1): New.
12755 (IPA_NEXT_TRACEFRAME): New.
12756 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12757 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12758 (gdb_jump_pad_buffer_end): New.
12759 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12760 (initialize_tracepoint): Adjust.
12761 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12762 buffer. Initialize the low module.
12763 * utils.c (PREFIX, TOOLNAME): New.
12764 (malloc_failure): Use PREFIX.
12765 (error): In the IPA, an error causes an exit.
12766 (fatal, warning): Use PREFIX.
12767 (internal_error): Use TOOLNAME.
12768 (NUMCELLS): Increase to 10.
12769 * configure, config.in: Regenerate.
12771 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12773 * server.c (handle_query) <qSupported>: Do two passes over the
12774 qSupported string to avoid nesting strtok.
12776 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12778 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12780 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12781 -Wl,--dynamic-list.
12782 * configure: Regenerate.
12783 * proc-service.list: New.
12785 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12787 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12790 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12792 * gdbreplay.c (remote_open): Check error return from socket() call by
12793 its equality to -1 not by it being negative.
12794 * remote-utils.c (remote_open): Likewise.
12796 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12798 * config.h: Regenerate.
12800 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12802 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12803 doesn't provide PTRACE_GET_THREAD_AREA.
12805 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12807 * linux-m68k-low.c: Include <asm/ptrace.h>
12808 (ps_get_thread_area): Implement.
12810 2010-05-03 Doug Evans <dje@google.com>
12812 * event-loop.c (struct callback_event): New struct.
12813 (callback_list): New global.
12814 (append_callback_event, delete_callback_event): New functions.
12815 (process_callback): New function.
12816 (start_event_loop): Call it.
12817 * remote-utils.c (NOT_SCHEDULED): Define.
12818 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12819 moved out of readchar.
12820 (readchar): Rewrite. Call reschedule before returning.
12821 (reset_readchar): New function.
12822 (remote_close): Call it.
12823 (process_remaining, reschedule): New functions.
12824 * server.h (callback_handler_func): New typedef.
12825 (append_callback_event, delete_callback_event): Declare.
12827 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12829 * proc-service.c (ps_pglobal_lookup): Use
12830 thread_db_look_up_one_symbol.
12831 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12832 parameter. Use it instead of all_symbols_looked_up.
12833 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12835 (all_symbols_looked_up): Don't declare.
12836 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12837 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12839 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12840 Set all_symbols_looked_up here.
12841 (thread_db_look_up_one_symbol): New.
12842 (thread_db_get_tls_address): Adjust.
12843 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12844 thread_db object on the heap, and tentatively set it in the
12846 (thread_db_init): Don't set all_symbols_looked_up here.
12847 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12849 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12851 * linux-low.c (linux_kill, linux_detach): Adjust.
12852 (status_pending_p_callback): Remove redundant statement. Check
12853 for !TARGET_WAITIKIND_IGNORE, instead of
12854 TARGET_WAITKIND_STOPPED.
12855 (handle_tracepoints): Make sure LWP is locked. Adjust.
12856 (linux_wait_for_event_1): Adjust.
12857 (linux_cancel_breakpoints): New.
12858 (unsuspend_one_lwp): New.
12859 (unsuspend_all_lwps): New.
12860 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12861 (send_sigstop_callback): Change return type to int, add new
12862 `except' parameter and handle it.
12863 (suspend_and_send_sigstop_callback): New.
12864 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12865 pass them down. If SUSPEND, also increment the lwp's suspend
12867 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12868 (need_step_over_p): Don't consider suspended LWPs.
12869 (start_step_over): Adjust.
12870 (proceed_one_lwp): Change return type to int, add new `except'
12871 parameter and handle it.
12872 (unsuspend_and_proceed_one_lwp): New.
12873 (proceed_all_lwps): Use find_inferior instead of
12875 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12876 also decrement the suspend count of LWPs. Pass `except' down,
12877 instead of hacking its suspend count.
12878 (linux_pause_all): Add `freeze' parameter. Adjust.
12879 (linux_unpause_all): New.
12880 (linux_target_ops): Install linux_unpause_all.
12881 * server.c (handle_status): Adjust.
12882 * target.h (struct target_ops): New fields `unpause_all' and
12883 `cancel_breakpoints'. Add new parameter to `pause_all'.
12884 (pause_all): Add new `freeze' parameter.
12885 (unpause_all): New.
12886 (cancel_breakpoints): New.
12887 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12888 cancel breakpoints.
12889 (cmd_qtstart): Pause threads.
12890 (stop_tracing): Pause threads, and cancel breakpoints.
12891 * win32-low.c (win32_target_ops): Adjust.
12893 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12895 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12896 the inferior right away from here...
12897 (linux_wait_1): ... to here, and adjust to check the thread's
12898 last_resume_kind instead of the lwp's step or stop_expected flags.
12900 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12902 * README: Use consistent `GDB' and `GDBserver' spellings.
12904 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12906 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12907 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12908 (linux_detach_one_lwp): Assume the lwp is stopped.
12909 (any_thread_of): Delete.
12910 (linux_detach): Stop all lwps here. Don't blindly delete all
12912 (delete_lwp_callback): New.
12913 (linux_mourn): Delete all lwps of the process that is gone.
12914 (linux_wait_1): Don't delete the last lwp of the process here.
12915 * mem-break.h (mark_breakpoints_out): Declare.
12916 * mem-break.c (mark_breakpoints_out): New.
12917 (free_all_breakpoints): Use it.
12918 * server.c (handle_target_event): If the process is gone, mark
12920 * thread-db.c (struct thread_db) <create_bp>: New field.
12921 (thread_db_enable_reporting): Fix prototype. Store a thread event
12922 breakpoint reference in the thread_db struct.
12923 (thread_db_load_search): Clear the thread_db object.
12924 (try_thread_db_load_1): Ditto.
12925 (switch_to_process): New.
12926 (disable_thread_event_reporting): Use it.
12927 (remove_thread_event_breakpoints): New.
12928 (thread_db_detach, thread_db_mourn): Use it.
12930 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12932 * linux-low.c (linux_enable_event_reporting): New.
12933 (linux_wait_for_event_1, handle_extended_wait): Use it.
12935 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12937 * linux-low.c (linux_kill_one_lwp, linux_kill)
12938 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12939 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12940 SIGSTOP even if the LWP is stopped.
12941 (send_sigstop_callback): New.
12942 (stop_all_lwps): Use send_sigstop_callback instead.
12943 (linux_resume_one_thread): Adjust.
12944 (proceed_one_lwp): Still proceed an LWP that the client has
12945 requested to stop, if we haven't reported it as stopped yet. Make
12946 sure that LWPs the client want stopped, have a pending SIGSTOP.
12948 2010-04-26 Doug Evans <dje@google.com>
12950 * server.c (handle_general_set): Make static.
12952 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12953 Print received char after testing for error/eof instead of before.
12954 (input_interrupt): Tweak comment.
12956 2010-04-23 Doug Evans <dje@google.com>
12958 * server.c (start_inferior): Print inferior argv if --debug.
12960 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12962 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12963 * nto-x86-low.c: Include server.h
12965 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12967 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12968 be consistent with other sources of this directory.
12969 (init_registers_amd64): Correct name of source file of this function
12972 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12974 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12975 64-bit executables.
12977 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12979 * win32-i386-low.c: Add 64-bit support.
12980 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12981 (init_registers_amd64): Declare.
12982 (mappings): Add 64-bit version of array.
12983 (init_windows_x86): New function.
12984 (the_low_target): Change init_arch field to init_windows_x86.
12986 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12988 * win32-low.c: Adapt to support also 64-bit architecture.
12989 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12990 (get_image_name): Use SIZE_T type for local variable `done'.
12991 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12992 (toolhelp_get_dll_name): Idem.
12993 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12994 Use uintptr_t typecast to avoid warning.
12995 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12996 (handle_exception): Use phex_nz to avoid warning.
12997 (win32_wait): Remove unused local variable `process'.
12999 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13001 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13004 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13006 * configure.ac: Use `ws2_32' library for srv_mingw.
13007 * configure: Regenerate.
13008 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13009 * remote-utils.c: Likewise.
13011 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13013 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13014 if __x86_64__ is defined.
13016 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13018 * configure: Regenerate.
13020 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13022 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13023 * target.h (target_ops): New get_tib_address field.
13024 * win32-low.h (win32_thread_info): Add thread_local_base field.
13025 * win32-low.c (child_add_thread): Add tlb argument.
13026 Set thread_local_base field to TLB.
13027 (get_child_debug_event): Adapt to child_add_thread change.
13028 (win32_get_tib_address): New function.
13029 (win32_target_ops): Set get_tib_address field to
13030 win32_get_tib_address.
13031 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13033 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13035 * linux-low.c (linux_mourn): Also remove the process.
13036 * server.c (handle_target_event): Don't remove the process here.
13037 * nto-low.c (nto_mourn): New.
13038 (nto_target_ops): Install it.
13039 * spu-low.c (spu_mourn): New.
13040 (spu_target_ops): Install it.
13041 * win32-low.c (win32_mourn): New.
13042 (win32_target_ops): Install it.
13044 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13046 * server.h (buffer_xml_printf): Remove redundant `;'.
13048 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13050 * regcache.c (set_register_cache): Invalidate regcaches before
13051 changing the register cache layout.
13052 (regcache_invalidate_one): Allow a NULL regcache.
13053 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13054 regcaches before changing the register cache layout or the target
13057 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13059 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13060 variable warning on Linux/x86-64.
13062 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13064 GDBserver disconnected tracing support.
13066 * linux-low.c (linux_remove_process): Delete.
13067 (add_lwp): Don't set last_resume_kind here.
13068 (linux_kill): Use `mourn'.
13069 (linux_detach): Use `thread_db_detach', and `mourn'.
13070 (linux_mourn): New.
13071 (linux_attach_lwp_1): Adjust comment.
13072 (linux_attach): last_resume_kind moved the thread_info; adjust.
13073 (status_pending_p_callback): Adjust.
13074 (linux_wait_for_event_1): Adjust.
13075 (count_events_callback, select_singlestep_lwp_callback)
13076 (select_event_lwp_callback, cancel_breakpoints_callback)
13077 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13078 (proceed_one_lwp): Adjust.
13079 (linux_async): Add debug output.
13080 (linux_thread_stopped): New.
13081 (linux_pause_all): New.
13082 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13084 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13085 (thread_db_free): Delete declaration.
13086 (thread_db_detach, thread_db_mourn): Declare.
13087 * thread-db.c (thread_db_init): Use thread_db_mourn.
13088 (thread_db_free): Delete, split in two.
13089 (disable_thread_event_reporting): New.
13090 (thread_db_detach): New.
13091 (thread_db_mourn): New.
13093 * server.h (struct thread_info) <last_resume_kind>: New field.
13094 <attached>: Add comment.
13095 <gdb_detached>: New field.
13096 (handler_func): Change return type to int.
13097 (handle_serial_event, handle_target_event): Ditto.
13098 (gdb_connected): Declare.
13100 (disconnected_tracing): Declare.
13101 (stop_tracing): Declare.
13103 * server.c (handle_query) <qSupported>: Report support for
13104 disconnected tracing.
13105 (queue_stop_reply_callback): Account for running threads.
13106 (gdb_wants_thread_stopped): New.
13107 (gdb_wants_all_threads_stopped): New.
13108 (gdb_reattached_process): New.
13109 (handle_status): Clear the `gdb_detached' flag of all processes.
13110 In all-stop, stop all threads.
13111 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13112 (process_serial_event): If the remote connection breaks, or if an
13113 exit was forced with "monitor exit", force an event loop exit.
13114 Handle disconnected tracing on detach.
13115 (handle_serial_event): Adjust.
13116 (handle_target_event): If GDB isn't connected, forward events back
13117 to the inferior, unless the last process exited, in which case,
13118 exit gdbserver. Adjust interface.
13120 * remote-utils.c (remote_open): Don't block in accept. Instead
13121 register an event loop source on the listen socket file
13122 descriptor. Refactor bits into ...
13123 (listen_desc): ... this new global.
13124 (gdb_connected): ... this new function.
13125 (enable_async_notification): ... this new function.
13126 (handle_accept_event): ... this new function.
13127 (remote_close): Clear remote_desc.
13129 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13131 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13133 (mourn_inferior): Define.
13134 (target_process_qsupported): Avoid the dangling else problem.
13135 (thread_stopped): Define.
13136 (pause_all): Define.
13137 (target_waitstatus_to_string): Declare.
13138 * target.c (target_waitstatus_to_string): New.
13140 * tracepoint.c (tracing): Make extern.
13141 (disconnected_tracing): New.
13142 (stop_tracing): Make extern. Handle tracing stops due to GDB
13144 (cmd_qtdisconnected): New.
13145 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13146 (handle_tracepoint_general_set): Handle QTDisconnected.
13148 * event-loop.c (event_handler_func): Change return type to int.
13149 (process_event): Bail out if the event handler wants the event
13151 (handle_file_event): Ditto.
13152 (start_event_loop): Bail out if the event handler wants the event
13155 * nto-low.c (nto_target_ops): Adjust.
13156 * spu-low.c (spu_wait): Don't remove the process here.
13157 (spu_target_ops): Adjust.
13158 * win32-low.c (win32_wait): Don't remove the process here.
13159 (win32_target_ops): Adjust.
13161 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13163 * regcache.c (realloc_register_cache): Invalidate inferior's
13164 regcache before recreating it.
13166 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13168 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13170 2010-04-09 Stan Shebs <stan@codesourcery.com>
13171 Pedro Alves <pedro@codesourcery.com>
13173 * server.h (LONGEST): New.
13174 (struct thread_info) <while_stepping>: New field.
13175 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13177 (initialize_tracepoint, handle_tracepoint_general_set)
13178 (handle_tracepoint_query, tracepoint_finished_step)
13179 (tracepoint_was_hit, release_while_stepping_state_list):
13180 (current_traceframe): Declare.
13181 * server.c (handle_general_set): Handle tracepoint packets.
13182 (read_memory): New.
13183 (write_memory): New.
13184 (handle_search_memory_1): Use read_memory.
13185 (handle_query): Report support for conditional tracepoints, trace
13186 state variables, and tracepoint sources. Handle tracepoint
13188 (main): Initialize the tracepoints module.
13189 (process_serial_event): Handle traceframe reads/writes.
13191 * linux-low.c (handle_tracepoints): New.
13192 (linux_wait_1): Call it.
13193 (linux_resume_one_lwp): Handle while-stepping.
13194 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13195 (linux_target_ops): Install them.
13196 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13198 * linux-x86-low.c (x86_supports_tracepoints): New.
13199 (the_low_target). Install it.
13201 * mem-break.h (delete_breakpoint): Declare.
13202 * mem-break.c (delete_breakpoint): Make external.
13204 * target.h (struct target_ops): Add `supports_tracepoints',
13205 `read_pc', and `write_pc' fields.
13206 (target_supports_tracepoints): Define.
13207 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13210 * regcache.h (struct regcache) <registers_owned>: New field.
13211 (init_register_cache, regcache_cpy): Declare.
13212 (regcache_read_pc, regcache_write_pc): Declare.
13213 (register_cache_size): Declare.
13214 (supply_regblock): Declare.
13215 * regcache.c (init_register_cache): New.
13216 (new_register_cache): Use it.
13217 (regcache_cpy): New.
13218 (register_cache_size): New.
13219 (supply_regblock): New.
13220 (regcache_read_pc, regcache_write_pc): New.
13222 * tracepoint.c: New.
13224 * Makefile.in (OBS): Add tracepoint.o.
13225 (tracepoint.o): New rule.
13227 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13229 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13231 (i386-mmx.c): Likewise.
13232 (i386-mmx-linux.o): Likewise.
13233 (i386-mmx-linux.c): Likewise.
13235 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13236 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13237 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13238 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13240 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13241 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13242 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13244 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13246 * Makefile.in (clean): Updated.
13248 (i386-avx.c): Likewise.
13249 (i386-avx-linux.o): Likewise.
13250 (i386-avx-linux.c): Likewise.
13251 (amd64-avx.o): Likewise.
13252 (amd64-avx.c): Likewise.
13253 (amd64-avx-linux.o): Likewise.
13254 (amd64-avx-linux.c): Likewise.
13256 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13257 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13258 (srv_amd64_regobj): Add amd64-avx.o.
13259 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13260 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13261 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13262 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13263 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13264 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13265 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13267 * i387-fp.c: Include "i386-xstate.h".
13269 (i387_cache_to_xsave): Likewise.
13270 (i387_xsave_to_cache): Likewise.
13271 (x86_xcr0): Likewise.
13273 * i387-fp.h (i387_cache_to_xsave): Likewise.
13274 (i387_xsave_to_cache): Likewise.
13275 (x86_xcr0): Likewise.
13277 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13278 * linux-crisv32-low.c (target_regsets): Likewise.
13279 * linux-m68k-low.c (target_regsets): Likewise.
13280 * linux-mips-low.c (target_regsets): Likewise.
13281 * linux-ppc-low.c (target_regsets): Likewise.
13282 * linux-s390-low.c (target_regsets): Likewise.
13283 * linux-sh-low.c (target_regsets): Likewise.
13284 * linux-sparc-low.c (target_regsets): Likewise.
13285 * linux-xtensa-low.c (target_regsets): Likewise.
13287 * linux-low.c: Include <sys/uio.h>.
13288 (regsets_fetch_inferior_registers): Support nt_type.
13289 (regsets_store_inferior_registers): Likewise.
13290 (linux_process_qsupported): New.
13291 (linux_target_ops): Add linux_process_qsupported.
13293 * linux-low.h (regset_info): Add nt_type.
13294 (linux_target_ops): Add process_qsupported.
13296 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13298 (init_registers_i386_avx_linux): New.
13299 (init_registers_amd64_avx_linux): Likewise.
13300 (xmltarget_i386_linux_no_xml): Likewise.
13301 (xmltarget_amd64_linux_no_xml): Likewise.
13302 (PTRACE_GETREGSET): Likewise.
13303 (PTRACE_SETREGSET): Likewise.
13304 (x86_fill_xstateregset): Likewise.
13305 (x86_store_xstateregset): Likewise.
13306 (use_xml): Likewise.
13307 (x86_linux_update_xmltarget): Likewise.
13308 (x86_linux_process_qsupported): Likewise.
13309 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13310 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13311 init_registers_i386_linux here. Call
13312 x86_linux_update_xmltarget.
13313 (the_low_target): Add x86_linux_process_qsupported.
13315 * server.c (handle_query): Call target_process_qsupported.
13317 * target.h (target_ops): Add process_qsupported.
13318 (target_process_qsupported): New.
13320 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13322 * inferiors.c (add_thread): Set last_status kind to
13323 TARGET_WAITKIND_IGNORE.
13324 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13325 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13326 (linux_wait_1): Move `thread' local definition to block that uses
13327 it. Don't NULL initialize `event_child'.
13328 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13329 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13330 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13332 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13334 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13335 an extended waitstatus, or by a watchpoint.
13336 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13337 thread was stepping or has been stopped by a watchpoint.
13339 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13341 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13342 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13343 of another, then delete the previous, and validate all
13345 (validate_inserted_breakpoint): New.
13346 (delete_disabled_breakpoints): New.
13347 (validate_breakpoints): New.
13348 (check_mem_read): Validate breakpoints before trusting their
13349 shadow. Delete disabled breakpoints.
13350 (check_mem_write): Validate breakpoints before trusting they
13351 should be inserted. Delete disabled breakpoints.
13352 * mem-break.h (validate_breakpoints):
13353 * server.c (handle_query): Validate breakpoints when we see a
13356 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13358 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13359 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13360 if we could tell there's a GDB breakpoint at stop_pc.
13361 (need_step_over_p): Don't do a step over if we find a GDB
13362 breakpoint at the resume PC.
13364 * mem-break.c (struct raw_breakpoint): New.
13365 (enum bkpt_type): New type `gdb_breakpoint'.
13366 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13367 fields. New field `raw'.
13368 (find_raw_breakpoint_at): New.
13369 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13370 breakpoint instead.
13371 (set_breakpoint_at): Adjust.
13372 (delete_raw_breakpoint): New.
13373 (release_breakpoint): New.
13374 (delete_breakpoint): Rename to...
13375 (delete_breakpoint_1): ... this. Add proc parameter. Use
13376 release_breakpoint. Return ENOENT.
13377 (delete_breakpoint): Reimplement.
13378 (find_breakpoint_at): Delete.
13379 (find_gdb_breakpoint_at): New.
13380 (delete_breakpoint_at): Delete.
13381 (set_gdb_breakpoint_at): New.
13382 (delete_gdb_breakpoint_at): New.
13383 (gdb_breakpoint_here): New.
13384 (set_reinsert_breakpoint): Use release_breakpoint.
13385 (uninsert_breakpoint): Rename to ...
13386 (uninsert_raw_breakpoint): ... this.
13387 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13388 (reinsert_raw_breakpoint): Change parameter type to
13390 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13392 (check_breakpoints): Adjust. Use release_breakpoint.
13393 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13394 (breakpoint_inserted_here): Ditto.
13395 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13396 Don't trust the breakpoint's shadow if it is not inserted.
13397 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13398 (delete_all_breakpoints): Adjust.
13399 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13400 use delete_breakpoint_1.
13402 * mem-break.h (breakpoints_supported): Delete declaration.
13403 (set_gdb_breakpoint_at): Declare.
13404 (gdb_breakpoint_here): Declare.
13405 (delete_breakpoint_at): Delete.
13406 (delete_gdb_breakpoint_at): Declare.
13408 * server.h (struct raw_breakpoint): Forward declare.
13409 (struct process_info): New field `raw_breakpoints'.
13411 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13414 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13416 * linux-low.c (status_pending_p_callback): Fix comment.
13417 (linux_wait_for_event_1): Move most of the internal breakpoint
13418 handling from here...
13419 (linux_wait_1): ... to here.
13420 (count_events_callback): New.
13421 (select_singlestep_lwp_callback): New.
13422 (select_event_lwp_callback): New.
13423 (cancel_breakpoints_callback): New.
13424 (select_event_lwp): New.
13425 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13426 priority to all LWPs that have had events that should be reported
13427 to the client. Cancel breakpoints when about to reporting the
13428 event to the client, not while stopping lwps. No longer cancel
13429 finished single-steps here.
13430 (cancel_finished_single_step): Delete.
13431 (cancel_finished_single_steps): Delete.
13433 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13435 * mem-break.c (enum bkpt_type): New.
13436 (struct breakpoint): New field `type'.
13437 (set_breakpoint_at): Change return type to struct breakpoint
13438 pointer. Set type to `other_breakpoint' by default.
13439 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13440 in the breakpoint list.
13441 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13442 (reinsert_breakpoint): Rename to ...
13443 (reinsert_raw_breakpoint): ... this.
13444 (reinsert_breakpoints_at): Adjust.
13445 * mem-break.h (struct breakpoint): Declare.
13446 (set_breakpoint_at): Change return type to struct breakpoint
13449 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13451 * server.c (handle_query): Assign, not compare.
13453 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13455 Teach linux gdbserver to step-over-breakpoints.
13457 * linux-low.c (can_hardware_single_step): New.
13458 (supports_breakpoints): New.
13459 (handle_extended_wait): If stopping threads, read the stop pc of
13460 the new cloned LWP.
13462 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13463 low target doesn't support retrieving the PC.
13464 (add_lwp): Set last_resume_kind to resume_continue.
13465 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13466 (linux_attach): Don't clear stop_expected. Set the lwp's
13467 last_resume_kind to resume_stop.
13468 (linux_detach_one_lwp): Don't check for removed breakpoints.
13469 (check_removed_breakpoint): Delete.
13470 (status_pending_p): Rename to ...
13471 (status_pending_p_callback): ... this. Don't check for removed
13472 breakpoints. Don't consider threads that are stopped from GDB's
13474 (linux_wait_for_lwp): Always read the stop_pc here.
13475 (cancel_breakpoint): New.
13476 (step_over_bkpt): New global.
13477 (linux_wait_for_event_1): Implement stepping over breakpoints.
13478 (gdb_wants_lwp_stopped): New.
13479 (gdb_wants_all_stopped): New.
13480 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13481 single-step traps here. Store the thread's last reported target
13483 (send_sigstop): Don't clear stop_expected. Always set it,
13485 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13486 (cancel_finished_single_step): New.
13487 (cancel_finished_single_steps): New.
13488 (wait_for_sigstop): Don't cancel finished single-step traps here.
13489 (linux_resume_one_lwp): Don't check for removed breakpoints.
13490 Don't set `step' on non-hardware step archs.
13491 (linux_set_resume_request): Ignore resume_stop requests if already
13492 stopping or stopped. Set the lwp's last_resume_kind.
13493 (resume_status_pending_p): Don't check for removed breakpoints.
13494 (need_step_over_p): New.
13495 (start_step_over): New.
13496 (finish_step_over): New.
13497 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13498 requests. Clear the thread's last reported target waitstatus.
13499 Don't use the `suspended' flag. Don't consider pending breakpoints.
13500 (linux_resume): Start a step-over if necessary.
13501 (proceed_one_lwp): New.
13502 (proceed_all_lwps): New.
13503 (unstop_all_lwps): New.
13504 * linux-low.h (struct lwp_info): Rewrite comment for the
13505 `suspended' flag. Add the `stop_pc' field. Delete the
13506 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13507 Add `'last_resume_kind' and `need_step_over' fields.
13508 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13509 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13510 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13511 (set_raw_breakpoint_at): New.
13512 (set_breakpoint_at): Rewrite to use it.
13513 (reinsert_breakpoint_handler): Delete.
13514 (set_reinsert_breakpoint): New.
13515 (reinsert_breakpoint_by_bp): Delete.
13516 (delete_reinsert_breakpoints): New.
13517 (uninsert_breakpoint): Rewrite.
13518 (uninsert_breakpoints_at): New.
13519 (reinsert_breakpoint): Rewrite.
13520 (reinsert_breakpoints_at): New.
13521 (check_breakpoints): Rewrite.
13522 (breakpoint_here): New.
13523 (breakpoint_inserted_here): New.
13524 (check_mem_read): Adjust.
13525 * mem-break.h (breakpoints_supported, breakpoint_here)
13526 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13527 (reinsert_breakpoint_by_bp): Delete declaration.
13528 (delete_reinsert_breakpoints): Declare.
13529 (reinsert_breakpoint): Delete declaration.
13530 (reinsert_breakpoints_at): Declare.
13531 (uninsert_breakpoint): Delete declaration.
13532 (uninsert_breakpoints_at): Declare.
13533 (check_breakpoints): Adjust prototype.
13534 * server.h: Adjust include order.
13535 (struct thread_info): Declare here. Add a `last_status' field.
13537 2010-03-23 Michael Snyder <msnyder@vmware.com>
13539 * server.c (crc32): New function.
13540 (handle_query): Add handling for 'qCRC:' request.
13542 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13544 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13545 lwp had been stopped by a watchpoint.
13547 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13549 * server.h (internal_error): Declare.
13550 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13551 * utils.c (internal_error): New function.
13553 2010-03-15 Andreas Schwab <schwab@redhat.com>
13555 * configure.srv: Fix typo setting srv_regobj.
13557 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13559 * linux-low.c (fetch_register): Avoid passing a non string literal
13561 (usr_store_inferior_registers): Ditto.
13563 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13565 * linux-low.c (linux_write_memory): Bail out early if peeking
13568 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13570 * linux-low.h (struct lwp_info): New fields
13571 `stopped_by_watchpoint' and `stopped_data_address'.
13572 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13573 here, and cache them in the lwp object.
13574 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13576 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13578 (linux_stopped_by_watchpoint): Rewrite.
13579 (linux_stopped_data_address): Rewrite.
13581 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13583 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13584 switching the current inferior, not before.
13586 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13588 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13589 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13590 i386-linux.c and amd64-linux.c.
13591 (reg-i386.o): Removed.
13592 (reg-i386.c): Likewise.
13593 (reg-i386-linux.o): Likewise.
13594 (reg-i386-linux.c): Likewise.
13595 (reg-x86-64.o): Likewise.
13596 (reg-x86-64.c): Likewise.
13597 (reg-x86-64-linux.o): Likewise.
13598 (reg-x86-64-linux.c): Likewise.
13600 (i386.c): Likewise.
13601 (i386-linux.o): Likewise.
13602 (i386-linux.c): Likewise.
13603 (amd64.o): Likewise.
13604 (amd64.c): Likewise.
13605 (amd64-linux.o): Likewise.
13606 (amd64-linux.c): Likewise.
13608 * configure.srv (srv_i386_regobj): New.
13609 (srv_i386_linux_regobj): Likewise.
13610 (srv_amd64_regobj): Likewise.
13611 (srv_amd64_linux_regobj): Likewise.
13612 (srv_i386_32bit_xmlfiles): Likewise.
13613 (srv_i386_64bit_xmlfiles): Likewise.
13614 (srv_i386_xmlfiles): Likewise.
13615 (srv_amd64_xmlfiles): Likewise.
13616 (srv_i386_linux_xmlfiles): Likewise.
13617 (srv_amd64_linux_xmlfiles): Likewise.
13618 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13619 srv_xmlfiles to $srv_i386_xmlfiles.
13620 (i[34567]86-*-mingw32ce*): Likewise.
13621 (i[34567]86-*-mingw*): Likewise.
13622 (i[34567]86-*-nto*): Likewise.
13623 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13624 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13625 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13626 (x86_64-*-linux*): Likewise.
13628 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13629 (init_registers_amd64_linux): New.
13630 (x86_arch_setup): Replace init_registers_x86_64_linux with
13631 init_registers_amd64_linux.
13633 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13635 * configure.ac: Check for libdl. If it is not available link against
13636 static libthread_db.
13637 * configure: Regenerate.
13639 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13643 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13644 handing a read watchpoint.
13645 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13647 2010-02-12 Doug Evans <dje@google.com>
13649 * linux-low.c (linux_supports_tracefork_flag): Document.
13650 (linux_look_up_symbols): Add comment.
13652 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13654 * regcache.c (supply_register): Clear regcache if buf is NULL.
13656 2010-02-02 Nicolas Roche <roche@sourceware.org>
13657 Joel Brobecker <brobecker@adacore.com>
13659 * inferiors.c (find_inferior): Add function documentation.
13660 (unloaded_dll): Handle the case where the unloaded dll has not
13661 been previously registered in the dll list.
13663 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13665 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13666 (thumb2_breakpoint): New.
13667 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13669 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13671 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13672 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13675 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13677 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13679 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13681 * linux-s390-low.c (s390_collect_ptrace_register)
13682 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13684 2010-01-21 Doug Evans <dje@google.com>
13686 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13687 (PTRACE_ARG4_TYPE): New macro.
13688 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13689 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13690 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13691 (usr_store_inferior_registers): Ditto.
13692 (linux_read_memory, linux_write_memory): Ditto.
13693 (linux_test_for_tracefork): Ditto.
13695 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13696 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13698 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13700 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13703 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13705 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13706 prototype to take a regcache. Adjust.
13708 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13710 * regcache.h (struct thread_info): Forward declare.
13711 (struct regcache): New.
13712 (new_register_cache): Adjust prototype.
13713 (get_thread_regcache): Declare.
13714 (free_register_cache): Adjust prototype.
13715 (registers_to_string, registers_from_string): Ditto.
13716 (supply_register, supply_register_by_name, collect_register)
13717 (collect_register_as_string, collect_register_by_name): Ditto.
13718 * regcache.c (struct inferior_regcache_data): Delete.
13719 (get_regcache): Rename to ...
13720 (get_thread_regcache): ... this. Adjust. Switch inferior before
13721 fetching registers.
13722 (regcache_invalidate_one): Adjust.
13723 (regcache_invalidate): Fix prototype.
13724 (new_register_cache): Return the new register cache.
13725 (free_register_cache): Change prototype.
13726 (realloc_register_cache): Adjust.
13727 (registers_to_string): Change prototype to take a regcache. Adjust.
13728 (registers_from_string): Ditto.
13729 (register_data): Ditto.
13730 (supply_register): Ditto.
13731 (supply_register_by_name): Ditto.
13732 (collect_register): Ditto.
13733 (collect_register_as_string): Ditto.
13734 (collect_register_by_name): Ditto.
13735 * server.c (process_serial_event): Adjust.
13736 * linux-low.h (regset_fill_func, regset_store_func): Change
13738 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13740 * linux-low.c (get_stop_pc): Adjust.
13741 (check_removed_breakpoint): Adjust.
13742 (linux_wait_for_event): Adjust.
13743 (linux_resume_one_lwp): Adjust.
13744 (fetch_register): Add regcache parameter. Adjust.
13745 (usr_store_inferior_registers): Ditto.
13746 (regsets_fetch_inferior_registers): Ditto.
13747 (regsets_store_inferior_registers): Ditto.
13748 (linux_fetch_registers, linux_store_registers): Ditto.
13749 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13751 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13753 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13754 prototype to take a regcache.
13755 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13756 * remote-utils.c (convert_ascii_to_int, outreg)
13757 (prepare_resume_reply): Change prototype to take a regcache.
13759 * target.h (struct target_ops) <fetch_registers, store_registers>:
13760 Change prototype to take a regcache.
13761 (fetch_inferior_registers, store_inferior_registers): Change
13762 prototype to take a regcache. Adjust.
13763 * proc-service.c (ps_lgetregs): Adjust.
13764 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13765 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13766 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13767 take a regcache. Adjust.
13768 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13769 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13770 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13771 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13772 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13773 (cris_cannot_fetch_register):
13774 (cris_breakpoint_at): Change prototype to take a regcache.
13776 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13777 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13778 to take a regcache. Adjust.
13779 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13781 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13782 take a regcache. Adjust.
13783 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13784 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13785 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13786 * linux-mips-low.c (mips_get_pc):
13787 (mips_set_pc): Change prototype to take a regcache. Adjust.
13788 (mips_reinsert_addr): Adjust.
13789 (mips_collect_register): Change prototype to take a regcache.
13791 (mips_supply_register):
13792 (mips_collect_register_32bit, mips_supply_register_32bit)
13793 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13794 (mips_store_fpregset): Ditto.
13795 * linux-ppc-low.c (ppc_supply_ptrace_register)
13796 (ppc_supply_ptrace_register): Ditto.
13797 (parse_spufs_run): Adjust.
13798 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13799 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13800 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13801 take a regcache. Adjust.
13802 * linux-s390-low.c (s390_collect_ptrace_register)
13803 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13804 (s390_set_pc): Change prototype to take a regcache. Adjust.
13805 (s390_arch_setup): Adjust.
13806 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13807 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13808 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13809 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13810 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13812 (sparc_breakpoint_at): Adjust.
13813 * linux-xtensa-low.c (xtensa_fill_gregset):
13814 (xtensa_store_gregset):
13815 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13816 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13817 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13818 prototype to take a regcache. Adjust.
13819 * win32-arm-low.c (arm_fetch_inferior_register)
13820 (arm_store_inferior_register): Change prototype to take a
13822 * win32-i386-low.c (i386_fetch_inferior_register)
13823 (i386_store_inferior_register): Change prototype to take a
13825 * win32-low.c (child_fetch_inferior_registers)
13826 (child_store_inferior_registers): Change prototype to take a
13828 (win32_wait): Adjust.
13829 (win32_fetch_inferior_registers): Change prototype to take a
13831 (win32_store_inferior_registers): Adjust.
13832 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13833 store_inferior_register>: Change prototype to take a regcache.
13835 2010-01-20 Doug Evans <dje@google.com>
13837 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13839 (linux_wait_for_event1, linux_init_signals): Ditto.
13840 (W_STOPCODE): Provide definition if missing.
13842 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13844 * linux-low.c (linux_core_of_thread): New.
13845 (compare_ints, show_process, list_threads): New.
13846 (linux_qxfer_osdata): Report threads and cores.
13847 (linux_target_op): Register linux_core_of_thread.
13848 * remote-utils.c (prepare_resume_reply): Report the core.
13849 (buffer_xml_printf): Support %d specifier.
13850 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13852 (handle_query): Handle qXfer:threads. Announce availability
13854 * target.h (struct target_ops): New field core_of_thread.
13856 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13858 * Makefile.in (clean): Remove new generated files.
13859 (reg-s390.o, reg-s390.c): Remove rules.
13860 (reg-s390x.o, reg-s390x.c): Likewise.
13861 (s390-linux32.o, s390-linux32.c): Add rules.
13862 (s390-linux64.o, s390-linux64.c): Likewise.
13863 (s390x-linux64.o, s390x-linux64.c): Likewise.
13864 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13865 * linux-s390-low.c: Include <elf.h>.
13866 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13867 (init_registers_s390): Remove prototype.
13868 (init_registers_s390x): Likewise.
13869 (init_registers_s390_linux32): Add prototype.
13870 (init_registers_s390_linux64): Likewise.
13871 (init_registers_s390x_linux64): Likewise.
13872 (s390_num_regs_3264): New define.
13873 (s390_regmap_3264): New global variable.
13874 (s390_cannot_fetch_register): Remove obsolete check.
13875 (s390_cannot_store_register): Likewise.
13876 (s390_collect_ptrace_register): Handle upper/lower register halves.
13877 (s390_supply_ptrace_register): Likewise.
13878 (s390_fill_gregset): Update to register number changes.
13879 (s390_get_hwcap): New routine.
13880 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13881 Install appropriate regmap and register set.
13883 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13885 * server.c (gdbserver_version): Update copyright year to 2010.
13886 * gdbreplay.c (gdbreplay_version): Likewise.
13888 2009-12-28 Doug Evans <dje@google.com>
13890 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13891 elf/external.h. Include <elf.h> instead but only if necessary.
13893 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13895 * linux-low.c (linux_remove_process): Remove `detaching'
13896 parameter. Don't release/detach from thread_db here.
13897 (linux_kill): Release/detach from thread_db here, ...
13898 (linux_detach): ... and here, before actually detaching.
13899 (linux_wait_1): ... and here, when a process exits.
13900 * thread-db.c (any_thread_of): New.
13901 (thread_db_free): Switch the current inferior to a thread of the
13904 2009-12-21 Doug Evans <dje@google.com>
13906 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13908 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13909 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13910 warning ifndef __NR_tkill. Move setting of errno there too.
13911 Delete unnecessary resetting of errno after syscall.
13912 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13914 * configure.ac: Check for dladdr.
13915 * config.in: Regenerate.
13916 * configure: Regenerate.
13917 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13918 (try_thread_db_load): Update.
13920 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13922 2009-12-18 Doug Evans <dje@google.com>
13924 * event-loop.c: Include unistd.h if it exists.
13926 * linux-low.c (my_waitpid): Move definition away from being in
13927 between linux_tracefork_child/linux_test_for_tracefork.
13929 * gdb_proc_service.h (psaddr_t): Fix type.
13930 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13931 signature to match glibc.
13933 2009-12-16 Doug Evans <dje@google.com>
13935 * linux-low.c (linux_read_memory): Fix argument to read.
13937 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13939 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13940 events, don't leave current_inferior pointing at null.
13942 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13944 * win32-low.c (LOG): Delete.
13945 (OUTMSG): Output to stderr.
13946 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13947 on compile time LOG macro.
13948 (win32_wait): Fix debug output.
13950 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13952 * win32-low.c (win32_add_one_solib): If the dll name is
13953 "ntdll.dll", prepend the system directory to the dll path.
13955 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13957 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13959 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13960 Vladimir Prus <vladimir@codesourcery.com>
13962 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13963 * configure.ac: Check for __mcoldfire__ and set
13964 gdb_cv_m68k_is_coldfire.
13965 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13966 reg-cf.o and reg-m68k.o.
13967 * configure: Regenerated.
13969 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13971 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13972 Pass it to thread_db_free.
13973 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13974 proper `detaching' argument to linux_remove_process.
13975 * linux-low.h (thread_db_free): Add `detaching' parameter.
13976 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13978 (thread_db_free): Add `detaching' parameter. Only
13979 call td_ta_clear_event if detaching from process.
13981 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13983 * thread-db.c (thread_db_free): Fix typo.
13985 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13988 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13990 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13992 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13993 with an i686 compiler.
13994 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13996 * configure: Rebuilt.
13998 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14002 * server.c (handle_search_memory_1): Correct read_addr initialization
14003 in loop for searching subsequent chunks.
14005 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14007 * configure.ac: New --with-libthread-db option.
14008 * thread-db.c: Allow direct dependence on libthread_db.
14009 (thread_db_free): Adjust.
14010 * config.in: Regenerate.
14011 * configure: Likewise.
14013 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14016 * thread-db.c (attach_thread): New function.
14017 (maybe_attach_thread): Return success/failure.
14018 (find_new_threads_callback): Adjust.
14019 (thread_db_find_new_threads): Loop until no new threads.
14021 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14023 * proc-service.c (ps_lgetregs): Formatting.
14025 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14027 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14028 * configure.ac: Adjust.
14029 * linux-low.h (struct process_info_private): Move members to struct
14031 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14032 * linux-low.c (linux_remove_process): Adjust.
14033 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14034 * server.c (handle_query): Move code ...
14035 (handle_monitor_command): ... here. New function.
14036 * target.h (struct target_ops): New member.
14037 * thread-db.c (struct thread_db): New.
14038 (libthread_db_search_path): New variable.
14039 (thread_db_create_event, thread_db_enable_reporting)
14040 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14041 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14042 (try_thread_db_load_1, dladdr_to_soname): New functions.
14043 (try_thread_db_load, thread_db_load_search): New functions.
14044 (thread_db_init): Search for libthread_db.
14045 (thread_db_free): New function.
14046 (thread_db_handle_monitor_command): Likewise.
14047 * config.in: Regenerate.
14048 * configure: Regenerate.
14050 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14052 * spu-low.c (spu_kill): Wait for inferior to terminate.
14053 Call clear_inferiors.
14054 (spu_detach): Call clear_inferiors.
14056 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14058 * aclocal.m4: Regenerate.
14059 * config.in: Likewise.
14060 * configure: Likewise.
14062 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14064 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14065 (parse_spufs_run): New function.
14066 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14067 (ppc_breakpoint_at): Handle SPU breakpoints.
14069 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14071 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14072 (SPUFS_MAGIC): Define.
14073 (spu_enumerate_spu_ids): New function.
14074 (linux_qxfer_spu): New function.
14075 (linux_target_ops): Install linux_qxfer_spu.
14077 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14079 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14080 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14081 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14082 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14083 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14084 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14085 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14086 (init_registers_powerpc_cell32l): Add prototype.
14087 (init_registers_powerpc_cell64l): Likewise.
14088 (ppc_arch_setup): Detect Cell/B.E. architecture.
14090 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14092 * Makefile.in (datarootdir): New variable.
14094 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14096 * linux-low.c (linux_write_memory): Update debugging output.
14097 * Makefile.in (clean): Add new descriptions.
14098 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14099 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14100 * configure.srv: Add new files for arm*-*-linux*.
14101 * linux-arm-low.c: Add new declarations.
14102 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14103 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14104 (HWCAP_VFPv3D16): New.
14105 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14106 instead of __IWMMXT__.
14107 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14108 (arm_arch_setup): New.
14109 (target_regsets): Remove #ifdef. Add VFP regset.
14110 (the_low_target): Use arm_arch_setup.
14112 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14114 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14115 the main thread again.
14117 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14119 Adding Neutrino gdbserver.
14120 * configure: Regenerated.
14121 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14122 * configure.srv (i[34567]86-*-nto*): New target.
14123 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14124 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14125 (nto_comctrl) [__QNX__]: New function.
14126 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14128 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14130 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14133 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14134 Pedro Alves <pedro@codesourcery.com>
14136 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14137 don't support CONTEXT_EXTENDED_REGISTERS.
14138 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14139 (the_low_target): Install them.
14140 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14141 failing with ERROR_PIPE_NOT_CONNECTED.
14143 2009-06-30 Doug Evans <dje@google.com>
14144 Pierre Muller <muller@ics.u-strasbg.fr>
14146 Add h/w watchpoint support to x86-linux, win32-i386.
14147 * Makefile.in (SFILES): Add i386-low.c
14148 (i386_low_h): Define.
14149 (i386-low.o): Add dependencies.
14150 (linux-x86-low.o): Add i386-low.h dependency.
14151 (win32-i386-low.o): Ditto.
14152 * i386-low.c: New file.
14153 * i386-low.h: New file.
14154 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14155 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14156 * linux-low.c (linux_add_process): Initialize arch_private.
14157 (linux_remove_process): Free arch_private.
14158 (add_lwp): Initialize arch_private.
14159 (delete_lwp): Free arch_private.
14160 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14162 * linux-low.h (process_info_private): New member arch_private.
14163 (lwp_info): New member arch_private.
14164 (linux_target_ops): New members new_process, new_thread,
14166 (ptid_of): New macro.
14167 * linux-x86-low.c: Include stddef.h, i386-low.h.
14168 (arch_process_info): New struct.
14169 (arch_lwp_info): New struct.
14170 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14171 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14172 (i386_dr_low_get_status): New function.
14173 (x86_insert_point, x86_remove_point): New functions.
14174 (x86_stopped_by_watchpoint): New function.
14175 (x86_stopped_data_address): New function.
14176 (x86_linux_new_process, x86_linux_new_thread): New functions.
14177 (x86_linux_prepare_to_resume): New function.
14178 (the_low_target): Add entries for insert_point, remove_point,
14179 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14181 * server.c (debug_hw_points): New global.
14182 (monitor_show_help): Document set debug-hw-points.
14183 (handle_query): Process "set debug-hw-points".
14184 * server.h (debug_hw_points): Declare.
14185 (paddress): Declare.
14186 * utils.c (NUMCELLS, CELLSIZE): New macros.
14187 (get_sell, xsnprintf, paddress): New functions.
14188 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14189 remove_point, stopped_by_watchpoint, stopped_data_address.
14190 * win32-i386-low.c: Include i386-low.h.
14191 (debug_reg_state): Replaces dr.
14192 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14193 (i386_dr_low_get_status): New function.
14194 (i386_insert_point, i386_remove_point): New functions.
14195 (i386_stopped_by_watchpoint): New function.
14196 (i386_stopped_data_address): New function.
14197 (i386_initial_stuff): Update.
14198 (get_thread_context,set_thread_context,i386_thread_added): Update.
14199 (the_low_target): Add entries for insert_point,
14200 remove_point, stopped_by_watchpoint, stopped_data_address.
14201 * win32-low.c (win32_insert_watchpoint): New function.
14202 (win32_remove_watchpoint): New function.
14203 (win32_stopped_by_watchpoint): New function.
14204 (win32_stopped_data_address): New function.
14205 (win32_target_ops): Add entries for insert_watchpoint,
14206 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14207 * win32-low.h (win32_target_ops): New members insert_point,
14208 remove_point, stopped_by_watchpoint, stopped_data_address.
14210 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14212 * server.c (process_serial_event): Re-return unsupported, not
14213 error, if the type isn't recognized. Re-allow supporting only
14214 insert or remove packets. Also call require_running for
14215 breakpoints. Add missing break statement to default case. Tidy.
14216 * target.h (struct target_ops): Rename insert_watchpoint to
14217 insert_point, and remove_watchpoint to remove_point.
14219 * linux-low.h (struct linux_target_ops): Likewise.
14220 * linux-low.c (linux_insert_watchpoint): Rename to ...
14221 (linux_insert_point): ... this. Adjust.
14222 (linux_remove_watchpoint): Rename to ...
14223 (linux_remove_point): ... this. Adjust.
14224 (linux_target_ops): Adjust.
14225 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14226 (cris_insert_point): ... this.
14227 (cris_remove_watchpoint): Rename to ...
14228 (cris_remove_point): ... this.
14229 (the_low_target): Adjust.
14231 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14233 * server.c (handle_v_kill): Pass signal_pid to
14234 kill_inferior if multi_process is zero.
14236 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14238 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14239 * target.h (target_ops): Comment for *_watchpoint to make it clear
14240 the functions can get types '0' and '1'.
14242 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14244 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14245 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14246 * regcache.c (get_regcache): Likewise.
14247 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14248 * win32-low.c (child_fetch_inferior_registers): Remove check for
14251 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14252 Pedro Alves <pedro@codesourcery.com>
14254 * target.h (struct target_ops) <supports_multi_process>: New
14256 (target_supports_multi_process): New.
14257 * server.c (handle_query): Even if GDB reports support, only
14258 enable multi-process if the target also supports it. Report
14259 multi-process support only if the target backend supports it.
14260 * linux-low.c (linux_supports_multi_process): New function.
14261 (linux_target_ops): Install it as target_supports_multi_process
14264 2009-05-24 Doug Evans <dje@google.com>
14266 Global renaming of find_thread_pid to find_thread_ptid.
14267 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14268 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14269 All callers updated.
14271 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14272 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14275 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14276 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14277 (linux_resume_one_lwp): Ditto.
14279 2009-05-23 Doug Evans <dje@google.com>
14281 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14282 from struct inferior_list_entry * to struct lwp_info *.
14283 All callers updated.
14285 2009-05-13 Doug Evans <dje@google.com>
14287 * linux-x86-low.c: Don't include assert.h.
14288 (x86_siginfo_fixup): Use fatal, not assert.
14289 (x86_arch_setup): Fix comment.
14291 2009-05-12 Doug Evans <dje@google.com>
14293 Biarch support for i386/amd64 gdbserver.
14294 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14295 Add linux-x86-low.c.
14296 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14297 (linux-x86-low.o): Add.
14298 * linux-x86-64-low.c: Delete.
14299 * linux-i386-low.c: Delete.
14300 * linux-x86-low.c: New file.
14301 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14303 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14305 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14306 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14307 (linux_child_pid_to_exec_file): New function.
14308 (elf_64_header_p, elf_64_file_p): New functions.
14309 (siginfo_fixup): New function.
14310 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14311 give target a chance to convert layout.
14312 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14313 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14315 2009-05-07 Doug Evans <dje@google.com>
14317 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14318 (regsets_store_inferior_registers): Ditto.
14320 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14324 * linux-low.c (must_set_ptrace_flags): Delete.
14325 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14327 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14328 `lwp->must_set_ptrace_flags' instead.
14329 (linux_wait_for_event_1): Set ptrace options here.
14330 (linux_wait_1): ... not here.
14332 2009-04-30 Doug Evans <dje@google.com>
14334 * inferiors.c (started_inferior_callback): New function.
14335 (attached_inferior_callback): New function.
14336 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14337 * server.c (print_started_pid, print_attached_pid): New functions.
14338 (detach_or_kill_for_exit): New function.
14339 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14340 * server.h (have_started_inferiors_p): Declare.
14341 (have_attached_inferiors_p): Declare.
14343 * inferiors.c (remove_process): Fix memory leak, free process.
14344 * linux-low.c (linux_remove_process): New function.
14345 (linux_kill): Call it instead of remove_process.
14346 (linux_detach, linux_wait_1): Ditto.
14348 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14350 * configure.srv: Add x86 Windows CE target.
14352 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14354 * inferiors.c (get_thread_process): Make global.
14355 * server.h (get_thread_process): Add prototype.
14356 * thread-db.c (find_one_thread): Use get_thread_process
14357 instead of current_process.
14358 (thread_db_get_tls_address): Do not crash if called when
14359 thread layer is not yet initialized.
14361 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14363 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14364 * spu-low.c (current_tid): Rename to ...
14365 (current_ptid): ... this.
14366 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14367 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14368 ptid_get_lwp (current_ptid) instead of current_tid.
14369 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14370 instead of current_tid. Use find_process_pid to verify pid
14371 argument is valid. Pass proper argument to remove_process.
14372 (spu_thread_alive): Compare current_ptid instead of current_tid.
14373 (spu_resume): Likewise.
14375 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14377 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14380 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14382 Implement the multiprocess extensions, and add linux multiprocess
14385 * server.h (ULONGEST): Declare.
14386 (struct ptid, ptid_t): New.
14387 (minus_one_ptid, null_ptid): Declare.
14388 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14389 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14390 (struct inferior_list_entry): Change `id' type from unsigned from
14392 (struct sym_cache, struct breakpoint, struct
14393 process_info_private): Forward declare.
14394 (struct process_info): Declare.
14395 (current_process): Declare.
14396 (all_processes): Declare.
14397 (initialize_inferiors): Declare.
14398 (add_thread): Adjust to use ptid_t.
14399 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14400 (add_process, remove_process, find_thread_pid): Declare.
14401 (find_inferior_id): Adjust to use ptid_t.
14402 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14403 (multi_process): Declare.
14404 (push_event): Adjust to use ptid_t.
14405 (read_ptid, write_ptid): Declare.
14406 (prepare_resume_reply): Adjust to use ptid_t.
14407 (clear_symbol_cache): Declare.
14408 * inferiors.c (all_processes): New.
14409 (null_ptid, minus_one_ptid): New.
14410 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14411 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14412 (add_thread): Change unsigned long to ptid. Remove gdb_id
14414 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14415 (gdb_id_to_thread): Rename to ...
14416 (find_thread_pid): ... this. Change unsigned long to ptid.
14417 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14418 (loaded_dll, pull_pid_from_list): Adjust.
14419 (add_process, remove_process, find_process_pid)
14420 (get_thread_process, current_process, initialize_inferiors): New.
14421 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14422 (struct target_waitstatus) <related_pid>: Ditto.
14423 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14424 return type to int.
14425 (struct target_ops) <join>: Add `pid' argument.
14426 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14427 (struct target_ops) <wait>: Add `ptid' field. Change return type
14429 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14430 (mywait): Add `ptid' argument. Change return type to ptid_t.
14431 (target_pid_to_str): Declare.
14432 * target.c (set_desired_inferior): Adjust to use ptids.
14433 (mywait): Add new `ptid' argument. Adjust.
14434 (target_pid_to_str): New.
14435 * mem-break.h (free_all_breakpoints): Declare.
14436 * mem-break.c (breakpoints): Delelete.
14437 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14438 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14439 to use per-process breakpoint list.
14440 (free_all_breakpoints): New.
14441 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14442 (symbol_cache, all_symbols_looked_up): Delete.
14444 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14446 (prepare_resume_reply): Change ptid argument's type from unsigned
14447 long to ptid_t. Adjust. Implement W;process and X;process.
14448 (free_sym_cache, clear_symbol_cache): New.
14449 (look_up_one_symbol): Adjust to per-process symbol cache. *
14450 * server.c (cont_thread, general_thread, step_thread): Change type
14452 (attached): Delete.
14453 (multi_process): New.
14454 (last_ptid): Change type to ptid_t.
14455 (struct vstop_notif) <ptid>: Change type to ptid_t.
14456 (queue_stop_reply, push_event): Change `ptid' argument's type to
14458 (discard_queued_stop_replies): Add `pid' argument.
14459 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14460 changes. Don't reference the `attached' global.
14461 (attach_inferior): Adjust to mywait interface changes.
14462 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14463 features. Handle and report "multiprocess+". Handle
14465 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14467 (handle_v_kill): New.
14468 (handle_v_stopped): Adjust to use target_pid_to_str.
14469 (handle_v_requests): Allow multiple attaches and runs when
14470 multiprocess extensions are in effect. Handle "vKill".
14471 (myresume): Adjust to use ptids.
14472 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14473 (handle_status): Adjust to discard_queued_stop_replies interface
14475 (first_thread_of, kill_inferior_callback)
14476 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14477 (main): Call initialize_inferiors. Adjust to use ptids, killing
14478 and detaching from all inferiors. Handle multiprocess packet
14480 * linux-low.h: Include gdb_proc_service.h.
14481 (struct process_info_private): New.
14482 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14483 <lwpid_of>: Use ptid_get_lwp.
14484 (get_lwp_thread): Adjust.
14485 (struct lwp_info): Add `dead' member.
14486 (find_lwp_pid): Declare.
14487 * linux-low.c (thread_db_active): Delete.
14488 (new_inferior): Adjust comment.
14489 (inferior_pid): Delete.
14490 (linux_add_process): New.
14491 (handle_extended_wait): Adjust.
14492 (add_lwp): Change unsigned long to ptid.
14493 (linux_create_inferior): Add process to processes table. Adjust
14494 to use ptids. Don't set new_inferior here.
14495 (linux_attach_lwp): Rename to ...
14496 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14497 it. Adjust to use ptids.
14498 (linux_attach_lwp): New.
14499 (linux_attach): Add process to processes table. Don't set
14501 (struct counter): New.
14502 (second_thread_of_pid_p, last_thread_of_process_p): New.
14503 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14504 multiple processes.
14505 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14506 processes. Remove process from process table.
14507 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14508 to multiple processes.
14509 (any_thread_of): New.
14510 (linux_detach): Add `pid' argument, and handle it. Remove process
14511 from processes table.
14512 (linux_join): Add `pid' argument. Handle it.
14513 (linux_thread_alive): Change unsighed long argument to ptid_t.
14514 Consider dead lwps as not being alive.
14515 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14516 threads we're not interested in.
14517 (same_lwp, find_lwp_pid): New.
14518 (linux_wait_for_lwp): Change `pid' argument's type from int to
14520 (linux_wait_for_event): Rename to ...
14521 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14522 from int to ptid_t. Adjust.
14523 (linux_wait_for_event): New.
14524 (linux_wait_1): Add `ptid' argument. Change return type to
14525 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14526 that exit from the process table.
14527 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14529 (mark_lwp_dead): New.
14530 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14531 stopping all threads, mark its main lwp as dead.
14532 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14534 (fetch_register, usr_store_inferior_registers)
14535 (regsets_fetch_inferior_registers)
14536 (regsets_store_inferior_registers, linux_read_memory)
14537 (linux_write_memory): Inline `inferior_pid'.
14538 (linux_look_up_symbols): Adjust to use per-process
14539 `thread_db_active'.
14540 (linux_request_interrupt): Adjust to use ptids.
14541 (linux_read_auxv): Inline `inferior_pid'.
14542 (initialize_low): Don't reference thread_db_active.
14543 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14544 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14545 (ps_getpid): Return the pid of the current inferior.
14546 * thread-db.c (proc_handle, thread_agent): Delete.
14547 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14549 (find_one_thread): Change argument type to ptid_t. Adjust to
14551 (maybe_attach_thread): Adjust to per-process data and ptids.
14552 (thread_db_find_new_threads): Ditto.
14553 (thread_db_init): Ditto.
14554 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14555 processes table. Adjust to use ptids.
14556 (spu_kill, spu_detach): Adjust interface. Remove process from
14558 (spu_join, spu_thread_alive): Adjust interface.
14559 (spu_wait): Adjust interface. Remove process from processes
14560 table. Adjust to use ptids.
14561 * win32-low.c (current_inferior_tid): Delete.
14562 (current_inferior_ptid): New.
14563 (debug_event_ptid): New.
14564 (thread_rec): Take a ptid. Adjust.
14565 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14566 (child_delete_thread): Ditto.
14567 (do_initial_child_stuff): Add `attached' argument. Add process to
14569 (child_fetch_inferior_registers, child_store_inferior_registers):
14571 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14572 (win32_attach): Pass 1 to do_initial_child_stuff.
14573 (win32_kill): Adjust interface. Remove process from processes
14575 (win32_detach): Ditto.
14576 (win32_join): Adjust interface.
14577 (win32_thread_alive): Take a ptid.
14578 (win32_resume): Adjust to use ptids.
14579 (get_child_debug_event): Ditto.
14580 (win32_wait): Adjust interface. Remove exiting process from
14583 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14585 Non-stop mode support.
14587 * server.h (non_stop): Declare.
14588 (gdb_client_data, handler_func): Declare.
14589 (delete_file_handler, add_file_handler, start_event_loop):
14591 (handle_serial_event, handle_target_event, push_event)
14592 (putpkt_notif): Declare.
14593 * target.h (enum resume_kind): New.
14594 (struct thread_resume): Replace `step' field by `kind' field.
14595 (TARGET_WNOHANG): Define.
14596 (struct target_ops) <wait>: Add `options' argument.
14597 <supports_non_stop, async, start_non_stop>: New fields.
14598 (target_supports_non_stop, target_async): New.
14599 (start_non_stop): Declare.
14600 (mywait): Add `options' argument.
14601 * target.c (mywait): Add `options' argument. Print child exit
14602 notifications here.
14603 (start_non_stop): New.
14604 * server.c (non_stop, own_buf, mem_buf): New globals.
14605 (struct vstop_notif): New.
14606 (notif_queue): New global.
14607 (queue_stop_reply, push_event, discard_queued_stop_replies)
14608 (send_next_stop_reply): New.
14609 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14611 (attach_inferior): In non-stop mode, don't wait for the target
14613 (handle_general_set): Handle QNonStop.
14614 (handle_query): When handling qC, return the current general
14615 thread, instead of the first thread of the list.
14616 (handle_query): If the backend supports non-stop mode, include
14617 QNonStop+ in the qSupported query response.
14618 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14620 (handle_v_attach, handle_v_run): Handle non-stop mode.
14621 (handle_v_stopped): New.
14622 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14623 (myresume): Adjust to use resume_kind. Handle non-stop.
14624 (queue_stop_reply_callback): New.
14625 (handle_status): Handle non-stop mode.
14626 (main): Clear non_stop flag on reconnection. Use the event-loop.
14627 Refactor serial protocol handling from here ...
14628 (process_serial_event): ... to this new function. When GDB
14629 selects any thread, select one here. In non-stop mode, wait until
14630 GDB acks all pending events before exiting.
14631 (handle_serial_event, handle_target_event): New.
14632 * remote-utils.c (remote_open): Install remote_desc in the event
14634 (remote_close): Remove remote_desc from the event loop.
14635 (putpkt_binary): Rename to...
14636 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14637 (putpkt_binary): New as wrapper around putpkt_binary_1.
14638 (putpkt_notif): New.
14639 (prepare_resume_reply): In non-stop mode, don't change the
14641 * event-loop.c: New.
14642 * Makefile.in (OBJ): Add event-loop.o.
14643 (event-loop.o): New rule.
14645 * linux-low.h (pid_of): Moved here.
14647 (get_lwp_thread): Use lwpid_of.
14648 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14649 * linux-low.c (pid_of): Delete.
14650 (inferior_pid): Use lwpid_of.
14651 (linux_event_pipe): New.
14652 (target_is_async_p): New.
14654 (handle_extended_wait): Use lwpid_of.
14655 (add_lwp): Don't set lwpid field.
14656 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14657 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14658 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14659 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14660 first. Adjust to linux_wait_for_event interface changes. Use
14662 (linux_detach): Don't delete the main lwp here.
14663 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14664 (status_pending_p): Don't consider explicitly suspended lwps.
14665 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14666 pointer. Add OPTIONS argument. Change return type to int. Use
14667 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14668 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14669 pointer. Add status pointer argument. Return a pid instead of a
14670 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14671 changes. In non-stop mode, don't switch to a random thread.
14672 (linux_wait): Rename to...
14673 (linux_wait_1): ... this. Add target_options argument, and handle
14674 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14675 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14676 clean exit and signal exit code. Don't stop all threads in
14677 non-stop mode. In all-stop mode, only stop all threads when
14678 reporting a stop to GDB. Handle explicit thread stop requests.
14679 (async_file_flush, async_file_mark): New.
14681 (send_sigstop): Use lwpid_of.
14682 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14683 interface changes. In non-stop mode, don't switch to a random
14685 (linux_resume_one_lwp): Use lwpid_of.
14686 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14687 (linux_resume_one_thread): ... this. Handle resume_stop. In
14688 non-stop mode, don't look for pending flag in all threads.
14689 (resume_status_pending_p): Don't consider explicitly suspended
14691 (my_waitpid): Reimplement. Emulate __WALL.
14692 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14694 (sigchld_handler, linux_supports_non_stop, linux_async)
14695 (linux_start_non_stop): New.
14696 (linux_target_ops): Register linux_supports_non_stop, linux_async
14697 and linux_start_non_stop.
14698 (initialize_low): Install SIGCHLD handler.
14699 * thread-db.c (thread_db_create_event, find_one_thread)
14700 (thread_db_get_tls_address): Use lwpid_of.
14701 * win32-low.c (win32_detach): Adjust to use resume_kind.
14702 (win32_wait): Add `options' argument.
14703 * spu-low.c (spu_resume): Adjust to use resume_kind.
14704 (spu_wait): Add `options' argument.
14706 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14708 Decouple target code from remote protocol.
14710 * target.h (enum target_waitkind): New.
14711 (struct target_waitstatus): New.
14712 (struct target_ops) <wait>: Return an unsigned long. Take a
14713 target_waitstatus pointer instead of a char pointer.
14714 (mywait): Likewise.
14715 * target.c (mywait): Change prototype to return an unsigned long.
14716 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14717 * server.h (thread_from_wait, old_thread_from_wait): Delete
14719 (prepare_resume_reply): Change prototype to take a
14721 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14722 (last_status, last_ptid): New.
14723 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14724 pid instead of a signal.
14725 (attach_inferior): Remove "status" and "signal" parameters.
14727 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14729 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14730 (handle_v_requests, myresume): Remove "status" and "signal"
14731 parameters. Adjust.
14732 (handle_status): New.
14733 (main): Delete local `status'. Adjust.
14734 * remote-utils.c: Include target.h.
14735 (prepare_resume_reply): Change prototype to take a
14736 target_waitstatus. Adjust.
14738 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14740 * spu-low.c (spu_wait): Adjust.
14741 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14743 (win32_wait): Adjust.
14745 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14747 * target.h (struct thread_resume): Delete leave_stopped member.
14748 (struct target_ops): Add a `n' argument to the `resume' callback.
14749 * server.c (start_inferior): Adjust.
14750 (handle_v_cont, myresume): Adjust.
14751 * linux-low.c (check_removed_breakpoint): Adjust to resume
14752 interface change, and to removed leave_stopped field.
14753 (resume_ptr): Delete.
14754 (struct thread_resume_array): New.
14755 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14756 resume interface change.
14757 (linux_continue_one_thread, linux_queue_one_thread)
14758 (resume_status_pending_p): Check if the resume field is NULL
14759 instead of checking the leave_stopped member.
14760 (linux_resume): Adjust to the target resume interface change.
14761 * spu-low.c (spu_resume): Adjust to the target resume interface
14763 * win32-low.c (win32_detach, win32_resume): Ditto.
14765 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14767 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14769 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14771 (linux_continue_one_thread): Only preserve the stepping flag if
14772 there's a pending breakpoint.
14774 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14776 * server.c (main): After the inferior having exited, call
14777 remote_close before exiting gdbserver.
14779 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14781 Fix size of FPSCR in Power 7 processors.
14782 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14783 (PPC_FEATURE_HAS_DFP): New #define.
14784 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14787 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14789 * server.c (handle_query) Whitespace and formatting.
14791 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14793 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14794 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14795 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14796 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14797 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14798 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14799 Makefile.in, configure.ac: Fix whitespace throughout.
14800 * configure: Regenerate.
14802 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14804 * inferiors.c (find_inferior): Make it safe for the callback
14805 function to delete the currently iterated inferior.
14807 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14809 * Makefile.in (linuw_low_h): Move higher.
14810 (thread-db.o): Depend on $(linux_low_h).
14812 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14814 Rename "process" to "lwp" throughout.
14816 * linux-low.c (all_processes): Rename to...
14817 (all_lwps): ... this.
14818 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14819 (add_process): Rename to ...
14820 (add_lwp): ... this. Adjust.
14821 (linux_create_inferior): Adjust.
14822 (linux_attach_lwp): Adjust.
14823 (linux_attach): Adjust.
14824 (linux_kill_one_process): Rename to ...
14825 (linux_kill_one_lwp): ... this. Adjust.
14826 (linux_kill): Adjust.
14827 (linux_detach_one_process): Rename to ...
14828 (linux_detach_one_lwp): ... this. Adjust.
14829 (linux_detach): Adjust.
14830 (check_removed_breakpoint): Adjust.
14831 (status_pending_p): Adjust.
14832 (linux_wait_for_process): Rename to ...
14833 (linux_wait_for_lwp): ... this. Adjust.
14834 (linux_wait_for_event): Adjust.
14835 (send_sigstop): Adjust.
14836 (wait_for_sigstop): Adjust.
14837 (stop_all_processes): Rename to ...
14838 (stop_all_lwps): ... this.
14839 (linux_resume_one_process): Rename to ...
14840 (linux_resume_one_lwp): ... this. Adjust.
14841 (linux_set_resume_request, linux_continue_one_thread)
14842 (linux_queue_one_thread, resume_status_pending_p)
14843 (usr_store_inferior_registers, regsets_store_inferior_registers)
14844 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14846 * linux-low.h (get_process): Rename to ...
14847 (get_lwp): ... this. Adjust.
14848 (get_thread_process): Rename to ...
14849 (get_thread_lwp): ... this. Adjust.
14850 (get_process_thread): Rename to ...
14851 (get_lwp_thread): ... this. Adjust.
14852 (struct process_info): Rename to ...
14853 (struct lwp_info): ... this.
14854 (all_processes): Rename to ...
14855 (all_lwps): ... this.
14856 * proc-service.c (ps_lgetregs): Adjust.
14857 * thread-db.c (thread_db_create_event, find_one_thread)
14858 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14860 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14862 * server.c (handle_query): Handle "qAttached".
14864 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14866 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14867 GPLv3, update license URL.
14869 2009-03-01 Doug Evans <dje@google.com>
14871 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14872 (server_h): Add gdb_signals.h.
14873 (signals.o): Update.
14874 * server.h (target_signal_from_host,target_signal_to_host_p)
14875 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14877 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14879 * remote-utils.c (getpkt): Also generate remote-debug
14880 information if noack_mode is set.
14882 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14884 * server.c (handle_query): Report qXfer:siginfo:read and
14885 qXfer:siginfo:write as supported and handle them.
14886 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14887 * linux-low.c (linux_xfer_siginfo): New.
14888 (linux_target_ops): Set it.
14890 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14892 * server.c (gdbserver_usage): Mention --remote-debug.
14893 (main): Accept '--remote-debug' switch.
14895 2009-01-18 Doug Evans <dje@google.com>
14897 * regcache.c (new_register_cache): No need to check result of xcalloc.
14898 * server.c (handle_search_memory): Back out calls to xmalloc,
14899 result is checked and error is returned to user upon failure.
14900 (handle_query): Ditto. Add more checks for result of malloc.
14901 (handle_v_cont): Check result of malloc, report error back to
14903 (handle_v_run): Ditto. Call freeargv.
14904 * server.h (freeargv): Declare.
14905 * utils.c (freeargv): New fn.
14907 2009-01-15 Doug Evans <dje@google.com>
14909 * gdbreplay.c (perror_with_name): Make arg const char *.
14910 * server.h (target_signal_to_name): Make return type const char *.
14911 * thread-db.c (thread_db_err_str): Make return type const char *.
14912 * utils.c (perror_with_name): Make arg const char *.
14914 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14916 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14917 when handling a EXIT_PROCESS_DEBUG_EVENT.
14919 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14921 * gdbreplay.c (gdbreplay_version): Update copyright year.
14922 * server.c (gdbserver_version): Likewise.
14924 2009-01-05 Doug Evans <dje@google.com>
14926 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14927 (handle_extended_wait): Improve comment.
14929 2008-12-13 Doug Evans <dje@google.com>
14931 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14932 * server.h (ATTR_MALLOC): New macro.
14933 (xmalloc,xcalloc,xstrdup): Declare.
14934 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14935 * inferiors.c: Ditto.
14936 * linux-low.c: Ditto.
14937 * mem-break.c: Ditto.
14938 * regcache.c: Ditto.
14939 * remote-utils.c: Ditto.
14942 * win32-low.c: Ditto.
14944 2008-12-12 Doug Evans <dje@google.com>
14946 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14947 in debugging printf.
14949 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14951 2008-12-09 Doug Evans <dje@google.com>
14953 * linux-low.h (struct process_info): Delete member tid, unused.
14954 * thread-db.c (find_one_thread): Update.
14955 (maybe_attach_thread): Update.
14957 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14959 * target.h (struct target_ops): Add qxfer_osdata member.
14960 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14962 (linux_qxfer_osdata): New functions.
14963 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14965 * server.c (handle_query): Handle "qXfer:osdata:read:".
14966 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14967 (buffer_xml_printf): New functions.
14968 * server.h (struct buffer): New.
14969 (buffer_grow_str, buffer_grow_str0): New macros.
14970 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14971 (buffer_xml_printf): Declare.
14973 2008-11-24 Doug Evans <dje@google.com>
14975 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14977 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14979 * server.c (handle_v_run): Always use the supplied argument list.
14981 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14983 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14984 (xtensa_regmap_table): Add entry for scompare1.
14986 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14988 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14989 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14990 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14991 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14992 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14993 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14994 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14995 XML target descriptions.
14996 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14997 when inferior is running on an ISA 2.05 or later processor. Add
14998 special case to return offset for full 64-bit slot of FPSCR when
15001 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15003 * Makefile.in (SFILES, clean): Added sparc64 files.
15004 (reg-sparc64.o, reg-sparc64.c): New.
15005 * configure.srv (sparc*-*-linux*): New configuration.
15006 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15007 syscall arguments for SPARC.
15008 (regsets_store_inferior_registers): Likewise.
15009 * linux-sparc-low.c: New file.
15011 2008-10-21 Doug Evans <dje@google.com>
15013 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15014 (READLINE_DIR,READLINE_DEP): Delete.
15015 (INTERNAL_CFLAGS): Update.
15016 (LINTFLAGS): Update.
15018 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15020 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15021 whole argv from the last run, not just argv[0].
15023 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15025 * regcache.c (new_register_cache): Return NULL if the register
15026 cache size isn't known yet.
15027 (free_register_cache): Avoid dereferencing a NULL regcache.
15029 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15031 * configure.srv: Merge MIPS and MIPS64.
15033 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15035 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15037 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15039 * Makefile.in: Add required vsx dependencies.
15041 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15042 Declare init_registers_powerpc_vsx32l.
15043 Declare init_registers_powerpc_vsx64l.
15044 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15045 (ppc_arch_setup): Check for VSX in hwcap.
15046 (ppc_fill_vsxregset): New function.
15047 (ppc_store_vsxregset): New function.
15048 Add new VSX entry in regset_info target_regsets.
15050 * configure.srv: Add new VSX dependencies.
15052 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15054 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15055 (remote_open): Set or clear transport_is_reliable.
15056 (putpkt_binary): Don't expect acks in noack mode.
15057 (getpkt): Don't send ack/nac in noack mode.
15058 * server.c (handle_general_set): Handle QStartNoAckMode.
15059 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15061 (main): Reset noack_mode on every connection.
15062 * server.h (noack_mode): Declare.
15064 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15066 * Makefile.in (GDBREPLAY_OBS): New variable.
15067 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15069 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15070 Daniel Jacobowitz <dan@codesourcery.com>
15072 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15073 (usr_store_inferior_registers): Likewise.
15074 (regsets_store_inferior_registers): Likewise.
15076 2008-07-31 Rolf Jansen <rj@surtec.com>
15077 Pedro Alves <pedro@codesourcery.com>
15079 * configure.ac: Check for memmem declaration.
15080 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15081 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15082 (disable_packet_qfThreadInfo): Unconditionally compile.
15083 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15084 * configure, config.in: Regenerate.
15086 2008-07-28 Doug Kwan <dougkwan@google.com>
15088 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15089 (linux_write_memory): Remove declaration of errno.
15091 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15093 * linux-low.c (handle_extended_wait): Do not use "status"
15094 variable uninitialized.
15096 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15098 * server.c (handle_v_attach): Inhibit reporting dll changes.
15100 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15102 * remote-utils.c (prepare_resume_reply): If requested, don't
15103 output "thread:TID" in the T stop reply.
15105 * server.c (disable_packet_vCont, disable_packet_Tthread)
15106 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15107 (handle_query): If requested, disable support for qC, qfThreadInfo
15109 (handle_v_requests): If requested, disable support for vCont.
15110 (gdbserver_show_disableable): New.
15111 (main): Handle --disable-packet and --disable-packet=LIST.
15113 * server.h (disable_packet_vCont, disable_packet_Tthread)
15114 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15116 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15118 * server.c (gdbserver_usage): Mention --version.
15120 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15122 * Makefile.in (gdbreplay.o): New rule.
15124 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15126 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15127 message, not gdbserver.
15129 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15130 Nathan Sidwell <nathan@codesourcery.com>
15131 Joseph Myers <joseph@codesourcery.com>
15133 * acinclude.m4: Include ../../config/acx.m4.
15134 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15135 * configure, config.in: Regenerate.
15136 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15137 * server.c (gdbserver_version): Print PKGVERSION.
15138 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15139 (main): Adjust gdbserver_usage calls.
15140 * gdbreplay.c (version, host_name): Add declarations.
15141 (gdbreplay_version, gdbreplay_usage): New.
15142 (main): Accept --version and --help options.
15144 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15146 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15147 (arm_breakpoint_at): Handle Thumb.
15148 (the_low_target): Add comment.
15150 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15152 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15154 2008-05-09 Doug Evans <dje@google.com>
15156 * server.h (decode_search_memory_packet): Declare.
15157 * remote-utils.c (decode_search_memory_packet): New fn.
15158 * server.c (handle_search_memory_1): New fn.
15159 (handle_search_memory): New fn.
15160 (handle_query): Process qSearch:memory packets.
15162 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15164 * regcache.c (registers_length): Remove.
15165 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15166 full register packet.
15167 * regcache.h (registers_length): Remove prototype.
15168 * server.h (PBUFSIZ): Define to 16384.
15170 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15172 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15173 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15174 powerpc-64l.o, and powerpc-altivec64l.o.
15175 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15176 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15177 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15178 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15179 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15182 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15183 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15184 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15185 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15186 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15187 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15188 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15189 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15190 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15191 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15194 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15195 (init_registers_powerpc_32l): ... this new prototype.
15196 (init_registers_powerpc_32): Remove, replace by ...
15197 (init_registers_powerpc_altivec32l): ... this new prototype.
15198 (init_registers_powerpc_e500): Remove, replace by ...
15199 (init_registers_powerpc_e500l): ... this new prototype.
15200 (init_registers_ppc64): Remove, replace by ...
15201 (init_registers_powerpc_64l): ... this new prototype.
15202 (init_registers_powerpc_64): Remove, replace by ...
15203 (init_registers_powerpc_altivec64l): ... this new prototype.
15204 (ppc_num_regs): Set to 73.
15205 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15206 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15207 (ppc_cannot_store_register): Handle orig_r3 and trap.
15208 (ppc_arch_setup): Update init_registers_... calls.
15209 (ppc_fill_gregset): Handle orig_r3 and trap.
15211 * inferiors.c (clear_inferiors): Reset current_inferior.
15213 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15215 * acinclude.m4: Add override.m4.
15216 * configure: Regenerate.
15218 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15220 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15221 initial call to init_register_ppc64.
15223 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15225 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15226 single powerpc*-*-linux* case.
15227 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15229 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15231 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15232 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15234 * linux-ppc-low.c: Include <elf.h>.
15235 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15236 (ppc_hwcap): New global variable.
15237 (ppc_regmap): Remove __SPE__ #ifdef sections.
15238 (ppc_regmap_e500): New global variable.
15239 (ppc_cannot_store_register): Update __SPE__ special case.
15240 (ppc_get_hwcap): New function.
15241 (ppc_arch_setup): Use it to determine whether inferior supports
15242 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15243 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15244 Do not access registers if target does not support AltiVec.
15245 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15246 Do not access registers if target does not support SPE.
15247 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15249 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15251 * linux-low.c (disabled_regsets, num_regsets): New.
15252 (use_regsets_p): Delete.
15253 (linux_wait_for_process): Clear disabled_regsets.
15254 (regsets_fetch_inferior_registers): Check and set it.
15255 (regsets_store_inferior_registers): Likewise.
15256 (linux_fetch_registers, linux_store_registers): Do not use
15258 (initialize_low): Allocate disabled_regsets.
15260 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15262 * Makefile.in (LIBOBJS): New.
15263 (OBS): Use LIBOBJS.
15264 (memmem.o): New rule.
15265 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15266 * configure: Regenerated.
15268 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15270 * server.c (handle_query): Never return "unsupported" for
15271 qXfer:features:read queries.
15273 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15275 * server.c (get_features_xml): Fix inverted condition.
15276 (handle_query): Always support qXfer:feature:read.
15278 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15280 * server.c (wrapper_argv): New.
15281 (start_inferior): Handle wrapper_argv. If set, expect an extra
15283 (gdbserver_usage): Document --wrapper.
15284 (main): Parse --wrapper.
15286 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15288 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15289 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15290 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15291 (ppc_set_pc): Likewise.
15292 (ppc_arch_setup): New function.
15293 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15294 of collect_register.
15295 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15297 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15299 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15300 instead of linux-ppc64-low.o.
15301 * linux-ppc64-low.c: Remove file.
15302 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15303 (linux-ppc64-low.o): Remove rule.
15305 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15306 (init_registers_powerpc_64): Likewise.
15307 (ppc_regmap): Conditionally define depending on __powerpc64__.
15308 (ppc_cannot_store_register): Do not special-case "fpscr" when
15309 compiled on __powerpc64__.
15310 (ppc_collect_ptrace_register): New function.
15311 (ppc_supply_ptrace_register): New function.
15312 (ppc_breakpoint): Change type to "unsigned int".
15313 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15314 (the_low_target): Conditionally provide initializers for the
15315 arch_setup member depending on __powerpc64__. Install
15316 collect_ptrace_register and supply_ptrace_register members.
15318 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15320 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15321 * server.c (gdbserver_xmltarget): Define.
15322 (get_features_xml): Use it to replace "target.xml" and arch_string.
15324 * configure.srv: Remove srv_xmltarget. Add XML files that were
15325 mentioned there to srv_xmlfiles instead. Remove conditional tests
15326 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15327 srv_xmlfiles and srv_regobj to include all possible choices.
15328 * configure.ac (srv_xmltarget): Remove.
15329 (srv_xmlfiles): Do not add "target.xml".
15330 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15331 checks for supplementary target information.
15332 * configure: Regenerate.
15333 * Makefile.in (XML_TARGET): Remove.
15334 (target.xml): Remove rule.
15335 (clean): Do not clean up target.xml.
15336 (.PRECIOUS): Do not mention target.xml.
15338 * target.h (struct target_ops): Remove arch_string member.
15339 * linux-low.c (linux_arch_string): Remove.
15340 (linux_target_ops): Remove arch_string initializer.
15341 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15342 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15343 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15344 * spu-low.c (spu_arch_string): Remove.
15345 (spu_target_ops): Remove arch_string initializer.
15346 * win32-low.c (win32_arch_string): Remove.
15347 (win32_target_ops): Remove arch_string initializer.
15348 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15349 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15350 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15352 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15354 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15355 by collect_ptrace_register and supply_ptrace_register hooks.
15356 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15357 instead of checking for the_low_target.left_pad_xfer.
15358 (usr_store_inferior_registers): Use collect_ptrace_register callback
15359 instead of checking for the_low_target.left_pad_xfer.
15361 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15362 (s390_supply_ptrace_register): Likewise.
15363 (s390_fill_gregset): Call s390_collect_ptrace_register.
15364 (the_low_target): Update.
15366 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15367 (ppc_supply_ptrace_register): Likewise.
15368 (the_low_target): Update.
15370 * linux-i386-low.c (the_low_target): Update.
15371 * linux-x86-64-low.c (the_low_target): Update.
15373 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15375 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15376 reg-s390.o and reg-s390x.o.
15378 * linux-low.c (new_inferior): New global variable.
15379 (linux_create_inferior, linux_attach): Set it.
15380 (linux_wait_for_process): Call the_low_target.arch_setup after the
15381 target has stopped for the first time.
15382 (initialize_low): Do not call the_low_target.arch_setup.
15384 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15385 (s390_set_pc): Likewise.
15386 (s390_arch_setup): New function.
15387 (the_low_target): Use s390_arch_setup as arch_setup routine.
15389 * regcache.c (realloc_register_cache): New function.
15390 (set_register_cache): Call it for each existing regcache.
15392 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15394 * server.h (init_registers): Remove prototype.
15396 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15397 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15398 instead of init_registers ().
15399 * linux-arm-low.c (init_registers_arm): Add prototype.
15400 (init_registers_arm_with_iwmmxt): Likewise.
15401 (the_low_target): Add initializer for arch_setup field.
15402 * linux-cris-low.c (init_registers_cris): Add prototype.
15403 (the_low_target): Add initializer for arch_setup field.
15404 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15405 (the_low_target): Add initializer for arch_setup field.
15406 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15407 (the_low_target): Add initializer for arch_setup field.
15408 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15409 (the_low_target): Add initializer for arch_setup field.
15410 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15411 (the_low_target): Add initializer for arch_setup field.
15412 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15413 (the_low_target): Add initializer for arch_setup field.
15414 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15415 (init_registers_mips64_linux): Likewise.
15416 (the_low_target): Add initializer for arch_setup field.
15417 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15418 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15419 (the_low_target): Add initializer for arch_setup field.
15420 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15421 (init_registers_powerpc_64): Likewise.
15422 (the_low_target): Add initializer for arch_setup field.
15423 * linux-s390-low.c (init_registers_s390): Add prototype.
15424 (init_registers_s390x): Likewise.
15425 (the_low_target): Add initializer for arch_setup field.
15426 * linux-sh-low.c (init_registers_sh): Add prototype.
15427 (the_low_target): Add initializer for arch_setup field.
15428 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15429 (the_low_target): Add initializer for arch_setup field.
15430 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15431 (the_low_target): Add initializer for arch_setup field.
15433 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15434 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15435 instead of init_registers ().
15436 * win32-arm-low.c (init_registers_arm): Add prototype.
15437 (the_low_target): Add initializer for arch_setup field.
15438 * win32-i386-low.c (init_registers_i386): Add prototype.
15439 (the_low_target): Add initializer for arch_setup field.
15441 * spu-low.c (init_registers_spu): Add prototype.
15442 (initialize_low): Call initialie_registers_spu () instead of
15443 initialize_registers ().
15445 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15447 * server.c (handle_v_requests): When handling the vRun and vAttach
15448 packets, if already debugging a process, don't kill it. Return an
15451 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15453 * server.c (handle_query): Correct length check.
15455 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15457 * win32-low.c (do_initial_child_stuff): Add process handle
15458 parameter. Set current_process_handle and current_process_id from the
15459 parameters. Clear globals.
15460 (win32_create_inferior): Don't set current_process_handle and
15461 current_process_id here. Instead pass them on the call to
15462 do_initial_child_stuff.
15463 (win32_attach): Likewise.
15464 (win32_clear_inferiors): New.
15465 (win32_kill): Don't close the current process handle or the
15466 current thread handle here. Instead call win32_clear_inferiors.
15467 (win32_detach): Don't open a new handle to the process. Call
15468 win32_clear_inferiors.
15469 (win32_join): Don't rely on current_process_handle; open a new
15470 handle using the process id.
15471 (win32_wait): Call win32_clear_inferiors when the inferior process
15474 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15476 * server.c (monitor_show_help): Add "exit".
15478 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15480 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15481 (clean): Add reg-xtensa.c.
15482 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15483 * configure.srv (xtensa*-*-linux*) New target.
15484 * linux-xtensa-low.c: New.
15485 * xtensa-xtregs.c: New.
15487 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15489 * hostio.c: Don't include errno.h.
15490 (errno_to_fileio_errno): Move to hostio-errno.
15491 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15492 error number outputting to the target->hostio_last_error callback.
15493 (hostio_packet_error): Use FILEIO_EINVAL directly.
15494 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15495 calls to hostio_error.
15496 * hostio-errno.c: New.
15497 * server.h (hostio_last_error_from_errno): Declare.
15498 * target.h (target_ops): Add hostio_last_error member.
15499 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15500 as hostio_last_error handler.
15501 * spu-low.c (spu_target_ops): Likewise.
15502 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15503 (wince_hostio_last_error): New functions.
15504 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15505 as hostio_last_error handler.
15506 (win32_target_ops) [!_WIN32_WCE]: Register
15507 hostio_last_error_from_errno as hostio_last_error handler.
15508 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15509 (hostio-errno.o): New rule.
15510 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15511 * configure.srv (srv_hostio_err_objs): New variable. Default to
15513 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15514 * configure: Regenerate.
15516 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15518 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15519 (linux_kill, linux_detach): Clean up the process list.
15520 * remote-utils.c (remote_open): Improve port number parsing.
15521 (putpkt_binary, input_interrupt): Only send interrupts if the target
15523 * server.c (extended_protocol): Make static.
15524 (attached): Define earlier.
15525 (exit_requested, response_needed, program_argv): New variables.
15526 (target_running): New.
15527 (start_inferior): Clear attached here.
15528 (attach_inferior): Set attached here.
15529 (require_running): Define.
15530 (handle_query): Use require_running and target_running. Implement
15532 (handle_v_attach, handle_v_run): New.
15533 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15534 (gdbserver_usage): Update.
15535 (main): Redo argument parsing. Handle --debug and --multi. Handle
15536 --attach along with other options or after the port. Save
15537 program_argv. Support no initial program. Resynchronize
15538 communication with GDB after an error. Handle "monitor exit".
15539 Use require_running and target_running. Always allow the extended
15540 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15541 restart in extended mode.
15542 * README: Refer to the GDB manual. Update --attach usage.
15544 2007-12-20 Andreas Schwab <schwab@suse.de>
15546 * linux-low.c (STACK_SIZE): Define.
15547 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15548 (linux_test_for_tracefork): Likewise.
15550 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15552 * linux-low.c (linux_wait_for_event): Update messages. Do not
15553 reinsert auto-delete breakpoints.
15554 * mem-break.c (struct breakpoint): Change return type of handler to
15556 (set_breakpoint_at): Update handler type.
15557 (reinsert_breakpoint_handler): Return 1 instead of calling
15559 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15561 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15562 * mem-break.h (set_breakpoint_at): Update handler type.
15563 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15564 * win32-low.c (auto_delete_breakpoint): New.
15565 (get_child_debug_event): Use it.
15567 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15569 * configure.ac: Check for pread and pwrite.
15570 * hostio.c (handle_pread): Fall back to lseek and read.
15571 (handle_pwrite): Fall back to lseek and write.
15572 * config.in, configure: Regenerated.
15574 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15576 * server.c (myresume): Add own_buf argument.
15577 (main): Update calls.
15579 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15581 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15582 * remote-utils.c (remote_open): Do not call disable_async_io.
15583 (block_async_io): Delete.
15584 (unblock_async_io): Make static.
15585 (initialize_async_io): New.
15586 * server.c (handle_v_cont): Handle async I/O here.
15587 (myresume): Likewise. Move other common resume tasks here...
15588 (main): ... from here. Call initialize_async_io. Disable async
15589 I/O before the main loop.
15590 * server.h (initialize_async_io): Declare.
15591 (block_async_io, unblock_async_io): Delete prototypes.
15592 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15594 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15596 * remote-utils.c (readchar): Allow binary data in received messages.
15598 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15600 * win32-low.c (attaching): New global.
15601 (win32_create_inferior): Clear the `attaching' global.
15602 (win32_attach): Set the `attaching' global.
15603 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15604 attaching. Only set a breakpoint at the entry point if not
15607 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15609 * server.c (main): Don't report dll events on the initial
15610 connection on attaches.
15612 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15614 * server.c (main): Relax numerical bases supported for the pid of
15615 the --attach command line argument.
15617 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15619 * win32-low.c (win32_attach): Call OpenProcess before
15620 DebugActiveProcess, not after. Add last error output to error
15623 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15625 * win32-low.c (win32_get_thread_context)
15626 (win32_set_thread_context): New functions.
15627 (thread_rec): Use win32_get_thread_context.
15628 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15629 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15632 2007-12-03 Leo Zayas
15633 Pedro Alves <pedro_alves@portugalmail.pt>
15635 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15637 (child_add_thread): Minor cleanup.
15638 (child_continue): Resume artificially suspended threads before
15639 calling ContinueDebugEvent.
15640 (suspend_one_thread): New.
15641 (fake_breakpoint_event): New.
15642 (get_child_debug_event): Change return type to int. Check here if
15643 gdb sent an interrupt request. If a soft interrupt was requested,
15644 fake a breakpoint event. Return 0 if there is no event to handle,
15646 (win32_wait): Don't check here if gdb sent an interrupt request.
15647 Ensure there is a valid event to handle.
15648 (win32_request_interrupt): Add soft interruption method as last
15651 2007-12-03 Leo Zayas
15652 Pedro Alves <pedro_alves@portugalmail.pt>
15654 * win32-low.h (win32_thread_info): Add descriptions to the
15655 structure members. Replace `suspend_count' counter by a
15657 * win32-low.c (thread_rec): Update condition of when to get the
15658 context from the inferior. Rely on ContextFlags being set if it
15659 has already been retrieved. Only suspend the inferior thread if
15660 we haven't already. Warn if that fails.
15661 (continue_one_thread): s/suspend_count/suspended/. Only call
15662 ResumeThread once. Warn if that fails.
15664 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15666 * win32-low.c (win32_wait): Don't read from the inferior when it
15667 has already exited.
15669 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15671 * Makefile.in (win32_low_h): New variable.
15672 (win32-low.o): Add dependency on $(win32_low_h).
15673 (win32-arm-low.o, win32-i386-low.o): New rules.
15675 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15677 * hostio.c: Correct copyright year.
15679 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15681 * Makefile.in (OBS): Add hostio.o.
15682 (hostio.o): New rule.
15683 * server.h (handle_vFile): Declare.
15684 * hostio.c: New file.
15685 * server.c (handle_v_requests): Take packet_len and new_packet_len
15686 for binary packets. Call handle_vFile.
15687 (main): Update call to handle_v_requests.
15689 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15691 * linux-low.c: Include <sched.h>.
15693 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15695 * linux-low.c (linux_tracefork_grandchild): New.
15696 (linux_tracefork_child): Use clone.
15697 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15699 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15701 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15703 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15705 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15707 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15709 * inferiors.c (change_inferior_id): Delete.
15710 (add_pid_to_list, pull_pid_from_list): New.
15711 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15712 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15713 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15714 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15715 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15716 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15717 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15718 (using_threads): Always set to 1.
15719 (handle_extended_wait): New.
15720 (add_process): Do not set TID.
15721 (linux_create_inferior): Set must_set_ptrace_flags.
15722 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15723 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15724 (linux_thread_alive): Rename TID argument to LWPID.
15725 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15726 (linux_wait_for_event): Do not use TID or check using_threads. Update
15727 call to dead_thread_notify. Call handle_extended_wait.
15728 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15729 (send_sigstop): Delete sigstop_sent.
15730 (wait_for_sigstop): Avoid TID.
15731 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15732 (linux_test_for_tracefork): New.
15733 (linux_lookup_signals): Use thread_db_active and
15734 linux_supports_tracefork_flag.
15735 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15736 * linux-low.h (get_process_thread): Avoid TID.
15737 (struct process_ifo): Move thread_known and tid to the end. Remove
15739 (linux_attach_lwp, thread_db_init): Update prototypes.
15740 * server.h (change_inferior_id): Delete prototype.
15741 (add_pid_to_list, pull_pid_from_list): New prototypes.
15742 * thread-db.c (thread_db_use_events): New.
15743 (find_first_thread): Rename to...
15744 (find_one_thread): ...this. Update callers and messages. Do not
15745 call fatal. Check thread_db_use_events. Do not call
15746 change_inferior_id or new_thread_notify.
15747 (maybe_attach_thread): Update. Do not call new_thread_notify.
15748 (thread_db_init): Set thread_db_use_events. Check use_events.
15749 * utils.c (fatal, warning): Correct message prefix.
15751 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15753 * Makefile.in (clean): Remove new files.
15754 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15755 (powerpc-64.o, powerpc-64.c): New rules.
15756 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15757 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15759 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15761 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15762 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15763 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15764 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15765 (target_regsets): Add AltiVec and SPE register sets.
15766 * configure.ac: Check for AltiVec and SPE.
15767 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15768 (ppc_fill_vrregset, ppc_store_vrregset): New.
15769 (target_regsets): Add AltiVec register set.
15770 * configure: Regenerated.
15772 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15774 * linux-low.c (O_LARGEFILE): Define.
15775 (linux_read_memory): Use /proc/PID/mem.
15776 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15777 * configure, config.in: Regenerated.
15779 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15781 * linux-low.c (linux_wait_for_event): Do not pass signals while
15784 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15786 * win32-low.c (create_process): New.
15787 (win32_create_inferior): Use create_process instead of
15788 CreateProcess. If create_process failed retry appending an ".exe"
15789 suffix. Store the GetLastError result immediatelly after
15790 create_process calls and use it on the call to error.
15792 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15794 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15796 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15798 * configure.ac: Switch license to GPLv3.
15800 2007-08-01 Michael Snyder <msnyder@access-company.com>
15802 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15804 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15806 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15808 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15809 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15810 CloseToolhelp32Snapshot.
15811 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15812 CloseToolhelp32Snapshot.
15814 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15816 * server.c (main): Check for inferior exit before main loop.
15818 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15820 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15821 instead of on tmp_desc.
15823 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15824 Daniel Jacobowitz <dan@codesourcery.com>
15826 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15827 (add_thread): Minor cleanups.
15828 (clear_inferiors): Move lower in the file. Clear the DLL
15830 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15831 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15832 (xml_escape_text): New.
15833 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15835 (handle_v_cont): Report errors.
15836 (gdbserver_version): Update.
15837 (main): Correct size of own_buf. Do not report initial DLL events.
15838 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15839 (unloaded_dll, xml_escape_text): New.
15840 * win32-low.c (enum target_waitkind): Update comments.
15841 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15842 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15843 (win32_EnumProcessModules, win32_GetModuleInformation)
15844 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15845 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15846 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15847 (win32_Module32First, win32_Module32Next, load_toolhelp)
15848 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15849 (get_child_debug_event): Handle DLL events.
15850 (win32_wait): Likewise.
15852 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15854 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15855 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15857 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15859 * win32-low.c (handle_output_debug_string): Ignore event if not
15862 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15864 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15866 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15868 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15870 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15872 * inferiors.c (change_inferior_id): Add comment.
15873 * linux-low.c (check_removed_breakpoint): Add an early
15874 prototype. Improve debug output.
15875 (linux_attach): Doc update.
15876 (linux_detach_one_process, linux_detach): Clean up before releasing
15878 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15879 * linux-low.h (struct process_info): Doc improvement.
15880 * mem-break.c (delete_all_breakpoints): New.
15881 * mem-break.h (delete_all_breakpoints): New prototype.
15882 * thread-db.c (find_first_thread): New.
15883 (thread_db_create_event): Call it instead of
15884 thread_db_find_new_threads. Clean up unused variables.
15885 (maybe_attach_thread): Remove first thread handling.
15886 (thread_db_find_new_threads): Use find_first_thread.
15887 (thread_db_get_tls_address): Likewise.
15889 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15891 * thread-db.c (thread_db_find_new_threads): Add prototype.
15892 (thread_db_create_event): Check for the main thread before adding
15894 (maybe_attach_thread): Only enable event reporting if TID == 0.
15895 (thread_db_get_tls_address): Check for new threads.
15897 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15899 * linux-low.c (linux_create_inferior): Try execv before execvp.
15900 * spu-low.c (spu_create_inferior): Likewise.
15902 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15904 * linux-low.c (linux_create_inferior): Change execv to execvp.
15905 * spu-low.c (spu_create_inferior): Likewies.
15907 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15909 * Makefile.in (clean): Clean new files instead of deleted ones.
15910 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15911 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15913 * configure.srv: Specify XML files and new regformats for MIPS and
15915 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15916 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15917 an entry for the restart register.
15918 (mips_cannot_fetch_register, mips_cannot_store_register)
15919 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15920 register names to match the XML descriptions.
15921 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15922 restart register instead of $0.
15924 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15925 Markus Deuling <deuling@de.ibm.com>
15927 * remote-utils.c (decode_xfer_write): New function.
15928 * server.h (decode_xfer_write): Add prototype.
15929 * server.c (handle_query): Add PACKET_LEN argument. Support
15930 qXfer:spu:read and qXfer:spu:write packets.
15931 (main): Pass packet_len to handle_query.
15932 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15933 * target.h (target_ops): Add qxfer_spu.
15935 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15937 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15938 accessing non-seekable spufs files.
15940 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15942 * server.c (handle_query): Add reply for qC packet.
15944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15945 Leo Zayas <lerele@champenstudios@com>
15947 * server.h (check_remote_input_interrupt_request): New function.
15948 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15949 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15950 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15951 (check_remote_input_interrupt_request): New function.
15952 * server.h (check_remote_input_interrupt_request): Declare.
15953 * win32-low.c (winapi_DebugBreakProcess,
15954 winapi_GenerateConsoleCtrlEvent): New typedefs.
15955 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15957 (win32_wait): Check for remote interrupt request
15958 with check_remote_input_interrupt_request.
15959 (win32_request_interrupt): New function.
15960 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15962 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15964 * win32-low.c (debug_registers_changed,
15965 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15966 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15967 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15968 (thread_rec): Get context using the low target.
15969 (child_add_thread): Call thread_added on the low target,
15970 which does the same thing.
15972 (do_initial_child_stuff): Remove debug registers references.
15973 Set context using the low target. Resume threads after
15974 setting the contexts.
15975 (child_continue): Remove dead variable. Remove debug
15976 registers references.
15977 (child_fetch_inferior_registers): Go through the low target.
15978 (do_child_store_inferior_registers): Remove.
15979 (child_store_inferior_registers): Go through the low target.
15980 (win32_resume): Remove debug registers references.
15981 Set context using the low target.
15982 (handle_exception): Change return type to void. Don't record
15983 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15984 first chance exception.
15985 (get_child_debug_event): Change return type to void. Remove
15986 goto loop. Always return after waiting for debug event.
15987 (win32_wait): Convert to switch statement. Handle spurious
15990 * win32-i386-low.c (debug_registers_changed,
15991 debug_registers_used): New.
15992 (initial_stuff): Rename to ...
15993 (i386_initial_stuff): ... this. Clear debug registers
15995 (store_debug_registers): Delete.
15996 (i386_get_thread_context): New.
15997 (load_debug_registers): Delete.
15998 (i386_set_thread_context): New.
15999 (i386_thread_added): New.
16000 (single_step): Rename to ...
16001 (i386_single_step): ... this.
16002 (do_fetch_inferior_registers): Rename to ...
16003 (i386_fetch_inferior_register): ... this.
16004 (i386_store_inferior_register): New.
16005 (the_low_target): Adapt to new interface.
16007 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16008 (arm_get_thread_context): New.
16009 (arm_set_thread_context): New.
16011 (do_fetch_inferior_registers): Rename to ...
16012 (arm_fetch_inferior_register): ... this.
16013 (arm_store_inferior_register): New.
16014 (arm_wince_breakpoint): Reimplement as unsigned long.
16015 (arm_wince_breakpoint_len): Define.
16016 (the_low_target): Adapt to new interface.
16018 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16019 load_debug_registers. Add get_thread_context, set_thread_context,
16020 thread_added and store_inferior_register. Rename
16021 fetch_inferior_registers to fetch_inferior_register.
16022 (regptr): Remove declaration.
16024 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16026 * linux-low.c (linux_detach): Change return type to int. Return 0.
16027 * spu-low.c (spu_detach): Likewise.
16029 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16031 * target.h (target_ops): Change return type of detach to int.
16033 (join_inferior): New.
16034 * server.c (main): Don't skip detach support on mingw32.
16035 If the inferior doesn't support detaching return error.
16036 Call join_inferior instead of using waitpid.
16037 * linux-low.c (linux_join): New.
16038 (linux_target_op): Add linux_join.
16039 * spu-low.c (spu_join): New.
16040 (spu_target_ops): Add spu_join.
16041 * win32-low.c (win32_detach): Adapt to new interface.
16042 Reopen current_process_handle before detaching. Issue a child
16043 resume before detaching.
16045 (win32_target_op): Add win32_join.
16047 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16049 * win32-low.c (win32-attach): Fix return value.
16050 * target.h (target_ops): Describe ATTACH return values.
16052 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16054 * win32-low.c (GETPROCADDRESS): Define.
16055 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16056 (winapi_DebugSetProcessKillOnExit): Likewise.
16057 (win32_create_inferior): Force usage of ansi CreateProcessA.
16058 (win32_attach): Use GETPROCADDRESS.
16059 (win32_detach): Likewise.
16061 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16063 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16065 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16067 * win32-low.c: Commit leftover changes from 2007-03-29.
16069 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16071 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16072 fields short instead of int. Add explicit padding.
16073 (i387_cache_to_fsave): Remove unnecessary casts.
16074 (i387_fsave_to_cache): Doc fix.
16075 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16077 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16079 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16080 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16082 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16084 * configure.srv (arm*-*-mingw32ce*): Move near the other
16087 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16089 * configure.ac: Add errno checking.
16090 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16091 sys/file.h and malloc.h.
16092 (AC_CHECK_DECLS): Add perror.
16093 (srv_mingwce): Handle.
16094 * configure.srv (i[34567]86-*-cygwin*): Add
16095 win32-i386-low.o to srv_tgtobj.
16096 (i[34567]86-*-mingw*): Likewise.
16097 (arm*-*-mingw32ce*): Add case.
16098 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16099 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16100 [__MINGW32CE__] (strerror): New function.
16101 [__MINGW32CE__] (errno): Define to GetLastError.
16102 [__MINGW32CE__] (COUNTOF): New macro.
16103 (remote_open): Remove extra close call.
16104 * mem-break.c (delete_breakpoint_at): New function.
16105 * mem-break.h (delete_breakpoint_at): Declare.
16106 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16107 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16108 [USE_WIN32API] (read, write): Add char* casts.
16109 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16110 * server.h: Include wincecompat.h on Windows CE.
16111 [HAVE_ERRNO_H]: Check.
16112 (perror): Declare if not declared.
16113 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16114 (perror_with_name): Remove errno declaration.
16115 * wincecompat.h: New.
16116 * wincecompat.c: New.
16117 * win32-low.h: New.
16118 * win32-arm-low.c: New.
16119 * win32-i386-low.c: New.
16120 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16121 (OUTMSG2): Make it safe.
16123 (COUNTOF): New macro.
16124 (NUM_REGS): Get it from the low target.
16125 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16126 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16127 (thread_rec): Let low target handle debug registers.
16128 (child_add_thread): Likewise.
16129 (child_init_thread_list): Likewise.
16130 (continue_one_thread): Likewise.
16132 (do_child_fetch_inferior_registers): Move to ...
16133 * win32-i386-low.c: ... here, and rename to ...
16134 (do_fetch_inferior_registers): ... this.
16135 * win32-low.c (child_fetch_inferior_registers):
16136 Go through the low target.
16137 (do_child_store_inferior_registers): Use regptr.
16138 (strwinerror): New function.
16139 (win32_create_inferior): Handle Windows CE.
16140 Use strwinerror instead of strerror on Windows error
16141 codes. Add program to the error output.
16142 Don't close the main thread handle on Windows CE.
16143 (win32_attach): Use coredll.dll on Windows CE.
16144 (win32_kill): Close current process and current
16146 (win32_detach): Use coredll.dll on Windows CE.
16147 (win32_resume): Let low target handle debug registers, and
16149 (handle_exception): Add/Remove initial breakpoint. Avoid
16150 non-existant WSTOPSIG on Windows CE.
16151 (win32_read_inferior_memory): Cast to remove warning.
16152 (win32_arch_string): Go through the low target.
16153 (initialize_low): Call set_breakpoint_data with the low
16154 target's breakpoint.
16155 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16156 FOP_REGNUM, mappings): Move to ...
16157 * win32-i386-low.c: ... here.
16158 * win32-low.c (win32_thread_info): Move to ...
16159 * win32-low.h: ... here.
16160 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16161 win32-arm-low.c and wincecompat.c.
16162 (all:): Add $EXEEXT.
16163 (install-only:): Likewise.
16164 (gdbserver:): Likewise.
16165 (gdbreplay:): Likewise.
16166 * config.in: Regenerate.
16167 * configure: Regenerate.
16169 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16171 * win32-low.c: Rename typedef thread_info to
16172 win32_thread_info throughout.
16174 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16176 * win32-i386-low.c: Rename to ...
16177 * win32-low.c: ... this.
16178 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16179 * Makefile.in: Likewise.
16181 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16183 * remote-utils.c (monitor_output): Constify msg parameter.
16184 * server.h (monitor_output): Likewise.
16185 * win32-i386-low.c (handle_output_debug_string): New.
16186 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16187 handle_output_debug_string.
16188 (get_child_debug_event): Likewise.
16190 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16192 * server.c (main): Correct strtoul check.
16194 2007-03-27 Jon Ringle <jon@ringle.org>
16196 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16198 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16200 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16202 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16204 * terminal.h: Check HAVE_SGTTY_H.
16206 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16208 * remote-utils.c (remote_open): Print out the assigned port number.
16210 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16212 * remote-utils.c (monitor_output): New function.
16213 * server.c (debug_threads): Define here.
16214 (monitor_show_help): New function.
16215 (handle_query): Handle qRcmd.
16216 (main): Do not handle 'd' packet.
16217 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16218 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16221 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16223 * Makefile.in (EXEEXT): New.
16224 (clean): Use $(EXEEXT).
16226 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16228 * target.h (target_ops): Rename send_signal to request_interrupt,
16229 and remove enum target_signal parameter.
16230 * linux-low.c (linux_request_interrupt): Rename from
16231 linux_send_signal, and always send SIGINT.
16232 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16233 and always send SIGINT.
16234 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16236 (input_interrupt): Likewise.
16238 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16240 * server.c (get_features_xml): Check if target implemented
16242 * win32-i386-low.c (win32_arch_string): New.
16243 (win32_target_ops): Add win32_arch_string as arch_string member.
16245 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16247 * spu-low.c (spu_arch_string): New.
16248 (spu_target_ops): Add spu_arch_string.
16250 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16252 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16253 * configure.ac: Do not check for terminal.h.
16254 * configure, config.in: Regenerated.
16256 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16258 * Makefile.in (OBS): Add $(XML_BUILTIN).
16259 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16261 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16262 (arm-with-iwmmxt.c): New.
16263 * config.in, configure: Regenerate.
16264 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16265 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16266 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16267 (arm*-*-linux*): Add iWMMXt and regset support.
16268 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16269 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16270 (arm_store_wmmxregset, target_regsets): New.
16271 * server.c (get_features_xml): Take annex argument. Check builtin
16273 (handle_query): Handle multiple annexes.
16275 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16277 * remote-utils.c [USE_WIN32API] (read, write): Define.
16278 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16281 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16283 * linux-i386-low.c (the_low_target): Set arch_string.
16284 * linux-x86-64-low.c (the_low_target): Likewise.
16285 * linux-low.c (linux_arch_string): New.
16286 (linux_target_ops): Add it.
16287 * linux-low.h (struct linux_target_ops): Add arch_string.
16288 * server.c (write_qxfer_response): Use const void * for DATA.
16289 (get_features_xml): New.
16290 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16291 * target.h (struct target_ops): Add arch_string method.
16293 2007-01-03 Denis Pilat <denis.pilat@st.com>
16294 Daniel Jacobowitz <dan@codesourcery.com>
16296 * linux-low.c (linux_kill): Handle being called with no threads.
16297 * win32-i386-low.c (win32_kill): Likewise.
16298 (get_child_debug_event): Clear current_process_handle.
16300 2006-12-30 Denis PILAT <denis.pilat@st.com>
16301 Daniel Jacobowitz <dan@codesourcery.com>
16303 * remote-utils.c (remote_open): Check the type of specified
16304 serial port devices before opening them.
16305 * server.c (main): Kill the inferior if an error occurs during
16306 the first remote_open.
16308 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16310 * README: Update supported targets.
16312 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16314 * Makefile.in (clean): Remove reg-mips64.c.
16315 (reg-mips64.c, reg-mips64.o): New rules.
16316 * configure.srv: Handle mips64. Include regset support for mips.
16317 * linux-mips-low.c (union mips_register): New.
16318 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16319 (mips_breakpoint, mips_breakpoint_at): Use int.
16320 (mips_collect_register, mips_supply_register)
16321 (mips_collect_register_32bit, mips_supply_register_32bit)
16322 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16323 (mips_store_fpregset, target_regsets): New.
16324 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16326 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16328 * configure.srv: Add target "spu*-*-*".
16329 * Makefile.in (clean): Remove reg-spu.c.
16330 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16331 * spu-low.c: New file.
16333 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16335 * configure.ac: Correct td_thr_tls_get_addr test.
16336 * configure: Regenerated.
16338 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16340 * linux-low.c (linux_wait_for_event): Reformat. Use the
16341 pass_signals array.
16342 * remote-utils.c (decode_address_to_semicolon): New.
16343 * server.c (pass_signals, handle_general_set): New.
16344 (handle_query): Mention QPassSignals for qSupported.
16345 (main): Call handle_general_set.
16346 * server.h (pass_signals, decode_address_to_semicolon): New.
16348 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16350 * server.c (handle_query): Correct error handling for read_auxv.
16352 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16354 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16355 and srv_linux_thread_db to yes.
16356 * linux-s390-low.c (s390_fill_gregset): New function.
16357 (target_regsets): Define data structure.
16359 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16361 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16362 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16363 * config.in, configure: Regenerated.
16364 * inferiors.c (gdb_id_to_thread): New function.
16365 (gdb_id_to_thread_id): Use it.
16366 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16367 * linux-low.h (struct process_info): Add th member.
16368 (thread_db_get_tls_address): New prototype.
16369 * remote-utils.c (decode_address): Make non-static.
16370 * server.c (handle_query): Handle qGetTLSAddr.
16371 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16372 * target.h (struct target_ops): Add get_tls_address.
16373 * thread-db.c (maybe_attach_thread): Save the thread handle.
16374 (thread_db_get_tls_address): New.
16376 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16378 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16379 (linux_resume_one_process): Take a siginfo_t *. Update all
16380 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16381 (struct pending_signals): Add a siginfo_t.
16382 (linux_wait_for_process): Always set last_status.
16383 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16384 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16385 * linux-low.h (struct process_info): Add last_status.
16387 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16389 * remote-utils.c (try_rle): New function.
16390 (putpkt_binary): Use it.
16392 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16394 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16395 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16396 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16397 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16398 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16401 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16403 * server.c (terminal_fd): New variable.
16404 (old_foreground_pgrp): Likewise.
16405 (restore_old_foreground_pgrp): New function.
16406 (start_inferior): Record the terminal file descriptor in terminal_fd
16407 and its original foreground group in old_foreground_pgrp. Register
16408 restore_old_foreground_pgrp with atexit().
16410 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16412 * server.c (handle_query): Correct qPart to qXfer.
16414 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16416 * configure.ac: Check for more headers which are missing on
16417 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16418 * configure.srv: Add Cygwin and mingw32.
16419 * remote-utils.c: Don't include headers unconditionally which
16420 are missing on mingw32. Include <winsock.h> for mingw32.
16421 (remote_open): Adjust for mingw32 support. Flush
16422 standard error after writing to it.
16423 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16424 (unblock_async_io, enable_async_io, disable_async_io)
16425 (readchar, getpkt): Update for Winsock support.
16426 (prepare_resume_reply): Expect a protocol signal number.
16427 * server.c: Disable <sys/wait.h> on mingw32.
16428 (start_inferior): Adjust for mingw32 support. Flush
16429 standard error after writing to it.
16430 (attach_inferior): Likewise. Use protocol signal
16432 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16434 * win32-i386-low.c: New file.
16435 * Makefile.in (XM_CLIBS): Set.
16436 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16437 (win32-i386-low.o): New dependency rule.
16438 * linux-low.c (linux_wait): Use target signal numbers.
16439 * target.h (struct target_ops): Doc fix.
16440 * server.h (target_signal_to_name): New prototype.
16441 * gdbreplay.c: Don't include headers unconditionally which
16442 are missing on mingw32. Include <winsock.h> for mingw32.
16443 (remote_close, remote_open): Adjust for Winsock support.
16444 * configure, config.in: Regenerated.
16446 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16448 * server.c (decode_xfer_read, write_qxfer_response): New.
16449 (handle_query): Take a packet length argument. Handle
16450 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16451 the qSupported response.
16452 (main): Update call to handle_query.
16454 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16456 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16457 (putpkt_binary): Renamed from putpkt and adjusted for binary
16459 (putpkt): New wrapper for putpkt_binary.
16460 (readchar): Don't mask off the high bit.
16461 (decode_X_packet): New function.
16462 * server.c (main): Call putpkt_binary if a handler sets the packet
16463 length. Save the length of the incoming packet. Handle 'X'.
16464 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16466 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16468 * server.c (handle_query): Handle qSupported.
16470 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16472 * remote-utils.c (all_symbols_looked_up): New variable.
16473 (look_up_one_symbol): Check it.
16474 * server.h (look_up_one_symbol): New declaration.
16475 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16477 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16479 * Makefile.in (linux-arm-low.o): Update dependencies.
16480 * linux-arm-low.c: Include "gdb_proc_service.h".
16481 (PTRACE_GET_THREAD_AREA): Define.
16482 (ps_get_thread_area): New function.
16484 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16486 * configure.srv (m68k*-*-uclinux*): New target.
16487 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16488 (linux_resume_one_process): Remove extraneous cast.
16489 (linux_read_offsets): New.
16490 (linux_target_op): Add linux_read_offsets on mmuless systems.
16491 * server.c (handle_query): Add qOffsets logic.
16492 * target.h (struct target_ops): Add read_offsets.
16494 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16496 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16497 (PTRACE_GET_THREAD_AREA): Define.
16498 (ps_get_thread_area): New function.
16499 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16500 (linux-x86-64-low.o): Update.
16502 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16504 * configure.ac: Remove checks for prfpregset_t.
16505 * gdb_proc_service.h: New file.
16506 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16507 new "gdb_proc_service.h".
16508 * proc-service.c: Likewise.
16509 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16510 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16511 * Makefile.in (gdb_proc_service_h): Updated.
16512 * configure, config.in: Regenerated.
16514 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16516 * remote-utils.c (prepare_resume_reply): Move declaration
16517 of gdb_id_from_wait to the top of the block.
16519 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16521 * linux-low.c (regsets_store_inferior_registers): Read the regset
16522 from the target before filling it.
16524 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16526 * server.c (attach_inferior): Return SIGTRAP for a successful
16529 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16531 * Makefile.in (OBS): Add version.o.
16532 (STAGESTUFF): Delete.
16533 (version.o): Add dependencies.
16534 (version.c): Replace rule.
16535 (clean): Remove version.c.
16536 * server.c (gdbserver_version): New.
16537 (gdbserver_usage): Use printf.
16538 (main): Handle --version and --help.
16539 * server.h (version, host_name): Add declarations.
16541 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16553 * linux-x86-64-low.c:
16555 * linux-s390-low.c:
16556 * linux-ppc64-low.c:
16558 * linux-mips-low.c:
16559 * linux-m68k-low.c:
16560 * linux-m32r-low.c:
16563 * linux-ia64-low.c:
16564 * linux-i386-low.c:
16565 * linux-crisv32-low.c:
16577 * gdbserver.1: Add (C) after Copyright. Update the FSF
16580 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16582 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16583 (arm_breakpoint_at): Recognize both breakpoints.
16584 (the_low_target): Use the correct breakpoint instruction.
16586 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16588 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16589 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16590 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16591 (the_low_target): Update.
16593 2005-10-25 Andreas Schwab <schwab@suse.de>
16595 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16597 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16598 (ia64_num_regs): Reduce to 462.
16600 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16602 * acinclude.m4: Correct quoting.
16603 * aclocal.m4: Regenerated.
16605 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16606 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16607 (thread_db_init): Call thread_db_err_str.
16608 * configure.ac: Check for TD_VERSION.
16609 * config.in, configure: Regenerated.
16611 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16613 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16615 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16617 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16618 is not available. Define HAVE_PTRACE_GETREGS if it is.
16619 * config.in, configure: Regenerated.
16620 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16621 * linux-i386-low.c, linux-m68k-low.c: Update to use
16622 HAVE_PTRACE_GETREGS.
16623 * linux-low.c (regsets_fetch_inferior_registers)
16624 (regsets_store_inferior_registers): Only return 0 if we processed
16626 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16627 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16629 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16631 * inferiors.c (struct thread_info): Add gdb_id.
16632 (add_thread): Add gdb_id argument.
16633 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16634 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16635 calls to add_thread.
16636 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16637 * server.c (handle_query): Use thread_to_gdb_id.
16638 (handle_v_cont, main): Use gdb_id_to_thread_id.
16639 * server.h (add_thread): Update prototype.
16640 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16643 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16645 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16646 left-padded registers.
16647 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16648 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16650 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16652 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16653 * configure: Regenerate.
16654 * config.in: Regenerate.
16655 * server.h (NEED_DECLARATION_STRERROR):
16656 Replace with !HAVE_DECL_STRERROR.
16658 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16660 * linux-low.c (linux_wait, linux_send_signal): Don't test
16661 an unsigned long variable for > 0 if it could be MAX_ULONG.
16662 * server.c (myresume): Likewise.
16663 * target.c (set_desired_inferior): Likewise.
16665 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16667 * configure.ac: Simplify and improve check for socklen_t.
16668 * configure, config.in: Regenerate.
16670 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16672 * acconfig.h: Remove.
16673 * configure.ac: Add a test for socklen_t. Use three-argument
16674 AC_DEFINE throughout.
16675 * config.in: Regenerated using autoheader 2.59.
16676 * configure: Regenerated.
16678 * gdbreplay.c (socklen_t): Provide a default.
16679 (remote_open): Use socklen_t.
16680 * remote-utils.c (socklen_t): Provide a default.
16681 (remote_open): Use socklen_t.
16682 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16685 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16687 * linux-low.c (linux_read_memory, linux_write_memory)
16688 (linux_read_auxv): Likewise.
16689 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16690 (check_mem_write): Likewise.
16691 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16693 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16694 (registers_from_string, register_data): Likewise.
16695 * server.c (handle_query, main): Likewise.
16696 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16697 (decode_M_packet): Likewise.
16698 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16699 * target.h (struct target_ops): Update read_memory, write_memory,
16701 (read_inferior_memory, write_inferior_memory): Update.
16702 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16703 to unsigned char *.
16704 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16705 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16706 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16707 linux-s390-low.c, linux-sh-low.c: Update for changes in
16708 read_inferior_memory and the_low_target->breakpoint.
16710 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16712 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16713 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16714 * configure.srv: Add powerpc64-*-linux*.
16715 * linux-ppc64-low.c: New file.
16717 2005-05-23 Orjan Friberg <orjanf@axis.com>
16719 * linux-cris-low.c: New file with support for CRIS.
16720 * linux-crisv32-low.c: Ditto for CRISv32.
16721 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16722 (clean): Add reg-cris.c and reg-crisv32.c.
16723 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16724 reg-crisv32.o, and reg-crisv32.c to make rules.
16725 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16726 recognized targets.
16728 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16730 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16731 of sizeof (PTRACE_XFER_TYPE).
16732 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16734 2005-05-12 Orjan Friberg <orjanf@axis.com>
16736 * target.h (struct target_ops): Add insert_watchpoint,
16737 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16738 pointers for hardware watchpoint support.
16739 * linux-low.h (struct linux_target_ops): Ditto.
16740 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16741 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16742 to linux_target_ops.
16743 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16745 * server.c (main): Recognize 'Z' and 'z' packets.
16747 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16749 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16750 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16751 (the_low_target): Add new members.
16753 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16755 * proc-service.c (ps_lgetregs): Search all_processes instead of
16758 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16760 * server.c (start_inferior): Change return type to int.
16761 (attach_inferior): Change sigptr to int *.
16762 (handle_v_cont, handle_v_requests): Change signal to int *.
16763 (main): Change signal to int.
16765 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16767 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16768 * configure.srv: Add m32r*-*-linux*.
16769 * linux-m32r-low.c: New file.
16771 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16773 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16775 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16777 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16778 Take unsigned long arguments for PIDs.
16779 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16780 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16781 (wait_for_sigstop, linux_resume_one_process)
16782 (regsets_fetch_inferior_registers, linux_send_signal)
16783 (linux_read_auxv): Likewise. Update the types of variables holding
16784 PIDs. Update format string specifiers.
16785 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16786 * remote-utils.c (prepare_resume_reply): Likewise.
16787 * server.c (cont_thread, general_thread, step_thread)
16788 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16790 (handle_query): Update format specifiers.
16791 (handle_v_cont, main): Use strtoul for thread IDs.
16792 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16793 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16794 (general_thread, step_thread, thread_from_wait)
16795 (old_thread_from_wait): Update.
16796 * target.h (struct thread_resume): Use unsigned long for THREAD.
16797 (struct target_ops): Use unsigned long for arguments to attach and
16800 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16802 * acinclude.m4: Include bfd/bfd.m4 directly.
16803 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16804 <agriffis@toolchain.org>.
16805 * aclocal.m4, configure: Regenerated.
16807 2005-01-07 Andrew Cagney <cagney@gnu.org>
16809 * configure.ac: Rename configure.in, require autoconf 2.59.
16810 * configure: Re-generate.
16812 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16814 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16815 LIBS when finished.
16816 * aclocal.m4: Regenerated.
16817 * configure: Regenerated.
16819 2004-11-21 Andreas Schwab <schwab@suse.de>
16821 * linux-m68k-low.c (m68k_num_gregs): Define.
16822 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16823 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16824 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16825 (m68k_breakpoint_at): New. Add to the_low_target.
16827 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16828 srv_linux_thread_db to yes.
16830 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16832 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16833 (ARCH_SET_FS): Likewise.
16834 (ARCH_GET_FS): Likewise.
16835 (ARCH_GET_GS): Likewise.
16837 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16839 * linux-i386-low.c (ps_get_thread_area): New.
16840 * linux-x86-64-low.c (ps_get_thread_area): New.
16841 * linux-low.c: Include <sys/syscall.h>.
16842 (linux_kill_one_process): Don't kill the first thread here.
16843 (linux_kill): Kill the first thread here.
16844 (kill_lwp): New function.
16845 (send_sigstop, linux_send_signal): Use it.
16846 * proc-service.c: Clean up #ifdefs.
16847 (fpregset_info): Delete.
16848 (ps_lgetregs): Update and enable implementation.
16849 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16851 * remote-utils.c (struct sym_cache, symbol_cache): New.
16852 (input_interrupt): Print a clearer message.
16853 (async_io_enabled): New variable.
16854 (enable_async_io, disable_async_io): Use it. Update comments.
16855 (look_up_one_symbol): Use the symbol cache.
16856 * thread-db.c (thread_db_look_up_symbols): New function.
16857 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16859 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16861 * configure.in: Test for -rdynamic.
16862 * configure: Regenerated.
16863 * Makefile (INTERNAL_LDFLAGS): New.
16864 (gdbserver, gdbreplay): Use it.
16866 2004-09-02 Andrew Cagney <cagney@gnu.org>
16868 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16870 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16872 * linux-low.c (linux_wait): Clear all_processes list also.
16874 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16876 * linux-low.c: Include <errno.h>. Remove extern declaration of
16879 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16881 * gdbreplay.c, server.h, utils.c: Update copyright years.
16883 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16885 * server.c (main): Print child status or termination signal from
16886 variable 'signal', not 'sig'.
16888 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16890 * linux-low.c (linux_read_memory): Change return type to
16891 int. Check for and return error from ptrace().
16892 * target.c (read_inferior_memory): Change return type to int. Pass
16893 back return status from the_target->read_memory().
16894 * target.h (struct target_ops): Adapt *read_memory() prototype.
16896 (read_inferior_memory): Adapt prototype.
16897 * server.c (main): Return an error packet if
16898 read_inferior_memory() returns an error.
16900 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16902 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16903 Unify with other clean targets.
16905 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16907 * server.c (handle_v_cont): Call set_desired_inferior.
16909 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16911 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16913 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16915 * linux-low.c (linux_wait): Unblock async I/O.
16916 (linux_resume): Block and enable async I/O.
16917 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16918 * server.h (block_async_io, unblock_async_io): Add prototypes.
16920 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16922 * remote-utils.c (remote_open): Print a status notice after
16923 opening a TCP port.
16924 * server.c (attach_inferior): Print a status notice after
16927 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16929 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16931 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16933 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16935 * server.c, target.h: Update copyright years.
16937 2004-02-25 Roland McGrath <roland@redhat.com>
16939 * target.h (struct target_ops): New member `read_auxv'.
16940 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16941 * linux-low.c (linux_read_auxv): New function.
16942 (linux_target_ops): Initialize `read_auxv' member to that.
16944 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16946 Committed by Jim Blandy <jimb@redhat.com>.
16948 * linux-s390-low.c (s390_num_regs): Update.
16949 (s390_regmap): Remove control registers. Use __s390x__ predefine
16950 instead of GPR_SIZE to distiguish s390 and s390x targets.
16952 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16954 * linux-low.c: Update copyright year.
16955 (check_removed_breakpoint): Clear pending_is_breakpoint.
16956 (linux_set_resume_request, linux_queue_one_thread)
16957 (resume_status_pending_p): New functions.
16958 (linux_continue_one_thread): Use process->resume.
16959 (linux_resume): Only resume threads if there are no pending events.
16960 * linux-low.h (struct process_info): Add resume request
16963 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16965 * regcache.c (new_register_cache): Clear the allocated register
16966 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16968 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16970 * linux-low.c (linux_resume): Take a struct thread_resume *
16972 (linux_wait): Update call.
16973 (resume_ptr): New static variable.
16974 (linux_continue_one_thread): Renamed from
16975 linux_continue_one_process. Use resume_ptr.
16976 (linux_resume): Use linux_continue_one_thread.
16977 * server.c (handle_v_cont, handle_v_requests): New functions.
16978 (myresume): New function.
16979 (main): Handle 'v' case.
16980 * target.h (struct thread_resume): New type.
16981 (struct target_ops): Change argument of "resume" to struct
16983 (myresume): Delete macro.
16985 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16987 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16988 (uninstall): Support DESTDIR.
16990 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16992 * configure.srv: Add xscale*linux copy of arm*linux entry.
16994 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16996 * linux-arm-low.c (arm_reinsert_addr): New function.
16997 (the_low_target): Add arm_reinsert_addr.
16999 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17001 * mem-break.c: Remove whitespace at end of file.
17003 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17005 * configure.in: Check whether we need to prototype strerror.
17006 * server.h: Optionally prototype strerror.
17007 * gdbreplay.c (perror_with_name): Use strerror.
17008 * linux-low.c (linux_attach_lwp): Use strerror.
17009 * utils.c (perror_with_name): Use strerror.
17010 * config.in, configure: Regenerated.
17012 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17014 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17015 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17017 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17019 * Makefile.in (SFILES): Update.
17020 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17021 low-sun3.c: Remove files.
17023 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17025 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17026 (linux_detach_one_process, linux_detach): New functions.
17027 (linux_target_ops): Add linux_detach.
17028 * server.c (main): Handle 'D' packet.
17029 * target.h (struct target_ops): Add "detach" member.
17030 (detach_inferior): Define.
17032 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17034 From Kelley Cook <kelleycook@wideopenwest.com>:
17035 * configure.srv: Accept i[34567]86 variants.
17037 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17039 * linux-low.c (linux_wait_for_event): Correct comment typos.
17040 (linux_resume_one_process): Call check_removed_breakpoint.
17041 (linux_send_signal): New function.
17042 (linux_target_ops): Add linux_send_signal.
17043 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17045 * target.h (struct target_ops): Add send_signal.
17047 2003-05-29 Jim Blandy <jimb@redhat.com>
17049 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17050 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17051 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17052 away part of the register's value.
17054 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17056 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17057 (linux_wait_for_event, linux_init_signals): Likewise.
17059 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17061 * configure.in: Check for stdlib.h.
17062 * configure: Regenerated.
17063 * config.in: Regenerated.
17065 2003-01-04 Andreas Schwab <schwab@suse.de>
17067 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17069 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17071 * Makefile.in: Remove obsolete code.
17073 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17075 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17076 defined(PT_FPR0_HI).
17078 2002-11-17 Stuart Hughes <seh@zee2.com>
17080 * linux-arm-low.c (arm_num_regs): Increase.
17081 (arm_regmap): Include status register.
17083 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17085 * linux-low.c (register_addr): Remove incorrect -1 check.
17087 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17089 * linux-low.c (linux_create_inferior): Call setpgid. Return
17091 (unstopped_p, linux_signal_pid): Remove.
17092 (linux_target_ops): Remove linux_signal_pid.
17093 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17094 global instead of target method.
17095 * target.h (struct target_ops): Remove signal_pid. Update comment
17096 for create_inferior.
17097 * server.c (signal_pid): New variable.
17098 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17099 gdbserver. Set the child to be the foreground process group.
17100 (attach_inferior): Set signal_pid.
17102 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17104 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17106 2002-08-20 Jim Blandy <jimb@redhat.com>
17108 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17111 2002-08-01 Andrew Cagney <cagney@redhat.com>
17113 * Makefile.in: Make chill references obsolete.
17115 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17117 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17118 * configure: Regenerate.
17119 * config.in: Regenerate.
17121 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17123 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17124 (perror_with_name, remote_close, remote_open, expect, play): Static.
17126 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17128 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17129 byte offsets instead of an array of indexes.
17130 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17132 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17134 * regcache.c: Add comment.
17136 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17138 * thread-db.c: New file.
17139 * proc-service.c: New file.
17140 * acinclude.m4: New file.
17141 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17142 proc-service.o, and thread-db.o.
17143 (linux-low.o): Add USE_THREAD_DB.
17144 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17145 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17146 * aclocal.m4: Regenerated.
17147 * config.in: Regenerated.
17148 * configure: Regenerated.
17149 * configure.in: Check for proc_service.h, sys/procfs.h,
17150 thread_db.h, and linux/elf.h headrs.
17151 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17152 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17153 Check for -lthread_db and thread support.
17154 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17155 PowerPC, and SuperH.
17156 * i387-fp.c: Constify arguments.
17157 * i387-fp.h: Likewise.
17158 * inferiors.c: (struct thread_info): Renamed from
17159 `struct inferior_info'. Remove PID member. Use generic inferior
17160 list header. All uses updated.
17161 (inferiors, signal_pid): Removed.
17162 (all_threads): New variable.
17163 (get_thread): Define.
17164 (add_inferior_to_list): New function.
17165 (for_each_inferior): New function.
17166 (change_inferior_id): New function.
17167 (add_inferior): Removed.
17168 (remove_inferior): New function.
17169 (add_thread): New function.
17170 (free_one_thread): New function.
17171 (remove_thread): New function.
17172 (clear_inferiors): Use for_each_inferior and free_one_thread.
17173 (find_inferior): New function.
17174 (find_inferior_id): New function.
17175 (inferior_target_data): Update argument type.
17176 (set_inferior_target_data): Likewise.
17177 (inferior_regcache_data): Likewise.
17178 (set_inferior_regcache_data): Likewise.
17179 * linux-low.c (linux_bp_reinsert): Remove.
17180 (all_processes, stopping_threads, using_thrads)
17181 (struct pending_signals, debug_threads, pid_of): New.
17182 (inferior_pid): Replace with macro.
17183 (struct inferior_linux_data): Remove.
17184 (get_stop_pc, add_process): New functions.
17185 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17186 Use add_process and add_thread.
17187 (linux_attach_lwp): New function, based on old linux_attach. Use
17188 add_process and add_thread. Set stop_expected for new threads.
17189 (linux_attach): New function.
17190 (linux_kill_one_process): New function.
17191 (linux_kill): Kill all LWPs.
17192 (linux_thread_alive): Use find_inferior_id.
17193 (check_removed_breakpoints, status_pending_p): New functions.
17194 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17195 Update. Use WNOHANG. Wait for cloned processes also. Update process
17196 struct for the found process.
17197 (linux_wait_for_event): New function.
17198 (linux_wait): Use it. Support LWPs.
17199 (send_sigstop, wait_for_sigstop, stop_all_processes)
17200 (linux_resume_one_process, linux_continue_one_process): New functions.
17201 (linux_resume): Support LWPs.
17202 (REGISTER_RAW_SIZE): Remove.
17203 (fetch_register): Use register_size instead. Call supply_register.
17204 (usr_store_inferior_registers): Likewise. Call collect_register.
17205 Fix recursive case.
17206 (regsets_fetch_inferior_registers): Improve error message.
17207 (regsets_store_inferior_registers): Add debugging.
17208 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17209 (unstopped_p, linux_signal_pid): New functions.
17210 (linux_target_ops): Add linux_signal_pid.
17211 (linux_init_signals): New function.
17212 (initialize_low): Call it. Initialize using_threads.
17213 * regcache.c (inferior_regcache_data): Add valid
17215 (get_regcache): Fetch registers lazily. Add fetch argument
17216 and update all callers.
17217 (regcache_invalidate_one, regcache_invalidate): New
17219 (new_register_cache): Renamed from create_register_cache.
17220 Return the new regcache.
17221 (free_register_cache): Change argument to a void *.
17222 (registers_to_string, registers_from_string): Call get_regcache
17223 with fetch flag set.
17224 (register_data): Make static. Pass fetch flag to get_regcache.
17225 (supply_register): Call get_regcache with fetch flag clear.
17226 (collect_register): Call get_regcache with fetch flag set.
17227 (collect_register_as_string): New function.
17228 * regcache.h: Update.
17229 * remote-utils.c (putpkt): Flush after debug output and use
17231 Handle input interrupts while waiting for an ACK.
17232 (input_interrupt): Use signal_pid method.
17233 (getpkt): Flush after debug output and use stderr.
17234 (outreg): Use collect_register_as_string.
17235 (new_thread_notify, dead_thread_notify): New functions.
17236 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17237 and general_thread.
17238 (look_up_one_symbol): Flush after debug output.
17239 * server.c (step_thread, server_waiting): New variables.
17240 (start_inferior): Don't use signal_pid. Update call to mywait.
17241 (attach_inferior): Update call to mywait.
17242 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17243 (main): Don't fetch/store registers explicitly. Use
17244 set_desired_inferior. Support proposed ``Hs'' packet. Update
17246 * server.h: Update.
17247 (struct inferior_list, struct_inferior_list_entry): New.
17248 * target.c (set_desired_inferior): New.
17249 (write_inferior_memory): Constify.
17250 (mywait): New function.
17251 * target.h: Update.
17252 (struct target_ops): New signal_pid method.
17253 (mywait): Removed macro, added prototype.
17255 * linux-low.h (regset_func): Removed.
17256 (regset_fill_func, regset_store_func): New.
17257 (enum regset_type): New.
17258 (struct regset_info): Add type field. Use new operation types.
17259 (struct linux_target_ops): stop_pc renamed to get_pc.
17260 Add decr_pc_after_break and breakpoint_at.
17261 (get_process, get_thread_proess, get_process_thread)
17262 (strut process_info, all_processes, linux_attach_lwp)
17263 (thread_db_init): New.
17265 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17266 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17267 (the_low_target): Add new members.
17268 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17269 (i386_store_fpxregset): Constify.
17270 (target_regsets): Add new kind identifier.
17271 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17272 (i386_set_pc): Add debugging.
17273 (i386_breakpoint_at): New function.
17274 (the_low_target): Add new members.
17275 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17276 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17277 (mips_breakpoint_at): New.
17278 (the_low_target): Add new members.
17279 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17280 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17281 (the_low_target): Add new members.
17282 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17283 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17284 (the_low_target): Add new members.
17285 * linux-x86-64-low.c (target_regsets): Add new kind
17288 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17290 From Martin Pool <mbp@samba.org>:
17291 * server.c (gdbserver_usage): New function.
17294 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17296 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17297 stop_at -> stop_pc.
17299 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17301 * Makefile.in: Remove obsolete code.
17303 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17305 * linux-low.c (regsets_fetch_inferior_registers),
17306 (regsets_store_inferior_registers): Removed cast to int from
17308 * regcache.h: Added declaration of struct inferior_info.
17310 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17312 * inferiors.c (struct inferior_info): Add regcache_data.
17313 (add_inferior): Call create_register_cache.
17314 (clear_inferiors): Call free_register_cache.
17315 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17316 * regcache.c (struct inferior_regcache_data): New.
17317 (registers): Remove.
17318 (get_regcache): New function.
17319 (create_register_cache, free_register_cache): New functions.
17320 (set_register_cache): Don't initialize the register cache here.
17321 (registers_to_string, registers_from_string, register_data): Call
17323 * regcache.h: Add prototypes.
17324 * server.h: Likewise.
17326 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17328 * mem-break.c: New file.
17329 * mem-break.h: New file.
17330 * Makefile.in: Add mem-break.o rule; update server.h
17332 * inferiors.c (struct inferior_info): Add target_data
17334 (clear_inferiors): Free target_data member if set.
17335 (inferior_target_data, set_inferior_target_data): New functions.
17336 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17337 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17338 * linux-low.c (linux_bp_reinsert): New variable.
17339 (struct inferior_linux_data): New.
17340 (linux_create_inferior): Use set_inferior_target_data.
17341 (linux_attach): Likewise. Call add_inferior.
17342 (linux_wait_for_one_inferior): New function.
17343 (linux_wait): Call it.
17344 (linux_write_memory): Add const.
17345 (initialize_low): Call set_breakpoint_data.
17346 * linux-low.h (struct linux_target_ops): Add breakpoint
17348 * server.c (attach_inferior): Remove extra add_inferior
17350 * server.h: Include mem-break.h. Update inferior.c
17352 * target.c (read_inferior_memory)
17353 (write_inferior_memory): New functions.
17354 * target.h (read_inferior_memory)
17355 (write_inferior_memory): Change macros to prototypes.
17356 (struct target_ops): Update comments. Add const to write_memory
17359 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17361 * linux-low.c (usr_store_inferior_registers): Support
17362 registers which are allowed to fail to store.
17363 * linux-low.h (linux_target_ops): Likewise.
17364 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17365 (ppc_cannot_store_register): FPSCR may not be storable.
17367 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17369 * server.h: Include <string.h> if HAVE_STRING_H.
17370 * ChangeLog: Correct paths in last ChangeLog entry.
17372 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17374 * linux-low.h: Remove obsolete prototypes.
17375 (struct linux_target_ops): New.
17376 (extern the_low_target): New.
17377 * linux-low.c (num_regs, regmap): Remove declarations.
17378 (register_addr): Use the_low_target explicitly.
17379 (fetch_register): Likewise.
17380 (usr_fetch_inferior_registers): Likewise.
17381 (usr_store_inferior_registers): Likewise.
17382 * linux-arm-low.c (num_regs): Remove.
17383 (arm_num_regs): Define.
17384 (arm_regmap): Renamed from regmap, made static.
17385 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17387 (arm_cannot_store_register): Renamed from cannot_store_register,
17389 (the_low_target): New.
17390 * linux-i386-low.c (num_regs): Remove.
17391 (i386_num_regs): Define.
17392 (i386_regmap): Renamed from regmap, made static.
17393 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17395 (i386_cannot_store_register): Renamed from cannot_store_register,
17397 (the_low_target): New.
17398 * linux-ia64-low.c (num_regs): Remove.
17399 (ia64_num_regs): Define.
17400 (ia64_regmap): Renamed from regmap, made static.
17401 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17403 (ia64_cannot_store_register): Renamed from cannot_store_register,
17405 (the_low_target): New.
17406 * linux-m68k-low.c (num_regs): Remove.
17407 (m68k_num_regs): Define.
17408 (m68k_regmap): Renamed from regmap, made static.
17409 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17411 (m68k_cannot_store_register): Renamed from cannot_store_register,
17413 (the_low_target): New.
17414 * linux-mips-low.c (num_regs): Remove.
17415 (mips_num_regs): Define.
17416 (mips_regmap): Renamed from regmap, made static.
17417 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17419 (mips_cannot_store_register): Renamed from cannot_store_register,
17421 (the_low_target): New.
17422 * linux-ppc-low.c (num_regs): Remove.
17423 (ppc_num_regs): Define.
17424 (ppc_regmap): Renamed from regmap, made static.
17425 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17427 (ppc_cannot_store_register): Renamed from cannot_store_register,
17429 (the_low_target): New.
17430 * linux-s390-low.c (num_regs): Remove.
17431 (s390_num_regs): Define.
17432 (s390_regmap): Renamed from regmap, made static.
17433 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17435 (s390_cannot_store_register): Renamed from cannot_store_register,
17437 (the_low_target): New.
17438 * linux-sh-low.c (num_regs): Remove.
17439 (sh_num_regs): Define.
17440 (sh_regmap): Renamed from regmap, made static.
17441 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17443 (sh_cannot_store_register): Renamed from cannot_store_register,
17445 (the_low_target): New.
17446 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17447 (the_low_target): New.
17449 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17451 * Makefile.in: Add stamp-h target.
17452 * configure.in: Create stamp-h.
17453 * configure: Regenerated.
17455 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17457 * inferiors.c: New file.
17458 * target.c: New file.
17459 * target.h: New file.
17460 * Makefile.in: Add target.o and inferiors.o. Update
17462 * linux-low.c (inferior_pid): New static variable,
17463 moved from server.c.
17464 (linux_create_inferior): Renamed from create_inferior.
17465 Call add_inferior. Return 0 on success instead of a PID.
17466 (linux_attach): Renamed from myattach.
17467 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17468 (linux_thread_alive): Renamed from mythread_alive.
17469 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17471 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17472 (regsets_store_inferior_registers): Correct error message.
17473 Add missing ``return 0''.
17474 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17475 (linux_store_registers): Renamed from store_inferior_registers.
17476 (linux_read_memory): Renamed from read_inferior_memory.
17477 (linux_write_memory): Renamed from write_inferior_memory.
17478 (linux_target_ops): New structure.
17479 (initialize_low): Call set_target_ops ().
17480 * remote-utils.c (unhexify): New function.
17481 (hexify): New function.
17482 (input_interrupt): Send signals to ``signal_pid''.
17483 * server.c (inferior_pid): Remove.
17484 (start_inferior): Update create_inferior call.
17485 (attach_inferior): Call add_inferior.
17486 (handle_query): New function.
17487 (main): Call handle_query for `q' packets.
17488 * server.h: Include "target.h". Remove obsolete prototypes.
17489 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17491 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17493 * Makefile.in: Add WARN_CFLAGS. Update configury
17495 * configure.in: Check for <string.h>
17496 * configure: Regenerate.
17497 * config.in: Regenerate.
17498 * gdbreplay.c: Include needed system headers.
17499 (remote_open): Remove strchr prototype.
17500 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17501 * regcache.c (supply_register): Change buf argument to const void *.
17502 (supply_register_by_name): Likewise.
17503 (collect_register): Change buf argument to void *.
17504 (collect_register_by_name): Likewise.
17505 * regcache.h: Add missing prototypes.
17506 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17507 * server.c (handle_query): New function.
17508 (attached): New static variable, moved out of main.
17509 (main): Quiet longjmp clobber warnings.
17510 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17511 * utils.c (error): Remove NORETURN.