1 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4 * configure.ac: Drop enable-libmcheck support.
5 * configure, config.in: Rebuild.
6 * acinclude.m4: Don't include it.
8 2019-07-19 Alan Hayward <alan.hayward@arm.com>
10 * configure.srv: Remove Arm xml files.
12 2019-07-19 Alan Hayward <alan.hayward@arm.com>
14 * configure.srv: Add new files. Remove xml generated files.
15 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
17 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
18 * linux-aarch32-tdesc.c: New file.
19 * linux-aarch32-tdesc.h: New file.
20 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
21 * linux-arm-low.c (init_registers_arm, tdesc_arm)
22 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
23 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
24 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
25 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
26 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
27 (arm_read_description): Call arm_linux_read_description.
28 (initialize_low_arch): Don't init registers.
29 * linux-arm-tdesc.c: New file.
30 * linux-arm-tdesc.h: New file.
32 2019-07-10 Alan Hayward <alan.hayward@arm.com>
34 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
35 Move counter inside for.
36 (arm_read_description): Check ptrace earlier.
37 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
39 2019-07-09 Tom Tromey <tom@tromey.com>
42 * configure.ac: Change common to gdbsupport.
43 * acinclude.m4: Change common to gdbsupport.
44 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
45 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
47 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
48 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
49 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
50 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
51 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
52 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
53 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
54 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
55 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
58 2019-07-04 Alan Hayward <alan.hayward@arm.com>
60 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
62 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
64 2019-07-04 Alan Hayward <alan.hayward@arm.com>
66 * configure.srv: Remove legacy xml.
67 * linux-aarch64-low.c (initialize_low_arch): Remove
68 initialize_low_tdesc call.
69 * linux-aarch64-tdesc-selftest.c: Remove file.
70 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
71 * linux-x86-low.c (initialize_low_arch): Remove
72 initialize_low_tdesc call.
73 * linux-x86-tdesc-selftest.c: Remove file.
74 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
76 2019-06-20 Tom de Vries <tdevries@suse.de>
78 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
79 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
81 2019-06-19 Tom de Vries <tdevries@suse.de>
83 * debug.h (debug_write): Change return type to ssize_t.
84 * debug.c (debug_write): Same.
86 2019-06-14 Tom Tromey <tom@tromey.com>
88 * configure.ac: Use new path to gnulib.
90 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
93 2019-06-11 Tom Tromey <tom@tromey.com>
95 * Makefile.in (SFILES): Add alloc.c.
97 (IPA_OBJS): Add alloc-ipa.o.
98 (alloc-ipa.o): New target.
99 (%.o: ../%.c): New pattern rule.
101 2019-06-10 Tom Tromey <tromey@adacore.com>
103 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
104 end warning with a newline.
105 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
107 * thread-db.c (attach_thread): Don't end warning with a newline.
108 (thread_db_notice_clone): Likewise.
109 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
111 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
112 end warning with a newline.
114 2019-06-04 Pedro Alves <palves@redhat.com>
116 * server.c (captured_main): Use make_unique_xstrdup.
118 2019-06-02 Tom Tromey <tom@tromey.com>
120 * gdbreplay.c (fromhex): Remove.
121 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
123 2019-05-29 Tom Tromey <tromey@adacore.com>
125 * configure: Rebuild.
127 2019-05-06 Kevin Buettner <kevinb@redhat.com>
129 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
130 sign extension code on 32-bit builds.
132 2019-05-03 Eli Zaretskii <eliz@gnu.org>
135 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
137 2019-04-19 Tom Tromey <tom@tromey.com>
139 * server.c (struct vstop_notif): Derive from notif_event.
141 (queue_stop_reply): Update.
142 (remove_all_on_match_ptid): Change type. Rewrite.
143 (discard_queued_stop_replies): Rewrite.
144 (in_queued_stop_replies_ptid): Change type.
145 (in_queued_stop_replies): Rewrite.
146 (notif_stop): Update.
147 (queue_stop_reply_callback): Update.
148 (captured_main): Don't call initialize_notif.
149 (push_stop_notification): Update.
150 * notif.c (notif_write_event, handle_notif_ack)
151 (notif_event_enque, notif_push): Update.
152 (notif_event_xfree, initialize_notif): Remove.
153 * notif.h (struct notif_event): Include <list>, not
155 (struct notif_server) <queue>: Now a std::list.
156 (notif_event_p): Remove typedef.
157 (initialize_notif): Don't declare.
158 (struct notif_event): Add virtual destructor.
160 2019-04-17 Alan Hayward <alan.hayward@arm.com>
162 * ax.c (ax_vdebug): Call debug_printf.
163 * debug.c (debug_write): New function.
164 * debug.h (debug_write): New declaration.
165 * linux-low.c (sigchld_handler): Call debug_write.
167 2019-04-17 Alan Hayward <alan.hayward@arm.com>
169 * debug.c (debug_set_output): New function.
170 (debug_vprintf): Send output to debug_file.
171 (debug_flush): Likewise.
172 * debug.h (debug_set_output): New declaration.
173 * server.c (handle_monitor_command): Add debug-file option.
174 (captured_main): Likewise.
176 2019-04-17 Alan Hayward <alan.hayward@arm.com>
178 * debug.c (remote_debug): Add definition.
179 * debug.h (remote_debug): Add declaration.
180 * hostio.c (remote_debug): Remove declaration.
181 * remote-utils.c (struct ui_file): Likewise.
182 (remote_debug): Likewise.
183 * remote-utils.h (remote_debug): Likewise,
184 * server.c (remote_debug): Remove definition.
186 2019-04-10 Kevin Buettner <kevinb@redhat.com>
188 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
189 when using a 64-bit gdbserver.
191 2019-04-09 Tom Tromey <tromey@adacore.com>
193 * linux-low.c (select_event_lwp): Use find_thread_in_random.
195 2019-04-08 Tom Tromey <tom@tromey.com>
197 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
199 (linux_resume_one_lwp): Likewise.
201 2019-04-08 Tom Tromey <tom@tromey.com>
203 * gdbreplay.c: Update.
204 * linux-low.c: Update.
207 2019-04-08 Tom Tromey <tom@tromey.com>
209 * server.c: Use C++ exception handling.
210 * linux-low.c: Use C++ exception handling.
211 * gdbreplay.c: Use C++ exception handling.
213 2019-04-08 Tom Tromey <tom@tromey.com>
215 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
216 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
217 (captured_main, main): Update.
218 * gdbreplay.c (main): Update.
220 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
222 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
223 value in argument pointer, return 1 if the entry is found and 0
224 otherwise. Move comment.
225 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
226 * linux-low.h (linux_get_auxv): Declare.
227 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
229 2019-04-05 Tom Tromey <tromey@adacore.com>
231 * server.c (gdbserver_usage): Use upper-case for metasyntactic
234 2019-03-28 Alan Hayward <alan.hayward@arm.com>
236 * linux-low.c (AT_HWCAP2): Add define if not already included.
238 2019-03-26 Alan Hayward <alan.hayward@arm.com>
240 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
241 (aarch64_arch_setup): Call linux_get_hwcap.
242 * linux-arm-low.c (arm_get_hwcap): Remove function.
243 (arm_read_description): Call linux_get_hwcap.
244 * linux-low.c (linux_get_auxv): New function.
245 (linux_get_hwcap): Likewise.
246 (linux_get_hwcap2): Likewise.
247 * linux-low.h (linux_get_hwcap): New declaration.
248 (linux_get_hwcap2): Likewise.
249 * linux-ppc-low.c (ppc_get_auxv): Remove function.
250 (ppc_arch_setup): Call linux_get_hwcap.
251 * linux-s390-low.c (s390_get_hwcap): Remove function.
252 (s390_arch_setup): Call linux_get_hwcap.
254 2019-03-22 Alan Hayward <alan.hayward@arm.com>
255 Jiong Wang <jiong.wang@arm.com>
257 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
258 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
260 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
262 2019-03-22 Alan Hayward <alan.hayward@arm.com>
263 Jiong Wang <jiong.wang@arm.com>
265 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
266 (aarch64_get_hwcap): New function.
267 (aarch64_arch_setup): Read APIA hwcap.
269 2019-03-22 Alan Hayward <alan.hayward@arm.com>
270 Jiong Wang <jiong.wang@arm.com>
272 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
273 (initialize_low_tracepoint): Likewise.
274 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
275 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
276 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
277 (aarch64_linux_read_description): Likewise.
278 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
280 2019-03-12 John Baldwin <jhb@FreeBSD.org>
282 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
283 i386_create_target_description for 'segments' parameter.
284 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
285 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
286 * win32-i386-low.c (i386_arch_setup): Likewise.
288 2019-03-12 Tom Tromey <tromey@adacore.com>
290 * linux-low.c (iterate_over_lwps): Update.
292 2019-03-06 Tom Tromey <tom@tromey.com>
294 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
295 (captured_main): Use SCOPE_EXIT.
297 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
299 * configure.srv: Use '$enable_unittest' instead of '$development'
300 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
303 2019-02-27 Tom Tromey <tromey@adacore.com>
305 * gdbreplay.c (logchar): Handle \r\n.
307 2019-02-07 Alan Hayward <alan.hayward@arm.com>
309 * linux-low.c (linux_attach): Add process before lwp.
310 * server.c (attach_inferior): Check if already attached.
312 2019-02-07 Tom Tromey <tom@tromey.com>
314 * x86-tdesc.h: Rename include guard.
315 * x86-low.h: Add include guard.
316 * wincecompat.h: Rename include guard.
317 * win32-low.h: Add include guard.
318 * utils.h: Rename include guard.
319 * tracepoint.h: Rename include guard.
320 * tdesc.h: Rename include guard.
321 * target.h: Rename include guard.
322 * server.h: Rename include guard.
323 * remote-utils.h: Rename include guard.
324 * regcache.h: Rename include guard.
325 * nto-low.h: Rename include guard.
326 * notif.h: Add include guard.
327 * mem-break.h: Rename include guard.
328 * lynx-low.h: Add include guard.
329 * linux-x86-tdesc.h: Add include guard.
330 * linux-s390-tdesc.h: Add include guard.
331 * linux-ppc-tdesc-init.h: Add include guard.
332 * linux-low.h: Add include guard.
333 * linux-aarch64-tdesc.h: Add include guard.
334 * linux-aarch32-low.h: Add include guard.
335 * inferiors.h: Rename include guard.
336 * i387-fp.h: Rename include guard.
337 * hostio.h: Rename include guard.
338 * gdbthread.h: Rename include guard.
339 * gdb_proc_service.h: Rename include guard.
340 * event-loop.h: Rename include guard.
341 * dll.h: Rename include guard.
342 * debug.h: Rename include guard.
343 * ax.h: Rename include guard.
345 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
348 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
349 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
351 2019-01-25 Tom Tromey <tom@tromey.com>
353 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
355 2019-01-25 Tom Tromey <tom@tromey.com>
357 * win32-low.c: Fix common/ includes.
358 * win32-i386-low.c: Fix common/ includes.
359 * tracepoint.c: Fix common/ includes.
360 * thread-db.c: Fix common/ includes.
361 * target.h: Fix common/ includes.
362 * symbol.c: Fix common/ includes.
363 * spu-low.c: Fix common/ includes.
364 * server.h: Fix common/ includes.
365 * server.c: Fix common/ includes.
366 * remote-utils.c: Fix common/ includes.
367 * regcache.h: Fix common/ includes.
368 * regcache.c: Fix common/ includes.
369 * nto-x86-low.c: Fix common/ includes.
370 * notif.h: Fix common/ includes.
371 * mem-break.h: Fix common/ includes.
372 * lynx-low.c: Fix common/ includes.
373 * lynx-i386-low.c: Fix common/ includes.
374 * linux-x86-tdesc-selftest.c: Fix common/ includes.
375 * linux-x86-low.c: Fix common/ includes.
376 * linux-low.c: Fix common/ includes.
377 * inferiors.h: Fix common/ includes.
378 * i387-fp.c: Fix common/ includes.
379 * hostio.c: Fix common/ includes.
380 * hostio-errno.c: Fix common/ includes.
381 * gdbthread.h: Fix common/ includes.
382 * gdbreplay.c: Fix common/ includes.
383 * fork-child.c: Fix common/ includes.
384 * event-loop.c: Fix common/ includes.
386 (enum gdb_agent_op): Fix common/ includes.
388 2019-01-21 Tom Tromey <tom@tromey.com>
390 * tracepoint.c: Fix includes.
391 * remote-utils.c: Fix includes.
392 * linux-x86-low.c: Fix includes.
394 2019-01-01 Joel Brobecker <brobecker@adacore.com>
396 * gdbreplay.c (gdbreplay_version): Update copyright year in
398 * server.c (gdbserver_version): Likewise.
400 2018-12-05 Alan Hayward <alan.hayward@arm.com>
402 * linux-low.c (add_lwp): Switch ordering.
404 2018-11-29 Tom Tromey <tom@tromey.com>
406 * win32-low.c (win32_join): Take pid, not process.
407 * target.h (struct target_ops) <join>: Change argument type.
408 (join_inferior): Change argument name.
409 * spu-low.c (spu_join): Take pid, not process.
410 * server.c (handle_detach): Preserve pid before destroying
412 * lynx-low.c (lynx_join): Take pid, not process.
413 * linux-low.c (linux_join): Take pid, not process.
415 2018-11-23 Alan Hayward <alan.hayward@arm.com>
417 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
418 (aarch64_cannot_fetch_register): Likewise.
419 (struct linux_target_ops): Update references.
421 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
423 * linux-ppc-low.c: Include nat/linux-ptrace.h.
425 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
427 * configure.srv (ipa_ppc_linux_regobj): Add
428 powerpc-isa207-htm-vsx32l-ipa.o and
429 powerpc-isa207-htm-vsx64l-ipa.o.
430 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
431 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
432 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
433 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
434 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
435 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
436 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
437 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
438 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
439 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
440 (init_registers_powerpc_isa207_htm_vsx32l)
441 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
442 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
443 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
444 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
445 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
446 (ppc_store_tm_ctarregset): New functions.
447 (ppc_regsets): Add entries for HTM regsets.
448 (ppc_arch_setup): Set htm in features struct when needed. Set
449 sizes for the HTM regsets.
450 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
451 (initialize_low_arch): Call
452 init_registers_powerpc_isa207_htm_vsx32l and
453 init_registers_powerpc_isa207_htm_vsx64l.
454 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
455 PPC_TDESC_ISA207_HTM_VSX.
456 (initialize_low_tracepoint): Call
457 init_registers_powerpc_isa207_htm_vsx32l and
458 init_registers_powerpc_isa207_htm_vsx64l.
460 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
462 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
463 rs6000/power-linux-pmu.xml to srv_xmlfiles.
464 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
465 (ppc_store_pmuregset): New functions.
466 (ppc_regsets): Add entries for ebb and pmu regsets.
467 (ppc_arch_setup): Set isa207 in features struct if the ebb and
468 pmu regsets are available. Set sizes for these regsets.
470 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
472 * configure.srv (ipa_ppc_linux_regobj): Add
473 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
474 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
475 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
476 rs6000/powerpc-isa207-vsx32l.xml, and
477 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
478 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
479 <PPC_TDESC_ISA207_VSX>: New enum value.
480 (init_registers_powerpc_isa207_vsx32l): Declare.
481 (init_registers_powerpc_isa207_vsx64l): Declare.
482 * linux-ppc-low.c (ppc_fill_tarregset): New function.
483 (ppc_store_tarregset): New function.
484 (ppc_regsets): Add entry for the TAR regset.
485 (ppc_arch_setup): Set isa207 in features struct when needed. Set
486 size for the TAR regsets.
487 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
488 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
489 and init_registers_powerpc_isa207_vsx64l.
490 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
491 (initialize_low_tracepoint): Call
492 init_registers_powerpc_isa207_vsx32l and
493 init_registers_powerpc_isa207_vsx64l.
495 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
496 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
498 * configure.srv (ipa_ppc_linux_regobj): Add
499 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
500 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
501 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
502 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
503 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
504 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
505 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
506 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
507 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
508 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
509 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
510 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
511 (ppc_hwcap): Add comment.
512 (ppc_hwcap2): New global.
513 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
514 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
515 (ppc_regsets): Add entries for the DSCR and PPR regsets.
516 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
517 when needed. Set sizes for the the DSCR and PPR regsets.
518 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
519 (initialize_low_arch): Call
520 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
521 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
522 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
523 PPC_TDESC_ISA205_PPR_DSCR_VSX.
524 (initialize_low_tracepoint): Call
525 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
526 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
528 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
530 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
532 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
533 Simon Marchi <simark@simark.ca>
535 * acinclude.m4: Include "../selftest.m4".
536 * configure: Regenerate.
537 * configure.ac: Use "GDB_AC_SELFTEST".
538 * configure.srv: Use "$enable_unittests" instead of
539 "$development" when checking whether unit tests have been
541 * server.c (captured_main): Update message informing that
542 selftests have been disabled.
544 2018-10-04 Tom Tromey <tom@tromey.com>
546 * configure: Rebuild.
548 2018-10-04 Tom Tromey <tom@tromey.com>
550 * server.c (handle_status): Rename inner "thread".
551 (process_serial_event): Declare "res" in 'm' case.
552 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
553 (iterate_over_lwps): Rename inner "thread".
554 (linux_qxfer_libraries_svr4): Rename inner "len".
555 * gdbthread.h (find_thread_in_random): Rename inner "thread".
557 2018-10-01 Gary Benson <gbenson@redhat.com>
559 * gdb_proc_service.h: Moved common code to
560 common/gdb_proc_service.h.
562 2018-10-01 Gary Benson <gbenson@redhat.com>
564 * gdb_proc_service.h: Synchronize comments and whitespace with
565 GDB's version of this file.
567 2018-09-25 Tom Tromey <tom@tromey.com>
569 * configure: Rebuild.
570 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
572 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
574 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
575 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
576 ($(IPA_LIB)): Sort IPA_OBJS.
578 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
580 * Makefile.in: Remove references to $(ADD_DEPS).
582 2018-09-16 Tom Tromey <tom@tromey.com>
584 * remote-utils.c (remote_open): Use GNU style for metasyntactic
586 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
589 2018-09-05 Tom Tromey <tom@tromey.com>
591 * configure: Rebuild.
593 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
596 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
598 2018-08-27 Tom Tromey <tom@tromey.com>
601 * configure: Rebuild.
603 2018-08-27 Tom Tromey <tom@tromey.com>
605 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
606 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
607 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
608 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
609 (s390x_emit_stack_adjust): Add casts to unsigned char.
611 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
615 * server.h (struct client_state) <disable_randomization>:
618 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
620 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
622 (mips_supply_ptrace_register): Likewise.
624 2018-07-22 Tom Tromey <tom@tromey.com>
626 * configure: Rebuild.
628 2018-07-22 Tom Tromey <tom@tromey.com>
630 * win32-low.c (win32_create_inferior): Remove unused variables.
631 * gdbreplay.c (remote_open): Remove unused variable.
632 * remote-utils.c (remote_prepare): Remove unused variable.
633 * x86-tdesc.h (X86_TDESC_H): Define.
634 (amd64_expedite_regs): Define conditionally.
635 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
636 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
637 * remote-utils.c (readchar): Remove unused variable.
639 2018-07-13 Pedro Alves <palves@redhat.com>
641 * linux-low.c (linux_kill): Change parameter to process_info
642 pointer instead of pid. Adjust.
643 * lynx-low.c (lynx_kill): Likewise.
644 * nto-low.c (nto_kill): Likewise.
645 * spu-low.c (spu_kill): Likewise.
646 * win32-low.c (win32_kill): Likewise.
647 * server.c (handle_v_kill, kill_inferior_callback)
648 (detach_or_kill_for_exit): Adjust.
649 * target.c (kill_inferior): Change parameter to process_info
650 pointer instead of pid. Adjust.
651 * target.h (struct target_ops) <kill>: Change parameter to
652 process_info pointer instead of pid. Adjust all implementations
654 (kill_inferior): Likewise.
656 2018-07-13 Pedro Alves <palves@redhat.com>
658 * linux-low.c (linux_detach, linux_join): Change parameter to
659 process_info pointer instead of pid. Adjust.
660 * lynx-low.c (lynx_detach, lynx_join): Likewise.
661 * nto-low.c (nto_detach): Likewise.
662 * spu-low.c (spu_detach, spu_join): Likewise.
663 * win32-low.c (win32_detach, win32_join): Likewise.
664 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
665 * target.h (struct target_ops) <detach, join>: Change parameter to
666 process_info pointer instead of pid. Adjust all implementations
668 (detach_inferior, join_inferior): Rename 'pid' parameter to
671 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
672 Jan Kratochvil <jan.kratochvil@redhat.com>
673 Paul Fertser <fercerpav@gmail.com>
674 Tsutomu Seki <sekiriki@gmail.com>
676 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
677 (OBS): Add 'common/netstuff.o'.
678 (GDBREPLAY_OBS): Likewise.
679 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
680 (remote_open): Implement support for IPv6
682 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
684 (handle_accept_event): Accept connections from IPv6 sources.
685 (remote_prepare): Handle IPv6-style hostnames; implement
686 support for IPv6 connections.
687 (remote_open): Implement support for printing connections from
690 2018-07-11 Pedro Alves <palves@redhat.com>
693 * mem-break.c (any_persistent_commands): Add process_info
694 parameter and use it instead of relying on the current process.
695 Change return type to bool.
696 * mem-break.h (any_persistent_commands): Add process_info
697 parameter and change return type to bool.
698 * server.c (handle_detach): Remove require_running_or_return call.
699 Look up the process_info for the process we're about to detach.
700 If not found, return back error to GDB. Adjust
701 any_persistent_commands call to pass down a process pointer.
703 2018-07-11 Pedro Alves <palves@redhat.com>
705 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
706 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
707 instead of collect_register_by_name.
708 * regcache.c (regcache_raw_get_unsigned_by_name): New.
709 * regcache.h (regcache_raw_get_unsigned_by_name): New.
711 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
712 Pedro Alves <palves@redhat.com>
714 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
716 2018-07-03 Tom Tromey <tom@tromey.com>
718 * linux-low.c: Update.
719 * lynx-low.c: Update.
720 * mem-break.c: Update.
722 * remote-utils.c: Update.
726 * win32-low.c: Update.
728 2018-07-03 Tom Tromey <tom@tromey.com>
732 2018-07-03 Tom Tromey <tom@tromey.com>
734 * linux-low.c: Update.
736 2018-07-03 Tom Tromey <tom@tromey.com>
740 2018-07-03 Tom Tromey <tom@tromey.com>
742 * linux-low.c: Update.
743 * linux-mips-low.c: Update.
744 * lynx-low.c: Update.
746 * remote-utils.c: Update.
750 * thread-db.c: Update.
752 2018-07-03 Tom Tromey <tom@tromey.com>
754 * linux-low.c: Update.
755 * linux-mips-low.c: Update.
756 * lynx-low.c: Update.
757 * mem-break.c: Update.
759 * remote-utils.c: Update.
763 * tracepoint.c: Update.
765 2018-07-03 Tom Tromey <tom@tromey.com>
767 * linux-low.c: Update.
768 * linux-ppc-low.c: Update.
769 * linux-x86-low.c: Update.
770 * proc-service.c: Update.
773 * thread-db.c: Update.
774 * win32-low.c: Update.
776 2018-07-03 Tom Tromey <tom@tromey.com>
778 * linux-low.c: Update.
779 * lynx-low.c: Update.
781 * remote-utils.c: Update.
783 * thread-db.c: Update.
784 * win32-low.c: Update.
786 2018-06-29 Joel Brobecker <brobecker@adacore.com>
788 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
789 parameter in call to 'amd64_create_target_description'.
791 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
793 * x86-tdesc.h: Remove executable permission flag.
795 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
797 * configure.ac: Remove AC_PREREQ, add missing quoting.
798 * configure: Re-generate.
799 * config.in: Re-generate.
800 * aclocal.m4: Re-generate.
802 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
804 * tracepoint.h (current_traceframe): Remove declaration.
806 2018-06-18 Alan Hayward <alan.hayward@arm.com>
808 * linux-aarch64-low.c (is_sve_tdesc): New function.
809 (aarch64_sve_regs_copy_to_regcache): Likewise.
810 (aarch64_sve_regs_copy_from_regcache): Likewise.
811 (aarch64_regs_info): Add SVE checks.
812 (initialize_low_arch): Initialize SVE.
814 2018-06-18 Alan Hayward <alan.hayward@arm.com>
816 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
818 2018-06-11 Alan Hayward <alan.hayward@arm.com>
820 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
821 (initialize_low_tracepoint): Likewise
822 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
823 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
825 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
827 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
829 2018-06-11 Alan Hayward <alan.hayward@arm.com>
831 * server.h (PBUFSIZ): Increase size
833 2018-06-11 Alan Hayward <alan.hayward@arm.com>
835 * regcache.c (regcache::raw_compare): New function.
836 * regcache.h (regcache::raw_compare): New declaration.
838 2018-06-11 Alan Hayward <alan.hayward@arm.com>
840 * regcache.c (new_register_cache): Use new.
841 (free_register_cache): Use delete.
842 (register_data): Use const.
843 (supply_register): Move body inside regcache.
844 (regcache::raw_supply): New override function.
845 (collect_register): Move body inside regcache.
846 (regcache::raw_collect): New override function.
847 (regcache::get_register_status): New override function.
848 * regcache.h (struct regcache): Inherit from reg_buffer_common.
850 2018-06-09 Tom Tromey <tom@tromey.com>
852 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
854 (event_queue): Use std::queue.
855 (gdb_event_xfree): Remove.
856 (initialize_event_loop, process_event, wait_for_event): Update.
858 2018-06-08 Stan Cox <scox@redhat.com>
860 * win32-low.c (win32_create_inferior): last_ptid and last_status
861 moved to client_state.
863 2018-06-08 Pedro Alves <palves@redhat.com>
865 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
866 common/common-exceptions.o, common/common-utils.o,
867 common/errors.o, common/print-utils.o and utils.o.
868 * gdbreplay.c: Include "common-defs.h" instead of the two
869 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
870 string.h or alloca.h.
871 (perror_with_name): Delete.
872 (remote_open): Use xstrdup instead of strdup.
873 (main): Rename to ...
874 (captured_main): ... this.
877 2018-06-08 Tom Tromey <tom@tromey.com>
879 * linux-low.c (linux_low_read_btrace): Update.
881 2018-06-04 Stan Cox <scox@redhat.com>
883 * server.h (struct client_state): New.
884 * server.c (cont_thread, general_thread, multi_process)
885 (report_fork_events, report_vfork_events, report_exec_events)
886 (report_thread_events, swbreak_feature, hwbreak_feature)
887 (vCont_supported, disable_randomization, pass_signals)
888 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
889 Moved to client_state.
890 * remote-utils.c (remote_debug, noack_mode)
891 (transport_is_reliable): Moved to client_state.
892 * tracepoint.c (current_traceframe): Moved to client_state.
895 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
896 linux-low.c, remote-utils.h, target.c: Use client_state.
898 2018-05-31 Alan Hayward <alan.hayward@arm.com>
900 * configure.srv: Add new c/h file.
902 2018-05-31 Alan Hayward <alan.hayward@arm.com>
904 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
907 2018-05-25 Maciej W. Rozycki <macro@mips.com>
909 * gdb.arch/mips-fpregset-core.exp: New test.
910 * gdb.arch/mips-fpregset-core.c: New test source.
912 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
915 * hostio.c (require_int): Do not report overflow for integers
916 between 0xfffffff and 0x7fffffff.
918 2018-05-22 Maciej W. Rozycki <macro@mips.com>
920 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
921 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
922 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
924 (the_low_target): Wire them.
926 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
928 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
929 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
930 mode. Call collect_register_by_name with vscr using
931 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
932 (ppc_store_vrregset): Add and set vscr_offset variable as in
933 ppc_fill_vrregset. Call supply_register_by_name with vscr using
936 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
938 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
939 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
940 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
942 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
944 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
945 (ppc_store_vsxregset): Likewise.
946 (ppc_fill_vrregset): Likewise.
947 (ppc_store_vrregset): Likewise.
948 (ppc_fill_evrregset): Likewise.
949 (ppc_store_evrregset): Likewise.
950 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
951 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
954 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
956 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
957 wordsize of the inferior. Call ppc_linux_target_wordsize.
959 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
961 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
962 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
963 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
964 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
965 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
966 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
967 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
968 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
969 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
970 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
971 (tdesc_powerpc_e500l): Remove.
972 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
973 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
974 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
975 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
977 (ppc_arch_setup): Remove target description matching code. Fill a
978 ppc_linux_features struct and call ppc_linux_match_description
981 2018-05-22 Maciej W. Rozycki <macro@mips.com>
983 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
984 width of the requested register exceeds the width of the
986 (mips_cannot_store_register): Likewise.
988 2018-05-21 Maciej W. Rozycki <macro@mips.com>
990 * linux-mips-low.c (mips_fetch_register): New function. Update
992 (mips_store_gregset): Supply 0 rather than $restart for $zero.
993 (the_low_target): Wire `mips_fetch_register'.
995 2018-05-10 Joel Brobecker <brobecker@adacore.com>
997 * lynx-i386-low.c (LYNXOS_178): New macro.
998 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
999 the layout on LynxOS-178.
1000 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1001 handle floating point registers that are not supported by
1004 2018-05-10 Tom Tromey <tom@tromey.com>
1006 * configure: Rebuild.
1008 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1011 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1012 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1013 Use it to set the expedite_regs field in the given tdesc.
1014 * x86-tdesc.h: New file.
1015 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1016 Adjust following the addition of the new expedite_regs parameter
1017 to init_target_desc.
1018 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1019 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1020 (i386_linux_read_description, amd64_linux_read_description):
1021 Adjust following the addition of the new expedite_regs parameter
1022 to init_target_desc.
1023 * lynx-i386-low.c: #include "x86-tdesc.h".
1024 (lynx_i386_arch_setup): Adjust following the addition of the new
1025 expedite_regs parameter to init_target_desc.
1026 * nto-x86-low.c: #include "x86-tdesc.h".
1027 (nto_x86_arch_setup): Adjust following the addition of the new
1028 expedite_regs parameter to init_target_desc.
1029 * win32-i386-low.c: #include "x86-tdesc.h".
1030 (i386_arch_setup): Adjust following the addition of the new
1031 expedite_regs parameter to init_target_desc.
1033 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1036 * win32-low.c (win32_create_inferior): Add call to my_wait
1037 setting last_status global.
1039 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1042 * win32-low.c (create_process): Only call gdb_tilde_expand if
1043 inferior_cwd is not NULL.
1045 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1047 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1048 registers to the cache if their values have changed.
1049 (i387_xsave_to_cache): Provide default values for x87 control
1050 registers when these features are available, but disabled.
1051 * regcache.c (supply_register_by_name_zeroed): New function.
1052 * regcache.h (supply_register_by_name_zeroed): Declare new
1055 2018-05-07 Tom Tromey <tom@tromey.com>
1057 * configure: Rebuild.
1059 2018-05-04 Tom Tromey <tom@tromey.com>
1061 * configure: Rebuild.
1063 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1064 Pedro Alves <palves@redhat.com>
1066 * linux-aarch64-low.c (aarch64_stopped_data_address):
1069 2018-04-27 Tom Tromey <tom@tromey.com>
1071 * configure: Rebuild.
1073 2018-04-23 Tom Tromey <tom@tromey.com>
1075 * configure: Rebuild.
1077 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1079 * Makefile.in (depcomp): Add "..".
1080 (all_deps_files): New and use it.
1082 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1084 * configure.srv (aarch64*-*-linux*): Don't include xml.
1085 (i[34567]86-*-cygwin*): Likewise.
1086 (i[34567]86-*-linux*): Likewise.
1087 (i[34567]86-*-lynxos*): Likewise.
1088 (i[34567]86-*-mingw32ce*): Likewise.
1089 (i[34567]86-*-mingw*): Likewise.
1090 (i[34567]86-*-nto*): Likewise.
1091 (tic6x-*-uclinux): Likewise.
1092 (x86_64-*-linux*): Likewise.
1093 (x86_64-*-mingw*): Likewise.
1094 (x86_64-*-cygwin*): Likewise.
1096 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1098 * tdesc.c: Remove xml parameter.
1100 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1102 * server.c (get_features_xml): Remove cast.
1103 * tdesc.c (void target_desc::accept): Fill in function.
1104 (tdesc_get_features_xml): Remove old xml creation.
1105 (print_xml_feature::visit_pre): Add xml vistor.
1106 * tdesc.h (struct target_desc): Make xmltarget mutable.
1107 (tdesc_get_features_xml): Remove declaration.
1109 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1111 * tdesc.c (tdesc_architecture_name): Add new function.
1112 (tdesc_osabi_name): Likewise.
1113 (tdesc_get_features_xml): Use new functions.
1115 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1117 * tdesc.c (tdesc_create_flags): Remove.
1118 (tdesc_add_flag): Likewise.
1119 (tdesc_named_type): Likewise.
1120 (tdesc_create_union): Likewise.
1121 (tdesc_create_struct): Likewise.
1122 (tdesc_create_vector): Likewise.
1123 (tdesc_add_bitfield): Likewise.
1124 (tdesc_add_field): Likewise.
1125 (tdesc_set_struct_size): Likewise.
1127 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1129 * tdesc.c (~target_desc): Remove implictly deleted items.
1130 (init_target_desc): Iterate all features.
1131 (tdesc_get_features_xml): Use vector.
1132 (tdesc_create_feature): Create feature.
1133 * tdesc.h (tdesc_feature) Remove
1134 (target_desc): Add features.
1136 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1138 * Makefile.in: Add common/tdesc.c
1139 * tdesc.c (init_target_desc): init all reg_defs from register
1141 (tdesc_create_reg): Create tdesc_reg.
1142 * tdesc.h (tdesc_feature): Add register vector.
1144 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1146 * tdesc.h (struct target_desc) <features>: Change type to
1147 std::vector<std::string>.
1148 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1150 (tdesc_get_features_xml): Likewise.
1151 (tdesc_create_feature): Likewise.
1153 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1155 * regcache.c (find_register_by_number): Return a ref.
1156 (find_regno): Use references.
1157 (register_size): Likewise.
1158 (register_data): Likewise.
1159 * tdesc.c (target_desc::~target_desc): Remove free calls.
1160 (target_desc::operator==): Use std::vector compare.
1161 (init_target_desc): Use reference.
1162 (tdesc_create_reg): Use reg constructors.
1163 * tdesc.h (struct target_desc): Replace pointer with object.
1165 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1167 * regcache.c (find_register_by_number): Make static.
1168 (find_regno): Use find_register_by_number
1169 * regcache.h (struct reg): Remove declaration.
1171 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1173 * tdesc.c (target_desc::~target_desc): Move to here.
1174 (target_desc::operator==): Likewise.
1175 * tdesc.h (target_desc::~target_desc): Move from here.
1176 (target_desc::operator==): Likewise.
1178 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1180 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1182 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1184 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1186 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1187 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1188 and init_registers_s390_gs_linux64.
1190 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1192 * linux-s390-low.c (s390_fill_gs): Remove function.
1193 (s390_fill_gsbc): Remove function.
1194 (s390_regsets): Set fill functions for the guarded storage regsets
1197 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1199 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1200 the word size. Add comment.
1201 (s390_get_wordsize): New function.
1202 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1203 pswm with it. Instead, use s390_get_wordsize to determine the
1204 word size first and derive the correct tdesc from that directly.
1206 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1208 * Makefile.in: Include silent-rules.mk.
1209 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1210 (COMPILE): Add ECHO_CXX.
1211 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1212 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1213 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1214 (version-generated.c): Add ECHO_GEN.
1215 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1216 (IPAGENT_COMPILE): Add ECHO_CXX.
1217 (%-generated.c): Add ECHO_REGDAT.
1219 2018-03-14 Tom Tromey <tom@tromey.com>
1222 * ax.c (ax_printf): Special case for NULL.
1224 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1226 * linux-low.c (linux_qxfer_libraries_svr4): Use
1227 xml_escape_text_append.
1229 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1231 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1233 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1235 * server.c (handle_general_set): Remove unnecessary xstrdup.
1237 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1239 * server.c (parse_debug_format_options): Adjust to
1240 delim_string_to_char_ptr_vec changes.
1241 * thread-db.c (thread_db_load_search): Adjust to
1242 dirnames_to_char_ptr_vec changes.
1244 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1246 * target.h (target_enable_btrace, target_disable_btrace)
1247 (target_read_btrace, target_read_btrace_conf): Turn macro into
1248 inline function. Throw error if target method is not defined.
1249 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1250 check for btrace target method. Be prepared to handle exceptions
1251 from btrace target methods.
1253 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1255 * server.c (captured_main): Change order of error message printed
1256 when the current working directory cannot be found.
1258 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1260 * server.c: Include "filenames.h" and "pathstuff.h".
1261 (program_name): Delete variable.
1262 (program_path): New anonymous class.
1263 (get_exec_wrapper): Use "program_path" instead of
1265 (handle_v_run): Likewise.
1266 (captured_main): Likewise.
1267 (process_serial_event): Likewise.
1269 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1271 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1272 (OBJS): Add "pathstuff.o".
1273 * server.c (current_directory): New global variable.
1274 (captured_main): Initialize "current_directory".
1276 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1278 * tdesc.c: Use common/tdesc.h.
1279 * tdesc.h: Likewise.
1281 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1282 Simon Marchi <simon.marchi@ericsson.com>
1284 * Makefile.in: Switch order of make rules.
1286 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1288 * Makefile.in: Add common directory in build.
1289 * configure.ac: Add common reference.
1290 * configure: Regenerate.
1292 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1294 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1295 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1296 * spu-low.c (spu_target_ops): Likewise.
1297 * win32-low.c (win32_target_ops): Likewise.
1298 * server.c (supported_btrace_packets): Report packets unconditionally.
1299 * target.h (target_ops) <supports_btrace>: Remove.
1300 (target_supports_btrace): Remove.
1302 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1304 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1305 (handle_btrace_disable): Change return type to void. Use exceptions
1307 (handle_btrace_general_set): Catch exception and copy message to
1310 2018-02-08 Tom Tromey <tom@tromey.com>
1312 * linux-low.c (install_software_single_step_breakpoints): Use
1313 make_scoped_restore.
1314 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1315 (do_restore_current_thread_cleanup): Remove.
1316 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1319 2018-02-08 Tom Tromey <tom@tromey.com>
1321 * mem-break.c (set_raw_breakpoint_at): Use
1322 gdb::unique_xmalloc_ptr.
1324 2018-01-30 Pedro Alves <palves@redhat.com>
1327 * target.c (target_terminal::terminal_state): Rename to ...
1328 (target_terminal::m_terminal_state): ... this.
1330 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1332 * linux-low.c (handle_extended_wait): Surround call to
1333 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1335 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1337 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1338 linux_ptrace_attach_fail_reason_string now returning an
1340 (linux_attach): Likewise.
1341 * thread-db.c (attach_thread): Likewise.
1343 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1346 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1347 checking for fs_base/gs_base fields in struct user_regs_struct.
1348 * configure: Regenerate.
1350 2018-01-16 Yao Qi <yao.qi@linaro.org>
1353 * linux-low.c (fetch_register): Call supply_register instead of
1356 2018-01-08 Yao Qi <yao.qi@linaro.org>
1357 Simon Marchi <simon.marchi@ericsson.com>
1359 * Makefile.in (OBS): Remove selftest.o.
1360 * configure.ac: Set srv_selftest_objs if $development is true.
1361 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1362 * configure: Re-generated.
1363 * server.c (captured_main): Wrap variable selftest_filter with
1366 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1368 * server.c (parse_debug_format_options): Return std::string.
1369 (handle_monitor_command, captured_main): Adjust.
1371 2018-01-05 Pedro Alves <palves@redhat.com>
1374 * server.c (captured_main): Pass quiet=false to
1375 save_original_signals_state.
1377 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1379 * gdbreplay.c (gdbreplay_version): Update copyright year in
1381 * server.c (gdbserver_version): Likewise.
1383 2017-12-08 Tom Tromey <tom@tromey.com>
1385 * ax.c (ax_printf): Update.
1387 2017-12-07 Yao Qi <yao.qi@linaro.org>
1389 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1390 aarch64_linux_read_description.
1391 * linux-amd64-ipa.c (idx2mask): New array.
1392 (get_ipa_tdesc): Move idx2mask out.
1393 (initialize_low_tracepoint): Initialize target descriptions.
1394 * linux-i386-ipa.c (idx2mask): New array.
1395 (get_ipa_tdesc): Move idx2mask out.
1396 (initialize_low_tracepoint): Initialize target descriptions.
1398 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1400 * tdesc.c (struct tdesc_type): Change return type.
1401 (tdesc_add_flag): Change parameter type.
1402 (tdesc_add_bitfield): Likewise.
1403 (tdesc_add_field): Likewise.
1404 (tdesc_set_struct_size): Likewise.
1406 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1408 * regcache.c (registers_to_string): Remove unused variable.
1410 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1412 * inferiors.c (for_each_inferior_with_data): Remove.
1413 * inferiors.h (for_each_inferior_with_data): Remove.
1414 * server.c (handle_qxfer_threads_worker): Change parameter type.
1415 (handle_qxfer_threads_proper): Use for_each_thread.
1417 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1419 * inferiors.c (for_each_inferior): Remove.
1420 (clear_inferiors): Use for_each_thread.
1421 * inferiors.h (for_each_inferior): Remove.
1422 * linux-low.c (linux_wait_for_event_filtered): Use
1424 (linux_stabilize_threads): Likewise.
1425 * regcache.c (regcache_release): Likewise.
1426 * server.c (gdb_wants_all_threads_stopped): Likewise.
1427 (clear_pending_status_callback): Remove.
1428 (handle_status): Use for_each_thread.
1429 (captured_main): Likewise.
1430 * win32-low.c (child_init_thread_list): Likewise.
1431 (win32_clear_inferiors): Likewise.
1432 (fake_breakpoint_event): Likewise.
1434 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1436 * inferiors.h (find_inferior): Remove.
1437 * inferiors.c (find_inferior): Remove.
1439 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1441 * linux-low.c (resume_status_pending_p): Update comment.
1442 (need_step_over_p): Update comment.
1444 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1446 * linux-low.c (proceed_one_lwp): Return void, change parameter
1448 (unsuspend_and_proceed_one_lwp): Likewise.
1449 (proceed_all_lwps): Use for_each_thread.
1450 (unstop_all_lwps): Likewise.
1452 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1454 * linux-low.c (linux_resume_one_thread): Return void, take
1456 (linux_resume): Use for_each_thread.
1458 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1460 * linux-low.c (send_sigstop_callback): Return void, change
1461 parameter type. Rename to...
1462 (send_sigstop): ... this.
1463 (suspend_and_send_sigstop_callback): Return void, change parameter
1465 (suspend_and_send_sigstop): ... this.
1466 (stop_all_lwps): Use for_each_thread.
1468 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1470 * linux-low.c (lwp_running): Return bool, remove unused
1472 (linux_stabilize_threads): Use find_thread.
1474 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1476 * linux-low.c (select_singlestep_lwp_callback): Remove.
1477 (count_events_callback): Remove.
1478 (select_event_lwp_callback): Remove.
1479 (select_event_lwp): Use find_thread/for_each_thread.
1481 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1483 * linux-low.c (not_stopped_callback): Return bool, take filter
1485 (linux_wait_for_event_filtered): Use find_thread.
1486 (linux_wait_1): Likewise.
1488 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1490 * linux-low.c (same_lwp): Remove.
1491 (find_lwp_pid): Use find_thread.
1493 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1495 * linux-low.c (delete_lwp_callback): Remove.
1496 (linux_mourn): Use for_each_thread.
1498 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1500 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1501 args parameter, don't check for pid.
1502 (linux_detach): Use for_each_thread.
1504 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1506 * linux-low.c (struct counter): Remove.
1507 (second_thread_of_pid_p): Remove.
1508 (last_thread_of_process_p): Use find_thread.
1510 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1512 * inferiors.c (find_inferior_in_random): Remove.
1513 * inferiors.h (find_inferior_in_random): Remove.
1514 * linux-low.c (status_pending_p_callback): Return bool, accept
1515 parameter ptid directly.
1516 (linux_wait_for_event_filtered): Use find_thread_in_random.
1517 (linux_wait_1): Likewise.
1519 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1521 * inferiors.c (find_inferior_id): Remove.
1522 (find_thread_ptid): Move implemention from find_inferior_id to
1524 * inferiors.h (find_inferior_id): Remove.
1525 * server.c (handle_status): Use find_thread_ptid.
1526 (process_serial_event): Likewise.
1527 * thread-db.c (find_one_thread): Likewise.
1528 (thread_db_thread_handle): Likewise.
1529 * win32-low.c (thread_rec): Likewise.
1530 (child_delete_thread): Likewise.
1531 (win32_thread_alive): Likewise.
1532 (get_child_debug_event): Likewise.
1534 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1536 * linux-mips-low.c (update_watch_registers_callback): Return
1537 void, remove pid_p parameter, don't check for pid.
1538 (mips_insert_point, mips_remove_point): Use for_each_thread.
1540 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1542 * lynx.low (lynx_delete_thread_callback): Remove.
1543 (lynx_mourn): Use for_each_thread.
1545 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1547 * regcache.c (regcache_invalidate_one): Remove.
1548 (regcache_invalidate_pid): use for_each_thread.
1550 2017-11-26 Tom Tromey <tom@tromey.com>
1552 * linux-low.c (linux_create_inferior): Update.
1554 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1556 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1558 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1560 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1561 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1562 * linux-aarch64-tdesc-selftest.c: New file.
1563 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1565 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1567 * configure.srv: Add new file.
1568 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1569 * linux-aarch64-tdesc-selftest.c: New file.
1570 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1572 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1574 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1575 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1576 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1578 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1580 * configure.srv: Add new files.
1581 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1582 aarch64_linux_read_description.
1583 * linux-aarch64-low.c (aarch64_linux_read_description):
1584 Merge with aarch64_arch_setup.
1585 (aarch64_arch_setup): Call aarch64_linux_read_description.
1586 * linux-aarch64-tdesc.c: New file.
1587 * linux-aarch64-tdesc.h: New file.
1589 2017-11-24 Yao Qi <yao.qi@linaro.org>
1591 * configure.srv: Set $srv_regobj for tic6x-linux.
1592 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1593 (tic6x_read_description): Move some code to tic6x_arch_setup.
1594 (tic6x_tdesc_test): New function.
1595 (initialize_low_arch): Call selftests::register_test.
1597 2017-11-22 Yao Qi <yao.qi@linaro.org>
1599 * remote-utils.c (prepare_resume_reply): Use memcpy.
1601 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1603 * linux-low.c (kill_one_lwp_callback): Return void, take
1604 argument directly, don't filter on pid.
1605 (linux_kill): Use for_each_thread.
1607 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1609 * linux-low.c (need_step_over_p): Return bool, remove dummy
1611 (linux_resume, proceed_all_lwps): Use find_thread.
1613 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1615 * linux-low.c (resume_status_pending_p): Return bool, remove
1617 (linux_resume): Use find_thread.
1619 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1621 * linux-low.c (struct thread_resume_array): Remove.
1622 (linux_set_resume_request): Return void, take arguments
1624 (linux_resume): Use for_each_thread.
1626 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1628 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1629 return bool, remove data argument.
1630 (linux_stabilize_threads): Use find_thread.
1632 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1634 * linux-low.c (unsuspend_one_lwp): Remove.
1635 (unsuspend_all_lwps): Use for_each_thread, inline code from
1638 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1640 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1641 * linux-low.c (struct iterate_over_lwps_args): Remove.
1642 (iterate_over_lwps_filter): Remove.
1643 (iterate_over_lwps): Use find_thread.
1645 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1647 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1648 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1649 code from reset_lwp_ptrace_options_callback.
1651 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1653 * linux-arm-low.c (struct update_registers_data): Remove.
1654 (update_registers_callback): Return void, take arguments
1655 directly, don't check thread's pid.
1656 (arm_insert_point, arm_remove_point): Use for_each_thread.
1658 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1660 * win32-low.c (continue_one_thread): Return void, take argument
1662 (child_continue): Use for_each_thread.
1664 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1666 * win32-i386-low.c (update_debug_registers_callback): Rename
1668 (update_debug_registers): ... this, return void, remove pid_p arg.
1669 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1671 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1673 * inferiors.h (struct process_info): Add constructor, initialize
1675 <syscalls_to_catch>: Change type to std::vector<int>.
1676 * inferiors.c (add_process): Allocate process_info with new.
1677 (remove_process): Free process_info with delete.
1678 * linux-low.c (handle_extended_wait): Adjust.
1679 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1680 * server.c (handle_general_set): Adjust.
1682 2017-11-16 Pedro Alves <palves@redhat.com>
1684 * remote-utils.c (remote_close): Block SIGIO signals instead of
1685 uninstalling the SIGIO handler.
1687 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1689 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1691 2017-11-16 Yao Qi <yao.qi@linaro.org>
1693 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1694 (tic6x_store_gregset): Likewise.
1695 (tic6x_usrregs_info): Move it up.
1697 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1699 * Makefile.in: Update arch rules.
1700 * configure.srv: Explicitly mark arch/ files.
1702 2017-11-13 Andreas Schwab <schwab@suse.de>
1704 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1706 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1708 2017-11-06 Pedro Alves <palves@redhat.com>
1710 * config.in, configure: Regenerate.
1712 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1714 * target.c (struct thread_search): Remove.
1715 (thread_search_callback): Remove.
1716 (prepare_to_access_memory): Use for_each_thread instead of
1717 find_inferior. Inline code from thread_search_callback.
1719 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1721 * server.c (struct visit_actioned_threads_data): Remove.
1722 (visit_actioned_threads): Change prototype to take arguments
1724 (resume): Use find_thread instead of find_inferior.
1726 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1728 * server.c (queue_stop_reply_callback): Change prototype, return
1730 (find_status_pending_thread_callback): Remove.
1731 (handle_status): Replace find_inferior with find_thread and
1734 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1736 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1738 (aarch64_store_gregset): Likewise.
1739 (aarch64_fill_fpregset): Likewise.
1740 (aarch64_store_fpregset): Likewise.
1742 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1744 * gdbthread.h (find_thread, for_each_thread): New functions.
1745 * inferiors.c (thread_of_pid): Remove.
1746 (find_any_thread_of_pid): Use find_thread.
1747 * linux-low.c (num_lwps): Use for_each_thread.
1749 2017-10-17 Yao Qi <yao.qi@linaro.org>
1751 * Makefile.in: Remove one rule.
1752 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1754 2017-10-17 Yao Qi <yao.qi@linaro.org>
1756 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1757 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1759 2017-10-17 Yao Qi <yao.qi@linaro.org>
1761 * configure.srv: Rename arm.o with arch/arm.o.
1763 2017-10-17 Yao Qi <yao.qi@linaro.org>
1765 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1766 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1767 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1768 (arch-i386.o, arch-amd64.o): Remove rules.
1769 (arch/%.o): New rule.
1770 Update POSTCOMPILE and COMPILE.pre.
1771 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1772 * configure: Re-generated.
1773 * configure.srv: Replace arch-i386.o with arch/i386.o.
1774 Replace arch-amd64.o with arch/amd64.o.
1776 2017-10-16 Yao Qi <yao.qi@linaro.org>
1778 * configure: Regenerated.
1780 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1782 * inferiors.h: (struct inferior_list): Remove.
1783 (struct inferior_list_entry); Remove.
1784 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1785 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1786 get_first_inferior): Remove.
1787 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1788 find_inferior_id, find_inferior_in_random): Change signature.
1789 * inferiors.c (all_threads): Change type to
1790 std::list<thread_info *>.
1791 (get_thread): Remove macro.
1792 (find_inferior, find_inferior_id): Change signature, implement
1794 (find_inferior_in_random): Change signature, implement using
1795 find_thread_in_random.
1796 (for_each_inferior, for_each_inferior_with_data): Change
1797 signature, implement using for_each_thread.
1798 (add_inferior_to_list, remove_inferior): Remove.
1799 (add_thread, get_first_thread, thread_of_pid,
1800 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1801 (get_first_inferior, one_inferior_p, clear_inferior_list):
1803 (clear_inferiors, get_thread_process): Update.
1804 * gdbthread.h: Include <list>.
1805 (struct thread_info) <entry>: Remove field.
1807 (all_threads): Change type to std::list<thread_info *>.
1808 (get_first_inferior): Add doc.
1809 (find_thread, for_each_thread, find_thread_in_random): New
1811 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1812 * linux-arm-low.c (update_registers_callback): Update.
1813 * linux-low.c (second_thread_of_pid_p): Update.
1814 (kill_one_lwp_callback, linux_detach_lwp_callback,
1815 delete_lwp_callback, status_pending_p_callback, same_lwp,
1816 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1817 iterate_over_lwps, not_stopped_callback,
1818 resume_stopped_resumed_lwps, count_events_callback,
1819 select_singlestep_lwp_callback, select_event_lwp_callback,
1820 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1821 suspend_and_send_sigstop_callback, wait_for_sigstop,
1822 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1823 lwp_running, linux_set_resume_request, resume_status_pending_p,
1824 need_step_over_p, start_step_over, linux_resume_one_thread,
1825 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1826 reset_lwp_ptrace_options_callback): Update.
1827 * linux-mips-low.c (update_watch_registers_callback): Update.
1828 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1830 (free_register_cache_thread_one): Remove.
1831 (regcache_release): Update.
1832 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1833 handle_qxfer_threads_worker): Update.
1834 (handle_query): Update, use list iterator.
1835 (visit_actioned_threads, handle_pending_status,
1836 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1837 clear_pending_status_callback, set_pending_status_callback,
1838 find_status_pending_thread_callback, handle_status,
1839 process_serial_event): Update.
1840 * target.c (thread_search_callback): Update.
1841 * thread-db.c (thread_db_get_tls_address): Update.
1842 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1844 * win32-i386-low.c (update_debug_registers_callback): Update.
1845 * win32-low.c (delete_thread_info, child_delete_thread,
1846 continue_one_thread, suspend_one_thread,
1847 get_child_debug_event): Adjust.
1849 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1851 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1852 * inferiors.h: Include <list>.
1853 (struct process_info) <entry>: Remove field.
1855 (pid_of): Change macro to function.
1856 (ptid_of, lwpid_of): Remove macro.
1857 (all_processes): Change type to std::list<process_info *>.
1858 (ALL_PROCESSES): Remove macro.
1859 (for_each_process, find_process): New function.
1860 * inferiors.c (all_processes): Change type to
1861 std::list<process_info *>.
1862 (find_thread_process): Adjust.
1863 (add_process): Likewise.
1864 (remove_process): Likewise.
1865 (find_process_pid): Likewise.
1866 (get_first_process): Likewise.
1867 (started_inferior_callback): Remove.
1868 (have_started_inferiors_p): Adjust.
1869 (attached_inferior_callback): Remove.
1870 (have_attached_inferiors_p): Adjust.
1871 * linux-low.c (check_zombie_leaders): Likewise.
1872 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1873 (x86_linux_update_xmltarget): Adjust.
1874 * server.c (handle_query): Likewise.
1875 (gdb_reattached_process): Remove.
1876 (handle_status): Adjust.
1877 (kill_inferior_callback): Likewise.
1878 (detach_or_kill_inferior): Remove.
1879 (print_started_pid): Likewise.
1880 (print_attached_pid): Likewise.
1881 (detach_or_kill_for_exit): Update.
1882 (process_serial_event): Likewise.
1883 * linux-arm-low.c (arm_new_fork): Likewise.
1885 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1887 * dll.h: Include <list>.
1888 (struct dll_info): Add constructor.
1889 <entry>: Remove field.
1890 (all_dlls): Change type to std::list<dll_info>.
1891 * dll.c: Include <algorithm>.
1892 (get_dll): Remove macro.
1893 (all_dlls): Change type to std::list<dll_info *>.
1894 (free_one_dll): Remove.
1895 (match_dll): Likewise.
1896 (loaded_dll): Adjust.
1897 (unloaded_dll): Adjust to all_dlls type change, use
1898 std::find_if. Inline code from match_dll.
1899 (clear_dlls): Adjust to all_dlls type change.
1900 * server.c (emit_dll_description): Remove.
1901 (handle_qxfer_libraries): Adjust to all_dlls type change,
1902 integrate emit_dll_description's functionality.
1904 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1906 * linux-low.h (struct linux_target_ops) <delete_process>: New
1908 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1909 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1910 (struct linux_target_ops): Add delete_process callback.
1911 * linux-arm-low.c (arm_delete_process): New.
1912 (struct linux_target_ops): Add delete_process callback.
1913 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1914 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1915 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1916 * linux-mips-low.c (mips_linux_delete_process): New.
1917 (struct linux_target_ops): Add delete_process callback.
1918 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1919 * linux-s390-low.c (struct linux_target_ops): Likewise.
1920 * linux-sh-low.c (struct linux_target_ops): Likewise.
1921 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1922 * linux-tile-low.c (struct linux_target_ops): Likewise.
1923 * linux-x86-low.c (x86_linux_delete_process): New.
1924 (struct linux_target_ops): Add delete_process callback.
1925 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1927 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1929 * linux-aarch64-low.c (the_low_target): Add thread delete
1931 * linux-arm-low.c (arm_delete_thread): New function.
1932 (the_low_target): Add thread delete callback.
1933 * linux-bfin-low.c (the_low_target): Likewise.
1934 * linux-crisv32-low.c (the_low_target): Likewise.
1935 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1937 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1939 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1940 * linux-mips-low.c (mips_linux_delete_thread): New function.
1941 (the_low_target): Add thread delete callback.
1942 * linux-ppc-low.c (the_low_target): Likewise.
1943 * linux-s390-low.c (the_low_target): Likewise.
1944 * linux-sh-low.c (the_low_target): Likewise.
1945 * linux-tic6x-low.c (the_low_target): Likewise.
1946 * linux-tile-low.c (the_low_target): Likewise.
1947 * linux-x86-low.c (the_low_target): Likewise.
1948 * linux-xtensa-low.c (the_low_target): Likewise.
1950 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1952 * win32-low.c: Include "common-inferior.h".
1954 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1956 * inferiors.c (set_inferior_cwd): New function.
1957 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1958 (handle_query): Inform that QSetWorkingDir is supported.
1959 * win32-low.c (create_process): Pass the inferior's cwd to
1962 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1964 * inferiors.c (current_inferior_cwd): New global variable.
1965 (get_inferior_cwd): New function.
1966 * inferiors.h (struct process_info) <cwd>: New field.
1968 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1970 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1971 (OBS): Add gdb_tilde_expand.o.
1973 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1975 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1976 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1978 2017-09-29 Pedro Alves <palves@redhat.com>
1980 * ax.c (gdb_parse_agent_expr): Constify.
1981 * ax.h (gdb_parse_agent_expr): Constify.
1982 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1984 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1985 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1986 * remote-utils.h (read_ptid): Constify.
1987 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1988 (process_point_options, process_serial_event): Constify.
1989 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1990 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1991 (cmd_qtbuffer): Constify.
1993 2017-09-29 Pedro Alves <palves@redhat.com>
1995 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1998 2017-09-29 Pedro Alves <palves@redhat.com>
2000 * linux-low.c (handle_extended_wait): Pass parent thread instead
2001 of process to thread_db_notice_clone.
2002 * linux-low.h (thread_db_notice_clone): Replace parent process
2003 parameter with parent thread parameter.
2004 * thread-db.c (find_one_thread): Add comment.
2005 (thread_db_notice_clone): Replace parent process parameter with
2006 parent thread parameter. Temporarily switch to the parent thread.
2008 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2010 * gdbthread.h: Include "common-gdbthread.h".
2011 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2012 "if" when validating the ptid.
2013 * remote-utils.c: Include "gdbthread.h".
2014 (prepare_resume_reply): Use "switch_to_thread".
2015 * target.c (done_accessing_memory): Likewise.
2017 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2019 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2020 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2021 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2022 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2023 s390x-gs-linux64-ipa.o to ipa_obj.
2024 * linux-s390-low.c (HWCAP_S390_GS): New define.
2025 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2027 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2028 (s390_arch_setup): Check for guarded-storage support and choose
2030 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2031 init_registers_s390x_gs_linux64.
2032 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2034 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2035 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2037 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2039 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2041 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2043 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2044 (thread_db_thread_handle): Declare.
2045 * linux-low.c (linux_target_ops): Initialize thread_handle.
2046 * server.c (handle_qxfer_threads_worker): Add support for
2048 * target.h (struct target_ops): Add new function pointer,
2050 (target_thread_handle): Define.
2051 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2053 (thread_db_thread_handle): New function.
2055 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2057 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2058 * linux-low.h (thread_db_notice_clone): Declare.
2059 * thread-db.c (thread_db_notice_clone): New function.
2061 2017-09-21 Pedro Alves <palves@redhat.com>
2063 * server.c (gdb_read_memory, handle_status, process_serial_event)
2064 (handle_serial_event, handle_target_event): Adjust to
2065 set_desired_thread prototype change.
2066 * target.c (set_desired_thread): Remove 'use_general' parameter
2068 * target.h (set_desired_thread): Remove 'use_general' parameter.
2070 2017-09-20 Tom Tromey <tom@tromey.com>
2072 * target.c (target_terminal::terminal_state): Define.
2073 (target_terminal::init): Rename from target_terminal_init.
2074 (target_terminal::inferior): Rename from
2075 target_terminal_inferior.
2076 (target_terminal::ours): Rename from target_terminal_ours.
2077 (target_terminal::ours_for_output, target_terminal::info): New.
2079 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2081 * server.c (accumulate_file_name_length): Remove.
2082 (emit_dll_description): Adjust to std::string change.
2083 (handle_qxfer_libraries): Use std::string to hold document.
2085 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2087 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2088 return type of xml_escape_text.
2089 * server.c (emit_dll_description): Likewise.
2091 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2093 * server.c (captured_main): Accept argument for --selftest.
2094 Update run_tests call.
2095 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2096 when registering selftests.
2098 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2100 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2101 instead of "VEC" for "target_desc.reg_defs".
2102 (regcache_cpy): Likewise.
2103 (registers_to_string): Likewise.
2104 (registers_from_string): Likewise.
2105 (find_regno): Likewise.
2106 (supply_regblock): Likewise.
2107 (regcache_raw_read_unsigned): Likewise.
2108 * tdesc.c (init_target_desc): Likewise.
2109 (tdesc_create_reg): Likewise.
2110 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2111 (struct target_desc) <reg_defs>: Convert to "std::vector".
2112 (target_desc): Do not initialize "reg_defs".
2113 (~target_desc): Update code to use "std::vector" instead of "VEC"
2114 for "target_desc.reg_defs".
2115 (operator==): Likewise.
2117 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2119 * inferiors.h (thread_to_gdb_id): Remove.
2120 * inferiors.c (thread_to_gdb_id): Remove.
2121 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2122 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2123 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2125 * nto-low.c (nto_fetch_registers, nto_store_registers,
2126 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2128 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2130 * inferiors.h (gdb_id_to_thread_id): Remove.
2131 * inferiors.c (gdb_id_to_thread_id): Remove.
2132 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2133 removal. Move pid declaration closer to where it's used.
2135 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2137 * server.c (handle_detach): New function.
2138 (process_serial_event): Move code out, call handle_detach.
2140 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2142 * server.c (require_running): Rename to ...
2143 (require_running_or_return): ... this ...
2144 (require_running_or_break): ... and this.
2145 (handle_query, process_serial_event): Adjust.
2147 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2149 * linux-low.c (linux_set_resume_request): Remove unused
2152 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2154 * server.c (first_thread_of): Remove.
2155 (process_serial_event): Replace usage of first_thread_of with
2156 find_any_thread_of_pid.
2157 * tracepoint.c (same_process_p): Remove.
2158 (gdb_agent_about_to_close): Replace usage of same_process_p with
2159 find_any_thread_of_pid.
2160 * linux-x86-low.c (same_process_callback): Remove.
2161 (x86_arch_setup_process_callback): Replace usage of
2162 same_process_callback with find_any_thread_of_pid.
2163 * thread-db.c (any_thread_of): Remove.
2164 (switch_to_process): Replace usage of any_thread_of with
2165 find_any_thread_of_pid.
2166 * inferiors.c (thread_pid_matches_callback): Remove.
2167 (find_thread_process): Adjust to use find_any_thread_of_pid.
2169 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2171 * regcache.c (get_thread_regcache): Guard calls to "memset"
2174 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2176 * linux-low.c (handle_extended_wait): Use
2177 "allocate_target_description" instead of "XNEW".
2178 * linux-x86-low.c (initialize_low_arch): Likewise.
2180 2017-09-05 Yao Qi <yao.qi@linaro.org>
2182 * configure.srv (srv_i386_regobj): Remove.
2183 (srv_amd64_regobj): Remove.
2184 (srv_regobj): Set it to "" for x86 non-linux targets.
2185 * linux-x86-tdesc.c (i386_linux_read_description):
2186 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2187 (init_registers_i386): Remove the declaration.
2188 (tdesc_i386): Remove the declaration.
2189 (lynx_i386_arch_setup): Call i386_create_target_description.
2190 * nto-x86-low.c: Likewise.
2191 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2192 [!__x86_64__]: include arch/i386.h.
2193 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2195 2017-09-05 Yao Qi <yao.qi@linaro.org>
2197 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2198 i386/amd64-XXX-linux from it.
2200 2017-09-05 Yao Qi <yao.qi@linaro.org>
2202 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2204 (ipa_amd64_linux_regobj): Remove.
2205 (ipa_x32_linux_regobj): Remove.
2207 2017-09-05 Yao Qi <yao.qi@linaro.org>
2209 * Makefile.in (arch-amd64.o): New rule.
2210 * configure.srv: Append arch-amd64.o.
2211 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2212 (get_ipa_tdesc): Call amd64_linux_read_description.
2213 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2214 and init_registers_amd64_XXX.
2215 * linux-x86-low.c (x86_linux_read_description): Call
2216 amd64_linux_read_description.
2217 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2218 (initialize_low_arch): Don't call init_registers_x32_XXX and
2219 init_registers_amd64_XXX.
2220 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2221 and tdesc_amd64_XXX.
2222 [__x86_64__] (amd64_tdesc_test): New function.
2223 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2224 and init_registers_amd64_XXX.
2225 * linux-x86-tdesc.c: Include arch/amd64.h.
2226 (xcr0_to_tdesc_idx): New function.
2227 (i386_linux_read_description): New function.
2228 (amd64_get_ipa_tdesc_idx): New function.
2229 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2230 (amd64_get_ipa_tdesc): Declare.
2232 2017-09-05 Yao Qi <yao.qi@linaro.org>
2234 * configure.srv (srv_i386_linux_xmlfiles): Remove
2235 i386/i386-XXX-linux.xml from it.
2237 2017-09-05 Yao Qi <yao.qi@linaro.org>
2239 * configure.srv: Set srv_i386_linux_regobj empty if $development
2241 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2242 initialize_low_tdesc.
2243 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2244 with #if initialize_low_tdesc.
2245 * linux-x86-tdesc-selftest.c: New file.
2246 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2248 2017-09-05 Yao Qi <yao.qi@linaro.org>
2250 * Makefile.in (arch-i386.o): New rule.
2251 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2252 (x86_64-*-linux*): Likewise.
2253 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2254 include arch/i386.h.
2255 (i386_linux_read_description): Remove code and call
2256 i386_create_target_description.
2257 * tdesc.c (allocate_target_description): New function.
2258 * tdesc.h (set_tdesc_architecture): Remove declaration.
2259 (set_tdesc_osabi): Likewise.
2261 2017-09-05 Yao Qi <yao.qi@linaro.org>
2263 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2264 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2265 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2267 * server.c (get_features_xml): Call tdesc_get_features_xml.
2268 * tdesc.c (set_tdesc_architecture): New function.
2269 (set_tdesc_osabi): New function.
2270 (tdesc_get_features_xml): New function.
2271 (tdesc_create_feature): Add an argument.
2272 * tdesc.h (struct target_desc) <features>: New field.
2273 <arch, osabi>: New field.
2274 (~target_desc): xfree features, arch, and osabi.
2275 (target_desc::oerator==): Don't compare .xmltarget.
2276 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2277 (set_tdesc_osabi): Likewise.
2278 (tdesc_get_features_xml): Likewise.
2280 2017-09-05 Yao Qi <yao.qi@linaro.org>
2282 * linux-x86-tdesc.c: Include selftest.h.
2283 (i386_tdesc_test): New function.
2284 (initialize_low_tdesc): Call selftests::register_test.
2285 * tdesc.h: Include regdef.h.
2286 (target_desc): Override operator == and !=.
2288 2017-09-05 Yao Qi <yao.qi@linaro.org>
2290 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2291 (ipa_obj): Likewise.
2292 * linux-i386-ipa.c: Include common/x86-xstate.h
2293 (get_ipa_tdesc): Call i386_linux_read_description.
2294 (initialize_low_tracepoint): Don't call init_registers_XXX
2295 functions, call initialize_low_tdesc instead.
2296 * linux-x86-low.c (x86_linux_read_description): Call
2297 i386_linux_read_description.
2298 (initialize_low_arch): Don't call init_registers_i386_XXX
2299 functions, call initialize_low_tdesc.
2300 * linux-x86-tdesc.c: New file.
2301 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2302 (i386_get_ipa_tdesc_idx): Declare.
2303 (i386_get_ipa_tdesc): Declare.
2304 (initialize_low_tdesc): Declare.
2306 2017-09-05 Yao Qi <yao.qi@linaro.org>
2308 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2311 2017-09-05 Yao Qi <yao.qi@linaro.org>
2313 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2314 * regcache.c (get_thread_regcache): Use VEC_length.
2315 (init_register_cache): Likewise.
2316 (regcache_cpy): Likewise.
2317 (registers_to_string): Iterate reg_defs via VEC_iterate.
2318 (find_regno): Likewise.
2319 (find_register_by_number): Use VEC_index.
2320 (register_size): Call find_register_by_number.
2321 (register_data): Call find_register_by_number.
2322 (supply_regblock): Use VEC_length.
2323 (regcache_raw_read_unsigned): Likewise.
2324 * tdesc.c (init_target_desc): Iterate reg_defs via
2326 (default_description): Update initializer.
2327 (copy_target_description): Don't update field num_registers.
2328 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2329 <num_registers>: Remove.
2331 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2333 * Makefile.in (.SECONDARY): Define target.
2335 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2337 * linux-low.c (linux_wait_1): Adjust.
2338 * server.c (queue_stop_reply_callback): Adjust.
2340 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2342 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2343 QEnvironmentUnset and QEnvironmentReset packets.
2344 (handle_query): Inform remote that QEnvironmentHexEncoded,
2345 QEnvironmentUnset and QEnvironmentReset are supported.
2347 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2349 * inferiors.h (inferior_target_data): Rename to ...
2350 (thread_target_data): ... this.
2351 (inferior_regcache_data): Rename to ...
2352 (thread_regcache_data): ... this.
2353 (set_inferior_regcache_data): Rename to ...
2354 (set_thread_regcache_data): ... this.
2355 * inferiors.c (inferior_target_data): Rename to ...
2356 (thread_target_data): ... this.
2357 (inferior_regcache_data): Rename to ...
2358 (thread_regcache_data): ... this.
2359 (set_inferior_regcache_data): Rename to ...
2360 (set_thread_regcache_data): ... this.
2361 (free_one_thread): Update.
2362 * linux-low.h (get_thread_lwp): Update.
2363 * regcache.c (get_thread_regcache): Update.
2364 (regcache_invalidate_thread): Update.
2365 (free_register_cache_thread): Update.
2366 * win32-i386-low.c (update_debug_registers_callback): Update.
2367 (win32_get_current_dr): Update.
2368 * win32-low.c (thread_rec): Update.
2369 (delete_thread_info): Update.
2370 (continue_one_thread): Update.
2371 (suspend_one_thread): Update.
2373 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2375 * inferiors.c (set_inferior_target_data): Remove.
2376 * inferiors.h (set_inferior_target_data): Remove.
2378 2017-08-18 Yao Qi <yao.qi@linaro.org>
2380 * Makefile.in (OBS): Add selftest.o.
2381 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2382 * configure, config.in: Re-generated.
2383 * server.c: Include common/sefltest.h.
2384 (captured_main): Handle option --selftest.
2386 2017-08-09 Yao Qi <yao.qi@linaro.org>
2388 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2389 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2390 i386-avx-mpx.o and i386-mmx.o.
2391 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2392 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2393 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2394 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2395 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2396 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2397 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2398 i386/amd64-avx-mpx.xml.
2400 2017-08-09 Yao Qi <yao.qi@linaro.org>
2402 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2403 and x32-avx-avx512.o.
2404 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2405 i386/x32-avx-avx512.xml.
2407 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2409 * tracepoint.h (enum class fast_tpoint_collect_result): New
2411 (fast_tracepoint_collecting): Change return type to
2412 fast_tpoint_collect_result.
2413 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2414 * linux-low.h: Include tracepoint.h.
2415 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2416 fast_tpoint_collect_result.
2417 * linux-low.c (handle_tracepoints): Adjust.
2418 (linux_fast_tracepoint_collecting): Change return type to
2419 fast_tpoint_collect_result.
2420 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2421 linux_wait_1, stuck_in_jump_pad_callback,
2422 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2423 proceed_one_lwp): Adjust to type change.
2425 2017-07-10 Yao Qi <yao.qi@linaro.org>
2427 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2429 2017-06-29 Yao Qi <yao.qi@linaro.org>
2431 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2433 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2435 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2437 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2439 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2441 * linux-low.c (linux_create_inferior): Adjust code to access the
2442 environment information via 'gdb_environ' class.
2443 * lynx-low.c (lynx_create_inferior): Likewise.
2444 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2445 (get_environ): Return a pointer to 'our_environ'.
2446 (captured_main): Initialize 'our_environ'.
2447 * server.h (get_environ): Adjust prototype.
2448 * spu-low.c (spu_create_inferior): Adjust code to access the
2449 environment information via 'gdb_environ' class.
2451 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2453 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2454 usage of "register" keyword.
2456 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2458 * configure: Re-generate.
2460 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2462 * configure: Re-generate.
2464 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2466 * Makefile.in (COMPILE.pre): Add "-x c++".
2468 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2470 * fork-child.c: Conditionally include <signal.h>.
2472 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2474 * server.c (handle_general_set): Handle new packet
2475 "QStartupWithShell".
2476 (handle_query): Add "QStartupWithShell" to the list of supported
2478 (gdbserver_usage): Add help text explaining the
2479 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2481 (captured_main): Recognize and act upon the presence of the new
2484 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2485 Pedro Alves <palves@redhat.com>
2487 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2488 * configure: Regenerate.
2489 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2491 (i[34567]86-*-lynxos*): Likewise.
2492 (spu*-*-*): Likewise.
2493 * fork-child.c: New file.
2494 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2496 (linux_ptrace_fun): New function.
2497 (linux_create_inferior): Adjust function prototype to reflect
2498 change on "target.h". Adjust function code to use
2500 (linux_request_interrupt): Delete "signal_pid".
2501 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2502 (lynx_ptrace_fun): New function.
2503 (lynx_create_inferior): Adjust function prototype to reflect
2504 change on "target.h". Adjust function code to use
2506 * nto-low.c (nto_create_inferior): Adjust function prototype and
2507 code to reflect change on "target.h". Update comments.
2508 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2509 "common-terminal.h" and "environ.h".
2510 (terminal_fd): Moved to fork-child.c.
2511 (old_foreground_pgrp): Likewise.
2512 (restore_old_foreground_pgrp): Likewise.
2513 (last_status): Make it global.
2514 (last_ptid): Likewise.
2515 (our_environ): New variable.
2516 (startup_with_shell): Likewise.
2517 (program_name): Likewise.
2518 (program_argv): Rename to...
2519 (program_args): ...this.
2520 (wrapper_argv): New variable.
2521 (start_inferior): Delete function.
2522 (get_exec_wrapper): New function.
2523 (get_exec_file): Likewise.
2524 (get_environ): Likewise.
2525 (prefork_hook): Likewise.
2526 (post_fork_inferior): Likewise.
2527 (postfork_hook): Likewise.
2528 (postfork_child_hook): Likewise.
2529 (handle_v_run): Update code to deal with arguments coming from the
2530 remote host. Update calls from "start_inferior" to
2532 (captured_main): Likewise. Initialize environment variable. Call
2534 * server.h (post_fork_inferior): New prototype.
2535 (get_environ): Likewise.
2536 (last_status): Declare.
2537 (last_ptid): Likewise.
2538 (signal_pid): Likewise.
2539 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2540 (spu_ptrace_fun): New function.
2541 (spu_create_inferior): Adjust function prototype to reflect change
2542 on "target.h". Adjust function code to use "fork_inferior".
2543 * target.c (target_terminal_init): New function.
2544 (target_terminal_inferior): Likewise.
2545 (target_terminal_ours): Likewise.
2546 * target.h: Include <vector>.
2547 (struct target_ops) <create_inferior>: Update prototype.
2548 (create_inferior): Update macro.
2549 * utils.c (gdb_flush_out_err): New function.
2550 * win32-low.c (win32_create_inferior): Adjust function prototype
2551 and code to reflect change on "target.h".
2553 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2555 * inferiors.c (switch_to_thread): New function.
2557 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2559 * Makefile.in (SFILE): Add "common/job-control.c".
2560 (OBS): Add "job-control.o".
2562 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2564 * Makefile: Remove "@host_makefile_frag@".
2566 2017-05-05 Pedro Alves <palves@redhat.com>
2568 * configure: Regenerate.
2570 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2572 * configure: Regenerate.
2574 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2576 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2577 software_single_step change of return type to
2578 std::vector<CORE_ADDR>.
2579 * linux-low.c (install_software_single_step_breakpoints):
2581 * linux-low.h (install_software_single_step_breakpoints):
2584 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2586 * remote-utils.c: Include "gdb_termios.h" instead of
2588 * terminal.h: Delete file.
2590 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2592 * server.c: Include <vector>.
2593 <program_argv, wrapper_argv>: Convert to std::vector.
2594 (start_inferior): Rewrite function to use C++.
2595 (handle_v_run): Likewise. Update code that calculates the argv
2596 based on the vRun packet; use C++.
2597 (captured_main): Likewise.
2599 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2601 * server.c (handle_v_cont): Initialize thread_resume::thread
2604 2017-04-05 Pedro Alves <palves@redhat.com>
2606 * configure: Regenerate.
2608 2017-04-05 Pedro Alves <palves@redhat.com>
2610 * gdbreplay.c (sync_error): Constify.
2611 * linux-x86-low.c (push_opcode): Constify.
2613 2017-04-05 Pedro Alves <palves@redhat.com>
2615 * win32-low.c (get_child_debug_event)
2616 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2617 Report TARGET_WAITKIND_SPURIOUS instead.
2619 2017-04-05 Pedro Alves <palves@redhat.com>
2621 * remote-utils.c (remote_prepare, remote_open): Constify.
2622 * remote-utils.h (remote_prepare, remote_open): Constify.
2623 * server.c (captured_main): Constify 'port' handling.
2625 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2627 * Makefile.in (clean): Clear .deps.
2629 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2631 * .gitignore: Remove generated files, replace with wildcard.
2632 * (clean): Replace removal of generated files with wildcard.
2633 (version.c): Replace with...
2634 (version-generated.c): ...this.
2635 (xml-builtin.c): Replace with...
2636 (xml-builtin-generated.c): ...this.
2637 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2638 (%.c: *regformats*): Replace with...
2639 (%-generated.c: *regformats*): ...this.
2641 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2643 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2644 (xtensa_fill_gregset): Call collect_register_by_name for
2646 (xtensa_store_gregset): Call supply_register_by_name for
2649 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2651 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2652 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2653 (xtensa_store_gregset): Call supply_register for all registers in
2654 a0_regnum..a0_regnum + C0_NREGS range.
2656 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2658 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2659 (ax-ipa.o: ax.c): Remove.
2660 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2661 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2662 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2663 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2664 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2666 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2668 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2669 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2670 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2671 (errors-ipa.o: ../common/errors.c): Remove.
2672 (format-ipa.o: ../common/format.c): Remove.
2673 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2675 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2677 * Makefile.in (%-ipa.o: %.c): New rule.
2678 (tracepoint-ipa.o: tracepoint.c): Remove.
2679 (utils-ipa.o: utils.c): Remove.
2680 (remote-utils-ipa.o: remote-utils.c): Remove.
2681 (regcache-ipa.o: regcache.c): Remove.
2682 (i386-linux-ipa.o: i386-linux.c): Remove.
2683 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2684 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2685 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2686 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2687 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2688 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2689 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2690 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2691 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2692 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2693 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2694 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2695 (aarch64-ipa.o: aarch64.c): Remove.
2696 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2697 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2698 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2699 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2700 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2701 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2702 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2703 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2704 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2705 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2706 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2707 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2708 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2709 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2710 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2711 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2712 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2713 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2714 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2715 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2716 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2717 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2718 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2719 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2720 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2721 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2722 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2723 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2724 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2725 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2726 (tdesc-ipa.o: tdesc.c): Remove.
2727 (x32-linux-ipa.o: x32-linux.c): Remove.
2728 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2729 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2731 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2733 * Makefile.in (%.o: ../arch/%.c): New rule.
2734 (arm.o: ../arch/arm.c): Remove.
2735 (arm-linux.o: ../arch/arm-linux.c): Remove.
2736 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2737 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2739 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2741 * Makefile.in (%.o: ../nat/%.c): New rule.
2742 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2743 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2744 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2745 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2746 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2747 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2748 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2749 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2750 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2751 (linux-personality.o: ../nat/linux-personality.c): Remove.
2752 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2753 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2754 (x86-linux.o: ../nat/x86-linux.c): Remove.
2755 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2756 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2758 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2760 * Makefile.in (%.o: ../common/%.c): New rule.
2761 (signals.o: ../common/signals.c): Remove.
2762 (print-utils.o: ../common/print-utils.c): Remove.
2763 (rsp-low.o: ../common/rsp-low.c): Remove.
2764 (common-utils.o: ../common/common-utils.c): Remove.
2765 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2766 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2767 (vec.o: ../common/vec.c): Remove.
2768 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2769 (xml-utils.o: ../common/xml-utils.c): Remove.
2770 (ptid.o: ../common/ptid.c): Remove.
2771 (buffer.o: ../common/buffer.c): Remove.
2772 (format.o: ../common/format.c): Remove.
2773 (filestuff.o: ../common/filestuff.c): Remove.
2774 (agent.o: ../common/agent.c): Remove.
2775 (errors.o: ../common/errors.c): Remove.
2776 (environ.o: ../common/environ.c): Remove.
2777 (common-debug.o: ../common/common-debug.c): Remove.
2778 (cleanups.o: ../common/cleanups.c): Remove.
2779 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2780 (fileio.o: ../common/fileio.c): Remove.
2781 (common-regcache.o: ../common/common-regcache.c): Remove.
2782 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2783 (new-op.o: ../common/new-op.c): Remove.
2784 (btrace-common.o: ../common/btrace-common.c): Remove.
2786 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2788 * Makefile.in (%.o: ../target/%.c): New rule.
2789 (waitstatus.o: ../target/waitstatus.c): Remove.
2791 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2794 (%.c: ../regformats/%.dat,
2795 (%.c: ../regformats/arm/%.dat,
2796 (%.c: ../regformats/i386/%.dat,
2797 (%.c: ../regformats/rs6000/%.dat): New rules.
2798 (aarch64.c): Remove.
2799 (reg-arm.c): Remove.
2800 (arm-with-iwmmxt.c): Remove.
2801 (arm-with-vfpv2.c): Remove.
2802 (arm-with-vfpv3.c): Remove.
2803 (arm-with-neon.c): Remove.
2804 (reg-bfin.c): Remove.
2805 (reg-cris.c): Remove.
2806 (reg-crisv32.c): Remove.
2808 (i386-linux.c): Remove.
2809 (i386-avx.c): Remove.
2810 (i386-avx-linux.c): Remove.
2811 (i386-avx-avx512.c): Remove.
2812 (i386-avx-avx512-linux.c): Remove.
2813 (i386-mpx.c): Remove.
2814 (i386-mpx-linux.c): Remove.
2815 (i386-avx-mpx-avx512-pku.c): Remove.
2816 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2817 (i386-avx-mpx.c): Remove.
2818 (i386-avx-mpx-linux.c): Remove.
2819 (i386-mmx.c): Remove.
2820 (i386-mmx-linux.c): Remove.
2821 (reg-ia64.c): Remove.
2822 (reg-m32r.c): Remove.
2823 (reg-m68k.c): Remove.
2825 (mips-linux.c): Remove.
2826 (mips-dsp-linux.c): Remove.
2827 (mips64-linux.c): Remove.
2828 (mips64-dsp-linux.c): Remove.
2829 (nios2-linux.c): Remove.
2830 (powerpc-32.c): Remove.
2831 (powerpc-32l.c): Remove.
2832 (powerpc-altivec32l.c): Remove.
2833 (powerpc-cell32l.c): Remove.
2834 (powerpc-vsx32l.c): Remove.
2835 (powerpc-isa205-32l.c): Remove.
2836 (powerpc-isa205-altivec32l.c): Remove.
2837 (powerpc-isa205-vsx32l.c): Remove.
2838 (powerpc-e500l.c): Remove.
2839 (powerpc-64l.c): Remove.
2840 (powerpc-altivec64l.c): Remove.
2841 (powerpc-cell64l.c): Remove.
2842 (powerpc-vsx64l.c): Remove.
2843 (powerpc-isa205-64l.c): Remove.
2844 (powerpc-isa205-altivec64l.c): Remove.
2845 (powerpc-isa205-vsx64l.c): Remove.
2846 (s390-linux32.c): Remove.
2847 (s390-linux32v1.c): Remove.
2848 (s390-linux32v2.c): Remove.
2849 (s390-linux64.c): Remove.
2850 (s390-linux64v1.c): Remove.
2851 (s390-linux64v2.c): Remove.
2852 (s390-te-linux64.c): Remove.
2853 (s390-vx-linux64.c): Remove.
2854 (s390-tevx-linux64.c): Remove.
2855 (s390x-linux64.c): Remove.
2856 (s390x-linux64v1.c): Remove.
2857 (s390x-linux64v2.c): Remove.
2858 (s390x-te-linux64.c): Remove.
2859 (s390x-vx-linux64.c): Remove.
2860 (s390x-tevx-linux64.c): Remove.
2861 (tic6x-c64xp-linux.c): Remove.
2862 (tic6x-c64x-linux.c): Remove.
2863 (tic6x-c62x-linux.c): Remove.
2865 (reg-sparc64.c): Remove.
2866 (reg-spu.c): Remove.
2868 (amd64-linux.c): Remove.
2869 (amd64-avx.c): Remove.
2870 (amd64-avx-linux.c): Remove.
2871 (amd64-avx-avx512.c): Remove.
2872 (amd64-avx-avx512-linux.c): Remove.
2873 (amd64-mpx.c): Remove.
2874 (amd64-mpx-linux.c): Remove.
2875 (amd64-avx-mpx-avx512-pku.c): Remove.
2876 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2877 (amd64-avx-mpx.c): Remove.
2878 (amd64-avx-mpx-linux.c): Remove.
2880 (x32-linux.c): Remove.
2881 (x32-avx.c): Remove.
2882 (x32-avx-linux.c): Remove.
2883 (x32-avx-avx512.c): Remove.
2884 (x32-avx-avx512-linux.c): Remove.
2885 (reg-xtensa.c): Remove.
2886 (reg-tilegx.c): Remove.
2887 (reg-tilegx32.c): Remove.
2889 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2891 * Makefile.in (SFILES): Add "common/environ.c".
2892 (OBJS): Add "common/environ.h".
2894 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2896 * configure.ac: Check if the fs_base and gs_base members of
2897 `struct user_regs_struct' exist.
2898 * config.in: Regenerated.
2899 * configure: Likewise.
2901 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2903 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2905 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2906 (get_next_pcs_syscall_next_pc): Likewise.
2908 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2910 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2911 * nto-x86-low.c: Likewise.
2913 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2915 * Makefile.in: Include disable-implicit-rules.mk.
2917 2016-11-23 Pedro Alves <palves@redhat.com>
2919 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2920 (debug_vprintf): Use std::chrono::steady_clock instead of
2921 gettimeofday. Use '.' instead of ':'.
2922 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2923 (get_timestamp): Use std::chrono::steady_clock instead of
2926 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2928 * Makefile.in: Fix whitespace formatting.
2930 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2932 * Makefile.in (SFILES, OBS): Flatten list and order
2935 2016-11-23 Pedro Alves <palves@redhat.com>
2937 * event-loop.c (handle_file_event): Use warning.
2938 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2939 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2942 2016-11-23 Pedro Alves <palves@redhat.com>
2944 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2946 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2947 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2948 debug_printf and debug_flush for debug output.
2949 * server.c (handle_general_set): Likewise.
2950 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2953 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2955 * Makefile.in (.c.o): Replace rule with ...
2956 (%.o: %.c): ... this one.
2958 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2960 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2961 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2963 * configure.ac: Remove checks for the make program.
2964 * configure: Re-generate.
2966 2016-10-28 Pedro Alves <palves@redhat.com>
2968 * Makefile.in (CXX_DIALECT): Get from configure.
2969 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2970 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2971 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2972 * config.in: Regenerate.
2973 * configure: Regenerate.
2975 2016-10-27 Yao Qi <yao.qi@linaro.org>
2977 * linux-low.c (linux_supports_range_stepping): Return true if
2978 can_software_single_step return true.
2980 2016-10-27 Yao Qi <yao.qi@linaro.org>
2982 * inferiors.c (find_inferior_in_random): New function.
2983 * inferiors.h (find_inferior_in_random): Declare.
2984 * linux-low.c (linux_wait_for_event_filtered): Call
2985 find_inferior_in_random instead of find_inferior.
2987 2016-10-27 Yao Qi <yao.qi@linaro.org>
2989 * linux-low.c (linux_wait_1): If single-step breakpoints are
2990 inserted, remove them.
2992 2016-10-26 Pedro Alves <palves@redhat.com>
2994 * linux-low.c (handle_extended_wait): Link parent/child fork
2996 (linux_wait_1): Unlink them.
2997 (linux_set_resume_request): Ignore resume requests for
2998 already-resumed and unhandled fork child threads.
2999 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3000 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3002 (handle_v_requests) <vCont>: Don't call require_running.
3003 * server.h (in_queued_stop_replies): New declaration.
3005 2016-10-24 Yao Qi <yao.qi@linaro.org>
3008 * linux-aarch64-low.c (append_insns): Cast the return value to
3011 2016-10-10 Yao Qi <yao.qi@linaro.org>
3013 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3015 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3017 * target.c (target_supports_multi_process): New function, moved
3019 * target.h (target_supports_multi_process): ... here. Remove
3022 2016-10-05 Tom Tromey <tom@tromey.com>
3025 * tracepoint.c (handle_tracepoint_bkpts): Check
3026 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3028 2016-10-05 Yao Qi <yao.qi@linaro.org>
3030 * configure.srv: Update the path of arm-*.xml files.
3032 2016-10-05 Terry Guo <terry.guo@arm.com>
3033 Yao Qi <yao.qi@linaro.org>
3035 * Makefile.in: Adjust the path of rules.
3036 * configure.srv: Update the path of xml files.
3037 * regformats/arm-with-iwmmxt.dat: Regenerated.
3038 * regformats/arm-with-neon.dat: Likewise.
3039 * regformats/arm-with-vfpv2.dat: Likewise.
3040 * regformats/arm-with-vfpv3.dat Likewise.
3042 2016-09-30 Yao Qi <yao.qi@linaro.org>
3045 * target.c (target_stop_and_wait): Don't call
3046 target_continue_no_signal, use resume_stop instead.
3048 2016-09-26 Yao Qi <yao.qi@linaro.org>
3050 * linux-low.c (linux_wait_1): Call debug_exit.
3052 2016-09-23 Pedro Alves <palves@redhat.com>
3054 * Makefile.in (SFILES): Add common/new-op.c.
3055 (OBS): Add common/new-op.o.
3056 (new-op.o): New rule.
3058 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3060 * .gitinore: Ignore more files.
3062 2016-09-21 Yao Qi <yao.qi@linaro.org>
3064 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3067 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3069 * server.c (start_inferior): Call target_mourn_inferior instead of
3070 mourn_inferior; pass ptid_t argument to it.
3072 (handle_target_event): Likewise.
3073 * target.c (target_mourn_inferior): New function.
3074 * target.h (mourn_inferior): Delete macro.
3076 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3078 * linux-low.c (lwp_is_stepping): New function.
3080 2016-09-06 Carl Love <cel@us.ibm.com>
3082 * server.c (start_inferior): Fixed comment, requested comment change
3083 didn't get updated correctly. Removed reference to ptrace () call as
3084 it is only true on Linux systems.
3086 2016-09-06 Carl Love <cel@us.ibm.com>
3088 * server.c (start_inferior): Do not call
3089 function target_post_create_inferior () if the
3090 inferior process has already exited.
3092 2016-09-05 Pedro Alves <palves@redhat.com>
3094 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3095 (COMPILE.pre, CC_LD): Use CXX directly.
3096 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3097 * acinclude.m4: Don't include build-with-cxx.m4.
3098 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3099 * configure: Regenerate.
3101 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3104 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3105 call writing data to own_buf.
3107 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3109 * target.c (mywait): Call target_wait instead of
3111 (target_wait): New function.
3113 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3115 * server.c (start_inferior): New variable 'ptid'. Replace calls
3116 to the_target->resume by target_continue{,_no_signal}, depending
3118 * target.c (target_stop_and_wait): Call target_continue_no_signal
3119 instead of the_target->resume.
3120 (target_continue): New function.
3122 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3124 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3126 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3129 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3131 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3132 * linux-arm-low.c (ps_get_thread_area): Likewise.
3133 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3134 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3135 * linux-mips-low.c (ps_get_thread_area): Likewise.
3136 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3137 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3138 * linux-x86-low.c (ps_get_thread_area): Likewise.
3139 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3141 2016-08-19 Pedro Alves <palves@redhat.com>
3143 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3145 2016-08-19 Pedro Alves <palves@redhat.com>
3147 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3148 comment. Use memcpy instead of casting through unsigned long.
3150 2016-08-19 Pedro Alves <palves@redhat.com>
3152 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3153 allocating around 0x80000000.
3155 2016-08-19 Pedro Alves <palves@redhat.com>
3158 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3159 (x32-avx512-linux-ipa.o): New rules.
3160 * configure.ac (x86_64-*-linux*): New x32 check.
3161 * configure.srv (ipa_x32_linux_regobj): New.
3162 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3163 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3165 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3167 * configure: Regenerate.
3169 2016-08-09 Pedro Alves <palves@redhat.com>
3172 * Makefile.in (OBS): Add signals-state-save-restore.o.
3173 (signals-state-save-restore.o): New rule.
3174 * config.in: Regenerate.
3175 * configure: Regenerate.
3176 * linux-low.c: Include "signals-state-save-restore.h".
3177 (linux_create_inferior): Call
3178 restore_original_signals_state.
3179 * server.c: Include "dispositions-save-restore.h".
3180 (captured_main): Call save_original_signals_state.
3182 2016-08-05 Pedro Alves <palves@redhat.com>
3184 * configure: Regenerate.
3186 2016-08-04 Yao Qi <yao.qi@linaro.org>
3188 * linux-low.c (regsets_fetch_inferior_registers): Check
3189 errno is ESRCH or not.
3191 2016-08-02 Yao Qi <yao.qi@linaro.org>
3193 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3194 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3195 (thread_db_load_search): Update.
3196 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3197 td_ta_set_event and td_ta_event_getmsg.
3199 2016-07-26 Pedro Alves <palves@redhat.com>
3202 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3203 of unsigned long for 64-bit registers and use uint32_t instead of
3204 unsigned int for 32-bit registers.
3206 2016-07-26 Pedro Alves <palves@redhat.com>
3208 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3211 2016-07-21 Tom Tromey <tom@tromey.com>
3213 * configure: Rebuild.
3215 2016-07-21 Yao Qi <yao.qi@linaro.org>
3217 * mem-break.c (find_gdb_breakpoint): Cast bp to
3218 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3220 2016-07-21 Yao Qi <yao.qi@linaro.org>
3222 * server.c (handle_v_requests): Support s and S actions
3223 if target_supports_software_single_step return true.
3225 2016-07-21 Yao Qi <yao.qi@linaro.org>
3227 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3228 is resume_step, call maybe_hw_step.
3229 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3231 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3233 (proceed_one_lwp): If resume request is resume_step, install
3234 reinsert breakpoints and call maybe_hw_step.
3236 2016-07-21 Yao Qi <yao.qi@linaro.org>
3238 * linux-low.c (proceed_one_lwp): Declare.
3239 (linux_resume_one_thread): Remove local variable 'step'.
3240 Lift code enqueue signal. Call proceed_one_lwp instead of
3241 linux_resume_one_lwp.
3243 2016-07-21 Yao Qi <yao.qi@linaro.org>
3245 * linux-low.c (linux_resume_one_thread): Call
3246 enqueue_pending_signal.
3248 2016-07-21 Yao Qi <yao.qi@linaro.org>
3250 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3251 * inferiors.c (do_restore_current_thread_cleanup): New function.
3252 (make_cleanup_restore_current_thread): Likewise.
3253 * linux-low.c (install_software_single_step_breakpoints): Call
3254 make_cleanup_restore_current_thread. Switch current_thread to
3257 2016-07-21 Yao Qi <yao.qi@linaro.org>
3259 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3260 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3261 (clone_one_breakpoint): Likewise.
3262 (delete_reinsert_breakpoints): Change parameter to thread.
3264 (has_reinsert_breakpoints): Likewise.
3265 (uninsert_reinsert_breakpoints): Likewise.
3266 (reinsert_reinsert_breakpoints): Likewise.
3267 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3268 (delete_reinsert_breakpoints): Likewise.
3269 (reinsert_reinsert_breakpoints): Likewise.
3270 (uninsert_reinsert_breakpoints): Likewise.
3271 (has_reinsert_breakpoints): Likewise.
3273 2016-07-21 Yao Qi <yao.qi@linaro.org>
3275 * inferiors.c (get_thread_process): Make parameter const.
3276 * inferiors.h (get_thread_process): Update declaration.
3277 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3278 Add new parameters child_thread and parent_thread. Callers
3280 * mem-break.h (clone_all_breakpoints): Update declaration.
3282 2016-07-21 Yao Qi <yao.qi@linaro.org>
3284 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3285 <command_list, handler>: Remove.
3286 (struct gdb_breakpoint): New.
3287 (struct other_breakpoint): New.
3288 (struct reinsert_breakpoint): New.
3289 (is_gdb_breakpoint): New function.
3290 (any_persistent_commands): Update command_list if
3291 is_gdb_breakpoint returns true.
3292 (set_breakpoint): Create breakpoints according to their types.
3293 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3294 (set_gdb_breakpoint_1): Likewise.
3295 (set_gdb_breakpoint): Likewise.
3296 (clear_breakpoint_conditions): Change parameter type to
3297 'struct gdb_breakpoint *'.
3298 (clear_breakpoint_commands): Likewise.
3299 (clear_breakpoint_conditions_and_commands): Likewise.
3300 (add_condition_to_breakpoint): Likewise.
3301 (add_breakpoint_condition): Likewise.
3302 (add_commands_to_breakpoint): Likewise.
3303 (check_breakpoints): Check other_breakpoint.
3304 (clone_one_breakpoint): Clone breakpopint according to its type.
3305 * mem-break.h (struct gdb_breakpoint): Declare.
3306 (set_gdb_breakpoint): Update declaration.
3307 (clear_breakpoint_conditions_and_commands): Likewise.
3308 (add_breakpoint_condition): Likewise.
3309 (add_breakpoint_commands): Likewise.
3310 * server.c (process_point_options): Change parameter type to
3311 'struct gdb_breakpoint *'.
3313 2016-07-21 Yao Qi <yao.qi@linaro.org>
3315 * mem-break.c (set_breakpoint_at): Rename it to ...
3316 (set_breakpoint_type_at): ... it.
3317 (set_breakpoint_at): Call set_breakpoint_type_at.
3318 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3319 * mem-break.h (set_breakpoint_at): Update comments.
3321 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3323 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3325 (nios2_store_gregset): Likewise.
3327 2016-07-01 Pedro Alves <palves@redhat.com>
3328 Antoine Tremblay <antoine.tremblay@ericsson.com>
3330 * linux-low.c: Change interface to take the target lwp_info
3331 pointer directly and return void. Handle detaching from a zombie
3333 (linux_detach_lwp_callback): New function.
3334 (linux_detach): Detach from the leader thread after detaching from
3337 2016-06-28 Yao Qi <yao.qi@linaro.org>
3339 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3340 for variable new_offset.
3341 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3342 (aarch64_ftrace_insn_reloc_cb): Likewise.
3343 (aarch64_ftrace_insn_reloc_tb): Likewise.
3344 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3345 PRIx64 instead of PRIx32.
3347 2016-06-28 Yao Qi <yao.qi@linaro.org>
3349 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3350 (the_low_target): Install arm_get_syscall_trapinfo.
3352 2016-06-28 Yao Qi <yao.qi@linaro.org>
3354 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3356 (the_low_target): Install aarch64_get_syscall_trapinfo.
3358 2016-06-28 Yao Qi <yao.qi@linaro.org>
3360 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3362 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3363 Remove parameter sysno.
3364 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3367 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3369 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3370 (s390_emit_ne_goto): Likewise.
3371 (s390_emit_lt_goto): Likewise.
3372 (s390_emit_le_goto): Likewise.
3373 (s390_emit_gt_goto): Likewise.
3374 (s390_emit_ge_goto): Likewise.
3375 (s390x_emit_eq_goto): Likewise.
3376 (s390x_emit_ne_goto): Likewise.
3377 (s390x_emit_lt_goto): Likewise.
3378 (s390x_emit_le_goto): Likewise.
3379 (s390x_emit_gt_goto): Likewise.
3380 (s390x_emit_ge_goto): Likewise.
3381 (s390_emit_ops_impl): Mark variable static.
3382 (s390x_emit_ops): Likewise.
3384 2016-06-17 Yao Qi <yao.qi@linaro.org>
3386 * linux-low.c (handle_extended_wait): Call
3387 uninsert_reinsert_breakpoints for the parent process. Remove
3388 reinsert breakpoints from the child process. Reinsert them to
3389 the parent process when vfork is done.
3390 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3391 (reinsert_reinsert_breakpoints): New function.
3392 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3393 (reinsert_reinsert_breakpoints): Declare.
3395 2016-06-17 Yao Qi <yao.qi@linaro.org>
3397 * linux-low.c (handle_extended_wait): If the parent is doing
3398 step-over, remove the reinsert breakpoints from the forked child.
3400 2016-06-17 Yao Qi <yao.qi@linaro.org>
3402 * linux-low.c (unsuspend_all_lwps): Declare.
3403 (linux_low_filter_event): If thread exited, call finish_step_over.
3404 If step-over is finished, unsuspend other threads.
3406 2016-06-17 Yao Qi <yao.qi@linaro.org>
3408 * linux-low.c (linux_resume_one_lwp_throw): Assert
3409 has_reinsert_breakpoints returns false.
3410 * mem-break.c (delete_disabled_breakpoints): Assert
3411 bp type isn't reinsert_breakpoint.
3413 2016-06-17 Yao Qi <yao.qi@linaro.org>
3415 * linux-low.c (maybe_hw_step): New function.
3416 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3417 (finish_step_over): Switch current_thread to lwp temporarily,
3418 and assert has_reinsert_breakpoints returns true.
3419 (proceed_one_lwp): Call maybe_hw_step.
3420 * mem-break.c (has_reinsert_breakpoints): New function.
3421 * mem-break.h (has_reinsert_breakpoints): Declare.
3423 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3425 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3427 2016-05-17 Yao Qi <yao.qi@linaro.org>
3429 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3430 instead of find_inferior.
3432 2016-05-05 Yao Qi <yao.qi@linaro.org>
3434 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3435 Initialize res to zero.
3437 2016-05-05 Yao Qi <yao.qi@linaro.org>
3439 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3442 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3444 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3445 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3446 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3448 2016-04-28 Par Olsson <par.olsson@windriver.com>
3449 Simon Marchi <simon.marchi@ericsson.com>
3451 * tracepoint.c (write_inferior_int8): New function.
3452 (cmd_qtenable_disable): Write enable flag using
3453 write_inferior_int8.
3455 2016-04-25 Yao Qi <yao.qi@linaro.org>
3457 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3458 (need_step_over_p): Return zero if the LWP has pending signals
3459 can be delivered on software single step target.
3461 2016-04-25 Yao Qi <yao.qi@linaro.org>
3463 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3464 return instead of error.
3466 2016-04-22 Yao Qi <yao.qi@linaro.org>
3468 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3471 2016-04-22 Yao Qi <yao.qi@linaro.org>
3473 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3474 signal when stepping over breakpoint with software single
3477 2016-04-21 Pedro Alves <palves@redhat.com>
3479 * linux-s390-low.c (s390_collect_ptrace_register)
3480 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3482 (s390_check_regset): Use void * instead of gdb_byte *.
3484 2016-04-20 Pedro Alves <palves@redhat.com>
3486 * configure: Renegerate.
3488 2016-04-20 Yao Qi <yao.qi@linaro.org>
3490 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3491 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3493 (arm_store_gregset): Likewise.
3495 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3497 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3498 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3499 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3500 (amd64-avx-mpx-linux.c): New rules.
3501 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3502 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3503 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3504 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3505 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3506 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3507 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3508 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3509 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3510 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3511 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3512 * linux-x86-low.c (x86_linux_read_description): Add case for
3513 X86_XSTATE_AVX_MPX_MASK.
3514 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3515 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3516 init_registers_i386_avx_mpx_linux.
3517 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3518 (initialize_low_tracepoint): Call
3519 init_registers_i386_avx_mpx_linux.
3520 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3521 (initialize_low_tracepoint): Call
3522 init_registers_amd64_avx_mpx_linux.
3523 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3524 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3525 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3528 2016-04-18 Pedro Alves <palves@redhat.com>
3530 * configure: Regenerate.
3532 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3534 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3535 (aarch64_emit_sub): Likewise.
3537 2016-04-12 Pedro Alves <palves@redhat.com>
3539 * utils.c (prepare_to_throw_exception): Delete.
3541 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3543 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3545 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3547 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3549 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3551 * linux-aarch64-ipa.c: Add <elf.h> include.
3552 * linux-ppc-ipa.c: Add <elf.h> include.
3553 * linux-s390-ipa.c: Add <elf.h> include.
3555 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3557 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3558 (get_raw_reg_ptr): Likewise.
3559 (get_trace_state_variable_value_ptr): Likewise.
3560 (set_trace_state_variable_value_ptr): Likewise.
3561 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3564 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3565 Marcin Kościelnicki <koriakin@0x04.net>
3568 * linux-ppc-low.c (emit_insns): New function.
3569 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3570 (ppc_emit_prologue): New function.
3571 (ppc_emit_epilogue): New function.
3572 (ppc_emit_add): New function.
3573 (ppc_emit_sub): New function.
3574 (ppc_emit_mul): New function.
3575 (ppc_emit_lsh): New function.
3576 (ppc_emit_rsh_signed): New function.
3577 (ppc_emit_rsh_unsigned): New function.
3578 (ppc_emit_ext): New function.
3579 (ppc_emit_zero_ext): New function.
3580 (ppc_emit_log_not): New function.
3581 (ppc_emit_bit_and): New function.
3582 (ppc_emit_bit_or): New function.
3583 (ppc_emit_bit_xor): New function.
3584 (ppc_emit_bit_not): New function.
3585 (ppc_emit_equal): New function.
3586 (ppc_emit_less_signed): New function.
3587 (ppc_emit_less_unsigned): New function.
3588 (ppc_emit_ref): New function.
3589 (ppc_emit_const): New function.
3590 (ppc_emit_reg): New function.
3591 (ppc_emit_pop): New function.
3592 (ppc_emit_stack_flush): New function.
3593 (ppc_emit_swap): New function.
3594 (ppc_emit_stack_adjust): New function.
3595 (ppc_emit_call): New function.
3596 (ppc_emit_int_call_1): New function.
3597 (ppc_emit_void_call_2): New function.
3598 (ppc_emit_if_goto): New function.
3599 (ppc_emit_goto): New function.
3600 (ppc_emit_eq_goto): New function.
3601 (ppc_emit_ne_goto): New function.
3602 (ppc_emit_lt_goto): New function.
3603 (ppc_emit_le_goto): New function.
3604 (ppc_emit_gt_goto): New function.
3605 (ppc_emit_ge_goto): New function.
3606 (ppc_write_goto_address): New function.
3607 (ppc_emit_ops_impl): New static variable.
3608 (ppc64v1_emit_prologue): New function.
3609 (ppc64v2_emit_prologue): New function.
3610 (ppc64_emit_epilogue): New function.
3611 (ppc64_emit_add): New function.
3612 (ppc64_emit_sub): New function.
3613 (ppc64_emit_mul): New function.
3614 (ppc64_emit_lsh): New function.
3615 (ppc64_emit_rsh_signed): New function.
3616 (ppc64_emit_rsh_unsigned): New function.
3617 (ppc64_emit_ext): New function.
3618 (ppc64_emit_zero_ext): New function.
3619 (ppc64_emit_log_not): New function.
3620 (ppc64_emit_bit_and): New function.
3621 (ppc64_emit_bit_or): New function.
3622 (ppc64_emit_bit_xor): New function.
3623 (ppc64_emit_bit_not): New function.
3624 (ppc64_emit_equal): New function.
3625 (ppc64_emit_less_signed): New function.
3626 (ppc64_emit_less_unsigned): New function.
3627 (ppc64_emit_ref): New function.
3628 (ppc64_emit_const): New function.
3629 (ppc64v1_emit_reg): New function.
3630 (ppc64v2_emit_reg): New function.
3631 (ppc64_emit_pop): New function.
3632 (ppc64_emit_stack_flush): New function.
3633 (ppc64_emit_swap): New function.
3634 (ppc64v1_emit_call): New function.
3635 (ppc64v2_emit_call): New function.
3636 (ppc64v1_emit_int_call_1): New function.
3637 (ppc64v2_emit_int_call_1): New function.
3638 (ppc64v1_emit_void_call_2): New function.
3639 (ppc64v2_emit_void_call_2): New function.
3640 (ppc64_emit_if_goto): New function.
3641 (ppc64_emit_eq_goto): New function.
3642 (ppc64_emit_ne_goto): New function.
3643 (ppc64_emit_lt_goto): New function.
3644 (ppc64_emit_le_goto): New function.
3645 (ppc64_emit_gt_goto): New function.
3646 (ppc64_emit_ge_goto): New function.
3647 (ppc64v1_emit_ops_impl): New static variable.
3648 (ppc64v2_emit_ops_impl): New static variable.
3649 (ppc_emit_ops): New function.
3650 (linux_low_target): Wire in ppc_emit_ops.
3652 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3653 Marcin Kościelnicki <koriakin@0x04.net>
3656 * Makefile.in: Add powerpc-*-ipa.o
3657 * configure.srv: Add ipa_obj for powerpc*-linux.
3658 * linux-ppc-ipa.c: New file.
3659 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3661 (PPC_FIELD): New macro.
3662 (PPC_SEXT): New macro.
3663 (PPC_OP6): New macro.
3664 (PPC_BO): New macro.
3665 (PPC_LI): New macro.
3666 (PPC_BD): New macro.
3667 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3668 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3669 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3670 (ppc_get_thread_area): New function.
3671 (is_elfv2_inferior): New function.
3672 (gen_ds_form): New function.
3673 (GEN_STD): New macro.
3674 (GEN_STDU): New macro.
3675 (GEN_LD): New macro.
3676 (GEN_LDU): New macro.
3677 (gen_d_form): New function.
3678 (GEN_ADDI): New macro.
3679 (GEN_ADDIS): New macro.
3680 (GEN_LI): New macro.
3681 (GEN_LIS): New macro.
3682 (GEN_ORI): New macro.
3683 (GEN_ORIS): New macro.
3684 (GEN_LWZ): New macro.
3685 (GEN_STW): New macro.
3686 (GEN_STWU): New macro.
3687 (gen_xfx_form): New function.
3688 (GEN_MFSPR): New macro.
3689 (GEN_MTSPR): New macro.
3690 (GEN_MFCR): New macro.
3691 (GEN_MTCR): New macro.
3692 (GEN_SYNC): New macro.
3693 (GEN_LWSYNC): New macro.
3694 (gen_x_form): New function.
3695 (GEN_OR): New macro.
3696 (GEN_MR): New macro.
3697 (GEN_LWARX): New macro.
3698 (GEN_STWCX): New macro.
3699 (GEN_CMPW): New macro.
3700 (gen_md_form): New function.
3701 (GEN_RLDICL): New macro.
3702 (GEN_RLDICR): New macro.
3703 (gen_i_form): New function.
3705 (GEN_BL): New macro.
3706 (gen_b_form): New function.
3707 (GEN_BNE): New macro.
3708 (GEN_LOAD): New macro.
3709 (GEN_STORE): New macro.
3710 (gen_limm): New function.
3711 (gen_atomic_xchg): New function.
3712 (gen_call): New function.
3713 (ppc_relocate_instruction): New function.
3714 (ppc_install_fast_tracepoint_jump_pad): New function.
3715 (ppc_get_min_fast_tracepoint_insn_len): New function.
3716 (ppc_get_ipa_tdesc_idx): New function.
3717 (the_low_target): Wire in the new functions.
3718 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3720 * linux-ppc-tdesc.h: New file.
3722 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3724 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3725 (alloc_jump_pad_buffer): New function.
3726 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3727 (alloc_jump_pad_buffer): New function.
3728 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3729 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3730 (alloc_jump_pad_buffer): New function.
3731 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3732 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3733 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3734 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3736 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3738 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3739 * linux-amd64-ipa.c: Likewise.
3740 * linux-i386-ipa.c: Likewise.
3741 * linux-s390-ipa.c: Likewise.
3742 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3743 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3744 set_trace_state_variable_value_ptr.
3745 (struct ipa_sym_addresses): Likewise.
3746 (symbol_list): Likewise.
3747 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3748 accessing gdb_collect directly.
3749 (gdb_collect_ptr_type): New typedef.
3750 (get_raw_reg_ptr_type): New typedef.
3751 (get_trace_state_variable_value_ptr_type): New typedef.
3752 (set_trace_state_variable_value_ptr_type): New typedef.
3753 (gdb_collect_ptr): New global.
3754 (get_raw_reg_ptr): New global.
3755 (get_trace_state_variable_value_ptr): New global.
3756 (set_trace_state_variable_value_ptr): New global.
3757 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3758 accessing get_raw_reg directly.
3759 (get_get_tsv_func_addr): Likewise for
3760 get_trace_state_variable_value_ptr.
3761 (get_set_tsv_func_addr): Likewise for
3762 set_trace_state_variable_value_ptr.
3763 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3765 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3767 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3769 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3771 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3773 (relocate_instruction): Remove own_buf.
3774 * server.c (own_buf): Make global.
3775 (handle_v_requests): Make global.
3776 * server.h (own_buf): New declaration.
3777 (handle_v_requests): New prototype.
3779 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3782 * linux-s390-low.c (add_insns): New function.
3783 (s390_emit_prologue): New function.
3784 (s390_emit_epilogue): New function.
3785 (s390_emit_add): New function.
3786 (s390_emit_sub): New function.
3787 (s390_emit_mul): New function.
3788 (s390_emit_lsh): New function.
3789 (s390_emit_rsh_signed): New function.
3790 (s390_emit_rsh_unsigned): New function.
3791 (s390_emit_ext): New function.
3792 (s390_emit_log_not): New function.
3793 (s390_emit_bit_and): New function.
3794 (s390_emit_bit_or): New function.
3795 (s390_emit_bit_xor): New function.
3796 (s390_emit_bit_not): New function.
3797 (s390_emit_equal): New function.
3798 (s390_emit_less_signed): New function.
3799 (s390_emit_less_unsigned): New function.
3800 (s390_emit_ref): New function.
3801 (s390_emit_if_goto): New function.
3802 (s390_emit_goto): New function.
3803 (s390_write_goto_address): New function.
3804 (s390_emit_litpool): New function.
3805 (s390_emit_const): New function.
3806 (s390_emit_call): New function.
3807 (s390_emit_reg): New function.
3808 (s390_emit_pop): New function.
3809 (s390_emit_stack_flush): New function.
3810 (s390_emit_zero_ext): New function.
3811 (s390_emit_swap): New function.
3812 (s390_emit_stack_adjust): New function.
3813 (s390_emit_set_r2): New function.
3814 (s390_emit_int_call_1): New function.
3815 (s390_emit_void_call_2): New function.
3816 (s390_emit_eq_goto): New function.
3817 (s390_emit_ne_goto): New function.
3818 (s390_emit_lt_goto): New function.
3819 (s390_emit_le_goto): New function.
3820 (s390_emit_gt_goto): New function.
3821 (s390_emit_ge_goto): New function.
3822 (s390x_emit_prologue): New function.
3823 (s390x_emit_epilogue): New function.
3824 (s390x_emit_add): New function.
3825 (s390x_emit_sub): New function.
3826 (s390x_emit_mul): New function.
3827 (s390x_emit_lsh): New function.
3828 (s390x_emit_rsh_signed): New function.
3829 (s390x_emit_rsh_unsigned): New function.
3830 (s390x_emit_ext): New function.
3831 (s390x_emit_log_not): New function.
3832 (s390x_emit_bit_and): New function.
3833 (s390x_emit_bit_or): New function.
3834 (s390x_emit_bit_xor): New function.
3835 (s390x_emit_bit_not): New function.
3836 (s390x_emit_equal): New function.
3837 (s390x_emit_less_signed): New function.
3838 (s390x_emit_less_unsigned): New function.
3839 (s390x_emit_ref): New function.
3840 (s390x_emit_if_goto): New function.
3841 (s390x_emit_const): New function.
3842 (s390x_emit_call): New function.
3843 (s390x_emit_reg): New function.
3844 (s390x_emit_pop): New function.
3845 (s390x_emit_stack_flush): New function.
3846 (s390x_emit_zero_ext): New function.
3847 (s390x_emit_swap): New function.
3848 (s390x_emit_stack_adjust): New function.
3849 (s390x_emit_int_call_1): New function.
3850 (s390x_emit_void_call_2): New function.
3851 (s390x_emit_eq_goto): New function.
3852 (s390x_emit_ne_goto): New function.
3853 (s390x_emit_lt_goto): New function.
3854 (s390x_emit_le_goto): New function.
3855 (s390x_emit_gt_goto): New function.
3856 (s390x_emit_ge_goto): New function.
3857 (s390_emit_ops): New function.
3858 (struct linux_target_ops): Fill in emit_ops hook.
3860 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3863 * Makefile.in: Add s390 IPA files.
3864 * configure.srv: Build IPA for s390.
3865 * linux-s390-ipa.c: New file.
3866 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3867 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3868 (tdesc_s390_linux32): Likewise.
3869 (init_registers_s390_linux32v1): Likewise.
3870 (tdesc_s390_linux32v1): Likewise.
3871 (init_registers_s390_linux32v2): Likewise.
3872 (tdesc_s390_linux32v2): Likewise.
3873 (init_registers_s390_linux64): Likewise.
3874 (tdesc_s390_linux64): Likewise.
3875 (init_registers_s390_linux64v1): Likewise.
3876 (tdesc_s390_linux64v1): Likewise.
3877 (init_registers_s390_linux64v2): Likewise.
3878 (tdesc_s390_linux64v2): Likewise.
3879 (init_registers_s390_te_linux64): Likewise.
3880 (tdesc_s390_te_linux64): Likewise.
3881 (init_registers_s390_vx_linux64): Likewise.
3882 (tdesc_s390_vx_linux64): Likewise.
3883 (init_registers_s390_tevx_linux64): Likewise.
3884 (tdesc_s390_tevx_linux64): Likewise.
3885 (init_registers_s390x_linux64): Likewise.
3886 (tdesc_s390x_linux64): Likewise.
3887 (init_registers_s390x_linux64v1): Likewise.
3888 (tdesc_s390x_linux64v1): Likewise.
3889 (init_registers_s390x_linux64v2): Likewise.
3890 (tdesc_s390x_linux64v2): Likewise.
3891 (init_registers_s390x_te_linux64): Likewise.
3892 (tdesc_s390x_te_linux64): Likewise.
3893 (init_registers_s390x_vx_linux64): Likewise.
3894 (tdesc_s390x_vx_linux64): Likewise.
3895 (init_registers_s390x_tevx_linux64): Likewise.
3896 (tdesc_s390x_tevx_linux64): Likewise.
3897 (have_hwcap_s390_vx): New static variable.
3898 (s390_arch_setup): Fill have_hwcap_s390_vx.
3899 (s390_get_thread_area): New function.
3900 (s390_ft_entry_gpr_esa): New const.
3901 (s390_ft_entry_gpr_zarch): New const.
3902 (s390_ft_entry_misc): New const.
3903 (s390_ft_entry_fr): New const.
3904 (s390_ft_entry_vr): New const.
3905 (s390_ft_main_31): New const.
3906 (s390_ft_main_64): New const.
3907 (s390_ft_exit_fr): New const.
3908 (s390_ft_exit_vr): New const.
3909 (s390_ft_exit_misc): New const.
3910 (s390_ft_exit_gpr_esa): New const.
3911 (s390_ft_exit_gpr_zarch): New const.
3912 (append_insns): New function.
3913 (s390_relocate_instruction): New function.
3914 (s390_install_fast_tracepoint_jump_pad): New function.
3915 (s390_get_min_fast_tracepoint_insn_len): New function.
3916 (s390_get_ipa_tdesc_idx): New function.
3917 (struct linux_target_ops): Wire in the above functions.
3918 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3919 * linux-s390-tdesc.h: New file.
3921 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3923 * linux-s390-low.c (s390_supports_tracepoints): New function.
3924 (struct linux_target_ops): Fill supports_tracepoints hook.
3926 2016-03-18 Yao Qi <yao.qi@linaro.org>
3928 * linux-low.c (lwp_signal_can_be_delivered): New function.
3929 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3931 2016-03-18 Yao Qi <yao.qi@linaro.org>
3933 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3934 0 if signal is enqueued. Remove 'signal' from one debugging
3935 message. Move one debugging message to some lines below.
3936 Remove code setting 'signal' to 0.
3938 2016-03-18 Yao Qi <yao.qi@linaro.org>
3940 * linux-low.c (linux_low_filter_event): Remove redundant
3941 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3943 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3945 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3946 (struct linux_target_ops): Wire in the above.
3948 2016-03-03 Yao Qi <yao.qi@linaro.org>
3950 * linux-low.c: Update comments to start_step_over.
3952 2016-03-03 Yao Qi <yao.qi@linaro.org>
3955 * linux-low.c (handle_extended_wait): Set child suspended
3956 if event_lwp->bp_reinsert isn't zero.
3958 2016-03-02 Yao Qi <yao.qi@linaro.org>
3960 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3961 enqueue_pending_signal.
3963 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3965 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3968 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3970 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3971 (s390_regmap_3264) [!__s390x__]: New global.
3972 (s390_collect_ptrace_register): Skip map entries containing -1.
3973 (s390_supply_ptrace_register): Ditto.
3974 (s390_fill_gprs_high): New function.
3975 (s390_store_gprs_high): New function.
3976 (s390_regsets): Add NT_S390_HIGH_GPRS.
3977 (s390_get_hwcap): Enable on 31-bit.
3978 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3979 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3980 Detect NT_S390_HIGH_GPRS.
3981 (s390_usrregs_info_3264): Enable on 31-bit.
3982 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3983 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3985 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3988 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3989 * configure.srv: Ditto.
3990 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3991 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3992 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3993 (init_registers_amd64_linux): Remove prototype.
3994 (tdesc_amd64_linux): Remove declaration.
3995 (get_ipa_tdesc): New function.
3996 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3997 initialize remaining tdescs.
3998 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3999 (init_registers_i386_linux): Remove prototype.
4000 (tdesc_i386_linux): Remove declaration.
4001 (get_ipa_tdesc): New function.
4002 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4003 initialize remaining tdescs.
4004 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4005 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4006 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4007 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4008 (x86_get_ipa_tdesc_idx): New function.
4009 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4010 * linux-x86-tdesc.h: New file.
4011 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4012 (target_get_ipa_tdesc_idx): New macro.
4013 * tracepoint.c (ipa_tdesc_idx): New macro.
4014 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4015 (symbol_list): Add ipa_tdesc_idx.
4016 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4017 (ipa_tdesc): Remove.
4018 (ipa_tdesc_idx): New variable.
4019 (get_context_regcache): Use get_ipa_tdesc.
4020 (gdb_collect): Ditto.
4022 * tracepoint.h (get_ipa_tdesc): New prototype.
4023 (ipa_tdesc): Remove.
4025 2016-02-24 Pedro Alves <palves@redhat.com>
4027 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4028 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4029 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4030 Factor out common code between the USE_SIGTRAP_SIGINFO and
4031 !USE_SIGTRAP_SIGINFO blocks.
4032 (linux_low_filter_event): Call save_stop_reason instead of
4033 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4035 (linux_wait_1): Update comments.
4037 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4039 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4040 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4041 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4042 ppc_insert_point, ppc_remove_point.
4044 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4046 * linux-s390-low.c (s390_supports_z_point_type): New function.
4047 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4049 2016-02-16 Yao Qi <yao.qi@linaro.org>
4051 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4052 PC. Get pc from regcache_read_pc.
4054 2016-02-12 Yao Qi <yao.qi@linaro.org>
4056 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4057 or linux_get_pc_32bit.
4058 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4060 2016-02-12 Yao Qi <yao.qi@linaro.org>
4062 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4063 arm_linux_get_next_pcs_fixup.
4065 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4067 * tracepoint.c (x_tracepoint_action_download): Change
4068 write_inferior_data_ptr to write_inferior_data_pointer.
4069 (cmd_qtstart): Likewise.
4070 (write_inferior_data_ptr): Remove.
4071 (download_agent_expr): Change write_inferior_data_ptr to
4072 write_inferior_data_pointer.
4073 (download_tracepoint_1): Likewise.
4074 (download_tracepoint): Likewise.
4075 (download_trace_state_variables): Likewise.
4077 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4078 Marcin Kościelnicki <koriakin@0x04.net>
4080 * tracepoint.c (struct tracepoint_action_ops): Remove.
4081 (struct tracepoint_action): Remove ops.
4082 (m_tracepoint_action_download, r_tracepoint_action_download)
4083 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4084 size and offset accordingly.
4085 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4086 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4087 (tracepoint_action_send, tracepoint_action_download): New functions.
4088 Helpers for trace action handlers.
4089 (add_tracepoint_action): Remove setup actions ops.
4090 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4092 2016-02-10 Yao Qi <yao.qi@linaro.org>
4094 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4096 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4098 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4100 * configure: Regenerate.
4102 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4104 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4105 void * to gdb_byte *.
4106 * linux-low.c (siginfo_fixup): Likewise.
4107 (linux_xfer_siginfo): Likewise.
4108 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4110 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4112 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4114 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4116 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4118 * linux-x86-low.c [__x86_64__]: Include
4119 "nat/amd64-linux-siginfo.h".
4120 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4121 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4122 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4123 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4124 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4125 (cpt_si_fd, si_timerid, si_overrun): Move from
4126 nat/amd64-linux-siginfo.c.
4127 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4129 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4131 * server.c (skip_to_semicolon): Remove.
4132 (process_point_options): Use strchrnul instead of
4135 2016-01-26 Yao Qi <yao.qi@linaro.org>
4137 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4138 * linux-low.c (install_software_single_step_breakpoints): Don't
4139 call regcache_read_pc.
4140 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4143 2016-01-26 Yao Qi <yao.qi@linaro.org>
4145 * linux-low.c (install_software_single_step_breakpoints): Call
4146 regcache_read_pc instead of get_pc.
4148 2016-01-26 Yao Qi <yao.qi@linaro.org>
4150 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4151 (unblock_async_io): Rename to ...
4152 (block_unblock_async_io): ... it. New function.
4153 (enable_async_io): Don't install SIGIO handler. Unblock it
4155 (disable_async_io): Don't ignore SIGIO. Block it instead.
4156 (initialize_async_io): Install SIGIO handler. Don't call
4159 2016-01-26 Yao Qi <yao.qi@linaro.org>
4161 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4162 first character is '\003', call *the_target->request_interrupt.
4164 2016-01-25 Yao Qi <yao.qi@linaro.org>
4166 * remote-utils.c (new_thread_notify): Remove.
4167 (dead_thread_notify): Likewise.
4168 * remote-utils.h (new_thread_notify): Remove declaration.
4169 (dead_thread_notify): Likewise.
4171 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4173 * gdb.trace/pending.exp: Fix expected message on continue.
4175 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4177 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4178 it works properly on big-endian machines where sizeof (CORE_ADDR)
4181 2016-01-21 Pedro Alves <palves@redhat.com>
4183 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4184 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4185 * configure: Regenerate.
4187 2016-01-21 Yao Qi <yao.qi@linaro.org>
4189 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4190 is_thumb and set it according to CPSR saved on the stack.
4191 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4192 arm_sigreturn_next_pc.
4194 2016-01-18 Yao Qi <yao.qi@linaro.org>
4196 * linux-low.c (linux_set_pc_64bit): New function.
4197 (linux_get_pc_64bit): New function.
4198 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4200 * linux-sparc-low.c (debug_threads): Remove declaration.
4201 (sparc_get_pc): Remove.
4202 (the_low_target): Use linux_get_pc_64bit instead of
4204 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4205 (the_low_target): Use linux_get_pc_64bit and
4208 2016-01-18 Yao Qi <yao.qi@linaro.org>
4210 * linux-arm-low.c (debug_threads): Remove declaration.
4211 (arm_get_pc, arm_set_pc): Remove.
4212 (the_low_target): Use linux_get_pc_32bit and
4214 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4215 (the_low_target): Use linux_get_pc_32bit and
4217 * linux-cris-low.c (debug_threads): Remove declaration.
4218 (cris_get_pc, cris_set_pc,): Remove.
4219 (the_low_target): Use linux_get_pc_32bit and
4221 * linux-crisv32-low.c (debug_threads): Remove declaration.
4222 (cris_get_pc, cris_set_pc): Remove.
4223 (the_low_target): Use linux_get_pc_32bit and
4225 * linux-low.c: Include inttypes.h.
4226 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4227 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4228 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4229 (the_low_target): Use linux_get_pc_32bit and
4231 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4232 (the_low_target): Use linux_get_pc_32bit and
4234 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4235 (the_low_target): Use linux_get_pc_32bit and
4237 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4238 (the_low_target): Use linux_get_pc_32bit and
4240 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4241 (the_low_target): Use linux_get_pc_32bit and
4244 2016-01-18 Gary Benson <gbenson@redhat.com>
4246 * configure.ac (AC_FUNC_FORK): New check.
4247 * config.in: Regenerate.
4248 * configure: Likewise.
4250 2016-01-14 Yao Qi <yao.qi@linaro.org>
4252 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4253 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4254 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4255 arm_get_next_pcs_ctor.
4257 2016-01-12 Josh Stone <jistone@redhat.com>
4258 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4260 * inferiors.h: Include "gdb_vecs.h".
4261 (struct process_info): Add syscalls_to_catch.
4262 * inferiors.c (remove_process): Free syscalls_to_catch.
4263 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4264 syscall_return stops.
4265 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4266 * server.c (handle_general_set): Handle QCatchSyscalls.
4267 (handle_query): Report support for QCatchSyscalls.
4268 * target.h (struct target_ops): Add supports_catch_syscall.
4269 (target_supports_catch_syscall): New macro.
4270 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4271 (struct lwp_info): Add syscall_state.
4272 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4273 Maintain syscall_state and syscalls_to_catch across exec.
4274 (get_syscall_trapinfo): New function, proxy to the_low_target.
4275 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4276 (linux_low_filter_event): Toggle syscall_state entry/return for
4277 syscall traps, and set it ignored for all others.
4278 (gdb_catching_syscalls_p): New function.
4279 (gdb_catch_this_syscall_p): New function.
4280 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4281 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4282 (linux_supports_catch_syscall): New function.
4283 (linux_target_ops): Install it.
4284 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4285 (the_low_target): Install it.
4287 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4289 * acinclude.m4: Include new ../warning.m4 file.
4290 * configure: Regenerated.
4291 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4293 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4295 * ax.c (is_goto_target): Mark static.
4296 * linux-low.c (register_addr): Likewise.
4297 (linux_fetch_registers, linux_store_registers): Likewise.
4298 * mem-break.c (any_persistent_commands): Fix old prototype.
4299 (add_commands_to_breakpoint): Mark static.
4300 * regcache.c (find_register_by_name): Delete unused func.
4301 * remote-utils.c (hex_or_minus_one): Mark static.
4302 * server.c (monitor_show_help): Mark static.
4303 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4304 handle_v_requests): Likewise.
4306 2016-01-12 Pedro Alves <palves@redhat.com>
4308 Remove use of the registered trademark symbol throughout.
4310 2016-01-08 Yao Qi <yao.qi@linaro.org>
4312 * remote-utils.c (getpkt): If c is '\003', call target hook
4315 2016-01-06 Yao Qi <yao.qi@linaro.org>
4317 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4318 linux-aarch32-low.c.
4319 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4320 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4321 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4322 (thumb2_breakpoint): Declare.
4323 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4324 linux-aarch32-low.h.
4325 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4326 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4327 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4329 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4331 * gdbreplay.c (gdbreplay_version): Change copyright year in
4333 * server.c (gdbserver_version): Likewise.
4335 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4337 * server.c (crc32_table): Delete.
4338 (crc32): Use libiberty's xcrc32 function.
4340 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4342 * lynx-low.c (lynx_delete_thread_callback): New function.
4343 (lynx_mourn): Properly delete our process and all of its
4344 threads. Remove call to clear_inferiors.
4346 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4348 * target.c (thread_search_callback): Add check that
4349 the thread_stopped target callback is not NULL before
4352 2015-12-21 Yao Qi <yao.qi@linaro.org>
4354 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4357 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4359 * server.c (handle_query): Call target_supports_software_single_step.
4361 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4363 * linux-low.c (single_step): New function.
4364 (linux_resume_one_lwp_throw): Call single_step.
4365 (start_step_over): Likewise.
4367 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4369 * Makefile.in (SFILES): Append arch/arm-linux.c,
4370 arch/arm-get-next-pcs.c.
4371 (arm-linux.o): New rule.
4372 (arm-get-next-pcs.o): New rule.
4373 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4375 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4376 to linux-aarch32-low.c.
4377 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4378 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4379 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4380 (thumb2_breakpoint_len): Likewise.
4381 (arm_is_thumb_mode): Make non-static.
4382 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4383 from linux-aarch32-low.c.
4384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4385 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4386 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4387 (thumb2_breakpoint_len): Likewise.
4388 (arm_is_thumb_mode): New declaration.
4389 * linux-arm-low.c: Include arch/arm-linux.h
4390 aarch/arm-get-next-pcs.h, sys/syscall.h.
4391 (get_next_pcs_ops): New struct.
4392 (get_next_pcs_addr_bits_remove): New function.
4393 (get_next_pcs_is_thumb): New function.
4394 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4395 (arm_sigreturn_next_pc): Likewise.
4396 (get_next_pcs_syscall_next_pc): Likewise.
4397 (arm_gdbserver_get_next_pcs): Likewise.
4398 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4400 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4401 * server.h: Include gdb_vecs.h.
4403 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4405 * Makefile.in (SFILES): Append common/common-regcache.c.
4406 (OBS): Append common-regcache.o.
4407 (common-regcache.o): New rule.
4408 * regcache.c (init_register_cache): Initialize cache to
4410 (regcache_raw_read_unsigned): New function.
4411 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4412 register_status enum.
4414 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4416 * linux-aarch64-low.c (the_low_targets): Rename
4417 breakpoint_reinsert_addr to get_next_pcs.
4418 * linux-arm-low.c (the_low_targets): Likewise.
4419 * linux-bfin-low.c (the_low_targets): Likewise.
4420 * linux-cris-low.c (the_low_targets): Likewise.
4421 * linux-crisv32-low.c (the_low_targets): Likewise.
4422 * linux-low.c (can_software_single_step): Likewise.
4423 (install_software_single_step_breakpoints): New function.
4424 (start_step_over): Use install_software_single_step_breakpoints.
4425 * linux-low.h: New CORE_ADDR vector.
4426 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4428 * linux-mips-low.c (the_low_targets): Likewise.
4429 * linux-nios2-low.c (the_low_targets): Likewise.
4430 * linux-sparc-low.c (the_low_targets): Likewise.
4432 2015-12-17 Pedro Alves <palves@redhat.com>
4434 * linux-low.c (linux_kill_one_lwp): Remove references to
4436 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4438 (linux_init_signals): Delete.
4439 (initialize_low): Adjust.
4440 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4442 2015-12-16 Pedro Alves <palves@redhat.com>
4444 * configure.ac (compiler warning flags): When testing a
4445 -Wno-foo option, check whether -Wfoo works instead.
4446 * configure: Regenerate.
4448 2015-12-11 Don Breazeal <donb@codesourcery.com>
4450 * server.c (process_serial_event): Don't exit from gdbserver
4451 in remote mode if there are still active inferiors.
4453 2015-12-11 Yao Qi <yao.qi@linaro.org>
4455 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4456 arm_breakpoint_at if the process is 32-bit.
4458 2015-12-11 Yao Qi <yao.qi@linaro.org>
4460 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4463 2015-12-07 Yao Qi <yao.qi@linaro.org>
4465 * configure.srv: Append arm.o to srv_tgtobj for
4466 aarch64*-*-linux* target.
4467 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4468 from linux-arm-low.c.
4469 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4470 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4471 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4472 (thumb2_breakpoint_len): Likewise.
4473 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4474 (arm_breakpoint_kinds): Likewise.
4475 (arm_breakpoint_kind_from_pc): Likewise.
4476 (arm_sw_breakpoint_from_kind): Likewise.
4477 (arm_breakpoint_kind_from_current_state): Likewise.
4478 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4479 (arm_sw_breakpoint_from_kind): Declare.
4480 (arm_breakpoint_kind_from_current_state): Declare.
4481 (arm_breakpoint_at): Declare.
4482 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4483 arm_sw_breakpoint_from_kind if process is 32-bit.
4484 (aarch64_breakpoint_kind_from_pc): New function.
4485 (aarch64_breakpoint_kind_from_current_state): New function.
4486 (the_low_target): Initialize fields breakpoint_kind_from_pc
4487 and breakpoint_kind_from_current_state.
4488 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4489 linux-aarch32-low.c.
4490 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4491 (arm_breakpoint, arm_breakpoint_len): Likewise.
4492 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4493 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4494 (arm_is_thumb_mode): Likewise.
4495 (arm_breakpoint_at): Likewise.
4496 (arm_breakpoint_kind_from_pc): Likewise.
4497 (arm_sw_breakpoint_from_kind): Likewise.
4498 (arm_breakpoint_kind_from_current_state): Likewise.
4501 2015-08-04 Yao Qi <yao.qi@linaro.org>
4503 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4504 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4505 * server.c (extended_protocol): Remove "static".
4506 * server.h (extended_protocol): Declare it.
4508 2015-12-04 Josh Stone <jistone@redhat.com>
4510 * target.h (struct target_ops) <arch_setup>: Rename to ...
4511 (struct target_ops) <post_create_inferior>: ... this.
4512 (target_arch_setup): Rename to ...
4513 (target_post_create_inferior): ... this, calling post_create_inferior.
4514 * server.c (start_inferior): Update target_arch_setup calls to
4515 target_post_create_inferior.
4516 * linux-low.c (linux_low_ptrace_options): Forward declare.
4517 (linux_arch_setup): Update its comment for general use.
4518 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4519 (struct linux_target_ops): Use linux_post_create_inferior.
4520 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4521 to post_create_inferior.
4522 * nto-low.c (struct nto_target_ops): Likewise.
4523 * spu-low.c (struct spu_target_ops): Likewise.
4524 * win32-low.c (struct win32_target_ops): Likewise.
4526 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4528 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4530 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4532 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4533 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4534 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4535 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4536 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4537 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4538 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4539 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4540 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4541 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4542 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4543 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4545 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4547 * linux-low.c (linux_look_up_symbols): Don't call
4548 linux_supports_traceclone.
4549 * linux-low.h (thread_db_init): Remove use_events argument.
4550 * thread-db.c (thread_db_use_event): Remove global variable.
4551 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4552 (struct thread_db) <td_create_bp>: Remove field.
4553 (thread_db_create_event): Remove function.
4554 (thread_db_enable_reporting): Likewise.
4555 (find_one_thread): Don't check for thread_db_use_events.
4556 (attach_thread): Likewise.
4557 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4558 (try_thread_db_load_1): Don't check for thread_db_use_events.
4559 (thread_db_init): Remove use_events argument and thread events
4561 (remove_thread_event_breakpoints): Remove function.
4562 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4564 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4566 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4568 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4569 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4570 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4571 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4572 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4574 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4576 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4577 * linux-low.c (can_hardware_single_step): Use
4578 supports_hardware_single_step.
4579 (can_software_single_step): New function.
4580 (start_step_over): Call can_software_single_step.
4581 (linux_supports_hardware_single_step): New function.
4582 (struct target_ops) <supports_software_single_step>: Initialize.
4583 * linux-low.h (struct linux_target_ops)
4584 <supports_hardware_single_step>: Initialize.
4585 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4586 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4587 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4588 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4589 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4590 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4591 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4593 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4594 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4596 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4597 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4599 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4600 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4601 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4603 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4604 * target.h (struct target_ops): <supports_software_single_step>:
4606 (target_supports_software_single_step): New macro.
4608 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4610 * linux-low.c (linux_wait_1): Fix pc advance condition.
4611 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4612 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4614 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4616 * linux-arm-low.c (arm_is_thumb_mode): New function.
4617 (arm_breakpoint_at): Use arm_is_thumb_mode.
4618 (arm_breakpoint_kind_from_current_state): New function.
4619 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4621 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4622 (linux_breakpoint_kind_from_current_state): New function.
4623 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4624 * linux-low.h (struct linux_target_ops)
4625 <breakpoint_kind_from_current_state>: New field.
4626 * target.h (struct target_ops): Likewise.
4627 (target_breakpoint_kind_from_current_state): New macro.
4629 2015-11-30 Pedro Alves <palves@redhat.com>
4631 * linux-low.c (linux_resume): Wake up the event loop before
4634 2015-11-30 Pedro Alves <palves@redhat.com>
4636 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4638 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4640 * target.c (struct thread_search): New structure.
4641 (thread_search_callback): New function.
4642 (prev_general_thread): New global.
4643 (prepare_to_access_memory, done_accessing_memory): New functions.
4644 * target.h (prepare_to_access_memory, done_accessing_memory):
4645 Replace macros with function declarations.
4647 2015-11-30 Pedro Alves <palves@redhat.com>
4650 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4651 report TARGET_WAITKIND_NO_RESUMED.
4652 * remote-utils.c (prepare_resume_reply): Handle
4653 TARGET_WAITKIND_NO_RESUMED.
4654 * server.c (report_no_resumed): New global.
4655 (handle_query) <qSupported>: Handle "no-resumed+". Report
4656 "no-resumed+" support.
4657 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4658 return error if the client doesn't support no-resumed events.
4659 (push_stop_notification): New function.
4660 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4661 events if the client supports them.
4663 2015-11-30 Pedro Alves <palves@redhat.com>
4665 * linux-low.c (thread_still_has_status_pending_p): Don't check
4667 (lwp_resumed): New function.
4668 (status_pending_p_callback): Return early if the LWP is not
4669 supposed to be resumed.
4671 2015-11-30 Pedro Alves <palves@redhat.com>
4673 * linux-low.c (handle_extended_wait): Assert that the LWP's
4674 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4675 thread create events, leave the new child's status pending.
4676 (linux_low_filter_event): If GDB wants to hear about thread exit
4677 events, leave the LWP marked dead and don't delete it.
4678 (linux_wait_for_event_filtered): Don't check for thread exit.
4679 (filter_exit_event): New function.
4680 (linux_wait_1): Use it, when returning an exit event.
4681 (linux_resume_one_lwp_throw): Assert that the LWP's
4682 waitstatus is TARGET_WAITKIND_IGNORE.
4683 * remote-utils.c (prepare_resume_reply): Handle
4684 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4685 * server.c (report_thread_events): New global.
4686 (handle_general_set): Handle QThreadEvents.
4687 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4688 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4689 TARGET_WAITKIND_THREAD_EXITED.
4690 * server.h (report_thread_events): Declare.
4692 2015-11-30 Pedro Alves <palves@redhat.com>
4694 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4695 the thread's last_resume_kind was resume_stop.
4697 2015-11-30 Pedro Alves <palves@redhat.com>
4699 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4702 2015-11-30 Pedro Alves <palves@redhat.com>
4704 * server.c (handle_v_requests): Handle vCtrlC.
4706 2015-11-30 Pedro Alves <palves@redhat.com>
4708 * gdbthread.h (find_any_thread_of_pid): Declare.
4709 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4711 * server.c (handle_query): If current_thread is NULL, look for
4712 another thread of the selected process.
4714 2015-11-26 Daniel Colascione <dancol@dancol.org>
4715 Simon Marchi <simon.marchi@ericsson.com>
4717 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4718 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4720 * target.h (struct target_ops) <thread_name>: New field.
4721 (target_thread_name): New macro.
4723 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4725 * regcache.h (regcache_invalidate_pid): Add declaration.
4726 * regcache.c (regcache_invalidate_pid): New function, extracted
4727 from regcache_invalidate.
4728 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4729 Add trivial documentation comment.
4730 * lynx-low.c: Use regcache_invalidate_pid instead of
4731 regcache_invalidate.
4733 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4735 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4736 and Elf64_auxv_t if the target is Android.
4738 2015-11-22 Doug Evans <xdje42@gmail.com>
4740 * target.h: #include <sys/types.h>.
4742 2015-11-19 Pedro Alves <palves@redhat.com>
4744 * linux-low.c (linux_process_qsupported): Change prototype.
4746 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4748 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4749 and adjust to loop over all features.
4750 * server.c (handle_query) <qSupported>: Adjust to call
4751 target_process_qsupported once, passing it a vector of unprocessed
4753 * target.h (struct target_ops) <process_qsupported>: Change
4755 (target_process_qsupported): Adjust.
4757 2015-11-19 Pedro Alves <palves@redhat.com>
4759 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4761 * configure: Regenerate.
4763 2015-11-19 Pedro Alves <palves@redhat.com>
4765 * configure: Regenerate.
4767 2015-11-19 Yao Qi <yao.qi@linaro.org>
4769 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4772 2015-11-19 Yao Qi <yao.qi@linaro.org>
4774 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4775 (struct aarch64_operand): Move enum out.
4777 2015-11-19 Yao Qi <yao.qi@linaro.org>
4779 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4780 struct user_fpsimd_state *.
4781 (aarch64_store_fpregset): Likewise.
4783 2015-11-19 Yao Qi <yao.qi@linaro.org>
4785 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4786 struct user_pt_regs *.
4787 (aarch64_store_gregset): Likewise.
4789 2015-11-18 Pedro Alves <palves@redhat.com>
4791 * Makefile.in (all_object_files): Add $IPA_OBJS.
4793 2015-11-17 Pedro Alves <palves@redhat.com>
4795 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4796 GDB_SIGNAL_0 and gdb_signal_to_string.
4798 2015-11-17 Pedro Alves <palves@redhat.com>
4800 * win32-low.c (handle_output_debug_string): Remove parameter.
4801 (win32_kill): Remove our_status local and adjust call to
4802 handle_output_debug_string.
4803 (get_child_debug_event): Adjust call to
4804 handle_output_debug_string.
4806 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4808 * linux-mips-low.c (mips_fill_gregset): Add cast.
4809 (mips_store_gregset): Likewise.
4810 (mips_fill_fpregset): Likewise.
4811 (mips_store_fpregset): Likewise.
4813 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4815 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4818 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4820 * linux-mips-low.c (mips_linux_new_thread): Change type of
4821 watch_type to enum target_hw_bp_type.
4823 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4825 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4826 Change return type to arm_hwbp_type.
4828 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4830 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4831 (arm_store_gregset): Likewise.
4832 * linux-arm-low.c (arm_get_hwcap): Likewise.
4833 (arm_read_description): Likewise.
4835 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4837 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4839 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4841 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4842 (ppc_fill_vsxregset): Likewise.
4843 (ppc_store_vsxregset): Likewise.
4844 (ppc_fill_vrregset): Likewise.
4845 (ppc_store_vrregset): Likewise.
4846 (ppc_fill_evrregset): Likewise.
4847 (ppc_store_evrregset): Likewise.
4849 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4851 * linux-ppc-low.c (ppc_usrregs_info): Remove
4852 forward-declaration.
4853 (ppc_arch_setup): Move lower in file.
4855 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4857 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4858 (ps_pdwrite): Likewise.
4860 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4862 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4863 to after assert checks.
4865 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4867 * proc-service.c (ps_pdread): Add/adjust casts.
4868 (ps_pdwrite): Add/adjust casts.
4870 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4872 * server.c (handle_search_memory_1): Cast return value of
4875 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4877 * server.c (write_qxfer_response): Change type of data to
4880 2015-10-29 Pedro Alves <palves@redhat.com>
4882 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4884 2015-10-29 Pedro Alves <palves@redhat.com>
4886 * tracepoint.c (clear_installed_tracepoints): Add casts.
4888 2015-10-29 Pedro Alves <palves@redhat.com>
4890 * server.c (handle_v_cont, process_serial_event): Add enum
4891 gdb_signal casts to signal parsing code.
4893 2015-10-29 Pedro Alves <palves@redhat.com>
4895 * linux-low.h (NULL_REGSET): Define.
4896 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4897 * linux-arm-low.c (arm_regsets): Likewise.
4898 * linux-crisv32-low.c (cris_regsets): Likewise.
4899 * linux-m68k-low.c (m68k_regsets): Likewise.
4900 * linux-mips-low.c (mips_regsets): Likewise.
4901 * linux-nios2-low.c (nios2_regsets): Likewise.
4902 * linux-ppc-low.c (ppc_regsets): Likewise.
4903 * linux-s390-low.c (s390_regsets): Likewise.
4904 * linux-sh-low.c (sh_regsets): Likewise.
4905 * linux-sparc-low.c (sparc_regsets): Likewise.
4906 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4907 * linux-tile-low.c (tile_regsets): Likewise.
4908 * linux-x86-low.c (x86_regsets): Likewise.
4909 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4911 2015-10-29 Pedro Alves <palves@redhat.com>
4913 * linux-low.h (NULL_REGSET): Define.
4914 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4915 * linux-arm-low.c (arm_regsets): Likewise.
4916 * linux-crisv32-low.c (cris_regsets): Likewise.
4917 * linux-m68k-low.c (m68k_regsets): Likewise.
4918 * linux-mips-low.c (mips_regsets): Likewise.
4919 * linux-nios2-low.c (nios2_regsets): Likewise.
4920 * linux-ppc-low.c (ppc_regsets): Likewise.
4921 * linux-s390-low.c (s390_regsets): Likewise.
4922 * linux-sh-low.c (sh_regsets): Likewise.
4923 * linux-sparc-low.c (sparc_regsets): Likewise.
4924 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4925 * linux-tile-low.c (tile_regsets): Likewise.
4926 * linux-x86-low.c (x86_regsets): Likewise.
4927 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4929 2015-10-26 Doug Evans <dje@google.com>
4931 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4933 2015-10-26 Doug Evans <dje@google.com>
4935 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4937 2015-10-26 Doug Evans <dje@google.com>
4939 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4941 (attach_thread, find_new_threads_callback): Ditto.
4943 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4945 * mem-break.h (set_breakpoint_data): Remove.
4947 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4949 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4950 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4951 (initialize_low): Remove set_breakpoint_data call.
4952 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4953 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4954 (initialize_low): Remove set_breakpoint_data call.
4955 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4956 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4957 (initialize_low): Remove set_breakpoint_data call.
4959 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4961 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4962 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4963 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4964 * target.h (target_breakpoint_kind_from_pc): New macro.
4966 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4968 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4969 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4970 the default breakpoint kind.
4972 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4974 * linux-arm-low.c (arm_supports_z_point_type): Add software
4977 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4979 * linux-arm-low.c: Refactor breakpoint definitions.
4980 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4981 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4983 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4985 * Makefile.in: Add arm.c/o.
4986 * configure.srv: Likewise.
4987 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4988 (arm_breakpoint_kind_from_pc): New function.
4989 (arm_sw_breakpoint_from_kind): Return proper kind.
4990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4992 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4994 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4996 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4997 (struct raw_breakpoint) <size>: Remove.
4998 (struct raw_breakpoint) <kind>: Add.
4999 (bp_size): New function.
5000 (bp_opcode): Likewise.
5001 (find_raw_breakpoint_at): Adjust for kind.
5002 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5003 (remove_memory_breakpoint): Adjust for kind call bp_size.
5004 (set_raw_breakpoint_at): Adjust for kind.
5005 (set_breakpoint): Likewise.
5006 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5007 (delete_raw_breakpoint): Adjust for kind.
5008 (delete_breakpoint): Likewise.
5009 (find_gdb_breakpoint): Likewise.
5010 (set_gdb_breakpoint_1): Likewise.
5011 (set_gdb_breakpoint): Likewise.
5012 (delete_gdb_breakpoint_1): Likewise.
5013 (delete_gdb_breakpoint): Likewise.
5014 (uninsert_raw_breakpoint): Likewise.
5015 (reinsert_raw_breakpoint): Likewise.
5016 (set_breakpoint_data): Remove.
5017 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5018 (check_mem_read): Adjust for kind call bp_size.
5019 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5020 (clone_one_breakpoint): Adjust for kind.
5021 * mem-break.h (set_gdb_breakpoint): Likewise.
5022 (delete_gdb_breakpoint): Likewise.
5023 * server.c (process_serial_event): Likewise.
5025 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5027 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5028 (struct linux_target_ops) <breakpoint>: Remove.
5029 (struct linux_target_ops) <breakpoint_len>: Remove.
5030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5032 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5033 (arm_sw_breakpoint_from_kind): New function.
5034 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5035 (struct linux_target_ops) <breakpoint>: Remove.
5036 (struct linux_target_ops) <breakpoint_len>: Remove.
5037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5038 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5039 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5040 (struct linux_target_ops) <breakpoint>: Remove.
5041 (struct linux_target_ops) <breakpoint_len>: Remove.
5042 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5043 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5044 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5045 (struct linux_target_ops) <breakpoint>: Remove.
5046 (struct linux_target_ops) <breakpoint_len>: Remove.
5047 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5048 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5049 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5050 and sw_breakpoint_from_kind to increment the pc.
5051 (linux_breakpoint_kind_from_pc): New function.
5052 (linux_sw_breakpoint_from_kind): New function.
5053 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5054 (initialize_low): Call breakpoint_kind_from_pc and
5055 sw_breakpoint_from_kind to replace breakpoint_data/len.
5056 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5058 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5059 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5060 (struct linux_target_ops) <breakpoint>: Remove.
5061 (struct linux_target_ops) <breakpoint_len>: Remove.
5062 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5063 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5064 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5065 (struct linux_target_ops) <breakpoint>: Remove.
5066 (struct linux_target_ops) <breakpoint_len>: Remove.
5067 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5068 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5069 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5070 (struct linux_target_ops) <breakpoint>: Remove.
5071 (struct linux_target_ops) <breakpoint_len>: Remove.
5072 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5073 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5074 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5075 (struct linux_target_ops) <breakpoint>: Remove.
5076 (struct linux_target_ops) <breakpoint_len>: Remove.
5077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5079 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5080 (struct linux_target_ops) <breakpoint>: Remove.
5081 (struct linux_target_ops) <breakpoint_len>: Remove.
5082 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5084 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5085 (struct linux_target_ops) <breakpoint>: Remove.
5086 (struct linux_target_ops) <breakpoint_len>: Remove.
5087 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5088 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5089 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5090 (struct linux_target_ops) <breakpoint>: Remove.
5091 (struct linux_target_ops) <breakpoint_len>: Remove.
5092 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5093 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5094 * linux-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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.
5104 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5105 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5106 (struct linux_target_ops) <breakpoint>: Remove.
5107 (struct linux_target_ops) <breakpoint_len>: Remove.
5108 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5109 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5110 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5111 (struct linux_target_ops) <breakpoint>: Remove.
5112 (struct linux_target_ops) <breakpoint_len>: Remove.
5113 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5114 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5116 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5118 * linux-cris-low.c (cris_get_pc): Remove void arg.
5120 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5122 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5125 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5127 * inferiors.c (thread_pid_matches_callback): New function.
5128 (find_thread_process): New function.
5129 (remove_thread): Reset current_thread.
5130 (remove_process): Assert threads have been removed first.
5132 2015-10-15 Yao Qi <yao.qi@linaro.org>
5134 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5136 (aarch64_remove_point): Likewise.
5137 * regcache.c (regcache_register_size): New function.
5139 2015-10-12 Yao Qi <yao.qi@linaro.org>
5141 * linux-aarch64-low.c: Update all callers as emit_load_store
5142 is renamed to aarch64_emit_load_store.
5144 2015-10-12 Yao Qi <yao.qi@linaro.org>
5146 * linux-aarch64-low.c: Update all callers of function renaming
5147 from emit_insn to aarch64_emit_insn.
5149 2015-10-12 Yao Qi <yao.qi@linaro.org>
5151 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5152 arch/aarch64-insn.h.
5153 (struct aarch64_memory_operand): Likewise.
5155 (emit_insn): Move to arch/aarch64-insn.c.
5156 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5157 (emit_load_store): Move to arch/aarch64-insn.c.
5158 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5159 (can_encode_int32): Remove.
5161 2015-10-12 Yao Qi <yao.qi@linaro.org>
5163 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5164 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5165 (aarch64_relocate_instruction): Likewise.
5166 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5167 (struct aarch64_insn_visitor): Likewise.
5169 2015-10-12 Yao Qi <yao.qi@linaro.org>
5171 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5172 (struct aarch64_insn_visitor): New.
5173 (struct aarch64_insn_relocation_data): New.
5174 (aarch64_ftrace_insn_reloc_b): New function.
5175 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5176 (aarch64_ftrace_insn_reloc_cb): Likewise.
5177 (aarch64_ftrace_insn_reloc_tb): Likewise.
5178 (aarch64_ftrace_insn_reloc_adr): Likewise.
5179 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5180 (aarch64_ftrace_insn_reloc_others): Likewise.
5182 (aarch64_relocate_instruction): Use visitor.
5184 2015-10-12 Yao Qi <yao.qi@linaro.org>
5186 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5187 int. Add argument buf.
5188 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5189 aarch64_relocate_instruction.
5191 2015-10-12 Yao Qi <yao.qi@linaro.org>
5193 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5194 argument insn. Remove local variable insn. Don't call
5196 (aarch64_install_fast_tracepoint_jump_pad): Call
5199 2015-09-30 Yao Qi <yao.qi@linaro.org>
5201 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5202 (emit_load_store_pair): Likewise.
5204 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5206 * dll.c (match_dll): Add cast(s).
5207 (unloaded_dll): Likewise.
5208 * linux-low.c (second_thread_of_pid_p): Likewise.
5209 (delete_lwp_callback): Likewise.
5210 (count_events_callback): Likewise.
5211 (select_event_lwp_callback): Likewise.
5212 (linux_set_resume_request): Likewise.
5213 * server.c (accumulate_file_name_length): Likewise.
5214 (emit_dll_description): Likewise.
5215 (handle_qxfer_threads_worker): Likewise.
5216 (visit_actioned_threads): Likewise.
5217 * thread-db.c (any_thread_of): Likewise.
5218 * tracepoint.c (same_process_p): Likewise.
5219 (match_blocktype): Likewise.
5220 (build_traceframe_info_xml): Likewise.
5222 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5224 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5226 (gdb_unparse_agent_expr): Likewise.
5227 * hostio.c (require_data): Likewise.
5228 (handle_pread): Likewise.
5229 * linux-low.c (disable_regset): Likewise.
5230 (fetch_register): Likewise.
5231 (store_register): Likewise.
5232 (get_dynamic): Likewise.
5233 (linux_qxfer_libraries_svr4): Likewise.
5234 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5235 (set_fast_tracepoint_jump): Likewise.
5236 (uninsert_fast_tracepoint_jumps_at): Likewise.
5237 (reinsert_fast_tracepoint_jumps_at): Likewise.
5238 (validate_inserted_breakpoint): Likewise.
5239 (clone_agent_expr): Likewise.
5240 * regcache.c (init_register_cache): Likewise.
5241 * remote-utils.c (putpkt_binary_1): Likewise.
5242 (decode_M_packet): Likewise.
5243 (decode_X_packet): Likewise.
5244 (look_up_one_symbol): Likewise.
5245 (relocate_instruction): Likewise.
5246 (monitor_output): Likewise.
5247 * server.c (handle_search_memory): Likewise.
5248 (handle_qxfer_exec_file): Likewise.
5249 (handle_qxfer_libraries): Likewise.
5250 (handle_qxfer): Likewise.
5251 (handle_query): Likewise.
5252 (handle_v_cont): Likewise.
5253 (handle_v_run): Likewise.
5254 (captured_main): Likewise.
5255 * target.c (write_inferior_memory): Likewise.
5256 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5257 * tracepoint.c (init_trace_buffer): Likewise.
5258 (add_tracepoint_action): Likewise.
5259 (add_traceframe): Likewise.
5260 (add_traceframe_block): Likewise.
5261 (cmd_qtdpsrc): Likewise.
5262 (cmd_qtdv): Likewise.
5263 (cmd_qtstatus): Likewise.
5264 (response_source): Likewise.
5265 (response_tsv): Likewise.
5266 (cmd_qtnotes): Likewise.
5267 (gdb_collect): Likewise.
5268 (initialize_tracepoint): Likewise.
5270 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5272 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5273 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5274 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5276 (enum aarch64_condition_codes): New enum.
5277 (w0): New static global.
5280 (struct aarch64_memory_operand) <type>: New
5281 MEMORY_OPERAND_POSTINDEX type.
5282 (postindex_memory_operand): New helper function.
5283 (emit_ret): New function.
5284 (emit_load_store_pair): New function, factored out of emit_stp
5285 with support for MEMORY_OPERAND_POSTINDEX.
5286 (emit_stp): Rewrite using emit_load_store_pair.
5287 (emit_ldp): New function.
5288 (emit_load_store): Likewise.
5289 (emit_ldr): Mention post-index instruction in comment.
5290 (emit_ldrh): New function.
5291 (emit_ldrb): New function.
5292 (emit_ldrsw): Mention post-index instruction in comment.
5293 (emit_str): Likewise.
5294 (emit_subs): New function.
5295 (emit_cmp): Likewise.
5296 (emit_and): Likewise.
5297 (emit_orr): Likewise.
5298 (emit_orn): Likewise.
5299 (emit_eor): Likewise.
5300 (emit_mvn): Likewise.
5301 (emit_lslv): Likewise.
5302 (emit_lsrv): Likewise.
5303 (emit_asrv): Likewise.
5304 (emit_mul): Likewise.
5305 (emit_sbfm): Likewise.
5306 (emit_sbfx): Likewise.
5307 (emit_ubfm): Likewise.
5308 (emit_ubfx): Likewise.
5309 (emit_csinc): Likewise.
5310 (emit_cset): Likewise.
5311 (emit_nop): Likewise.
5312 (emit_ops_insns): New helper function.
5313 (emit_pop): Likewise.
5314 (emit_push): Likewise.
5315 (aarch64_emit_prologue): New function.
5316 (aarch64_emit_epilogue): Likewise.
5317 (aarch64_emit_add): Likewise.
5318 (aarch64_emit_sub): Likewise.
5319 (aarch64_emit_mul): Likewise.
5320 (aarch64_emit_lsh): Likewise.
5321 (aarch64_emit_rsh_signed): Likewise.
5322 (aarch64_emit_rsh_unsigned): Likewise.
5323 (aarch64_emit_ext): Likewise.
5324 (aarch64_emit_log_not): Likewise.
5325 (aarch64_emit_bit_and): Likewise.
5326 (aarch64_emit_bit_or): Likewise.
5327 (aarch64_emit_bit_xor): Likewise.
5328 (aarch64_emit_bit_not): Likewise.
5329 (aarch64_emit_equal): Likewise.
5330 (aarch64_emit_less_signed): Likewise.
5331 (aarch64_emit_less_unsigned): Likewise.
5332 (aarch64_emit_ref): Likewise.
5333 (aarch64_emit_if_goto): Likewise.
5334 (aarch64_emit_goto): Likewise.
5335 (aarch64_write_goto_address): Likewise.
5336 (aarch64_emit_const): Likewise.
5337 (aarch64_emit_call): Likewise.
5338 (aarch64_emit_reg): Likewise.
5339 (aarch64_emit_pop): Likewise.
5340 (aarch64_emit_stack_flush): Likewise.
5341 (aarch64_emit_zero_ext): Likewise.
5342 (aarch64_emit_swap): Likewise.
5343 (aarch64_emit_stack_adjust): Likewise.
5344 (aarch64_emit_int_call_1): Likewise.
5345 (aarch64_emit_void_call_2): Likewise.
5346 (aarch64_emit_eq_goto): Likewise.
5347 (aarch64_emit_ne_goto): Likewise.
5348 (aarch64_emit_lt_goto): Likewise.
5349 (aarch64_emit_le_goto): Likewise.
5350 (aarch64_emit_gt_goto): Likewise.
5351 (aarch64_emit_ge_got): Likewise.
5352 (aarch64_emit_ops_impl): New static global variable.
5353 (aarch64_emit_ops): New target function, return
5354 &aarch64_emit_ops_impl.
5355 (struct linux_target_ops): Install it.
5357 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5359 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5360 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5362 * linux-aarch64-ipa.c: New file.
5363 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5365 (aarch64_get_thread_area): New target method.
5366 (extract_signed_bitfield): New helper function.
5367 (aarch64_decode_ldr_literal): New function.
5368 (enum aarch64_opcodes): New enum.
5369 (struct aarch64_register): New struct.
5370 (struct aarch64_operand): New struct.
5371 (x0): New static global.
5380 (aarch64_register): New helper function.
5381 (register_operand): Likewise.
5382 (immediate_operand): Likewise.
5383 (struct aarch64_memory_operand): New struct.
5384 (offset_memory_operand): New helper function.
5385 (preindex_memory_operand): Likewise.
5386 (enum aarch64_system_control_registers): New enum.
5387 (ENCODE): New macro.
5388 (emit_insn): New helper function.
5389 (emit_b): New function.
5390 (emit_bcond): Likewise.
5391 (emit_cb): Likewise.
5392 (emit_tb): Likewise.
5393 (emit_blr): Likewise.
5394 (emit_stp): Likewise.
5395 (emit_ldp_q_offset): Likewise.
5396 (emit_stp_q_offset): Likewise.
5397 (emit_load_store): Likewise.
5398 (emit_ldr): Likewise.
5399 (emit_ldrsw): Likewise.
5400 (emit_str): Likewise.
5401 (emit_ldaxr): Likewise.
5402 (emit_stxr): Likewise.
5403 (emit_stlr): Likewise.
5404 (emit_data_processing_reg): Likewise.
5405 (emit_data_processing): Likewise.
5406 (emit_add): Likewise.
5407 (emit_sub): Likewise.
5408 (emit_mov): Likewise.
5409 (emit_movk): Likewise.
5410 (emit_mov_addr): Likewise.
5411 (emit_mrs): Likewise.
5412 (emit_msr): Likewise.
5413 (emit_sevl): Likewise.
5414 (emit_wfe): Likewise.
5415 (append_insns): Likewise.
5416 (can_encode_int32_in): New helper function.
5417 (aarch64_relocate_instruction): New function.
5418 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5419 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5420 (struct linux_target_ops): Install aarch64_get_thread_area,
5421 aarch64_install_fast_tracepoint_jump_pad and
5422 aarch64_get_min_fast_tracepoint_insn_len.
5424 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5426 * Makefile.in (aarch64-insn.o): New rule.
5427 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5429 2015-09-21 Yao Qi <yao.qi@linaro.org>
5431 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5433 2015-09-21 Yao Qi <yao.qi@linaro.org>
5435 * tracepoint.c (max_jump_pad_size): Remove.
5437 2015-09-18 Yao Qi <yao.qi@linaro.org>
5439 * linux-aarch64-low.c: Don't include sys/uio.h.
5440 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5442 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5444 * tracepoint.c (eval_result_type): Change prototype.
5445 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5447 2015-09-15 Pedro Alves <palves@redhat.com>
5449 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5450 Check whether to report exec events instead of checking whether
5451 multiprocess is enabled.
5453 2015-09-15 Pedro Alves <palves@redhat.com>
5456 * remote-utils.c (prepare_resume_reply): Merge
5457 TARGET_WAITKIND_VFORK_DONE switch case with the
5458 TARGET_WAITKIND_FORKED case.
5460 2015-09-15 Yao Qi <yao.qi@linaro.org>
5462 * server.c (handle_query): Check string comparison using
5463 "else if" instead of "if".
5465 2015-09-15 Yao Qi <yao.qi@linaro.org>
5467 * server.c (vCont_supported): New global variable.
5468 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5469 matches. Append ";vContSupported+" to own_buf.
5470 (handle_v_requests): Append ";s;S" to own_buf if target supports
5471 hardware single step or vCont_supported is false.
5472 (capture_main): Set vCont_supported to zero.
5474 2015-09-15 Yao Qi <yao.qi@linaro.org>
5476 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5478 (linux_supports_hardware_single_step): ... New function.
5479 (linux_target_ops): Update.
5480 * lynx-low.c (lynx_target_ops): Set field
5481 supports_hardware_single_step to target_can_do_hardware_single_step.
5482 * nto-low.c (nto_target_ops): Likewise.
5483 * spu-low.c (spu_target_ops): Likewise.
5484 * win32-low.c (win32_target_ops): Likewise.
5485 * target.c (target_can_do_hardware_single_step): New function.
5486 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5487 Remove. <supports_hardware_single_step>: New field.
5488 (target_supports_conditional_breakpoints): Remove.
5489 (target_supports_hardware_single_step): New macro.
5490 (target_can_do_hardware_single_step): Declare.
5491 * server.c (handle_query): Use target_supports_hardware_single_step
5492 instead of target_supports_conditional_breakpoints.
5494 2015-09-15 Yao Qi <yao.qi@linaro.org>
5496 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5498 (struct linux_target_ops the_low_target): Install
5499 aarch64_linux_siginfo_fixup.
5501 2015-09-11 Don Breazeal <donb@codesourcery.com>
5502 Luis Machado <lgustavo@codesourcery.com>
5504 * linux-low.c (linux_mourn): Static declaration.
5505 (linux_arch_setup): Move in front of
5506 handle_extended_wait.
5507 (linux_arch_setup_thread): New function.
5508 (handle_extended_wait): Handle exec events. Call
5509 linux_arch_setup_thread. Make event_lwp argument a
5510 pointer-to-a-pointer.
5511 (check_zombie_leaders): Do not check stopped threads.
5512 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5513 (linux_low_filter_event): Add lwp and thread for exec'ing
5514 non-leader thread if leader thread has been deleted.
5515 Refactor code into linux_arch_setup_thread and call it.
5516 Pass child lwp pointer by reference to handle_extended_wait.
5517 (linux_wait_for_event_filtered): Update comment.
5518 (linux_wait_1): Prevent clobbering exec event status.
5519 (linux_supports_exec_events): New function.
5520 (linux_target_ops) <supports_exec_events>: Initialize new member.
5521 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5523 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5524 * server.c (report_exec_events): New global variable.
5525 (handle_query): Handle qSupported query for exec-events feature.
5526 (captured_main): Initialize report_exec_events.
5527 * server.h (report_exec_events): Declare new global variable.
5528 * target.h (struct target_ops) <supports_exec_events>: New
5530 (target_supports_exec_events): New macro.
5531 * win32-low.c (win32_target_ops) <supports_exec_events>:
5532 Initialize new member.
5534 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5536 * linux-low.c (linux_low_enable_btrace): Remove.
5537 (linux_target_ops): Replace linux_low_enable_btrace with
5538 linux_enable_btrace.
5540 2015-09-03 Yao Qi <yao.qi@linaro.org>
5542 * linux-aarch64-low.c (aarch64_insert_point): Call
5543 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5546 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5548 * linux-low.c (check_stopped_by_breakpoint): Use
5549 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5551 2015-08-27 Pedro Alves <palves@redhat.com>
5553 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5555 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5557 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5558 the XNEW-family equivalent.
5559 (compile_bytecodes): Likewise.
5560 * dll.c (loaded_dll): Likewise.
5561 * event-loop.c (append_callback_event): Likewise.
5562 (create_file_handler): Likewise.
5563 (create_file_event): Likewise.
5564 * hostio.c (handle_open): Likewise.
5565 * inferiors.c (add_thread): Likewise.
5566 (add_process): Likewise.
5567 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5568 * linux-arm-low.c (arm_new_process): Likewise.
5569 (arm_new_thread): Likewise.
5570 * linux-low.c (add_to_pid_list): Likewise.
5571 (linux_add_process): Likewise.
5572 (handle_extended_wait): Likewise.
5573 (add_lwp): Likewise.
5574 (enqueue_one_deferred_signal): Likewise.
5575 (enqueue_pending_signal): Likewise.
5576 (linux_resume_one_lwp_throw): Likewise.
5577 (linux_resume_one_thread): Likewise.
5578 (linux_read_memory): Likewise.
5579 (linux_write_memory): Likewise.
5580 * linux-mips-low.c (mips_linux_new_process): Likewise.
5581 (mips_linux_new_thread): Likewise.
5582 (mips_add_watchpoint): Likewise.
5583 * linux-x86-low.c (initialize_low_arch): Likewise.
5584 * lynx-low.c (lynx_add_process): Likewise.
5585 * mem-break.c (set_raw_breakpoint_at): Likewise.
5586 (set_breakpoint): Likewise.
5587 (add_condition_to_breakpoint): Likewise.
5588 (add_commands_to_breakpoint): Likewise.
5589 (clone_agent_expr): Likewise.
5590 (clone_one_breakpoint): Likewise.
5591 * regcache.c (new_register_cache): Likewise.
5592 * remote-utils.c (look_up_one_symbol): Likewise.
5593 * server.c (queue_stop_reply): Likewise.
5594 (start_inferior): Likewise.
5595 (queue_stop_reply_callback): Likewise.
5596 (handle_target_event): Likewise.
5597 * spu-low.c (fetch_ppc_memory): Likewise.
5598 (store_ppc_memory): Likewise.
5599 * target.c (set_target_ops): Likewise.
5600 * thread-db.c (thread_db_load_search): Likewise.
5601 (try_thread_db_load_1): Likewise.
5602 * tracepoint.c (add_tracepoint): Likewise.
5603 (add_tracepoint_action): Likewise.
5604 (create_trace_state_variable): Likewise.
5605 (cmd_qtdpsrc): Likewise.
5606 (cmd_qtro): Likewise.
5607 (add_while_stepping_state): Likewise.
5608 * win32-low.c (child_add_thread): Likewise.
5609 (get_image_name): Likewise.
5611 2015-08-25 Yao Qi <yao.qi@linaro.org>
5613 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5615 2015-08-25 Yao Qi <yao.qi@linaro.org>
5617 * Makefile.in (aarch64-linux.o): New rule.
5618 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5620 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5621 (aarch64_init_debug_reg_state): Make it extern.
5622 (aarch64_linux_prepare_to_resume): Remove.
5624 2015-08-25 Yao Qi <yao.qi@linaro.org>
5626 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5627 lwp_arch_private_info and ptid_of_lwp.
5629 2015-08-25 Yao Qi <yao.qi@linaro.org>
5631 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5632 Find proc_info by find_process_pid. All callers updated.
5634 2015-08-25 Yao Qi <yao.qi@linaro.org>
5636 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5638 (debug_reg_change_callback): Remove.
5639 (aarch64_notify_debug_reg_change): Remove.
5641 2015-08-25 Yao Qi <yao.qi@linaro.org>
5643 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5644 Call current_lwp_ptid.
5646 2015-08-25 Yao Qi <yao.qi@linaro.org>
5648 * linux-aarch64-low.c (debug_reg_change_callback): Use
5651 2015-08-25 Yao Qi <yao.qi@linaro.org>
5653 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5655 2015-08-25 Yao Qi <yao.qi@linaro.org>
5657 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5659 2015-08-25 Yao Qi <yao.qi@linaro.org>
5661 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5664 2015-08-25 Yao Qi <yao.qi@linaro.org>
5666 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5668 (debug_reg_change_callback): Remove argument entry and add argument
5669 lwp. Remove local variable thread. Don't print thread id in the
5670 debugging output. Don't check whether pid of thread equals to pid.
5671 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5672 iterate_over_lwps instead find_inferior.
5674 2015-08-24 Pedro Alves <palves@redhat.com>
5676 * inferiors.c (get_first_process): New function.
5677 * inferiors.h (get_first_process): New declaration.
5678 * remote-utils.c (read_ptid): Default to the first process in the
5679 list, instead of to the current thread's process.
5681 2015-08-24 Pedro Alves <palves@redhat.com>
5683 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5684 * event-loop.c: Likewise.
5685 * remote-utils.c: Likewise.
5686 * tracepoint.c: Likewise.
5688 2015-08-24 Pedro Alves <palves@redhat.com>
5690 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5693 2015-08-21 Pedro Alves <palves@redhat.com>
5695 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5696 instead of literal 1.
5698 2015-08-21 Pedro Alves <palves@redhat.com>
5700 * tdesc.c (default_description): Explicitly zero-initialize.
5702 2015-08-21 Pedro Alves <palves@redhat.com>
5705 * inferiors.c (remove_thread): Discard any pending stop reply for
5707 * server.c (remove_all_on_match_pid): Rename to ...
5708 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5710 (discard_queued_stop_replies): Change parameter to a ptid. Now
5712 (handle_v_kill, kill_inferior_callback, captured_main)
5713 (process_serial_event): Adjust.
5714 * server.h (discard_queued_stop_replies): Declare.
5716 2015-08-21 Pedro Alves <palves@redhat.com>
5718 * linux-low.c (wait_for_sigstop): Always switch to no thread
5719 selected if the previously current thread dies.
5720 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5721 process instead of the current thread's.
5722 * remote-utils.c (input_interrupt): Don't check if there's no
5724 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5725 current thread to the general thread fails, error out.
5726 (handle_qxfer_auxv, handle_qxfer_libraries)
5727 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5728 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5729 (handle_query): Check if there's a thread selected instead of
5730 checking whether there's any thread in the thread list.
5731 (handle_qxfer_threads, handle_qxfer_btrace)
5732 (handle_qxfer_btrace_conf): Don't error out early if there's no
5733 thread in the thread list.
5734 (handle_v_cont, myresume): Don't set the current thread to the
5736 (process_serial_event) <Hg handling>: Also set thread_id if the
5737 previous general thread is still alive.
5738 (process_serial_event) <g/G handling>: If setting the current
5739 thread to the general thread fails, error out.
5740 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5741 thread's lwp instead of the current thread's.
5742 * target.c (set_desired_thread): If the desired thread was not
5743 found, leave the current thread pointing to NULL. Return an int
5744 (boolean) indicating success.
5745 * target.h (set_desired_thread): Change return type to int.
5747 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5749 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5750 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5752 (ps_get_thread_area): New function.
5754 2015-08-19 Gary Benson <gbenson@redhat.com>
5756 * hostio.c (handle_pread): Do not attempt to read more data
5757 than hostio_reply_with_data can fit in a packet.
5759 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5761 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5763 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5765 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5767 2015-08-06 Pedro Alves <palves@redhat.com>
5769 * tracepoint.c (expr_eval_result): Now an int.
5771 2015-08-06 Pedro Alves <palves@redhat.com>
5773 * gdbthread.h (struct regcache): Forward declare.
5774 (struct thread_info) <regcache_data>: Now a struct regcache
5776 * inferiors.c (inferior_regcache_data)
5777 (set_inferior_regcache_data): Now work with struct regcache
5779 * inferiors.h (struct regcache): Forward declare.
5780 (inferior_regcache_data, set_inferior_regcache_data): Now work
5781 with struct regcache pointers.
5782 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5783 (free_register_cache_thread): Remove struct regcache pointer
5786 2015-08-06 Pedro Alves <palves@redhat.com>
5788 * server.c (captured_main): On error, print the exception message
5789 to stderr, and if run_once is set, throw a quit.
5791 2015-08-06 Pedro Alves <palves@redhat.com>
5793 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5796 2015-08-06 Pedro Alves <palves@redhat.com>
5798 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5799 reading beyond the passed in buffer length.
5801 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5803 * tracepoint.c (symbol_list) <required>: Remove.
5805 2015-08-06 Pedro Alves <palves@redhat.com>
5807 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5808 count if stopping and suspending threads.
5809 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5810 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5811 (linux_detach): Complete an ongoing step-over.
5812 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5814 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5815 (linux_wait_1): If passing a signal to the inferior after
5816 finishing a step-over, unsuspend and re-resume all lwps. If we
5817 see a single-step event but the thread should be continuing, don't
5818 pass the trap to gdb.
5819 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5820 internal_error instead of gdb_assert.
5821 (enqueue_pending_signal): New function.
5822 (check_ptrace_stopped_lwp_gone): Add debug output.
5823 (start_step_over): Use internal_error instead of gdb_assert.
5824 (complete_ongoing_step_over): New function.
5825 (linux_resume_one_thread): Don't resume a suspended thread.
5826 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5829 2015-08-06 Pedro Alves <palves@redhat.com>
5831 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5832 (linux_thread_alive): Use lwp_is_marked_dead.
5833 (extended_event_reported): Delete.
5834 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5835 instead of extended_event_reported.
5836 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5838 (lwp_is_marked_dead): New function.
5839 (lwp_running): Use lwp_is_marked_dead.
5840 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5843 2015-08-06 Pedro Alves <palves@redhat.com>
5845 * linux-low.c (linux_wait_1): Move fork event output out of the
5846 !report_to_gdb check. Pass event_child->waitstatus to
5847 target_waitstatus_to_string instead of ourstatus.
5849 2015-08-04 Yao Qi <yao.qi@linaro.org>
5851 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5852 if current_thread is 32 bit.
5854 2015-08-04 Yao Qi <yao.qi@linaro.org>
5856 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5857 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5858 * server.c (extended_protocol): Remove "static".
5859 * server.h (extended_protocol): Declare it.
5861 2015-08-04 Yao Qi <yao.qi@linaro.org>
5863 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5864 both aarch64 and aarch32.
5865 (aarch64_set_pc): Likewise.
5867 2015-08-04 Yao Qi <yao.qi@linaro.org>
5869 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5870 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5871 arm-with-neon.xml to srv_xmlfiles.
5872 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5873 (is_64bit_tdesc): New function.
5874 (aarch64_linux_read_description): New function.
5875 (aarch64_arch_setup): Call aarch64_linux_read_description.
5876 (regs_info): Rename to regs_info_aarch64.
5877 (aarch64_regs_info): Return right regs_info.
5878 (initialize_low_arch): Call initialize_low_arch_aarch32.
5880 2015-08-04 Yao Qi <yao.qi@linaro.org>
5882 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5883 * linux-aarch32-low.c: New file.
5884 * linux-aarch32-low.h: New file.
5885 * linux-arm-low.c (arm_fill_gregset): Move it to
5886 linux-aarch32-low.c.
5887 (arm_store_gregset): Likewise.
5888 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5889 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5890 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5891 (regs_info): Rename to regs_info_arm.
5892 (arm_regs_info): Return regs_info_aarch32 if
5893 have_ptrace_getregset is 1 and target description is
5894 arm_with_neon or arm_with_vfpv3.
5895 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5896 Call initialize_low_arch_aarch32 instead.
5898 2015-08-04 Yao Qi <yao.qi@linaro.org>
5900 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5901 * linux-low.c: ... here.
5902 * linux-low.h (have_ptrace_getregset): Declare it.
5904 2015-08-04 Pedro Alves <palves@redhat.com>
5906 * thread-db.c (struct thread_db): Use new typedefs.
5907 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5909 (disable_thread_event_reporting): Cast result of dlsym to
5910 destination function pointer type.
5911 (thread_db_mourn): Use td_ta_delete_ftype.
5913 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5915 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5917 (CDX_BREAKPOINT): Define for R2.
5918 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5919 (the_low_target): Add comments.
5921 2015-07-30 Yao Qi <yao.qi@linaro.org>
5923 * linux-arm-low.c (arm_hwcap): Remove it.
5924 (arm_read_description): New local variable arm_hwcap. Don't
5925 set arm_hwcap to zero.
5927 2015-07-30 Yao Qi <yao.qi@linaro.org>
5929 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5930 Use regcache->tdesc instead.
5931 (arm_store_wmmxregset): Likewise.
5932 (arm_fill_vfpregset): Likewise.
5933 (arm_store_vfpregset): Likewise.
5935 2015-07-30 Yao Qi <yao.qi@linaro.org>
5937 * linux-arm-low.c: Include arch/arm.h.
5938 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5939 (arm_store_gregset): Likewise.
5941 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5943 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5944 ptrace's 4th parameter.
5946 2015-07-27 Yao Qi <yao.qi@linaro.org>
5948 * configure.srv (case aarch64*-*-linux*): Don't set
5951 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5953 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5955 * linux-arm-low.c: Likewise.
5956 * linux-cris-low.c: Likewise.
5957 * linux-crisv32-low.c: Likewise.
5958 * linux-low.c: Likewise.
5959 * linux-m68k-low.c: Likewise.
5960 * linux-mips-low.c: Likewise.
5961 * linux-nios2-low.c: Likewise.
5962 * linux-s390-low.c: Likewise.
5963 * linux-sparc-low.c: Likewise.
5964 * linux-tic6x-low.c: Likewise.
5965 * linux-tile-low.c: Likewise.
5966 * linux-x86-low.c: Likewise.
5968 2015-07-24 Pedro Alves <palves@redhat.com>
5970 * config.in: Regenerate.
5971 * configure: Regenerate.
5973 2015-07-24 Pedro Alves <palves@redhat.com>
5975 * acinclude.m4: Include ../ptrace.m4.
5976 * configure.ac: Call GDB_AC_PTRACE.
5977 * config.in, configure: Regenerate.
5979 2015-07-24 Yao Qi <yao.qi@linaro.org>
5981 * linux-low.c (linux_create_inferior): Remove setting to
5982 proc->priv->new_inferior.
5983 (linux_attach): Likewise.
5984 (linux_low_filter_event): Likewise.
5985 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5987 2015-07-24 Yao Qi <yao.qi@linaro.org>
5989 * linux-low.c (linux_arch_setup): New function.
5990 (linux_low_filter_event): If proc->tdesc is NULL and
5991 proc->attached is true, call the_low_target.arch_setup.
5992 Otherwise, keep status pending, and return.
5993 (linux_resume_one_lwp_throw): Don't call get_pc if
5994 thread->while_stepping isn't NULL. Don't call
5995 get_thread_regcache if proc->tdesc is NULL.
5996 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5997 (linux_target_ops): Install arch_setup.
5998 * server.c (start_inferior): Call the_target->arch_setup.
5999 * target.h (struct target_ops) <arch_setup>: New field.
6000 (target_arch_setup): New marco.
6001 * lynx-low.c (lynx_target_ops): Update.
6002 * nto-low.c (nto_target_ops): Update.
6003 * spu-low.c (spu_target_ops): Update.
6004 * win32-low.c (win32_target_ops): Update.
6006 2015-07-24 Yao Qi <yao.qi@linaro.org>
6008 * linux-low.c (linux_add_process): Don't set
6009 proc->priv->new_inferior.
6010 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6011 (linux_attach): Likewise.
6013 2015-07-24 Yao Qi <yao.qi@linaro.org>
6015 * server.c (start_inferior): Code refactor.
6017 2015-07-24 Yao Qi <yao.qi@linaro.org>
6019 * server.c (process_serial_event): Set general_thread.
6021 2015-07-21 Yao Qi <yao.qi@linaro.org>
6023 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6024 aarch64_linux_get_debug_reg_capacity.
6026 2015-07-17 Yao Qi <yao.qi@linaro.org>
6028 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6029 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6030 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6031 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6032 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6033 (AARCH64_HWP_ALIGNMENT): Likewise.
6034 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6035 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6036 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6037 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6038 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6039 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6040 (struct aarch64_debug_reg_state): Likewise.
6041 (struct arch_lwp_info): Likewise.
6042 (aarch64_align_watchpoint): Likewise.
6043 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6044 (aarch64_watchpoint_length): Likewise.
6045 (aarch64_point_encode_ctrl_reg): Likewise
6046 (aarch64_point_is_aligned): Likewise.
6047 (aarch64_align_watchpoint): Likewise.
6048 (aarch64_linux_set_debug_regs):
6049 (aarch64_dr_state_insert_one_point): Likewise.
6050 (aarch64_dr_state_remove_one_point): Likewise.
6051 (aarch64_handle_breakpoint): Likewise.
6052 (aarch64_handle_aligned_watchpoint): Likewise.
6053 (aarch64_handle_unaligned_watchpoint): Likewise.
6054 (aarch64_handle_watchpoint): Likewise.
6056 2015-07-17 Yao Qi <yao.qi@linaro.org>
6058 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6059 and don't aarch64_get_debug_reg_state. All callers update.
6060 (aarch64_handle_aligned_watchpoint): Likewise.
6061 (aarch64_handle_unaligned_watchpoint): Likewise.
6062 (aarch64_handle_watchpoint): Likewise.
6063 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6064 (aarch64_remove_point): Likewise.
6066 2015-07-17 Yao Qi <yao.qi@linaro.org>
6068 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6070 (aarch64_handle_unaligned_watchpoint): Likewise.
6072 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6074 Revert the previous 3 commits:
6075 Move gdb_regex* to common/
6076 Move linux_find_memory_regions_full & co.
6077 gdbserver build-id attribute generator
6079 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6080 Jan Kratochvil <jan.kratochvil@redhat.com>
6082 gdbserver build-id attribute generator.
6083 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6084 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6085 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6087 (get_dynamic): Use find_pdhr to traverse program headers.
6088 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6089 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6090 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6091 (get_hex_build_id): New.
6092 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6093 to reply XML document.
6095 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6096 Jan Kratochvil <jan.kratochvil@redhat.com>
6098 * target.c: Include target/target-utils.h and fcntl.h.
6099 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6100 (target_fileio_read_stralloc): New functions.
6102 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6104 * Makefile.in (OBS): Add gdb_regex.o.
6106 * config.in: Rebuilt.
6107 * configure: Rebuilt.
6109 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6110 Jan Kratochvil <jan.kratochvil@redhat.com>
6112 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6113 * Makefile.in (OBS): Add target-utils.o.
6114 (linux-maps.o, target-utils.o): New.
6115 * configure.srv (srv_linux_obj): Add linux-maps.o.
6117 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6119 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6121 (the_low_target): Install it.
6123 2015-07-14 Pedro Alves <palves@redhat.com>
6125 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6126 Instead, ignore ECHILD, and throw an error for other errnos.
6128 2015-07-10 Pedro Alves <palves@redhat.com>
6130 * event-loop.c (struct callback_event) <data>: Change type to
6131 gdb_client_data instance instead of gdb_client_data pointer.
6132 (append_callback_event): Adjust.
6134 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6136 * linux-aarch64-low.c: Add comments for each linux_target_ops
6137 method. Remove comments already covered in target_ops and
6138 linux_target_ops definitions.
6139 (the_low_target): Add comments for each unimplemented method.
6141 2015-07-09 Yao Qi <yao.qi@linaro.org>
6143 * linux-aarch64-low.c (aarch64_regmap): Remove.
6144 (aarch64_usrregs_info): Remove.
6145 (regs_info): Set field usrregs to NULL.
6147 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6149 * linux-low.c: Include "rsp-low.h"
6150 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6151 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6152 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6153 (handle_btrace_enable_pt): New.
6154 (handle_btrace_general_set): Support "pt".
6155 (handle_btrace_conf_general_set): Support "pt:size".
6157 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6159 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6162 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6164 * linux-aarch64-low.c: Remove comment about endianness.
6165 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6166 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6169 2015-06-24 Gary Benson <gbenson@redhat.com>
6171 * linux-i386-ipa.c (stdint.h): Do not include.
6172 * lynx-i386-low.c (stdint.h): Likewise.
6173 * lynx-ppc-low.c (stdint.h): Likewise.
6174 * mem-break.c (stdint.h): Likewise.
6175 * thread-db.c (stdint.h): Likewise.
6176 * tracepoint.c (stdint.h): Likewise.
6177 * win32-low.c (stdint.h): Likewise.
6179 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6181 * server.c (write_qxfer_response): Update call to
6182 remote_escape_output.
6184 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6185 Jan Kratochvil <jan.kratochvil@redhat.com>
6187 Merge multiple hex conversions.
6188 * gdbreplay.c (tohex): Rename to 'fromhex'.
6189 (logchar): Use fromhex.
6191 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6193 * server.c (handle_qxfer_libraries): Set `version' attribute for
6196 2015-06-10 Gary Benson <gbenson@redhat.com>
6198 * target.h (struct target_ops) <multifs_open>: New field.
6199 <multifs_unlink>: Likewise.
6200 <multifs_readlink>: Likewise.
6201 * linux-low.c (nat/linux-namespaces.h): New include.
6202 (linux_target_ops): Initialize the_target->multifs_open,
6203 the_target->multifs_unlink and the_target->multifs_readlink.
6204 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6205 * hostio.c (hostio_fs_pid): New static variable.
6206 (hostio_handle_new_gdb_connection): New function.
6207 (handle_setfs): Likewise.
6208 (handle_open): Use the_target->multifs_open as appropriate.
6209 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6210 (handle_readlink): Use the_target->multifs_readlink as
6212 (handle_vFile): Handle vFile:setfs packets.
6213 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6214 after target_handle_new_gdb_connection.
6216 2015-06-10 Gary Benson <gbenson@redhat.com>
6218 * configure.ac (AC_CHECK_FUNCS): Add setns.
6219 * config.in: Regenerate.
6220 * configure: Likewise.
6221 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6222 (linux-namespaces.o): New rule.
6223 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6225 2015-06-09 Gary Benson <gbenson@redhat.com>
6227 * hostio.c (handle_open): Process mode argument with
6228 fileio_to_host_mode.
6230 2015-06-01 Yao Qi <yao.qi@linaro.org>
6232 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6233 * linux-x86-low.c: Likewise.
6235 2015-05-28 Don Breazeal <donb@codesourcery.com>
6237 * linux-low.c (handle_extended_wait): Initialize
6238 thread_info.last_resume_kind for new fork children.
6240 2015-05-15 Pedro Alves <palves@redhat.com>
6242 * target.h (target_handle_new_gdb_connection): Rewrite using if
6243 wrapped in do/while.
6245 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6247 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6248 * configure, config.in: Regenerate.
6249 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6252 2015-05-12 Don Breazeal <donb@codesourcery.com>
6254 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6255 PTRACE_EVENT_VFORK_DONE.
6256 (linux_low_ptrace_options, extended_event_reported): Add vfork
6258 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6259 and "vforkdone" for RSP 'T' Stop Reply Packet.
6260 * server.h (report_vfork_events): Declare
6263 2015-05-12 Don Breazeal <donb@codesourcery.com>
6265 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6266 (the_low_target) <new_fork>: Initialize new member.
6267 * linux-arm-low.c (arm_new_fork): New function.
6268 (the_low_target) <new_fork>: Initialize new member.
6269 * linux-low.c (handle_extended_wait): Call new target function
6271 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6272 * linux-mips-low.c (mips_add_watchpoint): New function
6273 extracted from mips_insert_point.
6274 (the_low_target) <new_fork>: Initialize new member.
6275 (mips_linux_new_fork): New function.
6276 (mips_insert_point): Call mips_add_watchpoint.
6277 * linux-x86-low.c (x86_linux_new_fork): New function.
6278 (the_low_target) <new_fork>: Initialize new member.
6280 2015-05-12 Don Breazeal <donb@codesourcery.com>
6282 * linux-low.c (handle_extended_wait): Implement return value,
6283 rename argument 'event_child' to 'event_lwp', handle
6284 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6285 (linux_low_ptrace_options): New function.
6286 (linux_low_filter_event): Call linux_low_ptrace_options,
6287 use different argument fo linux_enable_event_reporting,
6288 use return value from handle_extended_wait.
6289 (extended_event_reported): New function.
6290 (linux_wait_1): Call extended_event_reported and set
6291 status to report fork events.
6292 (linux_write_memory): Add pid to debug message.
6293 (reset_lwp_ptrace_options_callback): New function.
6294 (linux_handle_new_gdb_connection): New function.
6295 (linux_target_ops): Initialize new structure member.
6296 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6297 * lynx-low.c: Initialize new structure member.
6298 * remote-utils.c (prepare_resume_reply): Implement stop reason
6299 "fork" for "T" stop message.
6300 * server.c (handle_query): Call handle_new_gdb_connection.
6301 * server.h (report_fork_events): Declare global flag.
6302 * target.h (struct target_ops) <handle_new_gdb_connection>:
6304 (target_handle_new_gdb_connection): New macro.
6305 * win32-low.c: Initialize new structure member.
6307 2015-05-12 Don Breazeal <donb@codesourcery.com>
6309 * mem-break.c (APPEND_TO_LIST): Define macro.
6310 (clone_agent_expr): New function.
6311 (clone_one_breakpoint): New function.
6312 (clone_all_breakpoints): New function.
6313 * mem-break.h: Declare new functions.
6315 2015-05-12 Don Breazeal <donb@codesourcery.com>
6317 * linux-low.c (linux_supports_fork_events): New function.
6318 (linux_supports_vfork_events): New function.
6319 (linux_target_ops): Initialize new structure members.
6320 (initialize_low): Call linux_check_ptrace_features.
6321 * lynx-low.c (lynx_target_ops): Initialize new structure
6323 * server.c (report_fork_events, report_vfork_events):
6325 (handle_query): Add new features to qSupported packet and
6327 (captured_main): Initialize new global variables.
6328 * target.h (struct target_ops) <supports_fork_events>:
6330 <supports_vfork_events>: New member.
6331 (target_supports_fork_events): New macro.
6332 (target_supports_vfork_events): New macro.
6333 * win32-low.c (win32_target_ops): Initialize new structure
6336 2015-05-12 Gary Benson <gbenson@redhat.com>
6338 * server.c (handle_qxfer_exec_file): Use current process
6341 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6343 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6344 Remove HAVE_PTRACE_GETREGS conditionals.
6345 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6346 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6348 2015-05-08 Yao Qi <yao.qi@linaro.org>
6350 * linux-low.c (linux_supports_conditional_breakpoints): New
6352 (linux_target_ops): Install new target method.
6353 * lynx-low.c (lynx_target_ops): Install NULL hook for
6354 supports_conditional_breakpoints.
6355 * nto-low.c (nto_target_ops): Likewise.
6356 * spu-low.c (spu_target_ops): Likewise.
6357 * win32-low.c (win32_target_ops): Likewise.
6358 * server.c (handle_query): Check
6359 target_supports_conditional_breakpoints.
6360 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6362 (target_supports_conditional_breakpoints): New macro.
6364 2015-05-06 Pedro Alves <palves@redhat.com>
6367 * server.c (start_inferior): If the process exits, mourn it.
6369 2015-04-21 Gary Benson <gbenson@redhat.com>
6371 * hostio.c (fileio_open_flags_to_host): Factored out to
6372 fileio_to_host_openflags in common/fileio.c. Single use
6375 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6377 * linux-xtensa-low.c (xtensa_fill_gregset)
6378 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6381 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6383 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6384 (regs_info): Replace usrregs pointer with NULL.
6386 2015-04-17 Gary Benson <gbenson@redhat.com>
6388 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6389 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6390 * server.c (handle_qxfer_exec_file): New function.
6391 (qxfer_packets): Add exec-file entry.
6392 (handle_query): Report qXfer:exec-file:read as supported packet.
6394 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6396 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6398 2015-04-09 Gary Benson <gbenson@redhat.com>
6400 * hostio-errno.c (errno_to_fileio_error): Remove function.
6401 Update caller to use remote_fileio_to_fio_error.
6403 2015-04-09 Yao Qi <yao.qi@linaro.org>
6405 * linux-low.c (linux_insert_point): Call
6406 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6407 (linux_remove_point): Call remove_memory_breakpoint if type is
6409 * linux-x86-low.c (x86_insert_point): Don't call
6410 insert_memory_breakpoint.
6411 (x86_remove_point): Don't call remove_memory_breakpoint.
6413 2015-04-01 Pedro Alves <palves@redhat.com>
6414 Cleber Rosa <crosa@redhat.com>
6416 * server.c (gdbserver_usage): Reorganize and extend the usage
6419 2015-03-24 Pedro Alves <palves@redhat.com>
6421 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6422 output. Also dump TRAP_TRACE.
6423 (linux_low_filter_event): In debug output, distinguish a
6424 resume_stop SIGSTOP from a delayed SIGSTOP.
6426 2015-03-24 Gary Benson <gbenson@redhat.com>
6428 * linux-x86-low.c (x86_linux_new_thread): Moved to
6430 (x86_linux_prepare_to_resume): Likewise.
6432 2015-03-24 Gary Benson <gbenson@redhat.com>
6434 * Makefile.in (x86-linux-dregs.o): New rule.
6435 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6436 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6437 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6438 (x86_linux_dr_get): Likewise.
6439 (x86_linux_dr_set): Likewise.
6440 (update_debug_registers_callback): Likewise.
6441 (x86_linux_dr_set_addr): Likewise.
6442 (x86_linux_dr_get_addr): Likewise.
6443 (x86_linux_dr_set_control): Likewise.
6444 (x86_linux_dr_get_control): Likewise.
6445 (x86_linux_dr_get_status): Likewise.
6446 (x86_linux_update_debug_registers): Likewise.
6448 2015-03-24 Gary Benson <gbenson@redhat.com>
6450 * linux-x86-low.c (x86_linux_update_debug_registers):
6451 New function, factored out from...
6452 (x86_linux_prepare_to_resume): ...this.
6454 2015-03-24 Gary Benson <gbenson@redhat.com>
6456 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6457 (x86_linux_dr_set): Likewise.
6458 (update_debug_registers_callback): Likewise.
6459 (x86_linux_dr_set_addr): Likewise.
6460 (x86_linux_dr_get_addr): Likewise.
6461 (x86_linux_dr_set_control): Likewise.
6462 (x86_linux_dr_get_control): Likewise.
6463 (x86_linux_dr_get_status): Likewise.
6464 (x86_linux_prepare_to_resume): Likewise.
6466 2015-03-24 Gary Benson <gbenson@redhat.com>
6468 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6469 Use perror_with_name. Pass string through gettext.
6470 (x86_linux_dr_set): Likewise.
6472 2015-03-24 Gary Benson <gbenson@redhat.com>
6474 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6475 (x86_linux_dr_set_addr): ...this.
6476 (x86_dr_low_get_addr): Rename to...
6477 (x86_linux_dr_get_addr): ...this.
6478 (x86_dr_low_set_control): Rename to...
6479 (x86_linux_dr_set_control): ...this.
6480 (x86_dr_low_get_control): Rename to...
6481 (x86_linux_dr_get_control): ...this.
6482 (x86_dr_low_get_status): Rename to...
6483 (x86_linux_dr_get_status): ...this.
6484 (x86_dr_low): Update with new function names.
6486 2015-03-24 Gary Benson <gbenson@redhat.com>
6488 * Makefile.in (x86-linux.o): New rule.
6489 * configure.srv: Add x86-linux.o to relevant targets.
6490 * linux-low.c (lwp_set_arch_private_info): New function.
6491 (lwp_arch_private_info): Likewise.
6492 * linux-x86-low.c: Include nat/x86-linux.h.
6493 (arch_lwp_info): Removed structure.
6494 (update_debug_registers_callback):
6495 Use lwp_set_debug_registers_changed.
6496 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6497 and lwp_set_debug_registers_changed.
6498 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6500 2015-03-24 Gary Benson <gbenson@redhat.com>
6502 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6503 * linux-arm-low.c (arm_new_thread): Likewise.
6504 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6505 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6506 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6507 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6509 2015-03-24 Gary Benson <gbenson@redhat.com>
6511 * linux-low.c (ptid_of_lwp): New function.
6512 (lwp_is_stopped): Likewise.
6513 (lwp_stop_reason): Likewise.
6514 * linux-x86-low.c (update_debug_registers_callback):
6516 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6519 2015-03-24 Gary Benson <gbenson@redhat.com>
6521 * linux-low.h (linux_stop_lwp): Remove declaration.
6523 2015-03-24 Gary Benson <gbenson@redhat.com>
6525 * linux-low.h: Include nat/linux-nat.h.
6526 * linux-low.c (iterate_over_lwps_args): New structure.
6527 (iterate_over_lwps_filter): New function.
6528 (iterate_over_lwps): Likewise.
6529 * linux-x86-low.c (update_debug_registers_callback):
6530 Update signature to what iterate_over_lwps expects.
6531 Remove PID check that iterate_over_lwps now performs.
6532 (x86_dr_low_set_addr): Use iterate_over_lwps.
6533 (x86_dr_low_set_control): Likewise.
6535 2015-03-24 Gary Benson <gbenson@redhat.com>
6537 * linux-x86-low.c (x86_debug_reg_state): New function.
6538 (x86_linux_prepare_to_resume): Use the above.
6540 2015-03-24 Gary Benson <gbenson@redhat.com>
6542 * linux-low.c (current_lwp_ptid): New function.
6543 * linux-x86-low.c: Include nat/linux-nat.h.
6544 (x86_dr_low_get_addr): Use current_lwp_ptid.
6545 (x86_dr_low_get_control): Likewise.
6546 (x86_dr_low_get_status): Likewise.
6548 2015-03-20 Pedro Alves <palves@redhat.com>
6550 * tracepoint.c (cmd_qtstatus): Make "str" const.
6552 2015-03-20 Pedro Alves <palves@redhat.com>
6554 * server.c (handle_general_set): Make "req_str" const.
6556 2015-03-19 Pedro Alves <palves@redhat.com>
6558 * linux-low.c (linux_resume_one_lwp): Rename to ...
6559 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6560 instead call perror_with_name.
6561 (check_ptrace_stopped_lwp_gone): New function.
6562 (linux_resume_one_lwp): Reimplement as wrapper around
6563 linux_resume_one_lwp_throw that swallows errors if the LWP is
6566 2015-03-19 Pedro Alves <palves@redhat.com>
6568 * linux-low.c (count_events_callback, select_event_lwp_callback):
6569 No longer check whether the thread has resume_stop as last resume
6572 2015-03-19 Pedro Alves <palves@redhat.com>
6574 * linux-low.c (count_events_callback, select_event_lwp_callback):
6575 Use the lwp's status_pending_p field, not the thread's.
6577 2015-03-19 Pedro Alves <palves@redhat.com>
6579 * linux-low.c (select_event_lwp_callback): Update comments to
6580 no longer mention SIGTRAP.
6582 2015-03-18 Gary Benson <gbenson@redhat.com>
6584 * server.c (handle_query): Do not report vFile:fstat as supported.
6586 2015-03-11 Gary Benson <gbenson@redhat.com>
6588 * hostio.c (sys/types.h): New include.
6589 (sys/stat.h): Likewise.
6590 (common-remote-fileio.h): Likewise.
6591 (handle_fstat): New function.
6592 (handle_vFile): Handle vFile:fstat packets.
6594 2015-03-11 Gary Benson <gbenson@redhat.com>
6596 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6597 struct stat.st_blocks and struct stat.st_blksize.
6598 * configure: Regenerate.
6599 * config.in: Likewise.
6600 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6601 (OBS): Add common-remote-fileio.o.
6602 (common-remote-fileio.o): New rule.
6604 2015-03-09 Pedro Alves <palves@redhat.com>
6606 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6607 'struct sockaddr' pointer in 'accept' call.
6609 2015-03-09 Pedro Alves <palves@redhat.com>
6612 2015-03-07 Pedro Alves <palves@redhat.com>
6613 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6614 or <winsock2.h> here. Instead include "gdb_socket.h".
6615 (remote_open): Use union gdb_sockaddr_u.
6616 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6617 or <winsock2.h> here. Instead include "gdb_socket.h".
6618 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6619 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6621 (init_named_socket, gdb_agent_helper_thread): Use union
6624 2015-03-07 Pedro Alves <palves@redhat.com>
6626 * configure.ac (build_warnings): Move
6627 -Wdeclaration-after-statement to the C-specific set.
6628 * configure: Regenerate.
6630 2015-03-07 Pedro Alves <palves@redhat.com>
6632 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6633 or <winsock2.h> here. Instead include "gdb_socket.h".
6634 (remote_open): Use union gdb_sockaddr_u.
6635 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6636 or <winsock2.h> here. Instead include "gdb_socket.h".
6637 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6638 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6640 (init_named_socket, gdb_agent_helper_thread): Use union
6643 2015-03-07 Pedro Alves <palves@redhat.com>
6645 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6648 2015-03-06 Yao Qi <yao.qi@linaro.org>
6650 * linux-aarch64-low.c (aarch64_insert_point): Use
6651 show_debug_regs as a boolean.
6652 (aarch64_remove_point): Likewise.
6654 2015-03-05 Pedro Alves <palves@redhat.com>
6656 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6657 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6658 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6659 * nto-low.c (nto_target_ops): Likewise.
6660 * spu-low.c (spu_target_ops): Likewise.
6661 * win32-low.c (win32_target_ops): Likewise.
6663 2015-03-04 Pedro Alves <palves@redhat.com>
6665 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6666 Decide whether a breakpoint triggered based on the SIGTRAP's
6668 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6669 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6670 (linux_low_filter_event): Check for breakpoints before checking
6672 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6674 (linux_stopped_by_sw_breakpoint)
6675 (linux_supports_stopped_by_sw_breakpoint)
6676 (linux_stopped_by_hw_breakpoint)
6677 (linux_supports_stopped_by_hw_breakpoint): New functions.
6678 (linux_target_ops): Install new target methods.
6680 2015-03-04 Pedro Alves <palves@redhat.com>
6682 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6683 * server.c (swbreak_feature, hwbreak_feature): New globals.
6684 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6685 (captured_main): Clear swbreak_feature and hwbreak_feature.
6686 * server.h (swbreak_feature, hwbreak_feature): Declare.
6687 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6688 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6689 supports_stopped_by_hw_breakpoint>: New fields.
6690 (target_supports_stopped_by_sw_breakpoint)
6691 (target_stopped_by_sw_breakpoint)
6692 (target_supports_stopped_by_hw_breakpoint)
6693 (target_stopped_by_hw_breakpoint): Declare.
6695 2015-03-04 Pedro Alves <palves@redhat.com>
6697 enum lwp_stop_reason -> enum target_stop_reason
6698 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6699 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6700 (linux_wait_1, stuck_in_jump_pad_callback)
6701 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6702 (linux_stopped_by_watchpoint):
6703 * linux-low.h (enum lwp_stop_reason): Delete.
6704 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6705 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6707 2015-03-04 Yao Qi <yao.qi@linaro.org>
6709 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6711 2015-03-03 Gary Benson <gbenson@redhat.com>
6713 * hostio.c (handle_vFile): Fix prefix lengths.
6715 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6717 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6720 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6722 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6723 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6724 (clean): Add "rm -f" for above C files.
6725 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6726 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6727 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6728 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6729 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6730 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6731 (init_registers_s390x_vx_linux64)
6732 (init_registers_s390x_tevx_linux64)
6733 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6734 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6736 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6737 (s390_store_vxrs_high): New functions.
6738 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6740 (s390_arch_setup): Add logic for selecting one of the new target
6741 descriptions. Activate the new vector regsets if applicable.
6742 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6743 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6744 and init_registers_s390x_tevx_linux64.
6746 2015-03-01 Pedro Alves <palves@redhat.com>
6748 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6751 2015-02-27 Pedro Alves <palves@redhat.com>
6753 * linux-x86-low.c (u_debugreg_offset): New function.
6754 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6756 2015-02-27 Pedro Alves <palves@redhat.com>
6758 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6759 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6760 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6761 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6762 (ps_lsetfpregs, ps_getpid)
6763 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6764 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6765 (ps_lsetxregs, ps_plog): Declare.
6767 2015-02-27 Pedro Alves <palves@redhat.com>
6769 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6770 IP_AGENT_EXPORT_FUNC.
6771 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6772 IP_AGENT_EXPORT_FUNC.
6773 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6774 (IP_AGENT_EXPORT): Delete.
6775 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6776 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6777 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6778 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6779 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6780 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6781 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6782 (traceframe_read_count, traceframe_write_count)
6783 (traceframes_created, trace_state_variables, get_raw_reg)
6784 (get_trace_state_variable_value, set_trace_state_variable_value)
6785 (ust_loaded, helper_thread_id, cmd_buf): Use
6786 IPA_SYM_EXPORTED_NAME.
6787 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6788 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6789 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6790 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6791 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6792 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6793 EXTERN_C_PUSH/EXTERN_C_POP.
6794 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6795 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6796 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6797 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6798 (traceframe_write_count, traceframe_read_count)
6799 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6800 (about_to_request_buffer_space, get_trace_state_variable_value)
6801 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6802 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6803 EXTERN_C_PUSH/EXTERN_C_POP.
6804 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6805 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6806 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6807 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6808 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6809 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6810 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6811 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6813 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6814 (IP_AGENT_EXPORT_VAR_DECL): Define.
6816 (gdb_agent_get_raw_reg): Declare.
6818 2015-02-27 Tom Tromey <tromey@redhat.com>
6819 Pedro Alves <palves@redhat.com>
6821 Rename symbols whose names are reserved C++ keywords throughout.
6823 2015-02-27 Pedro Alves <palves@redhat.com>
6825 * Makefile.in (COMPILER): New, get it from autoconf.
6826 (CXX): Get from autoconf instead.
6827 (COMPILE.pre): Use COMPILER.
6828 (CC-LD): Rename to ...
6829 (CC_LD): ... this. Use COMPILER.
6830 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6831 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6832 * acinclude.m4: Include build-with-cxx.m4.
6833 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6834 Disable -Werror by default if building in C++ mode.
6835 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6836 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6837 the C++ compiler. Save/restore CXXFLAGS too.
6838 * configure: Regenerate.
6840 2015-02-27 Pedro Alves <palves@redhat.com>
6842 * acinclude.m4: Include libiberty.m4.
6843 * configure.ac: Call libiberty_INIT.
6844 * config.in, configure: Regenerate.
6846 2015-02-26 Pedro Alves <palves@redhat.com>
6848 * linux-low.c (linux_wait_1): When incrementing the PC past a
6849 program breakpoint always use the_low_target.breakpoint_len as
6850 increment, rather than the maximum between that and
6851 the_low_target.decr_pc_after_break.
6853 2015-02-23 Pedro Alves <palves@redhat.com>
6855 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6856 thread was doing a step-over; always adjust the PC if
6857 we stepped over a permanent breakpoint.
6858 (linux_wait_1): If we stepped over breakpoint that was on top of a
6859 permanent breakpoint, manually advance the PC past it.
6861 2015-02-23 Pedro Alves <palves@redhat.com>
6863 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6865 (x86_fill_gregset, x86_store_gregset): Use it when handling
6868 2015-02-20 Pedro Alves <palves@redhat.com>
6870 * thread-db.c: Include "nat/linux-procfs.h".
6871 (thread_db_init): Skip listing new threads if the kernel supports
6872 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6874 2015-02-20 Pedro Alves <palves@redhat.com>
6876 * linux-low.c (status_pending_p_callback): Use ptid_match.
6878 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6880 PR breakpoints/16812
6881 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6882 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6883 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6885 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6887 PR breakpoints/15956
6888 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6890 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6892 * linux-low.c (linux_low_btrace_conf): Print size.
6893 * server.c (handle_btrace_conf_general_set): New.
6894 (hanle_general_set): Call handle_btrace_conf_general_set.
6895 (handle_query): Report Qbtrace-conf:bts:size as supported.
6897 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6899 * linux-low.c (linux_low_enable_btrace): Update parameters.
6900 (linux_low_btrace_conf): New.
6901 (linux_target_ops)<to_btrace_conf>: Initialize.
6902 * server.c (current_btrace_conf): New.
6903 (handle_btrace_enable): Rename to ...
6904 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6905 to target_enable_btrace. Update comment. Update users.
6906 (handle_qxfer_btrace_conf): New.
6907 (qxfer_packets): Add btrace-conf entry.
6908 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6909 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6910 (target_ops)<read_btrace_conf>: New.
6911 (target_enable_btrace): Update parameters.
6912 (target_read_btrace_conf): New.
6914 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6916 * server.c (handle_btrace_general_set): Remove call to
6917 target_supports_btrace.
6918 (supported_btrace_packets): New.
6919 (handle_query): Call supported_btrace_packets.
6920 * target.h: include btrace-common.h.
6921 (btrace_target_info): Removed.
6922 (supports_btrace, target_supports_btrace): Update parameters.
6924 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6926 * Makefile.in (SFILES): Add common/btrace-common.c.
6927 (OBS): Add common/btrace-common.o.
6928 (btrace-common.o): Add build rules.
6929 * linux-low: Include btrace-common.h.
6930 (linux_low_read_btrace): Use struct btrace_data. Call
6931 btrace_data_init and btrace_data_fini.
6933 2015-02-06 Pedro Alves <palves@redhat.com>
6935 * thread-db.c (find_new_threads_callback): Add debug output.
6937 2015-02-04 Pedro Alves <palves@redhat.com>
6939 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6940 (resume_stopped_resumed_lwps): New function.
6941 (linux_wait_for_event_filtered): Use it.
6943 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6945 * Makefile.in (SFILES): Add linux-personality.c.
6946 (linux-personality.o): New rule.
6947 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6948 list of objects to be built.
6949 * linux-low.c: Include nat/linux-personality.h.
6950 (linux_create_inferior): Remove code to disable address space
6951 randomization (moved to ../nat/linux-personality.c). Create
6952 cleanup to disable address space randomization.
6954 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6956 * Makefile.in (posix-strerror.o): New rule.
6957 (mingw-strerror.o): Likewise.
6958 * configure: Regenerated.
6959 * configure.ac: Source file ../common/common.host. Initialize new
6960 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6962 2015-01-14 Yao Qi <yao@codesourcery.com>
6964 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6965 (ppc-linux.o): New rule.
6966 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6967 * configure.ac: AC_CHECK_FUNCS(getauxval).
6968 * config.in: Re-generated.
6969 * configure: Re-generated.
6970 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6971 ppc64_64bit_inferior_p
6973 2015-01-14 Yao Qi <yao@codesourcery.com>
6975 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6976 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6977 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6978 (PT_ORIG_R3, PT_TRAP): Likewise.
6979 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6980 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6981 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6983 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6985 * i387-fp.c (i387_cache_to_xsave): In look over
6986 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6987 zmmh_low_space field by use of zmmh_high_space.
6989 2015-01-09 Pedro Alves <palves@redhat.com>
6991 * linux-low.c (step_over_bkpt): Move higher up in the file.
6992 (handle_extended_wait): Don't store the stop_pc here.
6993 (get_stop_pc): Adjust comments and rename to ...
6994 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6995 stopped for a software breakpoint or hardware breakpoint.
6996 (thread_still_has_status_pending_p): New function.
6997 (status_pending_p_callback): Use
6998 thread_still_has_status_pending_p. If the event is no longer
6999 interesting, resume the LWP.
7000 (handle_tracepoints): Add assert.
7001 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7002 (wstatus_maybe_breakpoint): New function.
7003 (cancel_breakpoint): Delete function.
7004 (check_stopped_by_watchpoint): New function, factored out from
7005 linux_low_filter_event.
7006 (lp_status_maybe_breakpoint): Delete function.
7007 (linux_low_filter_event): Remove filter_ptid argument.
7008 Leave thread group exits pending here. Store the LWP's stop PC.
7009 Always leave events pending.
7010 (linux_wait_for_event_filtered): Pull all events out of the
7011 kernel, and leave them all pending.
7012 (count_events_callback, select_event_lwp_callback): Consider all
7014 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7015 (select_event_lwp): Only give preference to the stepping LWP in
7016 all-stop mode. Adjust comments.
7017 (ignore_event): New function.
7018 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7019 references to cancel_breakpoints. Adjust to renames. Also give
7020 equal priority to all LWPs that have had events in non-stop mode.
7021 If reporting a software breakpoint event, unadjust the LWP's PC.
7022 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7023 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7025 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7026 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7027 (linux_stopped_by_watchpoint): Adjust.
7028 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7029 * linux-low.h (enum lwp_stop_reason): New.
7030 (struct lwp_info) <stop_pc>: Adjust comment.
7031 <stopped_by_watchpoint>: Delete field.
7032 <stop_reason>: New field.
7033 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7034 * mem-break.c (software_breakpoint_inserted_here)
7035 (hardware_breakpoint_inserted_here): New function.
7036 * mem-break.h (software_breakpoint_inserted_here)
7037 (hardware_breakpoint_inserted_here): Declare.
7038 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7039 (cancel_breakpoints): Delete.
7040 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7041 (upload_fast_traceframes): Remove references to
7044 2015-01-09 Pedro Alves <palves@redhat.com>
7046 * thread-db.c (find_new_threads_callback): Ignore thread if the
7047 kernel thread ID is -1.
7049 2015-01-09 Pedro Alves <palves@redhat.com>
7051 * linux-low.c (linux_attach_fail_reason_string): Move to
7052 nat/linux-ptrace.c, and rename.
7053 (linux_attach_lwp): Update comment.
7054 (attach_proc_task_lwp_callback): New function.
7055 (linux_attach): Adjust to rename and use
7056 linux_proc_attach_tgid_threads.
7057 (linux_attach_fail_reason_string): Delete declaration.
7059 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7061 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7062 * server.c (gdbserver_version): Likewise.
7064 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7066 * remote-utils.c: Include ctype.h.
7067 (input_interrupt): Explicitly handle the case when the char
7068 received is the NUL byte. Improve the printing of non-ASCII
7071 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7073 * linux-low.c (linux_low_filter_event): Update call to
7074 linux_enable_event_reporting following the addition of
7075 a new parameter to that function.
7077 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7080 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7081 (AARCH64_FPCR_REGNO): Likewise.
7082 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7083 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7084 (aarch64_store_fpregset): Likewise.
7086 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7088 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7089 Remove FIXME comment about assumption about N.
7091 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7093 * configure.ac: If large-file support is disabled in GDBserver,
7094 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7095 * configure: Regenerate.
7097 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7099 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7100 warning upon ENODATA from ptrace.
7101 * linux-s390-low.c (s390_store_tdb): New.
7102 (s390_regsets): Add regset for NT_S390_TDB.
7104 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7106 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7107 without a fill_function.
7108 * linux-s390-low.c (s390_fill_last_break): Remove.
7109 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7110 (s390_arch_setup): Use regset's size instead of fill_function for
7113 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7115 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7116 the regset's store function when ptrace returned an error.
7117 * regcache.c (get_thread_regcache): Invalidate register cache
7118 before fetching inferior's registers.
7120 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7122 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7123 while-loop as for-loop.
7124 (regsets_store_inferior_registers): Likewise.
7126 2014-11-28 Yao Qi <yao@codesourcery.com>
7128 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7129 * config.in, configure: Re-generate.
7130 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7133 2014-11-21 Yao Qi <yao@codesourcery.com>
7135 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7136 (AC_CHECK_HEADERS): Remove malloc.h.
7137 * configure: Re-generated.
7138 * config.in: Re-generated.
7139 * server.h: Don't include alloca.h and malloc.h.
7140 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7141 Don't include malloc.h.
7143 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7145 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7146 corresponding ERRNO check in same block.
7148 2014-11-12 Pedro Alves <palves@redhat.com>
7150 * server.c (cont_thread): Update comment.
7151 (start_inferior, attach_inferior): No longer clear cont_thread.
7152 (handle_v_cont): No longer set cont_thread.
7153 (captured_main): Clear cont_thread each time a GDB connects.
7155 2014-11-12 Pedro Alves <palves@redhat.com>
7157 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7158 thread, and don't resume all threads if the Hc thread has exited.
7160 2014-11-12 Pedro Alves <palves@redhat.com>
7162 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7163 the process group instead of to a specific LWP.
7165 2014-10-15 Pedro Alves <palves@redhat.com>
7168 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7170 (arm_set_thread_context): Delete.
7171 (the_low_target): Adjust.
7172 * win32-i386-low.c (debug_registers_changed)
7173 (debug_registers_used): Delete.
7174 (update_debug_registers_callback): New function.
7175 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7176 needing to update their debug registers.
7177 (win32_get_current_dr): New function.
7178 (x86_dr_low_get_addr, x86_dr_low_get_control)
7179 (x86_dr_low_get_status): Fetch the debug register from the thread
7181 (i386_initial_stuff): Adjust.
7182 (i386_get_thread_context): Remove current_event parameter. Don't
7183 clear debug_registers_changed nor copy DR values to
7185 (i386_set_thread_context): Delete.
7186 (i386_prepare_to_resume): New function.
7187 (i386_thread_added): Mark the thread as needing to update irs
7189 (the_low_target): Remove i386_set_thread_context and install
7190 i386_prepare_to_resume.
7191 * win32-low.c (win32_get_thread_context): Adjust.
7192 (win32_set_thread_context): Use SetThreadContext
7194 (win32_prepare_to_resume): New function.
7195 (win32_require_context): New function, factored out from ...
7196 (thread_rec): ... this.
7197 (continue_one_thread): Call win32_prepare_to_resume on each thread
7198 we're about to continue.
7199 (win32_resume): Call win32_prepare_to_resume on the event thread.
7200 * win32-low.h (struct win32_thread_info)
7201 <debug_registers_changed>: New field.
7202 (struct win32_target_ops): Change prototype of set_thread_context,
7203 delete set_thread_context and add prepare_to_resume.
7204 (win32_require_context): New declaration.
7206 2014-10-08 Gary Benson <gbenson@redhat.com>
7208 * server.h: Do not include common-exceptions.h.
7210 2014-10-08 Gary Benson <gbenson@redhat.com>
7212 * server.h: Do not include cleanups.h.
7214 2014-09-30 James Hogan <james.hogan@imgtec.com>
7216 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7219 2014-09-23 Yao Qi <yao@codesourcery.com>
7221 * linux-low.c (lp_status_maybe_breakpoint): New function.
7222 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7223 (count_events_callback): Likewise.
7224 (select_event_lwp_callback): Likewise.
7225 (cancel_breakpoints_callback): Likewise.
7227 2014-09-19 Don Breazeal <donb@codesourcery.com>
7229 * linux-low.c (handle_extended_wait): Call
7230 linux_ptrace_get_extended_event.
7231 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7232 linux_is_extended_waitstatus.
7234 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7236 * Makefile.in (CPPFLAGS): Define.
7237 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7238 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7240 2014-09-16 Gary Benson <gbenson@redhat.com>
7242 * inferiors.h (current_inferior): Renamed as...
7243 (current_thread): New variable. All uses updated.
7244 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7245 (maybe_move_out_of_jump_pad): Likewise.
7246 (cancel_breakpoint): Likewise.
7247 (linux_low_filter_event): Likewise.
7248 (wait_for_sigstop): Likewise.
7249 (linux_resume_one_lwp): Likewise.
7250 (need_step_over_p): Likewise.
7251 (start_step_over): Likewise.
7252 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7253 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7254 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7255 and save_inferior as saved_thread.
7256 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7258 (regcache_invalidate_thread): Likewise.
7259 * remote-utils.c (prepare_resume_reply): Likewise.
7260 * thread-db.c (thread_db_get_tls_address): Likewise.
7261 (disable_thread_event_reporting): Likewise.
7262 (remove_thread_event_breakpoints): Likewise.
7263 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7265 * target.h (set_desired_inferior): Renamed as...
7266 (set_desired_thread): New declaration. All uses updated.
7267 * server.c (myresume): Updated comment to reference thread instead
7269 (handle_serial_event): Likewise.
7270 (handle_target_event): Likewise.
7272 2014-09-12 Tom Tromey <tromey@redhat.com>
7273 Gary Benson <gbenson@redhat.com>
7275 * regcache.h: Include common-regcache.h.
7276 (regcache_read_pc): Don't declare.
7277 * regcache.c (get_thread_regcache_for_ptid): New function.
7279 2014-09-11 Tom Tromey <tromey@redhat.com>
7280 Gary Benson <gbenson@redhat.com>
7282 * symbol.c: New file.
7283 * Makefile.in (SFILES): Add symbol.c.
7284 (OBS): Add symbol.o.
7286 2014-09-11 Gary Benson <gbenson@redhat.com>
7288 * target.c (target_stop_ptid, target_continue_ptid): New
7291 2014-09-11 Tom Tromey <tromey@redhat.com>
7292 Gary Benson <gbenson@redhat.com>
7294 * target.h: Include target/target.h.
7295 * target.c (target_read_memory, target_read_uint32)
7296 (target_write_memory): New functions.
7298 2014-09-11 Gary Benson <gbenson@redhat.com>
7300 * server.h (debug_hw_points): Don't declare.
7301 * server.c (debug_hw_points): Don't define. Replace all uses
7302 with show_debug_regs.
7303 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7304 all uses with show_debug_regs.
7306 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7308 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7309 endianness into account.
7310 (ppc_supply_ptrace_register): Likewise.
7312 2014-09-03 James Hogan <james.hogan@imgtec.com>
7314 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7315 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7317 2014-09-03 Gary Benson <gbenson@redhat.com>
7319 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7320 ALL_DEBUG_ADDRESS_REGISTERS.
7322 2014-09-02 Gary Benson <gbenson@redhat.com>
7324 * i386-low.h: Renamed as...
7325 * x86-low.h: New file. All type, function and variable name
7326 prefixes changed from "i386_" to "x86_". All references updated.
7327 * i386-low.c: Renamed as...
7328 * x86-low.c: New file. All type, function and variable name
7329 prefixes changed from "i386_" to "x86_". All references updated.
7331 2014-09-02 Gary Benson <gbenson@redhat.com>
7333 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7334 (x86_linux_new_thread): Likewise.
7336 2014-08-29 Gary Benson <gbenson@redhat.com>
7338 * server.h (setjmp.h): Do not include.
7339 (toplevel): Do not declare.
7340 (common-exceptions.h): Include.
7341 (cleanups.h): Likewise.
7342 * server.c (toplevel): Do not define.
7343 (exit_code): New static global.
7344 (detach_or_kill_for_exit_cleanup): New function.
7345 (main): New function. Original main renamed to...
7346 (captured_main): New function.
7347 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7349 2014-08-29 Gary Benson <gbenson@redhat.com>
7351 * Makefile.in (SFILES): Add common/common-exceptions.c.
7352 (OBS): Add common-exceptions.o.
7353 (common-exceptions.o): New rule.
7354 * utils.c (prepare_to_throw_exception): New function.
7356 2014-08-29 Gary Benson <gbenson@redhat.com>
7358 * config.in: Regenerate.
7359 * configure: Likewise.
7361 2014-08-29 Gary Benson <gbenson@redhat.com>
7363 * Makefile.in (SFILES): Add common/cleanups.c.
7365 (cleanups.o): New rule.
7367 2014-08-29 Gary Benson <gbenson@redhat.com>
7369 * utils.c (internal_vwarning): New function.
7371 2014-08-28 Gary Benson <gbenson@redhat.com>
7373 * utils.h (fatal): Remove declaration.
7374 * utils.c (fatal): Remove function.
7376 2014-08-28 Gary Benson <gbenson@redhat.com>
7378 * tracepoint.c (gdb_agent_init): Replace fatal with
7380 (initialize_tracepoint): Likewise.
7382 2014-08-28 Gary Benson <gbenson@redhat.com>
7384 * remote-utils.c (remote_prepare): Replace fatal with error.
7386 2014-08-28 Gary Benson <gbenson@redhat.com>
7388 * linux-low.c (linux_async): Replace fatal with warning.
7390 (linux_start_non_stop): Return -1 if linux_async failed.
7392 2014-08-28 Gary Benson <gbenson@redhat.com>
7394 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7396 (i386_dr_low_get_addr): Remove vague comment.
7397 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7400 2014-08-28 Gary Benson <gbenson@redhat.com>
7402 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7403 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7405 (linux_resume_one_lwp): Likewise.
7406 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7408 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7409 with internal_error.
7410 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7411 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7412 (find_register_by_name): Replace fatal with internal_error.
7413 (find_regno): Likewise.
7414 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7415 * thread-db.c (thread_db_create_event): Likewise.
7416 (thread_db_load_search): Likewise.
7417 (try_thread_db_load_1): Likewise.
7418 * tracepoint.c (get_jump_space_head): Replace fatal with
7420 (claim_trampoline_space): Likewise.
7421 (have_fast_tracepoint_trampoline_buffer): Likewise.
7422 (cmd_qtstart): Likewise.
7423 (stop_tracing): Likewise.
7424 (fast_tracepoint_collecting): Likewise.
7425 (target_malloc): Likewise.
7426 (download_tracepoint): Likewise.
7427 (download_trace_state_variables): Replace check with gdb_assert.
7428 (upload_fast_traceframes): Replace fatal with internal_error.
7430 2014-08-19 Tom Tromey <tromey@redhat.com>
7431 Gary Benson <gbenson@redhat.com>
7433 * Makefile.in (SFILES): Add common/common-debug.c.
7434 (OBS): Add common-debug.o.
7435 (common-debug.o): New rule.
7436 * debug.h (debug_printf): Don't declare.
7437 * debug.c (debug_printf): Renamed and rewritten as...
7438 (debug_vprintf): New function.
7440 2014-08-19 Gary Benson <gbenson@redhat.com>
7442 * utils.h: Do not include print-utils.h.
7444 2014-08-19 Tom Tromey <tromey@redhat.com>
7445 Gary Benson <gbenson@redhat.com>
7447 * server.h: Add static assertion.
7448 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7450 2014-08-19 Tom Tromey <tromey@redhat.com>
7451 Gary Benson <gbenson@redhat.com>
7453 * Makefile.in (SFILES): Add common/errors.c.
7454 (OBS): Add errors.o.
7455 (IPA_OBS): Add errors-ipa.o.
7456 (errors.o): New rule.
7457 (errors-ipa.o): Likewise.
7458 * utils.h (perror_with_name, error, warning): Don't declare.
7459 * utils.c (warning): Renamed and rewritten as...
7460 (vwarning): New function.
7461 (error): Renamed and rewritten as...
7462 (verror): New function.
7463 (internal_error): Renamed and rewritten as...
7464 (internal_verror): New function.
7466 2014-08-07 Gary Benson <gbenson@redhat.com>
7468 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7469 * configure: Regenerate.
7470 * config.in: Likewise.
7471 * server.h: Do not include errno.h.
7472 * event-loop.c: Likewise.
7473 * hostio-errno.c: Likewise.
7474 * linux-low.c: Likewise.
7475 * remote-utils.c: Likewise.
7476 * spu-low.c: Likewise.
7477 * utils.c: Likewise.
7478 * gdbreplay.c: Unconditionally include errno.h.
7480 2014-08-07 Gary Benson <gbenson@redhat.com>
7482 * server.h: Do not include string.h.
7483 * event-loop.c: Likewise.
7484 * linux-low.c: Likewise.
7485 * regcache.c: Likewise.
7486 * remote-utils.c: Likewise.
7487 * spu-low.c: Likewise.
7488 * utils.c: Likewise.
7490 2014-08-07 Gary Benson <gbenson@redhat.com>
7492 * server.h: Do not include gdb_assert.h.
7494 2014-08-07 Gary Benson <gbenson@redhat.com>
7496 * server.h: Do not include common-utils.h.
7498 2014-08-07 Gary Benson <gbenson@redhat.com>
7500 * server.h: Do not include ptid.h.
7501 * notif.h: Likewise.
7503 2014-08-07 Gary Benson <gbenson@redhat.com>
7505 * server.h: Do not include gdb_locale.h.
7507 2014-08-07 Gary Benson <gbenson@redhat.com>
7509 * server.h: Do not include gdb/signals.h.
7510 * win32-low.c: Likewise.
7512 2014-08-07 Gary Benson <gbenson@redhat.com>
7514 * server.h: Do not include pathmax.h.
7516 2014-08-07 Gary Benson <gbenson@redhat.com>
7518 * server.h: Do not include libiberty.h.
7519 * linux-bfin-low.c: Likewise.
7521 2014-08-07 Gary Benson <gbenson@redhat.com>
7523 * server.h: Do not include ansidecl.h.
7525 2014-08-07 Gary Benson <gbenson@redhat.com>
7527 * linux-x86-low.c: Do not include stddef.h.
7528 * lynx-ppc-low.c: Likewise.
7529 * tracepoint.c: Likewise.
7531 2014-08-07 Gary Benson <gbenson@redhat.com>
7533 * server.h: Do not include stdarg.h.
7534 * nto-low.c: Likewise.
7536 2014-08-07 Gary Benson <gbenson@redhat.com>
7538 * server.h: Do not include stdlib.h.
7539 * inferiors.c: Likewise.
7540 * linux-low.c: Likewise.
7541 * regcache.c: Likewise.
7542 * spu-low.c: Likewise.
7543 * tracepoint.c: Likewise.
7544 * utils.c: Likewise.
7546 2014-08-07 Gary Benson <gbenson@redhat.com>
7548 * server.h: Do not include stdio.h.
7549 * linux-low.c: Likewise.
7550 * remote-utils.c: Likewise.
7551 * spu-low.c: Likewise.
7552 * utils.c: Likewise.
7553 * wincecompat.c: Likewise.
7555 2014-08-06 Gary Benson <gbenson@redhat.com>
7557 * regcache.c (init_register_cache): Move conditionals inside if.
7559 2014-08-06 Gary Benson <gbenson@redhat.com>
7561 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7563 2014-07-31 Gary Benson <gbenson@redhat.com>
7565 * ax.h: Do not include server.h.
7566 * gdbthread.h: Likewise.
7567 * lynx-low.h: Likewise.
7568 * notif.h: Likewise.
7570 2014-07-30 Gary Benson <gbenson@redhat.com>
7572 * server.h: Include common-defs.h.
7573 Do not include config.h or build-gnulib-gdbserver/config.h.
7575 2014-07-30 Gary Benson <gbenson@redhat.com>
7577 * hostio-errno.c: Move server.h to top of includes list.
7578 * inferiors.c: Likewise.
7579 * linux-x86-low.c: Likewise.
7580 * notif.c: Include server.h.
7582 2014-07-24 Tom Tromey <tromey@redhat.com>
7583 Gary Benson <gbenson@redhat.com>
7585 * server.h (CORE_ADDR): Now unsigned.
7587 2014-07-16 Pedro Alves <palves@redhat.com>
7589 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7591 2014-07-15 Pedro Alves <palves@redhat.com>
7593 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7596 2014-07-11 Pedro Alves <palves@redhat.com>
7598 * linux-low.c (kill_wait_lwp): New function, based on
7599 kill_one_lwp_callback, but use my_waitpid directly.
7600 (kill_one_lwp_callback, linux_kill): Use it.
7602 2014-06-23 Pedro Alves <palves@redhat.com>
7604 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7605 before setting DR0..DR3.
7607 2014-06-20 Gary Benson <gbenson@redhat.com>
7609 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7610 * configure: Regenerated.
7611 * config.in: Likewise.
7613 2014-06-20 Gary Benson <gbenson@redhat.com>
7615 * Makefile.in (SFILES): Update locations for files moved
7617 (object file files): Reordered.
7619 2014-06-20 Gary Benson <gbenson@redhat.com>
7621 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7622 (i386_dr_low_set_addr): Likewise.
7623 (i386_dr_low_get_addr): Likewise.
7624 (i386_dr_low_can_set_control): Likewise.
7625 (i386_dr_low_set_control): Likewise.
7626 (i386_dr_low_get_control): Likewise.
7627 (i386_dr_low_get_status): Likewise.
7628 (i386_get_debug_register_length): Likewise.
7629 * linux-x86-low.c (i386_dr_low_set_addr):
7630 Changed signature. Made static.
7631 (i386_dr_low_get_addr): Likewise.
7632 (i386_dr_low_set_control): Likewise.
7633 (i386_dr_low_get_control): Likewise.
7634 (i386_dr_low_get_status): Likewise.
7635 (i386_dr_low): New global variable.
7636 * win32-i386-low.c (i386_dr_low_set_addr):
7637 Changed signature. Made static.
7638 (i386_dr_low_get_addr): Likewise.
7639 (i386_dr_low_set_control): Likewise.
7640 (i386_dr_low_get_control): Likewise.
7641 (i386_dr_low_get_status): Likewise.
7642 (i386_dr_low): New global variable.
7644 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7646 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7647 * Makefile.in (AR, AR_FLAGS): Define.
7648 * configure: Regenerate.
7650 2014-06-19 Gary Benson <gbenson@redhat.com>
7652 * Makefile.in (i386-dregs.o): New rule.
7653 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7654 * i386-low.c (target.h): Remove include.
7655 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7656 (DR_CONTROL_SHIFT): Likewise.
7657 (DR_CONTROL_SIZE): Likewise.
7658 (DR_RW_EXECUTE): Likewise.
7659 (DR_RW_WRITE): Likewise.
7660 (DR_RW_READ): Likewise.
7661 (DR_RW_IORW): Likewise.
7662 (DR_LEN_1): Likewise.
7663 (DR_LEN_2): Likewise.
7664 (DR_LEN_4): Likewise.
7665 (DR_LEN_8): Likewise.
7666 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7667 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7668 (DR_ENABLE_SIZE): Likewise.
7669 (DR_LOCAL_SLOWDOWN): Likewise.
7670 (DR_GLOBAL_SLOWDOWN): Likewise.
7671 (DR_CONTROL_RESERVED): Likewise.
7672 (I386_DR_CONTROL_MASK): Likewise.
7673 (I386_DR_VACANT): Likewise.
7674 (I386_DR_LOCAL_ENABLE): Likewise.
7675 (I386_DR_GLOBAL_ENABLE): Likewise.
7676 (I386_DR_DISABLE): Likewise.
7677 (I386_DR_SET_RW_LEN): Likewise.
7678 (I386_DR_GET_RW_LEN): Likewise.
7679 (I386_DR_WATCH_HIT): Likewise.
7680 (i386_wp_op_t): Likewise.
7681 (i386_show_dr): Likewise.
7682 (i386_length_and_rw_bits): Likewise.
7683 (i386_insert_aligned_watchpoint): Likewise.
7684 (i386_remove_aligned_watchpoint): Likewise.
7685 (i386_handle_nonaligned_watchpoint): Likewise.
7686 i386_update_inferior_debug_regs(): Likewise.
7687 (i386_dr_insert_watchpoint): Likewise.
7688 (i386_dr_remove_watchpoint): Likewise.
7689 (i386_dr_region_ok_for_watchpoint): Likewise.
7690 (i386_dr_stopped_data_address): Likewise.
7691 (i386_dr_stopped_by_watchpoint): Likewise.
7693 2014-06-19 Gary Benson <gbenson@redhat.com>
7695 * i386-low.c (i386_dr_show): Renamed to
7696 i386_show_dr and made static. All uses updated.
7697 (i386_dr_length_and_rw_bits): Renamed to
7698 i386_length_and_rw_bits and made static.
7700 (i386_dr_insert_aligned_watchpoint): Renamed to
7701 i386_insert_aligned_watchpoint and made static.
7703 (i386_dr_remove_aligned_watchpoint): Renamed to
7704 i386_remove_aligned_watchpoint and made static.
7706 (i386_dr_update_inferior_debug_regs): Renamed to
7707 i386_update_inferior_debug_regs and made static.
7710 2014-06-18 Gary Benson <gbenson@redhat.com>
7712 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7713 (i386_dr_low_can_set_control): Likewise.
7714 (i386_get_debug_register_length): Likewise.
7715 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7716 (i386_dr_low_can_set_control): Likewise.
7717 (i386_get_debug_register_length): Likewise.
7719 2014-06-17 Gary Benson <gbenson@redhat.com>
7721 * i386-low.h (i386-dregs.h): New include.
7722 (DR_FIRSTADDR): Now in i386-dregs.h.
7723 (DR_LASTADDR): Likewise.
7724 (DR_NADDR): Likewise.
7725 (DR_STATUS): Likewise.
7726 (DR_CONTROL): Likewise.
7727 (i386_debug_reg_state): Likewise.
7728 (i386_dr_insert_watchpoint): Likewise.
7729 (i386_dr_remove_watchpoint): Likewise.
7730 (i386_dr_region_ok_for_watchpoint): Likewise.
7731 (i386_dr_stopped_data_address): Likewise.
7732 (i386_dr_stopped_by_watchpoint): Likewise.
7733 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7735 2014-06-18 Gary Benson <gbenson@redhat.com>
7737 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7738 i386_dr_insert_watchpoint.
7739 (i386_low_remove_watchpoint): Renamed to
7740 i386_dr_remove_watchpoint.
7741 (i386_low_region_ok_for_watchpoint): Renamed to
7742 i386_dr_region_ok_for_watchpoint.
7743 (i386_low_stopped_data_address): Renamed to
7744 i386_dr_stopped_data_address.
7745 (i386_low_stopped_by_watchpoint): Renamed to
7746 i386_dr_stopped_by_watchpoint.
7747 * i386-low.c (i386_show_dr): Renamed to
7748 i386_dr_show and made nonstatic. All uses updated.
7749 (i386_length_and_rw_bits): Renamed to
7750 i386_dr_length_and_rw_bits and made nonstatic.
7752 (i386_insert_aligned_watchpoint): Renamed to
7753 i386_dr_insert_aligned_watchpoint and made nonstatic.
7755 (i386_remove_aligned_watchpoint): Renamed to
7756 i386_dr_remove_aligned_watchpoint and made nonstatic.
7758 (i386_update_inferior_debug_regs): Renamed to
7759 i386_dr_update_inferior_debug_regs and made nonstatic.
7761 (i386_low_insert_watchpoint): Renamed to
7762 i386_dr_insert_watchpoint. All uses updated.
7763 (i386_low_remove_watchpoint): Renamed to
7764 i386_dr_remove_watchpoint. All uses updated.
7765 (i386_low_region_ok_for_watchpoint): Renamed to
7766 i386_dr_region_ok_for_watchpoint. All uses updated.
7767 (i386_low_stopped_data_address): Renamed to
7768 i386_dr_stopped_data_address. All uses updated.
7769 (i386_low_stopped_by_watchpoint): Renamed to
7770 i386_dr_stopped_by_watchpoint. All uses updated.
7772 2014-06-18 Gary Benson <gbenson@redhat.com>
7774 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7775 (i386_dr_low_can_set_control): Likewise.
7776 (i386_insert_aligned_watchpoint): New check.
7778 2014-06-18 Gary Benson <gbenson@redhat.com>
7780 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7783 2014-06-18 Gary Benson <gbenson@redhat.com>
7785 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7786 instead of fatal and error.
7787 (i386_handle_nonaligned_watchpoint): Likewise.
7789 2014-06-18 Gary Benson <gbenson@redhat.com>
7791 * i386-low.c (i386_get_debug_register_length): New macro.
7792 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7793 (i386_show_dr): Use debug_printf instead of fprintf. Use
7794 phex to format values.
7796 2014-06-18 Gary Benson <gbenson@redhat.com>
7798 * i386-low.h: Comment changes.
7799 * i386-low.c: Likewise.
7801 2014-06-18 Gary Benson <gbenson@redhat.com>
7803 * i386-low.c: Whitespace changes.
7805 2014-06-12 Tom Tromey <tromey@redhat.com>
7807 * utils.c (freeargv): Remove.
7809 2014-06-12 Tom Tromey <tromey@redhat.com>
7811 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7812 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7813 (parse_debug_format_options): Likewise.
7814 (gdbserver_usage): Likewise.
7815 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7816 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7817 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7819 ($(LIBGNU)): Depend on libiberty.
7820 (all-lib): Recurse into all subdirs.
7821 (install-only): Invoke "install" target in subdirs.
7822 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7824 * configure: Rebuild.
7825 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7826 for vasprintf, vsnprintf, or gettimeofday.
7827 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7830 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7832 * development.sh: Delete.
7833 * Makefile.in (config.status): Adjust dependency on development.sh.
7834 * configure.ac: Adjust development.sh source call.
7835 * configure: Regenerate.
7837 2014-06-02 Pedro Alves <palves@redhat.com>
7839 * ax.c (gdb_free_agent_expr): New function.
7840 * ax.h (gdb_free_agent_expr): New declaration.
7841 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7843 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7845 (clear_breakpoint_conditions_and_commands): New function.
7846 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7847 (clear_breakpoint_conditions_and_commands): New declaration.
7849 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7851 * linux-aarch64-low.c (asm/ptrace.h): Include.
7853 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7855 Fix TLS access for -static -pthread.
7856 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7857 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7858 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7860 2014-05-20 Pedro Alves <palves@redhat.com>
7862 * linux-aarch64-low.c (aarch64_insert_point)
7863 (aarch64_remove_point): No longer check whether the type is
7864 supported here. Adjust to new interface.
7865 (the_low_target): Install aarch64_supports_z_point_type as
7866 supports_z_point_type method.
7867 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7868 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7869 instead of a Z packet char. Adjust.
7870 (arm_supports_z_point_type): New function.
7871 (arm_insert_point, arm_remove_point): Adjust to new interface.
7872 (the_low_target): Install arm_supports_z_point_type.
7873 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7874 (cris_insert_point, cris_remove_point): Adjust to new interface.
7875 Don't check whether the type is supported here.
7876 (the_low_target): Install cris_supports_z_point_type.
7877 * linux-low.c (linux_supports_z_point_type): New function.
7878 (linux_insert_point, linux_remove_point): Adjust to new interface.
7879 * linux-low.h (struct linux_target_ops) <insert_point,
7880 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7881 raw_breakpoint pointer parameter.
7882 <supports_z_point_type>: New method.
7883 * linux-mips-low.c (mips_supports_z_point_type): New function.
7884 (mips_insert_point, mips_remove_point): Adjust to new interface.
7885 Use mips_supports_z_point_type.
7886 (the_low_target): Install mips_supports_z_point_type.
7887 * linux-ppc-low.c (the_low_target): Install NULL as
7888 supports_z_point_type method.
7889 * linux-s390-low.c (the_low_target): Install NULL as
7890 supports_z_point_type method.
7891 * linux-sparc-low.c (the_low_target): Install NULL as
7892 supports_z_point_type method.
7893 * linux-x86-low.c (x86_supports_z_point_type): New function.
7894 (x86_insert_point): Adjust to new insert_point interface. Use
7895 insert_memory_breakpoint. Adjust to new
7896 i386_low_insert_watchpoint interface.
7897 (x86_remove_point): Adjust to remove_point interface. Use
7898 remove_memory_breakpoint. Adjust to new
7899 i386_low_remove_watchpoint interface.
7900 (the_low_target): Install x86_supports_z_point_type.
7901 * lynx-low.c (lynx_target_ops): Install NULL as
7902 supports_z_point_type callback.
7903 * nto-low.c (nto_supports_z_point_type): New.
7904 (nto_insert_point, nto_remove_point): Adjust to new interface.
7905 (nto_target_ops): Install nto_supports_z_point_type.
7906 * mem-break.c: Adjust intro comment.
7907 (struct raw_breakpoint) <raw_type, size>: New fields.
7908 <inserted>: Update comment.
7909 <shlib_disabled>: Delete field.
7910 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7911 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7912 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7913 (raw_bkpt_type_to_target_hw_bp_type): New function.
7914 (find_enabled_raw_code_breakpoint_at): New function.
7915 (find_raw_breakpoint_at): New type and size parameters. Use them.
7916 (insert_memory_breakpoint): New function, based off
7917 set_raw_breakpoint_at.
7918 (remove_memory_breakpoint): New function.
7919 (set_raw_breakpoint_at): Reimplement.
7920 (set_breakpoint): New, based on set_breakpoint_at.
7921 (set_breakpoint_at): Reimplement.
7922 (delete_raw_breakpoint): Go through the_target->remove_point
7923 instead of assuming memory breakpoints.
7924 (find_gdb_breakpoint_at): Delete.
7925 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7926 (find_gdb_breakpoint): New function.
7927 (set_gdb_breakpoint_at): Delete.
7928 (z_type_supported): New function.
7929 (set_gdb_breakpoint_1): New function, loosely based off
7930 set_gdb_breakpoint_at.
7931 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7932 (delete_gdb_breakpoint_at): Delete.
7933 (delete_gdb_breakpoint_1): New function, loosely based off
7934 delete_gdb_breakpoint_at.
7935 (delete_gdb_breakpoint): New function.
7936 (clear_gdb_breakpoint_conditions): Rename to ...
7937 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7939 (add_condition_to_breakpoint): Make static.
7940 (add_breakpoint_condition): Take a struct breakpoint pointer
7941 instead of an address. Adjust.
7942 (gdb_condition_true_at_breakpoint): Rename to ...
7943 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7945 (gdb_condition_true_at_breakpoint): Reimplement.
7946 (add_breakpoint_commands): Take a struct breakpoint pointer
7947 instead of an address. Adjust.
7948 (gdb_no_commands_at_breakpoint): Rename to ...
7949 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7950 parameter. Return true if no breakpoint was found. Change debug
7952 (gdb_no_commands_at_breakpoint): Reimplement.
7953 (run_breakpoint_commands): Rename to ...
7954 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7955 and change return type to boolean.
7956 (run_breakpoint_commands): New function.
7957 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7958 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7959 breakpoint. Go through the_target->remove_point instead of
7960 assuming memory breakpoint.
7961 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7962 software and hardware breakpoints.
7963 (reinsert_raw_breakpoint): Go through the_target->insert_point
7964 instead of assuming memory breakpoint.
7965 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7966 software and hardware breakpoints.
7967 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7968 Check both software and hardware breakpoints.
7969 (validate_inserted_breakpoint): Assert the breakpoint is a
7970 software breakpoint. Set the inserted flag to -1 instead of
7971 setting shlib_disabled.
7972 (delete_disabled_breakpoints): Adjust.
7973 (validate_breakpoints): Only validate software breakpoints.
7974 Adjust to inserted flag change.
7975 (check_mem_read, check_mem_write): Skip breakpoint types other
7976 than software breakpoints. Adjust to inserted flag change.
7977 * mem-break.h (enum raw_bkpt_type): New enum.
7978 (raw_breakpoint, struct process_info): Forward declare.
7979 (Z_packet_to_target_hw_bp_type): Delete declaration.
7980 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7981 (set_gdb_breakpoint, delete_gdb_breakpoint)
7982 (clear_breakpoint_conditions): New declarations.
7983 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7984 (breakpoint_inserted_here): Update comment.
7985 (add_breakpoint_condition, add_breakpoint_commands): Replace
7986 address parameter with a breakpoint pointer parameter.
7987 (gdb_breakpoint_here): Update comment.
7988 (delete_gdb_breakpoint_at): Delete.
7989 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7990 * server.c (process_point_options): Take a struct breakpoint
7991 pointer instead of an address. Adjust.
7992 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7993 delete_gdb_breakpoint.
7994 * spu-low.c (spu_target_ops): Install NULL as
7995 supports_z_point_type method.
7996 * target.h: Include mem-break.h.
7997 (struct target_ops) <prepare_to_access_memory>: Update comment.
7998 <supports_z_point_type>: New field.
7999 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8000 instead of a char. Also take a raw breakpoint pointer.
8001 * win32-arm-low.c (the_low_target): Install NULL as
8002 supports_z_point_type.
8003 * win32-i386-low.c (i386_supports_z_point_type): New function.
8004 (i386_insert_point, i386_remove_point): Adjust to new interface.
8005 (the_low_target): Install i386_supports_z_point_type.
8006 * win32-low.c (win32_supports_z_point_type): New function.
8007 (win32_insert_point, win32_remove_point): Adjust to new interface.
8008 (win32_target_ops): Install win32_supports_z_point_type.
8009 * win32-low.h (struct win32_target_ops):
8010 <supports_z_point_type>: New method.
8011 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8012 instead of a char. Also take a raw breakpoint pointer.
8014 2014-05-20 Pedro Alves <palves@redhat.com>
8016 * mem-break.h: Include break-common.h.
8017 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8018 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8019 (Z_packet_to_target_hw_bp_type): New declaration.
8020 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8021 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8022 (Z_PACKET_ACCESS_WP): Delete macros.
8023 (Z_packet_to_hw_type): Delete function.
8024 * i386-low.h: Don't include break-common.h here.
8025 (Z_packet_to_hw_type): Delete declaration.
8026 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8027 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8028 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8029 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8030 * linux-aarch64-low.c: Don't include break-common.h here.
8031 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8032 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8033 (Z_packet_to_target_hw_bp_type): Delete function.
8034 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8036 (mips_insert_point, mips_remove_point): Use
8037 Z_packet_to_target_hw_bp_type.
8039 2014-05-20 Pedro Alves <palves@redhat.com>
8041 * linux-aarch64-low.c: Include break-common.h.
8042 (enum target_point_type): Delete.
8043 (Z_packet_to_point_type): Rename to ...
8044 (Z_packet_to_target_hw_bp_type): ... this, and return a
8045 target_hw_bp_type instead.
8046 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8047 instead of an enum target_point_type.
8048 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8050 (aarch64_dr_state_insert_one_point)
8051 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8052 (aarch64_handle_aligned_watchpoint)
8053 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8054 Take an enum target_hw_bp_type instead of an enum
8056 (aarch64_supports_z_point_type): New function.
8057 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8058 use Z_packet_to_target_hw_bp_type.
8060 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8062 * configure.ac: Only use -Werror by default when DEVELOPMENT
8064 * configure: Regenerate.
8066 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8068 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8069 * linux-x86-low.c (X86_64_USER_REGS): New.
8070 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8072 2014-04-28 Yao Qi <yao@codesourcery.com>
8074 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8077 2014-04-25 Pedro Alves <palves@redhat.com>
8080 * linux-low.c (linux_attach_fail_reason_string): New function.
8081 (linux_attach_lwp): Delete.
8082 (linux_attach_lwp_1): Rename to ...
8083 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8084 argument. Remove "initial" parameter. Return int instead of
8085 void. Don't error or warn here.
8086 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8087 failure to attach to the tgid. Call warning when failing to
8089 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8090 argument. Remove "initial" parameter. Return int instead of
8091 void. Don't error or warn here.
8092 (linux_attach_fail_reason_string): New declaration.
8093 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8094 interface change. Use linux_attach_fail_reason_string.
8096 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8097 Walfred Tedeschi <walfred.tedeschi@intel.com>
8099 * Makefile.in: Added rules to handle new files
8100 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8101 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8102 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8103 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8104 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8105 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8107 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8108 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8109 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8110 i386/x32-avx512.xml.
8111 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8112 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8113 i386/x32-avx512-linux.xml.
8114 * i387-fp.c (num_avx512_k_registers): New constant for number
8116 (num_avx512_zmmh_low_registers): New constant for number of
8117 lower ZMM registers (0-15).
8118 (num_avx512_zmmh_high_registers): New constant for number of
8119 higher ZMM registers (16-31).
8120 (num_avx512_ymmh_registers): New contant for number of higher
8121 YMM registers (ymm16-31 added by avx521 on x86_64).
8122 (num_avx512_xmm_registers): New constant for number of higher
8123 XMM registers (xmm16-31 added by AVX512 on x86_64).
8124 (struct i387_xsave): Add space for AVX512 registers.
8125 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8126 Add code to handle AVX512 registers.
8127 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8128 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8129 prototypei from generated file.
8130 (tdesc_amd64_avx512_linux): Likewise.
8131 (init_registers_x32_avx512_linux): Likewise.
8132 (tdesc_x32_avx512_linux): Likewise.
8133 (init_registers_i386_avx512_linux): Likewise.
8134 (tdesc_i386_avx512_linux): Likewise.
8135 (x86_64_regmap): Add AVX512 registers.
8136 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8138 (initialize_low_arch): Add code to initialize AVX512 registers.
8140 2014-04-23 Pedro Alves <palves@redhat.com>
8142 * mem-break.c (find_gdb_breakpoint_at): Make static.
8143 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8145 2014-04-23 Pedro Alves <palves@redhat.com>
8147 * i386-low.c: Don't include break-common.h here.
8148 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8149 prototype to take target_hw_bp_type as argument instead of a Z
8151 * i386-low.h: Include break-common.h here.
8152 (Z_packet_to_hw_type): Declare.
8153 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8155 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8156 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8157 (x86_remove_point): Convert the packet number to a
8158 target_hw_bp_type before calling i386_low_remove_watchpoint.
8159 * win32-i386-low.c (i386_insert_point): Convert the packet number
8160 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8161 (i386_remove_point): Convert the packet number to a
8162 target_hw_bp_type before calling i386_low_remove_watchpoint.
8164 2014-04-23 Pedro Alves <palves@redhat.com>
8166 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8168 2014-04-10 Pedro Alves <palves@redhat.com>
8170 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8171 Check if the condition or command is NULL before checking if the
8172 breakpoint is known. On success, return true.
8173 * mem-break.h (add_breakpoint_condition): Document return.
8174 (add_breakpoint_commands): Add describing comment.
8175 * server.c (skip_to_semicolon): New function.
8176 (process_point_options): Use it.
8178 2014-04-09 Pedro Alves <palves@redhat.com>
8180 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8183 2014-02-27 Pedro Alves <palves@redhat.com>
8186 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8188 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8190 (last_thread_of_process_p): Take a PID argument instead of a
8192 (linux_wait_for_lwp): Delete.
8193 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8195 (linux_low_filter_event): New function, party factored out from
8196 linux_wait_for_event.
8197 (linux_wait_for_event): Rename to ...
8198 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8199 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8200 sigsuspend. Check for zombie leaders.
8201 (linux_wait_for_event): Reimplement as wrapper around
8202 linux_wait_for_event_filtered.
8203 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8204 a normal or signal exit is seen, it's the whole process exiting.
8205 (wait_for_sigstop): No longer a for_each_inferior callback.
8206 Rewrite on top of linux_wait_for_event_filtered.
8207 (stop_all_lwps): Call wait_for_sigstop directly.
8208 * server.c (resume, handle_target_event): Handle
8209 TARGET_WAITKIND_NO_RESUMED.
8211 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8213 * win32-low.c (psapi_get_dll_name,
8214 * win32_CreateToolhelp32Snapshot): Delete.
8215 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8216 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8218 (handle_load_dll): Add function description.
8219 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8221 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8223 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8225 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8226 base address when calling win32_add_one_solib.
8227 (handle_load_dll): Delete local variable load_addr.
8228 Remove 0x1000 offset applied to DLL base address when calling
8229 win32_add_one_solib.
8230 (handle_unload_dll): Add comment.
8232 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8234 * win32-low.c (win32_add_all_dlls): Renames
8235 win32_ensure_ntdll_loaded. Rewrite function documentation.
8236 Adjust implementation to always load all DLLs.
8237 Add 0x1000 offset to DLL base address when calling
8238 win32_add_one_solib.
8239 (child_initialization_done): New static global.
8240 (do_initial_child_stuff): Set child_initialization_done to
8241 zero during child initialization, and 1 after. Replace call
8242 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8244 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8245 (handle_unload_dll): Add function documentation.
8246 (get_child_debug_event): Ignore load and unload DLL events
8247 during child initialization.
8249 2014-02-20 Doug Evans <dje@google.com>
8251 Remove global all_lwps.
8252 * inferiors.h (ptid_of): Move here from linux-low.h.
8253 (pid_of, lwpid_of): Ditto.
8254 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8255 parameter is a struct thread_info * now.
8256 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8257 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8258 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8260 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8261 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8262 * linux-arm-low.c (update_registers_callback): Update, "entry"
8263 parameter is a struct thread_info * now.
8264 Fetch lwpid from current_inferior directly.
8265 (arm_insert_point): Pass &all_threads to find_inferior instead of
8267 (arm_remove_point): Ditto.
8268 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8269 (arm_prepare_to_resume): Fetch pid from thread.
8270 (arm_read_description): Fetch lwpid from current_inferior directly.
8271 * linux-low.c (all_lwps): Delete.
8272 (delete_lwp): Delete call to remove_inferior.
8273 (handle_extended_wait): Fetch lwpid from thread.
8274 (add_lwp): Don't set lwp->entry.id. Remove call to
8275 add_inferior_to_list.
8276 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8277 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8278 (kill_one_lwp_callback): Ditto.
8279 (linux_kill): Don't dereference NULL pointer.
8280 Fetch ptid,lwpid from thread.
8281 (get_detach_signal): Fetch ptid from thread.
8282 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8283 Simplify call to regcache_invalidate_thread.
8284 (delete_lwp_callback): Update, "entry" parameter is a
8285 struct thread_info * now. Fetch pid from thread.
8286 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8287 (status_pending_p_callback): Update, "entry" parameter is a
8288 struct thread_info * now. Fetch ptid from thread.
8289 (find_lwp_pid): Update, "entry" parameter is a
8290 struct thread_info * now.
8291 (linux_wait_for_lwp): Fetch pid from thread.
8292 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8293 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8294 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8295 (dequeue_one_deferred_signal): Ditto.
8296 (cancel_breakpoint): Fetch ptid from current_inferior.
8297 (linux_wait_for_event): Pass &all_threads to find_inferior,
8298 not &all_lwps. Fetch ptid, lwpid from thread.
8299 (count_events_callback): Update, "entry" parameter is a
8300 struct thread_info * now.
8301 (select_singlestep_lwp_callback): Ditto.
8302 (select_event_lwp_callback): Ditto.
8303 (cancel_breakpoints_callback): Ditto.
8304 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8306 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8307 (unsuspend_one_lwp): Update, "entry" parameter is a
8308 struct thread_info * now.
8309 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8311 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8312 Fetch lwpid from thread, not lwp.
8313 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8314 Pass &all_threads to find_inferior, not &all_lwps.
8315 (send_sigstop): Fetch lwpid from thread, not lwp.
8316 (send_sigstop_callback): Update, "entry" parameter is a
8317 struct thread_info * now.
8318 (suspend_and_send_sigstop_callback): Ditto.
8319 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8320 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8321 struct thread_info * now.
8322 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8324 (lwp_running): Update, "entry" parameter is a
8325 struct thread_info * now.
8326 (stop_all_lwps): Fetch ptid from thread.
8327 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8328 (linux_resume_one_lwp): Fetch lwpid from thread.
8329 (linux_set_resume_request): Update, "entry" parameter is a
8330 struct thread_info * now. Fetch pid, lwpid from thread.
8331 (resume_status_pending_p): Update, "entry" parameter is a
8332 struct thread_info * now.
8333 (need_step_over_p): Ditto. Fetch lwpid from thread.
8334 (start_step_over): Fetch lwpid from thread.
8335 (linux_resume_one_thread): Update, "entry" parameter is a
8336 struct thread_info * now. Fetch lwpid from thread.
8337 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8338 (proceed_one_lwp): Update, "entry" parameter is a
8339 struct thread_info * now. Fetch lwpid from thread.
8340 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8341 struct thread_info * now.
8342 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8343 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8344 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8346 (regsets_store_inferior_registers): Ditto.
8347 (fetch_register, store_register): Ditto.
8348 (linux_read_memory, linux_write_memory): Ditto.
8349 (linux_request_interrupt): Ditto.
8350 (linux_read_auxv): Ditto.
8351 (linux_xfer_siginfo): Ditto.
8352 (linux_qxfer_spu): Ditto.
8353 (linux_qxfer_libraries_svr4): Ditto.
8354 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8355 moved to inferiors.h.
8357 (get_thread_lwp): Update.
8358 (struct lwp_info): Delete member "entry". Simplify comment for
8361 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8362 current_inferior directly.
8363 (update_watch_registers_callback): Update, "entry" parameter is a
8364 struct thread_info * now. Fetch pid from thread.
8365 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8366 (mips_insert_point): Fetch lwpid from current_inferior.
8367 Pass &all_threads to find_inferior, not &all_lwps.
8368 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8369 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8371 (mips_stopped_data_address): Ditto.
8372 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8374 * linux-tile-low.c (tile_arch_setup): Ditto.
8375 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8376 (update_debug_registers_callback): Update, "entry" parameter is a
8377 struct thread_info * now. Fetch pid from thread.
8378 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8379 Pass &all_threads to find_inferior, not &all_lwps.
8380 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8381 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8382 Pass &all_threads to find_inferior, not &all_lwps.
8383 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8384 (i386_dr_low_get_status): Ditto.
8385 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8386 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8387 (x86_linux_read_description): Ditto.
8388 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8390 2014-02-20 Doug Evans <dje@google.com>
8392 * inferiors.c (get_first_inferior): Fix buglet.
8394 2014-02-19 Doug Evans <dje@google.com>
8396 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8397 * inferiors.c (add_thread): Change result type to struct thread_info *.
8398 All callers updated.
8399 (add_lwp): Call add_thread here instead of in callers.
8400 All callers updated.
8401 * linux-low.h (get_lwp_thread): Rewrite.
8402 (struct lwp_info): New member "thread".
8404 2014-02-19 Doug Evans <dje@google.com>
8406 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8407 All callers updated.
8409 2014-02-19 Doug Evans <dje@google.com>
8411 * inferiors.c (add_thread): Fix whitespace.
8413 2014-02-19 Doug Evans <dje@google.com>
8415 * dll.c (clear_dlls): Replace accessing list implemention details
8417 * gdbthread.h (get_first_thread): Declare.
8418 * inferiors.c (for_each_inferior_with_data): New function.
8419 (get_first_thread): New function.
8420 (find_thread_ptid): Simplify.
8421 (get_first_inferior): New function.
8422 (clear_list): Delete.
8423 (one_inferior_p): New function.
8424 (clear_inferior_list): New function.
8425 (clear_inferiors): Update.
8426 * inferiors.h (for_each_inferior_with_data): Declare.
8427 (clear_inferior_list): Declare.
8428 (one_inferior_p): Declare.
8429 (get_first_inferior): Declare.
8430 * linux-low.c (linux_wait_for_event): Replace accessing list
8431 implemention details with API function.
8432 * server.c (target_running): Ditto.
8433 (accumulate_file_name_length): New function.
8434 (emit_dll_description): New function.
8435 (handle_qxfer_libraries): Replace accessing list implemention
8436 details with API function.
8437 (handle_qxfer_threads_worker): New function.
8438 (handle_qxfer_threads_proper): Replace accessing list implemention
8439 details with API function.
8440 (handle_query): Ditto.
8441 (visit_actioned_threads_callback_ftype): New typedef.
8442 (visit_actioned_threads_data): New struct.
8443 (visit_actioned_threads): Rewrite to be find_inferior callback.
8444 (resume): Call find_inferior.
8445 (handle_status): Replace accessing list implemention
8446 details with API function.
8447 (process_serial_event): Replace accessing list implemention details
8449 * target.c (set_desired_inferior): Replace accessing list implemention
8450 details with API function.
8451 * tracepoint.c (same_process_p): New function.
8452 (gdb_agent_about_to_close): Replace accessing list implemention
8453 details with API function.
8454 * win32-low.c (child_delete_thread): Replace accessing list
8455 implemention details with API function.
8456 (match_dll_by_basename): New function.
8457 (dll_is_loaded_by_basename): New function.
8458 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8459 details call to dll_is_loaded_by_basename.
8461 2014-02-19 Doug Evans <dje@google.com>
8463 * dll.h (struct dll_info): Add comment.
8464 * gdbthread.h (struct thread_info): Add comment.
8465 (current_ptid): Simplify.
8466 * inferiors.c (add_process): Update.
8467 (remove_process): Update.
8468 * inferiors.h (struct process_info): Rename member "head" to "entry".
8469 * linux-low.c (delete_lwp): Update.
8471 (last_thread_of_process_p): Update.
8472 (kill_one_lwp_callback, linux_kill): Update.
8473 (status_pending_p_callback): Update.
8474 (wait_for_sigstop): Update. Simplify read of ptid.
8475 (start_step_over): Update.
8476 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8477 (get_lwp_thread): Update.
8478 (struct lwp_info): Rename member "head" to "entry".
8479 * regcache.h (inferior_list_entry): Delete.
8480 * server.c (kill_inferior_callback): Update.
8481 (detach_or_kill_inferior_callback): Update.
8482 (print_started_pid): Update.
8483 (print_attached_pid): Update.
8484 (process_serial_event): Simplify read of ptid.
8485 * thread-db.c (thread_db_create_event): Update.
8486 (thread_db_get_tls_address): Update.
8487 * win32-low.c (current_inferior_ptid): Simplify.
8489 2014-02-19 Tom Tromey <tromey@redhat.com>
8491 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8493 (target_supports_btrace): Update.
8495 2014-02-14 Yao Qi <yao@codesourcery.com>
8497 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8498 (rsp-low-ipa.o): New target.
8500 2014-02-12 Tom Tromey <tromey@redhat.com>
8502 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8503 convert_ascii_to_int.
8504 * regcache.c (registers_to_string): Likewise.
8505 * remote-utils.c (decode_M_packet): Likewise.
8506 * server.c (process_serial_event): Likewise.
8508 2014-02-12 Tom Tromey <tromey@redhat.com>
8510 * server.c (handle_query, handle_v_run): Use hex2bin, not
8512 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8514 2014-02-12 Tom Tromey <tromey@redhat.com>
8516 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8517 convert_int_to_ascii.
8518 * regcache.c (registers_to_string, collect_register_as_string):
8520 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8522 * server.c (process_serial_event): Likewise.
8523 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8524 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8526 2014-02-12 Tom Tromey <tromey@redhat.com>
8528 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8529 bin2hex, not hexify.
8530 * tracepoint.c (cmd_qtstatus): Likewise.
8532 2014-02-12 Tom Tromey <tromey@redhat.com>
8534 * remote-utils.c (monitor_output): Pass explicit length to
8537 2014-02-12 Tom Tromey <tromey@redhat.com>
8539 * tracepoint.c: Include rsp-low.h.
8540 * server.c: Include rsp-low.h.
8541 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8542 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8544 * remote-utils.c: Include rsp-low.h.
8545 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8546 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8547 (convert_int_to_ascii, convert_ascii_to_int): Move to
8549 * regcache.c: Include rsp-low.h.
8550 * ax.c: Include rsp-low.h.
8551 * Makefile.in (SFILES): Add common/rsp-low.c.
8552 (OBS): Add rsp-low.o.
8553 (rsp-low.o): New target.
8555 2014-02-12 Tom Tromey <tromey@redhat.com>
8557 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8558 Include print-utils.h.
8559 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8560 (plongest, thirty_two, phex_nz): Remove.
8561 * Makefile.in (SFILES): Add common/print-utils.c.
8562 (OBS): Add print-utils.o.
8563 (print-utils-ipa.o): New target.
8564 (print-utils.o): New target.
8565 (IPA_OBJS): Add print-utils-ipa.o.
8567 2014-02-06 Tom Tromey <tromey@redhat.com>
8569 * Makefile.in (SFILES): Fix indentation.
8571 2014-02-05 Doug Evans <dje@google.com>
8573 * linux-low.c (linux_wait_for_event): Improve comment.
8574 (linux_wait_1): Keep current_inferior in sync with event_child.
8576 2014-01-22 Doug Evans <dje@google.com>
8578 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8580 2014-01-22 Doug Evans <dje@google.com>
8582 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8583 * configure: Regenerate.
8584 * config.in: Regenerate.
8585 * Makefile.in (SFILES): Add debug.c.
8587 * debug.c: New file.
8588 * debug.h: New file.
8589 * linux-aarch64-low.c (*): Update all debugging printfs to use
8590 debug_printf instead of fprintf.
8591 * linux-arm-low.c (*): Ditto.
8592 * linux-cris-low.c (*): Ditto.
8593 * linux-crisv32-low.c (*): Ditto.
8594 * linux-m32r-low.c (*): Ditto.
8595 * linux-sparc-low.c (*): Ditto.
8596 * linux-x86.c (*): Ditto.
8597 * linux-low.c (*): Ditto.
8598 (linux_wait_1): Add calls to debug_enter, debug_exit.
8599 (linux_wait): Remove redundant debugging printf.
8600 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8601 (linux_resume, unstop_all_lwps): Ditto.
8602 * mem-break.c (*): Update all debugging printfs to use
8603 debug_printf instead of fprintf.
8604 * remote-utils.c (*): Ditto.
8605 * thread-db.c (*): Ditto.
8606 * server.c #include <ctype.h>, "gdb_vecs.h".
8607 (debug_threads): Moved to debug.c.
8608 (*): Update all debugging printfs to use debug_printf instead of
8610 (start_inferior): Replace call to fflush with call to debug_flush.
8611 (monitor_show_help): Mention set debug-format.
8612 (parse_debug_format_options): New function.
8613 (handle_monitor_command): Handle "monitor set debug-format".
8614 (gdbserver_usage): Mention --debug-format.
8615 (main): Parse --debug-format.
8616 * server.h (debug_threads): Declaration moved to debug.h.
8618 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8619 trace_debug_1 that uses debug_printf.
8620 (tracepoint_look_up_symbols): Update all debugging printfs to use
8621 debug_printf instead of fprintf.
8623 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8625 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8628 2014-01-17 Pedro Alves <palves@redhat.com>
8631 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8632 defined after including gdb_proc_service.h.
8634 2014-01-16 Doug Evans <dje@google.com>
8636 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8637 (match_dll): Use it.
8639 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8641 * target.h (target_ops) <read_btrace>: Change parameters and
8642 return type to allow error reporting.
8643 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8644 trace reading errors on.
8645 * linux-low.c (linux_low_read_btrace): Pass trace reading
8647 (linux_low_disable_btrace): New.
8649 2014-01-15 Doug Evans <dje@google.com>
8651 * inferiors.c (thread_id_to_gdb_id): Delete.
8652 * inferiors.h (thread_id_to_gdb_id): Delete.
8654 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8656 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8657 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8660 2014-01-08 Pedro Alves <palves@redhat.com>
8662 * server.c (handle_status): Don't discard previous queued stop
8663 replies or thread's pending status here.
8664 (main) <disconnection>: Do it here instead.
8666 2014-01-08 Pedro Alves <palves@redhat.com>
8668 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8669 * server.c (visit_actioned_threads, handle_pending_status): New
8671 (handle_v_cont): Factor out parts to ...
8672 (resume): ... this new function. If in all-stop, and a thread
8673 being resumed has a pending status, report it without actually
8675 (myresume): Adjust to use the new 'resume' function.
8676 (clear_pending_status_callback, set_pending_status_callback)
8677 (find_status_pending_thread_callback): New functions.
8678 (handle_status): Handle the case of multiple threads having
8679 interesting statuses to report. Report threads' real last signal
8680 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8681 with an interesting thread to report the status for, instead of
8682 always reporting the status of the first thread.
8684 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8686 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8687 * gdbreplay.c (gdbreplay_version): Likewise.
8689 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8691 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8692 iov.iov_len with the real length in use.
8694 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8696 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8697 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8698 for all targets that use win32-low.c.
8699 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8700 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8702 2013-12-13 Pedro Alves <palves@redhat.com>
8704 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8705 if equal to TARGET_WAITKIND_LOADED.
8706 * win32-low.c (cached_status): New static global.
8707 (win32_wait): Add declaration.
8708 (do_initial_child_stuff): Flush all initial pending debug events
8709 up to the initial breakpoint.
8710 (win32_wait): If CACHED_STATUS was set, return that instead
8711 of doing a real wait. Remove the code resuming the execution
8712 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8713 during the initial phase. Also remove the code changing
8714 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8715 TARGET_WAITKIND_STOPPED.
8717 2013-12-11 Yao Qi <yao@codesourcery.com>
8719 * notif.c (handle_notif_ack): Return 0 if no notification
8722 2013-11-20 Doug Evans <dje@google.com>
8724 * linux-low.c (linux_set_resume_request): Fix comment.
8726 2013-11-20 Doug Evans <dje@google.com>
8728 * linux-low.c (resume_status_pending_p): Tweak comment.
8730 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8732 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8733 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8734 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8735 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8736 (srv_amd64_regobj): Add amd64-mpx.o.
8737 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8738 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8739 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8740 * i387-fp.c (num_pl_bnd_register) Added constant.
8741 (num_pl_bnd_cfg_registers) Added constant.
8742 (struct i387_xsave) Added reserved area and MPX fields.
8743 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8744 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8746 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8747 (init_registers_amd64_mpx_linux): Declare new function.
8748 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8749 (x86_64_regmap): Add MPX registers.
8750 (x86_linux_read_description): Add MPX case.
8751 (initialize_low_arch): Initialize MPX targets.
8753 2013-11-18 Tom Tromey <tromey@redhat.com>
8755 * configure: Rebuild.
8756 * configure.ac: Don't check for stdlib.h.
8757 * gdbreplay.c: Unconditionally include stdlib.h.
8759 2013-11-18 Tom Tromey <tromey@redhat.com>
8761 * config.in: Rebuild.
8762 * configure: Rebuild.
8763 * configure.ac: Don't use AC_HEADER_DIRENT.
8765 2013-11-18 Tom Tromey <tromey@redhat.com>
8767 * server.h: Don't check HAVE_STRING_H.
8768 * gdbreplay.c: Don't check HAVE_STRING_H.
8769 * configure: Rebuild.
8771 2013-11-18 Tom Tromey <tromey@redhat.com>
8773 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8776 2013-11-08 Tom Tromey <tromey@redhat.com>
8778 * configure, config.in: Rebuild.
8779 * configure.ac: Remove unused configury.
8781 2013-11-08 Tom Tromey <tromey@redhat.com>
8783 * acinclude.m4: Include common.m4, codeset.m4.
8784 * configure, config.in: Rebuild.
8785 * configure.ac: Use GDB_AC_COMMON.
8787 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8789 * linux-s390-low.c (HWCAP_S390_TE): New define.
8790 (s390_arch_setup): Consider the TE field in the HWCAP for
8791 determining 'have_regset_tdb'.
8793 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8796 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8799 2013-10-02 Pedro Alves <palves@redhat.com>
8801 * server.c (process_serial_event): Don't output "GDBserver
8802 exiting" if GDB is connected through stdio.
8803 * target.c (mywait): Likewise, be silent if GDB is connected
8806 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8808 * lynx-low.c (lynx_add_threads_after_attach): New function.
8809 (lynx_attach): Remove call to add_thread. Add call to
8810 lynx_add_threads_after_attach instead.
8812 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8814 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8815 * config.in, configure: Regenerated.
8817 2013-09-18 Yao Qi <yao@codesourcery.com>
8820 * server.c (start_inferior): Clear 'resume_info'.
8822 2013-09-16 Jiong Wang <jiwang@tilera.com>
8824 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8827 2013-09-16 Jiong Wang <jiwang@tilera.com>
8829 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8830 linux-tile-low.o to srv_tgtobj.
8832 2013-09-16 Will Newton <will.newton@linaro.org>
8834 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8837 2013-09-06 Pedro Alves <palves@redhat.com>
8839 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8840 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8841 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8842 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8843 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8844 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8846 2013-09-06 Pedro Alves <palves@redhat.com>
8848 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8849 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8851 2013-09-06 Pedro Alves <palves@redhat.com>
8853 * linux-amd64-ipa.c: Include tracepoint.h.
8854 * linux-i386-ipa.c: Include tracepoint.h.
8856 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8858 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8859 (ps_get_thread_area): New function.
8861 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8863 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8864 (initialize_low_arch): Call init_registers_crisv32 rather than
8865 init_register_crisv32.
8867 2013-09-05 Pedro Alves <palves@redhat.com>
8869 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8871 * hostio.h: ... this new file.
8872 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8873 win32-low.c: Include hostio.h.
8875 2013-09-05 Pedro Alves <palves@redhat.com>
8877 * server.h (gdb_client_data, handler_func, callback_handler_func)
8878 (delete_file_handler, add_file_handler, append_callback_event)
8879 (delete_callback_event, start_event_loop, initialize_event_loop):
8880 Move to event-loop.h and include it.
8881 * event-loop.h: New file.
8883 2013-09-05 Pedro Alves <palves@redhat.com>
8885 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8886 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8887 (loaded_dll, unloaded_dll): Move to ...
8888 * dll.h: ... this new file.
8889 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8891 2013-09-05 Pedro Alves <palves@redhat.com>
8893 * server.h (current_process, get_thread_process, all_processes)
8894 (add_inferior_to_list, for_each_inferior, current_inferior)
8895 (remove_inferior, add_process, remove_process, find_process_pid)
8896 (have_started_inferiors_p, have_attached_inferiors_p)
8897 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8898 (clear_inferiors, find_inferior, find_inferior_id)
8899 (inferior_target_data, set_inferior_target_data)
8900 (inferior_regcache_data, set_inferior_regcache_data): Move to
8901 inferiors.h, and include it.
8902 * inferiors.h: New file.
8904 2013-09-05 Pedro Alves <palves@redhat.com>
8906 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8910 2013-09-05 Pedro Alves <palves@redhat.com>
8912 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8914 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8915 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8916 (handle_tracepoint_general_set, handle_tracepoint_query)
8917 (tracepoint_finished_step, tracepoint_was_hit)
8918 (release_while_stepping_state_list, current_traceframe)
8919 (in_readonly_region, traceframe_read_mem)
8920 (fetch_traceframe_registers, traceframe_read_sdata)
8921 (traceframe_read_info, struct fast_tpoint_collect_status)
8922 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8923 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8924 (supply_fast_tracepoint_registers)
8925 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8926 (ipa_tdesc, claim_trampoline_space)
8927 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8928 (agent_mem_read, agent_get_trace_state_variable_value)
8929 (agent_set_trace_state_variable_value, agent_tsv_read)
8930 (agent_mem_read_string, get_raw_reg_func_addr)
8931 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8932 * tracepoint.h: ... this new file.
8934 2013-09-05 Pedro Alves <palves@redhat.com>
8936 * server.h (perror_with_name, error, fatal, warning, paddress)
8937 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8939 * utils.h: New file.
8941 2013-09-05 Pedro Alves <palves@redhat.com>
8943 * server.h (remote_debug, noack_mode, transport_is_reliable)
8944 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8945 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8946 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8947 (write_enn, initialize_async_io, enable_async_io)
8948 (disable_async_io, check_remote_input_interrupt_request)
8949 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8950 (dead_thread_notify, prepare_resume_reply)
8951 (decode_address_to_semicolon, decode_address, decode_m_packet)
8952 (decode_M_packet, decode_X_packet, decode_xfer_write)
8953 (decode_search_memory_packet, unhexify, hexify)
8954 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8955 (look_up_one_symbol, relocate_instruction)
8956 (monitor_output): Move to remote-utils.h, and include it.
8957 * remote-utils.h: New file.
8959 2013-09-05 Pedro Alves <palves@redhat.com>
8961 * server.h (_): Delete.
8963 2013-09-02 Pedro Alves <palves@redhat.com>
8965 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8966 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8968 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8970 2013-09-02 Pierre Muller <muller@sourceware.org>
8972 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8973 or WriteProcessMemory complete successfully and handle
8974 ERROR_PARTIAL_COPY error.
8976 2013-09-02 Pedro Alves <palves@redhat.com>
8978 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8979 error instead of EIO.
8981 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8984 * linux-low.c: Include filestuff.h.
8985 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8986 * lynx-low.c: Include filestuff.h.
8987 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8988 * server.c: Include filestuff.h.
8989 (main): Call notice_open_fds.
8990 * spu-low.c: Include filestuff.h.
8991 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8993 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8995 * Makefile.in: Explain why ../target and ../nat are not
8996 listed as include file search paths.
8997 (linux-waitpid.o): New object file rule.
8998 * configure.srv (srv_native_linux_obj): New variable.
8999 Replace all occurrences of linux native object files with
9000 $srv_native_linux_obj.
9001 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9002 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9003 (linux_enable_event_reporting): Remove declaration.
9004 (my_waitpid): Moved to common/linux-waitpid.c.
9005 (linux_wait_for_event): Pass ptid when calling
9006 linux_enable_event_reporting.
9007 (linux_supports_tracefork_flag): Remove.
9008 (linux_enable_event_reporting): Likewise.
9009 (linux_tracefork_grandchild): Remove.
9010 (STACK_SIZE): Moved to common/linux-ptrace.c.
9011 (linux_tracefork_child): Remove.
9012 (linux_test_for_tracefork): Remove.
9013 (linux_look_up_symbols): Call linux_supports_traceclone.
9014 (initialize_low): Remove call to linux_test_for_tracefork.
9015 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9016 common/linux-ptrace.h.
9017 (PTRACE_TYPE_ARG4): Likewise.
9018 Include linux-ptrace.h.
9020 2013-08-21 Pedro Alves <palves@redhat.com>
9022 * config.in: Renegerate.
9024 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9026 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9027 (SFILES): Remove $(srcdir)/common/target-common.c and
9028 add $(srcdir)/target/waitstatus.c.
9029 (OBS): Remove target-common.o and add waitstatus.o.
9030 (server_h): Remove $(srcdir)/../common/target-common.h and
9031 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9032 and $(srcdir)/../target/waitstatus.h.
9033 (target-common.o): Remove.
9034 (waitstatus.o): New target object file.
9035 * target.h: Do not include target-common.h and
9036 include target/resume.h, target/wait.h and
9037 target/waitstatus.h.
9039 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9041 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9042 to PTRACE_TYPE_ARG3.
9043 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9044 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9046 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9047 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9049 2013-07-27 Jie Zhang <jie@codesourcery.com>
9050 Daniel Jacobowitz <dan@codesourcery.com>
9051 Yao Qi <yao@codesourcery.com>
9053 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9054 (mips-linux-watch.o): New rule.
9055 (mips_linux_watch_h): New variable.
9056 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9058 * linux-mips-low.c: Include mips-linux-watch.h.
9059 (struct arch_process_info, struct arch_lwp_info): New.
9060 (update_watch_registers_callback): New function.
9061 (mips_linux_new_process, mips_linux_new_thread) New functions.
9062 (mips_linux_prepare_to_resume, mips_insert_point): New
9064 (mips_remove_point, mips_stopped_by_watchpoint): New
9066 (rsp_bp_type_to_target_hw_bp_type): New function.
9067 (mips_stopped_data_address): New function.
9068 (the_low_target): Add watchpoint support functions.
9070 2013-07-27 Yao Qi <yao@codesourcery.com>
9072 * i386-low.c: Include break-common.h.
9073 (enum target_hw_bp_type): Remove.
9075 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9077 * Makefile.in (SFILES): /common/target-common.c.
9078 (OBS): Add target-common.o.
9079 (server_h): Add $(srcdir)/../common/target-common.h.
9080 (target-common.o): New target.
9081 * server.c (queue_stop_reply_callback): Free
9082 status string after use.
9083 * target.c (target_waitstatus_to_string): Remove.
9084 * target.h: Include target-common.h.
9085 (resume_kind): Likewise.
9086 (target_waitkind): Likewise.
9087 (target_waitstatus): Likewise.
9088 (TARGET_WNOHANG): Likewise.
9090 2013-07-04 Yao Qi <yao@codesourcery.com>
9092 * Makefile.in (host_alias): Use @host_noncanonical@.
9093 (target_alias): Use @target_noncanonical@.
9094 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9095 ACX_NONCANONICAL_HOST.
9096 * configure: Regenerated.
9099 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9101 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9102 * configure: Rebuild.
9103 * Makefile.in (version_host, version_target): Get from configure.
9104 (version.c): Use $(version_host) and $(version_target).
9106 2013-07-03 Pedro Alves <palves@redhat.com>
9108 * Makefile.in (config.status): Depend on development.sh.
9109 * acinclude.m4: Include libmcheck.m4.
9110 * configure: Regenerate.
9112 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9114 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9115 attribute inside the parentheses.
9116 (winapi_DebugSetProcessKillOnExit): Ditto.
9117 (winapi_DebugBreakProcess): Ditto.
9118 (winapi_GenerateConsoleCtrlEvent): Ditto.
9120 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9122 * notif.h (notif_event): Add a dummy member to avoid compiler
9125 2013-07-01 Pedro Alves <palves@redhat.com>
9127 * hostio.c (HOSTIO_PATH_MAX): Define.
9128 (require_filename, handle_open, handle_unlink, handle_readlink):
9131 2013-07-01 Pedro Alves <palves@redhat.com>
9133 * server.h: Include "pathmax.h".
9134 * linux-low.c: Don't include sys/param.h.
9135 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9137 * win32-low.c: Don't include sys/param.h.
9138 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9140 2013-07-01 Pedro Alves <palves@redhat.com>
9142 * event-loop.c: Don't check HAVE_UNISTD_H before including
9144 * gdbreplay.c: Likewise.
9145 * remote-utils.c: Likewise.
9146 * server.c: Likewise.
9147 * configure.ac: Don't check for unistd.h.
9148 * configure: Regenerate.
9150 2013-06-28 Tom Tromey <tromey@redhat.com>
9152 * Makefile.in (version.c): Use version.in, not
9155 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9157 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9158 * configure: Rebuild.
9159 * Makefile.in (version_host, version_target): Get from configure.
9160 (version.c): Use $(version_host) and $(version_target).
9162 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9164 Fix trace-status to output user name without trailing colon.
9165 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9167 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9169 Fix trace-status to output proper start-time and stop-time.
9170 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9171 output start time and stop time in hex as gdb expects.
9173 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9175 * tracepoint.c (build_traceframe_info_xml): Output trace state
9176 variables present in the trace buffer.
9178 2013-06-24 Tom Tromey <tromey@redhat.com>
9180 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9182 (version.o): Remove.
9183 * gdbreplay.c: Include version.h.
9184 (version, host_name): Don't declare.
9185 * server.h: Include version.h.
9186 (version, host_name): Don't declare.
9188 2013-06-12 Pedro Alves <palves@redhat.com>
9190 * linux-x86-low.c (linux_is_elf64): Delete global.
9191 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9192 with local linux_pid_exe_is_elf_64_file use.
9194 2013-06-11 Pedro Alves <palves@redhat.com>
9196 * linux-low.c (regset_disabled, disable_regset): New functions.
9197 (regsets_fetch_inferior_registers)
9198 (regsets_store_inferior_registers): Use them.
9199 (initialize_regsets_info); Don't allocate the disabled_regsets
9201 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9204 2013-06-11 Pedro Alves <palves@redhat.com>
9206 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9209 2013-06-11 Pedro Alves <palves@redhat.com>
9211 * linux-x86-low.c (initialize_low_arch): Call
9212 init_registers_x32_avx_linux.
9214 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9216 Fix compatibility with Android Bionic.
9217 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9220 2013-06-07 Pedro Alves <palves@redhat.com>
9223 * Makefile.in (OBS): Add tdesc.o.
9224 (IPA_OBJS): Add tdesc-ipa.o.
9225 (tdesc-ipa.o): New rule.
9226 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9228 * linux-low.c (new_inferior): Delete.
9229 (disabled_regsets, num_regsets): Delete.
9230 (linux_add_process): Adjust to set the new per-process
9232 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9233 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9234 was a stop. When calling arch_setup, switch the current inferior
9235 to the thread that got an event.
9236 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9237 (regsets_fetch_inferior_registers)
9238 (regsets_store_inferior_registers): New regsets_info parameter.
9240 (linux_register_in_regsets): New regs_info parameter. Adjust to
9242 (register_addr, fetch_register, store_register): New usrregs_info
9243 parameter. Adjust to use it.
9244 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9245 parameter regs_info. Adjust to use it.
9246 (linux_fetch_registers): Get the current inferior's regs_info, and
9248 (linux_store_registers): Ditto.
9249 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9250 (initialize_low): Don't initialize the target_regsets here. Call
9251 initialize_low_arch.
9252 * linux-low.h (target_regsets): Delete declaration.
9253 (struct regsets_info): New.
9254 (struct usrregs_info): New.
9255 (struct regs_info): New.
9256 (struct process_info_private) <new_inferior>: New field.
9257 (struct linux_target_ops): Delete the num_regs, regmap, and
9258 regset_bitmap fields. New field regs_info.
9259 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9260 * i387-fp.c (num_xmm_registers): Delete.
9261 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9262 calls to new interface.
9263 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9264 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9265 Infer the number of xmm registers from the regcache's target
9267 * i387-fp.h (num_xmm_registers): Delete.
9268 * inferiors.c (add_thread): Don't install the thread's regcache
9270 * proc-service.c (gregset_info): Fetch the current inferior's
9271 regs_info. Adjust to use it.
9272 * regcache.c: Include tdesc.h.
9273 (register_bytes, reg_defs, num_registers)
9274 (gdbserver_expedite_regs): Delete.
9275 (get_thread_regcache): If the thread doesn't have a regcache yet,
9276 create one, instead of aborting gdbserver.
9277 (regcache_invalidate_one): Rename to ...
9278 (regcache_invalidate_thread): ... this.
9279 (regcache_invalidate_one): New.
9280 (regcache_invalidate): Only invalidate registers of the current
9282 (init_register_cache): Add target_desc parameter, and use it.
9283 (new_register_cache): Ditto. Assert the target description has a
9284 non zero registers_size.
9285 (regcache_cpy): Add assertions. Adjust.
9286 (realloc_register_cache, set_register_cache): Delete.
9287 (registers_to_string, registers_from_string): Adjust.
9288 (find_register_by_name, find_regno, find_register_by_number)
9289 (register_cache_size): Add target_desc parameter, and use it.
9290 (free_register_cache_thread, free_register_cache_thread_one)
9291 (regcache_release, register_cache_size): New.
9292 (register_size): Add target_desc parameter, and use it.
9293 (register_data, supply_register, supply_register_zeroed)
9294 (supply_regblock, supply_register_by_name, collect_register)
9295 (collect_register_as_string, collect_register_by_name): Adjust.
9296 * regcache.h (struct target_desc): Forward declare.
9297 (struct regcache) <tdesc>: New field.
9298 (init_register_cache, new_register_cache): Add target_desc
9300 (regcache_invalidate_thread): Declare.
9301 (regcache_invalidate_one): Delete declaration.
9302 (regcache_release): Declare.
9303 (find_register_by_number, register_cache_size, register_size)
9304 (find_regno): Add target_desc parameter.
9305 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9307 * remote-utils.c: Include tdesc.h.
9308 (outreg, prepare_resume_reply): Adjust.
9309 * server.c: Include tdesc.h.
9310 (gdbserver_xmltarget): Delete declaration.
9311 (get_features_xml, process_serial_event): Adjust.
9312 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9314 (struct process_info) <tdesc>: New field.
9315 (ipa_tdesc): Declare.
9316 * tdesc.c: New file.
9317 * tdesc.h: New file.
9318 * tracepoint.c: Include tdesc.h.
9319 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9320 (get_context_regcache): Adjust to pass ipa_tdesc down.
9321 (do_action_at_tracepoint): Adjust to get the register cache size
9322 from the context regcache's description.
9323 (traceframe_walk_blocks): Adjust to get the register cache size
9324 from the current trace frame's description.
9325 (traceframe_get_pc): Adjust to get current trace frame's
9326 description and pass it down.
9327 (gdb_collect): Adjust to get the register cache size from the
9329 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9330 (gdbserver_xmltarget): Delete.
9331 (initialize_low_tracepoint): Set the ipa's target description.
9332 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9333 (initialize_low_tracepoint): Set the ipa's target description.
9334 * linux-x86-low.c: Include tdesc.h.
9335 [__x86_64__] (is_64bit_tdesc): New.
9336 (ps_get_thread_area, x86_get_thread_area): Use it.
9337 (i386_cannot_store_register): Rename to ...
9338 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9339 (i386_cannot_fetch_register): Rename to ...
9340 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9341 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9343 (target_regsets): Rename to ...
9344 (x86_regsets): ... this.
9345 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9347 (x86_siginfo_fixup): Use is_64bit_tdesc.
9348 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9349 (tdesc_x32_avx_linux, tdesc_x32_linux)
9350 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9352 (x86_linux_update_xmltarget): Delete.
9353 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9354 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9355 (AMD64_LINUX_USER64_CS): New.
9356 (x86_linux_read_description): New, based on
9357 x86_linux_update_xmltarget.
9358 (same_process_callback): New.
9359 (x86_arch_setup_process_callback): New.
9360 (x86_linux_update_xmltarget): New.
9361 (x86_regsets_info): New.
9362 (amd64_linux_regs_info): New.
9363 (i386_linux_usrregs_info): New.
9364 (i386_linux_regs_info): New.
9365 (x86_linux_regs_info): New.
9366 (x86_arch_setup): Reimplement.
9367 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9368 (x86_emit_ops): Ditto.
9369 (the_low_target): Adjust. Install x86_linux_regs_info,
9370 x86_cannot_fetch_register, and x86_cannot_store_register.
9371 (initialize_low_arch): New.
9372 * linux-ia64-low.c (tdesc_ia64): Declare.
9373 (ia64_fetch_register): Adjust.
9374 (ia64_usrregs_info, regs_info): New globals.
9375 (ia64_regs_info): New function.
9376 (the_low_target): Adjust.
9377 (initialize_low_arch): New function.
9378 * linux-sparc-low.c (tdesc_sparc64): Declare.
9379 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9381 (sparc_arch_setup): New function.
9382 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9383 (the_low_target): Adjust.
9384 (initialize_low_arch): New function.
9385 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9386 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9387 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9388 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9389 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9390 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9391 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9392 (tdesc_powerpc_isa205_vsx64l): Declare.
9393 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9394 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9395 (ppc_set_pc, ppc_get_hwcap): Adjust.
9396 (ppc_usrregs_info): Forward declare.
9397 (!__powerpc64__) ppc_regmap_adjusted: New global.
9398 (ppc_arch_setup): Adjust to the current process'es target
9400 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9401 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9402 (ppc_store_evrregset): Adjust.
9403 (target_regsets): Rename to ...
9404 (ppc_regsets): ... this, and make static.
9405 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9406 (ppc_regs_info): New function.
9407 (the_low_target): Adjust.
9408 (initialize_low_arch): New function.
9409 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9410 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9411 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9412 (tdesc_s390x_linux64v2): Declare.
9413 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9414 (s390_fill_gregset, s390_store_last_break): Adjust.
9415 (target_regsets): Rename to ...
9416 (s390_regsets): ... this, and make static.
9417 (s390_get_pc, s390_set_pc): Adjust.
9418 (s390_get_hwcap): New target_desc parameter, and use it.
9419 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9420 (s390_arch_setup): Adjust to set the current process'es target
9421 description. Don't adjust the regmap.
9422 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9423 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9424 (regs_info_3264): New globals.
9425 (s390_regs_info): New function.
9426 (the_low_target): Adjust.
9427 (initialize_low_arch): New function.
9428 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9429 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9430 [__mips64] (init_registers_mips_linux)
9431 (init_registers_mips_dsp_linux): Delete defines.
9432 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9433 (have_dsp): New global.
9434 (mips_read_description): New, based on mips_arch_setup.
9435 (mips_arch_setup): Reimplement.
9436 (get_usrregs_info): New function.
9437 (mips_cannot_fetch_register, mips_cannot_store_register)
9438 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9439 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9440 (target_regsets): Rename to ...
9441 (mips_regsets): ... this, and make static.
9442 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9443 (dsp_regs_info, regs_info): New globals.
9444 (mips_regs_info): New function.
9445 (the_low_target): Adjust.
9446 (initialize_low_arch): New function.
9447 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9448 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9450 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9451 (arm_read_description): New, with bits factored from
9453 (arm_arch_setup): Reimplement.
9454 (target_regsets): Rename to ...
9455 (arm_regsets): ... this, and make static.
9456 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9457 (arm_regs_info): New function.
9458 (the_low_target): Adjust.
9459 (initialize_low_arch): New function.
9460 * linux-m68k-low.c (tdesc_m68k): Declare.
9461 (target_regsets): Rename to ...
9462 (m68k_regsets): ... this, and make static.
9463 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9464 (m68k_regs_info): New function.
9465 (m68k_arch_setup): New function.
9466 (the_low_target): Adjust.
9467 (initialize_low_arch): New function.
9468 * linux-sh-low.c (tdesc_sharch): Declare.
9469 (target_regsets): Rename to ...
9470 (sh_regsets): ... this, and make static.
9471 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9472 (sh_regs_info, sh_arch_setup): New functions.
9473 (the_low_target): Adjust.
9474 (initialize_low_arch): New function.
9475 * linux-bfin-low.c (tdesc_bfin): Declare.
9476 (bfin_arch_setup): New function.
9477 (bfin_usrregs_info, regs_info): New globals.
9478 (bfin_regs_info): New function.
9479 (the_low_target): Adjust.
9480 (initialize_low_arch): New function.
9481 * linux-cris-low.c (tdesc_cris): Declare.
9482 (cris_arch_setup): New function.
9483 (cris_usrregs_info, regs_info): New globals.
9484 (cris_regs_info): New function.
9485 (the_low_target): Adjust.
9486 (initialize_low_arch): New function.
9487 * linux-cris-low.c (tdesc_crisv32): Declare.
9488 (cris_arch_setup): New function.
9489 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9490 (cris_regs_info): New function.
9491 (the_low_target): Adjust.
9492 (initialize_low_arch): New function.
9493 * linux-m32r-low.c (tdesc_m32r): Declare.
9494 (m32r_arch_setup): New function.
9495 (m32r_usrregs_info, regs_info): New globals.
9496 (m32r_regs_info): Adjust.
9497 (initialize_low_arch): New function.
9498 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9499 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9500 (tic6x_usrregs_info): Forward declare.
9501 (tic6x_read_description): New function, based on ...
9502 (tic6x_arch_setup): ... this. Reimplement.
9503 (target_regsets): Rename to ...
9504 (tic6x_regsets): ... this, and make static.
9505 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9506 (tic6x_regs_info): New function.
9507 (the_low_target): Adjust.
9508 (initialize_low_arch): New function.
9509 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9510 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9511 (target_regsets): Rename to ...
9512 (xtensa_regsets): ... this, and make static.
9513 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9515 (xtensa_arch_setup, xtensa_regs_info): New functions.
9516 (the_low_target): Adjust.
9517 (initialize_low_arch): New function.
9518 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9519 (nios2_arch_setup): Set the current process'es tdesc.
9520 (target_regsets): Rename to ...
9521 (nios2_regsets): ... this.
9522 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9523 (nios2_regs_info): New function.
9524 (the_low_target): Adjust.
9525 (initialize_low_arch): New function.
9526 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9527 (aarch64_arch_setup): Set the current process'es tdesc.
9528 (target_regsets): Rename to ...
9529 (aarch64_regsets): ... this.
9530 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9531 (aarch64_regs_info): New function.
9532 (the_low_target): Adjust.
9533 (initialize_low_arch): New function.
9534 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9536 (target_regsets): Rename to ...
9537 (tile_regsets): ... this.
9538 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9539 (tile_regs_info): New function.
9540 (tile_arch_setup): Set the current process'es tdesc.
9541 (the_low_target): Adjust.
9542 (initialize_low_arch): New function.
9543 * spu-low.c (tdesc_spu): Declare.
9544 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9545 * win32-arm-low.c (tdesc_arm): Declare.
9546 (arm_arch_setup): New function.
9547 (the_low_target): Install arm_arch_setup instead of
9549 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9550 (init_windows_x86): Rename to ...
9551 (i386_arch_setup): ... this. Set `win32_tdesc'.
9552 (the_low_target): Adjust.
9553 * win32-low.c (win32_tdesc): New global.
9554 (child_add_thread): Don't create the thread cache here.
9555 (do_initial_child_stuff): Set the new process'es tdesc.
9556 * win32-low.h (struct target_desc): Forward declare.
9557 (win32_tdesc): Declare.
9558 * lynx-i386-low.c (tdesc_i386): Declare global.
9559 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9560 * lynx-low.c (lynx_tdesc): New global.
9561 (lynx_add_process): Set the new process'es tdesc.
9562 * lynx-low.h (struct target_desc): Forward declare.
9563 (lynx_tdesc): Declare global.
9564 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9565 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9566 * nto-low.c (nto_tdesc): New global.
9567 (do_attach): Set the new process'es tdesc.
9568 * nto-low.h (struct target_desc): Forward declare.
9569 (nto_tdesc): Declare.
9570 * nto-x86-low.c (tdesc_i386): Declare.
9571 (nto_x86_arch_setup): Set `nto_tdesc'.
9573 2013-06-04 Gary Benson <gbenson@redhat.com>
9575 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9576 to qSupported response when appropriate.
9577 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9578 with nonzero-length annex.
9579 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9580 arguments supplied in annex.
9582 2013-05-31 Doug Evans <dje@google.com>
9585 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9586 64 bits in 64-cross-32 environment.
9588 2013-05-28 Pedro Alves <palves@redhat.com>
9590 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9591 (aarch64-without-fpu.c): Delete rule.
9592 * configure.srv (aarch64*-*-linux*): Remove references to
9593 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9594 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9597 2013-05-24 Pedro Alves <palves@redhat.com>
9599 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9600 instead of strchr/decode_address. Error if the range isn't split
9601 with a ','. Don't assume there's be a ':' in the action.
9603 2013-05-23 Yao Qi <yao@codesourcery.com>
9604 Pedro Alves <palves@redhat.com>
9606 * linux-low.c (lwp_in_step_range): New function.
9607 (linux_wait_1): If the thread was range stepping and stopped
9608 outside the stepping range, report the stop to GDB. Otherwise,
9609 continue stepping. Add range stepping debug output.
9610 (linux_set_resume_request): Copy the step range from the resume
9612 (linux_supports_range_stepping): New.
9613 (linux_target_ops) <supports_range_stepping>: Set to
9614 linux_supports_range_stepping.
9615 * linux-low.h (struct linux_target_ops)
9616 <supports_range_stepping>: New field.
9617 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9618 * linux-x86-low.c (x86_supports_range_stepping): New.
9619 (the_low_target) <supports_range_stepping>: Set to
9620 x86_supports_range_stepping.
9621 * server.c (handle_v_cont): Handle 'r' action.
9622 (handle_v_requests): Append ";r" if the target supports range
9624 * target.h (struct thread_resume) <step_range_start,
9625 step_range_end>: New fields.
9626 (struct target_ops) <supports_range_stepping>:
9628 (target_supports_range_stepping): New macro.
9630 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9632 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9633 confusion in comment.
9635 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9637 * lynx-low.c (struct process_info_private): New type.
9638 (lynx_add_process): New function.
9639 (lynx_create_inferior, lynx_attach): Replace calls to
9640 add_process by calls to lynx_add_process.
9641 (lynx_resume): If PTID is null, then try using
9642 current_process()->private->last_wait_event_ptid.
9644 (lynx_clear_inferiors): Delete. The contents of that function
9645 has been inlined in lynx_mourn;
9646 (lynx_wait_1): Save the ptid in the process's private data.
9647 (lynx_mourn): Free the process' private data. Replace call
9648 to lynx_clear_inferiors by call to clear_inferiors.
9650 2013-05-17 Yao Qi <yao@codesourcery.com>
9652 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9655 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9657 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9658 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9659 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9660 PT_TEXT_END_ADDR guards. Update comments.
9661 (linux_target_op) <read_offsets>: Conditionally define to
9662 linux_read_offsets if the target is UCLIBC and if it defines
9663 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9665 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9666 Andrew Jenner <andrew@codesourcery.com>
9668 * Makefile.in (SFILES): Add linux-nios2-low.c.
9669 (clean): Add action to delete nios2-linux.c.
9670 (nios2-linux.c): New rule.
9671 * configure.srv: Add nios2*-*-linux*.
9672 * linux-nios2-low.c: New.
9674 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9676 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9678 2013-04-25 Hui Zhu <hui@codesourcery.com>
9681 * ax.c (ax_printf): Add fflush.
9683 2013-04-22 Tom Tromey <tromey@redhat.com>
9685 * Makefile.in (SFILES): Add filestuff.c.
9686 (OBS): Add filestuff.o.
9687 (filestuff.o): New target.
9688 * config.in, configure: Rebuild.
9689 * configure.ac: Check for fdwalk, pipe2.
9691 2013-04-17 Pedro Alves <palves@redhat.com>
9693 * configure.ac (USE_THREAD_DB): Delete variable.
9694 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9695 Don't AC_SUBST USE_THREAD_DB.
9696 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9697 * config.in, configure: Regenerate.
9699 2013-04-16 Pedro Alves <palves@redhat.com>
9701 * linux-low.h (struct lwp_info) <thread_known>: Move under
9702 the USE_THREAD_DB #ifdef.
9704 2013-04-16 Pedro Alves <palves@redhat.com>
9706 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9707 (linux-low.o): Delete rule.
9708 * linux-low.h: Always include "gdb_thread_db.h" instead of
9709 conditionally including thread_db.h.
9710 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9713 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9715 * Makefile.in (install-only): Fix make install regression.
9717 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9719 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9720 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9722 * gdbserver.1: Remove.
9724 2013-03-22 Pedro Alves <palves@redhat.com>
9726 * linux-low.c (handle_extended_wait): Don't call
9727 linux_enable_event_reporting.
9729 2013-03-15 Tony Theodore <tonyt@logyst.com>
9732 * Makefile.in (SHELL): Use @SHELL@.
9734 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9736 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9739 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9741 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9742 Remove extraneous NULL element.
9744 2013-03-13 Yao Qi <yao@codesourcery.com>
9746 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9747 'V' block in trace frame.
9749 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9751 * target.h (struct target_ops): Add btrace ops.
9752 (target_supports_btrace): New macro.
9753 (target_enable_btrace): New macro.
9754 (target_disable_btrace): New macro.
9755 (target_read_btrace): New macro.
9756 * gdbthread.h (struct thread_info): Add btrace field.
9757 * server.c: Include btrace-common.h.
9758 (handle_btrace_general_set): New function.
9759 (handle_btrace_enable): New function.
9760 (handle_btrace_disable): New function.
9761 (handle_general_set): Call handle_btrace_general_set.
9762 (handle_qxfer_btrace): New function.
9763 (struct qxfer qxfer_packets[]): Add btrace entry.
9764 * inferiors.c (remove_thread): Disable btrace.
9765 * linux-low: Include linux-btrace.h.
9766 (linux_low_enable_btrace): New function.
9767 (linux_low_read_btrace): New function.
9768 (linux_target_ops): Add btrace ops.
9769 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9770 Add srv_linux_btrace=yes.
9771 (x86_64-*-linux*): Add linux-btrace.o.
9772 Add srv_linux_btrace=yes.
9773 * configure.ac: Define HAVE_LINUX_BTRACE.
9774 * config.in: Regenerated.
9775 * configure: Regenerated.
9777 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9779 * server.c (handle_qxfer): Preserve error message if -3 is
9781 (qxfer): Document the -3 return value.
9783 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9785 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9786 (linux_btrace_h): New variable.
9787 (linux-btrace.o): New rule.
9789 2013-03-08 Stan Shebs <stan@codesourcery.com>
9790 Hafiz Abid Qadeer <abidh@codesourcery.com>
9792 * tracepoint.c (trace_buffer_size): New global.
9793 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9794 (init_trace_buffer): Change to one-argument function. Allocate
9795 trace buffer memory.
9796 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9797 handle QTBuffer:size packet.
9798 (cmd_bigqtbuffer_size): New function.
9799 (initialize_tracepoint): Call init_trace_buffer with
9800 DEFAULT_TRACE_BUFFER_SIZE.
9801 * server.c (handle_query): Add QTBuffer:size in the
9804 2013-03-07 Yao Qi <yao@codesourcery.com>
9806 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9807 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9809 (cmd_qtsp): Adjust condition. Do post increment.
9810 Set cur_action and cur_step_action back to 0.
9812 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9815 * linux-low.c (linux_write_memory): Return early success if LEN is
9818 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9820 * configure.srv: Add x86_64-*-cygwin* as target.
9822 2013-02-28 Tom Tromey <tromey@redhat.com>
9824 * configure.ac: Invoke AC_SYS_LARGEFILE.
9825 * configure, config.in: Rebuild.
9827 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9829 * win32-low.c: Throughout, fix format strings and casts of
9830 printf-like functions to avoid type related warnings on all
9832 (get_child_debug_event): Print dwDebugEventCode as hex since
9833 that's how it's usually documented.
9835 2013-02-28 Yao Qi <yao@codesourcery.com>
9837 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9840 2013-02-27 Jiong Wang <jiwang@tilera.com>
9842 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9843 (reg-tilegx32.c): New rule.
9844 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9845 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9846 different register info initializer according to elf class.
9847 (init_registers_tilgx32): New function. The tilegx32 register info
9849 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9850 (tile_store_gregset): Likewise.
9852 2013-02-27 Yao Qi <yao@codesourcery.com>
9854 * server.c (process_point_options): Print debug message when
9855 debug_threads is true.
9857 2013-02-26 Yao Qi <yao@codesourcery.com>
9859 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9861 2013-02-19 Pedro Alves <palves@redhat.com>
9862 Kai Tietz <ktietz@redhat.com>
9866 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9867 instead of strtoul to extract address from packet.
9868 (process_serial_event) <'z'>: Likewise.
9870 2013-02-18 Yao Qi <yao@codesourcery.com>
9872 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9874 2013-02-14 Pedro Alves <palves@redhat.com>
9878 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9879 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9881 2013-02-14 Pedro Alves <palves@redhat.com>
9883 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9885 2013-02-14 Pedro Alves <palves@redhat.com>
9887 * tracepoint.c (save_string): Delete.
9888 (add_tracepoint_action): Use savestring instead of save_string.
9890 2013-02-12 Pedro Alves <palves@redhat.com>
9892 * linux-xtensa-low.c: Ditto.
9893 * xtensa-xtregs.c: Ditto.
9895 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9897 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9900 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9902 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9903 aarch64_num_wp_regs and aarch64_num_bp_regs to
9904 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9906 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9908 * linux-aarch64-low.c (ps_get_thread_area): Replace
9909 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9911 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9912 Marcus Shawcroft <marcus.shawcroft@arm.com>
9913 Nigel Stephens <nigel.stephens@arm.com>
9914 Yufeng Zhang <yufeng.zhang@arm.com>
9916 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9917 (aarch64.c, aarch64-without-fpu.c): New targets.
9918 * configure.srv (aarch64*-*-linux*): New.
9919 * linux-aarch64-low.c: New file.
9921 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9923 * linux-low.c (handle_extended_wait, linux_create_inferior)
9924 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9925 (dequeue_one_deferred_signal, linux_resume_one_thread)
9926 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9927 (linux_tracefork_grandchild, linux_test_for_tracefork)
9928 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9929 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9930 where the argument is 0.
9932 2013-01-25 Yao Qi <yao@codesourcery.com>
9934 * event-loop.c: Include "queue.h".
9935 (gdb_event_p): New typedef.
9936 (struct gdb_event) <next_event>: Remove.
9937 (event_queue): Change to QUEUE(gdb_event_p).
9938 (async_queue_event): Remove.
9939 (gdb_event_xfree): New.
9940 (initialize_event_loop): New.
9941 (process_event): Use API from QUEUE.
9942 (wait_for_event): Likewise.
9943 * server.c (main): Call initialize_event_loop.
9944 * server.h (initialize_event_loop): Declare.
9946 2013-01-18 Yao Qi <yao@codesourcery.com>
9948 * ax.h (struct eval_agent_expr_context): New.
9949 (gdb_eval_agent_expr): Update declaration.
9950 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9951 TFRAME. Add new argument CTX.
9952 * server.h (struct eval_agent_expr_context): Declare.
9953 (agent_mem_read, agent_tsv_read): Update declaration.
9954 (agent_mem_read_string): Likewise.
9955 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9956 (add_traceframe_block): Add new argument TPOINT.
9957 Increase TPOINT->traceframe_usage.
9958 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9959 eval_tracepoint_agent_expr.
9960 (condition_true_at_tracepoint): Likewise.
9961 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9962 (agent_mem_read_string, agent_tsv_read): Likewise.
9964 2013-01-16 Yao Qi <yao@codesourcery.com>
9966 * linux-low.c (linux_resume_one_lwp): Don't check
9967 'lwp->bp_reinsert != 0'.
9969 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9970 Pedro Alves <palves@redhat.com>
9972 * lynx-low.c (ptrace_request_to_str): Define a temporary
9973 macro and use it to simplify this function's implementation.
9975 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9977 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9980 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9982 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9984 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9986 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9988 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9990 * lynx-low.c (lynx_resume): Use the resume_info parameter
9991 to determine the ptid for the lynx_ptrace call, unless
9992 it is equal to minus_one_ptid, in which case we use the
9993 ptid of the current_inferior.
9994 (lynx_wait_1): After having received a thread create/exit
9995 event, resume the inferior's execution using the signaling
9996 thread's ptid, rather than the old ptid.
9998 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10000 * lynx-low.c (lynx_resume): Delete variable ret.
10002 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10004 * gdbreplay.c (gdbreplay_version): Update copyright year.
10005 * server.c (gdbserver_version): Likewise.
10007 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10009 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10012 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10014 * lynx-low.c (ptrace_request_to_str): Add handling for
10015 PTRACE_GETTRACESIG.
10017 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10019 * lynx-low.c (lynx_attach): Delete variable new_process.
10021 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10023 * lynx-low.c (lynx_create_inferior): Delete variable
10026 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10028 * lynx-low.c (ptrace_request_to_str): Do not handle
10029 PTRACE_GETTHREADLIST if this macro does not exist.
10031 2012-12-15 Yao Qi <yao@codesourcery.com>
10033 * Makefile.in (OBS): Add notif.o.
10034 * notif.c, notif.h: New.
10035 * server.c: Include "notif.h".
10036 (struct vstop_notif) <next>: Remove.
10038 (queue_stop_reply): Update.
10039 (push_event, send_next_stop_reply): Remove.
10040 (discard_queued_stop_replies): Update.
10041 (notif_stop): New variable.
10042 (handle_v_stopped): Remove.
10043 (handle_v_requests): Don't call handle_v_stopped. Call
10044 handle_ack_notif instead.
10045 (queue_stop_reply_callback): Call notif_event_enque instead
10046 of queue_stop_reply.
10047 (handle_status): Don't call send_next_stop_reply, call
10048 notif_write_event instead.
10049 (kill_inferior_callback): Likewise.
10050 (detach_or_kill_inferior_callback): Likewise.
10051 (main): Call initialize_notif.
10052 (process_serial_event): Call QUEUE_is_empty.
10053 (handle_target_event): Call notif_push instead of push event.
10054 * server.h (push_event): Remove declaration.
10056 2012-12-10 Tom Tromey <tromey@redhat.com>
10058 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10059 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10062 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10063 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10064 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10065 (amd64-linux-ipa.o, ax.o): Rewrite.
10066 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10067 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10068 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10069 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10070 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10071 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10072 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10073 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10074 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10075 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10076 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10077 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10078 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10079 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10080 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10081 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10082 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10083 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10084 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10085 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10086 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10087 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10088 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10089 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10090 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10091 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10092 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10093 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10094 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10095 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10096 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10097 (reg-tilegx.o): Remove.
10098 (all_object_files): New macro.
10099 Include .deps files.
10100 * aclocal.m4, configure: Rebuild.
10101 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10102 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10103 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10105 2012-12-05 Tom Tromey <tromey@redhat.com>
10108 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10110 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10112 * configure.ac: Check for linux/perf_event.h.
10113 * config.in: Regenerated.
10114 * configure: Regenerated.
10116 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10118 * hostio.c (handle_readlink): Decrease buffer size
10119 parameter passed to readlink by one byte.
10121 2012-11-26 Yao Qi <yao@codesourcery.com>
10123 * configure.ac (build_warnings): Append '-Wempty-body'.
10124 * configure: Regenerated.
10125 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10128 2012-11-15 Pierre Muller <muller@sourceware.org>
10130 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10131 * config.in: Regenerate.
10132 * configure: Regenerate.
10133 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10134 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10135 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10136 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10138 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10139 instead of <sys/wait.h> header.
10140 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10142 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10144 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10145 (various make rules): Remove -DGDBSERVER
10147 2012-11-09 Yao Qi <yao@codesourcery.com>
10149 * spu-low.c (current_ptid): Move it to ..
10150 * gdbthread.h: ... here. New.
10151 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10152 * server.c (myresume, process_serial_event): Likewise.
10153 * thread-db.c (thread_db_find_new_threads): Likewise.
10154 * tracepoint.c (run_inferior_command): Likewise.
10156 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10158 * server.c (handle_search_memory_1): Include access length in
10161 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10163 * linux-crisv32-low.c: Fix compile errors.
10165 2012-09-04 Yao Qi <yao@codesourcery.com>
10167 * tracepoint.c (cmd_qtsv): Adjust debug message.
10168 Don't check CUR_TPOINT.
10170 2012-08-28 Yao Qi <yao@codesourcery.com>
10172 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10173 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10174 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10175 Remove declarations of xmalloc, xreallloc, xstrdup and
10177 * Makefile.in (libiberty_h): New.
10178 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10179 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10181 2012-08-23 Yao Qi <yao@codesourcery.com>
10183 * server.h: Remove declaration of 'xsnprintf'.
10185 2012-08-22 Keith Seitz <keiths@redhat.com>
10187 * server.h: Include build-gnulib-gbserver/config.h.
10188 * gdbreplay.c: Likewise.
10190 2012-08-08 Doug Evans <dje@google.com>
10192 * Makefile.in (SFILES): Add gdb_vecs.c.
10193 (OBS): Add gdb_vecs.o.
10194 (gdb_vecs_h, host_defs_h): New variables.
10195 (thread-db.o): Add $(gdb_vecs_h) dependency.
10196 (gdb_vecs.o): New rule.
10197 * thread-db.c: #include "gdb_vecs.h".
10198 (thread_db_load_search): Use a vector to iterate over path elements.
10199 Handle text appearing after "$pdir".
10201 * configure.ac: Add check for strstr.
10202 * config.in: Regenerate.
10203 * configure: Regenerate.
10205 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10207 * hostio.c (handle_pread): If pread fails, fall back to attempting
10209 (handle_pwrite): Likewise for pwrite.
10211 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10213 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10214 between unsupported TYPE and unimplementable ADDR/LEN combination.
10215 (arm_insert_point): Act on new return value.
10217 2012-07-31 Pedro Alves <palves@redhat.com>
10219 * server.c (process_point_options): Only skip tokens if we find
10220 one that is unrecognized. Don't treat 'X' specially while
10221 skipping unrecognized tokens.
10223 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10225 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10226 to 4-byte-align HW breakpoint addresses for Thumb.
10228 2012-07-27 Yao Qi <yao@codesourcery.com>
10232 * server.h: Declare gdb_agent_about_to_close.
10233 * target.c (kill_inferior): Include "agent.h".
10234 New. Send command 'kill'.
10235 * target.h (kill_inferior): Removed macro.
10236 * tracepoint.c (gdb_agent_about_to_close): New.
10237 (gdb_agent_helper_thread): Handle command 'close'.
10238 Wait endlessly until the inferior stops.
10239 Install gdb_agent_remove_socket to atexit hook.
10240 (agent_socket_name): New static variable.
10241 (gdb_agent_socket_init): Replace local variable 'name' with
10242 'agent_socket_name'.
10243 (gdb_agent_remove_socket): New.
10245 2012-07-27 Yao Qi <yao@codesourcery.com>
10247 * server.c (process_point_options): Stop at 'X' when parsing.
10249 2012-07-19 Michael Eager <eager@eagercon.com>
10251 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10253 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10254 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10255 hardware breakpoint.
10257 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10259 * gdbserver/linux-low.c (initialize_low): Call
10260 linux_ptrace_init_warnings.
10262 2012-07-02 Doug Evans <dje@google.com>
10264 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10267 2012-07-02 Stan Shebs <stan@codesourcery.com>
10269 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10270 (ax.o): Add it to build rule.
10272 (OBS): Add format.o.
10273 (IPA_OBS): Add format.o.
10274 * server.c (handle_query): Claim support for breakpoint commands.
10275 (process_point_options): Add command case.
10276 (process_serial_event): Leave running if there are printfs in
10278 * mem-break.h (any_persistent_commands): Declare.
10279 (add_breakpoint_commands): Declare.
10280 (gdb_no_commands_at_breakpoint): Declare.
10281 (run_breakpoint_commands): Declare.
10282 * mem-break.c (struct point_command_list): New struct.
10283 (struct breakpoint): New field command_list.
10284 (any_persistent_commands): New function.
10285 (add_commands_to_breakpoint): New function.
10286 (add_breakpoint_commands): New function.
10287 (gdb_no_commands_at_breakpoint): New function.
10288 (run_breakpoint_commands): New function.
10289 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10291 * ax.c: Include format.h.
10292 (ax_printf): New function.
10293 (gdb_eval_agent_expr): Add printf opcode.
10295 2012-06-13 Yao Qi <yao@codesourcery.com>
10297 * server.c (start_inferior): Remove duplicated writes to fields
10298 'last_resume_kind' and 'last_status' of 'current_inferior'.
10300 2012-06-12 Yao Qi <yao@codesourcery.com>
10301 Pedro Alves <palves@redhat.com>
10303 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10305 * server.c (handle_v_cont): Extend comment.
10307 2012-06-11 Yao Qi <yao@codesourcery.com>
10309 * linux-low.c (linux_attach): Add 'static'.
10311 2012-06-06 Yao Qi <yao@codesourcery.com>
10313 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10315 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10317 Fix gcc -flto compilation warning.
10318 * server.c (main): Make variable multi_mode and attach volatile.
10320 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10322 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10323 if the platform doesn't know about it.
10325 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10327 * Makefile.in (SFILES): Add linux-tile-low.c.
10328 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10329 * configure.srv: Handle tilegx-*-linux*.
10330 * linux-tile-low.c: New file.
10332 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10334 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10336 2012-05-24 Pedro Alves <palves@redhat.com>
10340 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10342 2012-05-24 Pedro Alves <palves@redhat.com>
10346 Replace target_signal with gdb_signal throughout.
10348 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10350 * linux-low.c (linux_store_registers): Avoid the copying sequence
10351 when no data has been retrieved by ptrace.
10353 2012-05-22 Will Deacon <will.deacon@arm.com>
10355 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10356 Include asm/ptrace.h.
10357 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10360 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10362 * linux-low.c (linux_store_registers): Don't re-retrieve data
10363 with ptrace that has already been obtained from /proc. Always
10364 copy any data retrieved with ptrace to the buffer supplied.
10366 2012-05-11 Yao Qi <yao@codesourcery.com>
10367 Pedro Alves <palves@redhat.com>
10369 * linux-low.c (enum stopping_threads_kind): New.
10370 (stopping_threads): Change type to `enum stopping_threads_kind'.
10371 (handle_extended_wait): If stopping and suspending threads, leave
10372 the new_lwp suspended too.
10373 (linux_wait_for_event): Adjust.
10374 (stop_all_lwps): Set `stopping_threads' to
10375 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10376 whether we're suspending threads or just stopping them. Assert no
10379 2012-04-29 Yao Qi <yao@codesourcery.com>
10381 * server.h: Move some code to ...
10382 * gdbthread.h: ... here. New.
10383 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10384 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10385 (nto-low.o, win32-low.o): Likewise.
10386 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10387 * regcache.c, remote-utils.c, server.c: Likewise.
10388 * target.c, tracepoint.c, win32-low.c: Likewise.
10390 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10392 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10393 (PTRACE_ARG4_TYPE): Likewise.
10394 (PTRACE_XFER_TYPE): Likewise.
10395 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10396 ptrace to PTRACE_ARG3_TYPE.
10397 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10398 (PTRACE_ARG4_TYPE): Likewise.
10399 (PTRACE_XFER_TYPE): Likewise.
10400 (linux_detach_one_lwp): Cast fourth argument of
10401 ptrace to long then PTRACE_ARG4_TYPE.
10402 (regsets_fetch_inferior_registers): Cast third argument of
10403 ptrace to long then PTRACE_ARG3_TYPE.
10404 (regsets_store_inferior_registers): Likewise.
10406 2012-04-20 Pedro Alves <palves@redhat.com>
10408 * configure: Regenerate.
10410 2012-04-19 Pedro Alves <palves@redhat.com>
10412 * Makefile.in (GNULIB_BUILDDIR): New.
10413 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10414 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10415 (all, install-only, uninstall, clean-info, all-lib, clean): No
10416 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10417 (maintainer-clean realclean distclean): Use subdir_do.
10419 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10420 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10421 * acinclude.m4: Include acx_configure_dir.m4.
10422 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10423 calls. Call AC_PROG_RANLIB. Configure gnulib using
10426 (GNULIB_STDINT_H): Adjust.
10427 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10428 * gdbreplay.c: Include build-gnulib/config.h.
10429 * server.h: Likewise.
10430 * aclocal.m4: Regenerate.
10431 * config.in: Regenerate.
10432 * configure: Regenerate.
10434 2012-04-19 Pedro Alves <palves@redhat.com>
10436 * Makefile.in (LIBGNU, INCGNU): Adjust.
10437 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10438 (all, install-only, uninstall, clean-info, all-lib, clean)
10439 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10440 * configure.ac: Adjust AC_OUTPUT output.
10441 * aclocal.m4: Regenerate.
10442 * configure: Regenerate.
10444 2012-04-19 Pedro Alves <palves@redhat.com>
10446 * Makefile.in (generated_files): New.
10447 (server_h): Remove the explicit dependency on config.h, and depend
10448 on $generated_files.
10450 2012-04-19 Pedro Alves <palves@redhat.com>
10452 * Makefile.in (INCGNU): Add -Ignulib.
10454 2012-04-19 Pedro Alves <palves@redhat.com>
10456 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10457 (INCGNU): ... this, and spell out -I here.
10458 (GNULIB_LIB): Rename to ...
10459 (LIBGNU): ... this.
10460 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10462 2012-04-19 Pedro Alves <palves@redhat.com>
10464 * config.in: Regenerate.
10466 2012-04-19 Pedro Alves <palves@redhat.com>
10468 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10469 * server.h (memmem): Remove declaration.
10470 * config.in: Regenerate.
10471 * configure: Regenerate.
10473 2012-04-19 Yao Qi <yao@codesourcery.com>
10475 * Makefile.in (SFILES): Add common/vec.c.
10479 2012-04-19 Yao Qi <yao@codesourcery.com>
10481 * remote-utils.c (prepare_resume_reply): Replace with macro
10482 target_core_of_thread.
10483 * server.c (handle_qxfer_threads_proper): Likewise.
10484 * target.h (traget_core_of_thread): New macro.
10486 2012-04-18 Pedro Alves <palves@redhat.com>
10488 * aclocal.m4: Regenerate.
10489 * configure: Regenerate.
10491 2012-04-16 Yao Qi <yao@codesourcery.com>
10493 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10494 duplicated on address.
10496 2012-04-16 Yao Qi <yao@codesourcery.com>
10498 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10499 (struct tracepoint_action_ops) <send>: New field.
10500 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10501 (agent_expr_send, x_tracepoint_action_send): New.
10502 (l_tracepoint_action_send): New.
10503 (cmd_qtdp): Download and install tracepoint
10504 according to `use_agent'.
10505 (run_inferior_command): Add one more parameter `len'.
10507 (tracepoint_send_agent): New.
10508 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10510 2012-04-16 Yao Qi <yao@codesourcery.com>
10512 * tracepoint.c (download_tracepoints): Moved to ...
10513 (cmd_qtstart): ... here.
10515 2012-04-14 Yao Qi <yao@codesourcery.com>
10517 * tracepoint.c: Include inttypes.h.
10518 (struct collect_memory_action): Use sized types.
10519 (struct tracepoint): Likewise.
10520 (cmd_qtdp, stop_tracing): Update print specifiers.
10521 (cmd_qtp, response_tracepoint): Likewise.
10522 (collect_data_at_tracepoint): Likewise.
10523 (collect_data_at_step): Likewise.
10525 2012-04-14 Yao Qi <yao@codesourcery.com>
10527 Import gnulib module inttypes.
10528 * aclocal.m4, config.in, configure: Regenerated.
10530 2012-04-14 Yao Qi <yao@codesourcery.com>
10532 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10533 Makefile and config.status at last.
10535 2012-04-13 Yao Qi <yao@codesourcery.com>
10537 * tracepoint.c: Include stdint.h unconditionally.
10539 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10541 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10542 on BFD_HAVE_SYS_PROCFS_TYPE.
10543 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10544 * configure: Regenerate.
10545 * config.in: Likewise.
10547 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10549 * Makefile.in (clean): Also remove x32.c x32-linux.c
10550 x32-avx.c x32-avx-linux.c.
10551 (x32.o): New target.
10553 (x32-linux.o): Likewise.
10554 (x32-linux.c): Likewise.
10555 (x32-avx.o): Likewise.
10556 (x32-avx.c): Likewise.
10557 (x32-avx-linux.o): Likewise.
10558 (x32-avx-linux.c): Likewise.
10560 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10561 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10562 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10563 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10564 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10565 i386/x32-avx-linux.xml.
10567 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10568 (init_registers_x32_avx_linux): Likwise.
10569 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10570 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10572 2012-04-13 Pedro Alves <palves@redhat.com>
10574 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10575 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10576 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10577 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10580 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10582 * linux-x86-low.c (compat_x32_clock_t): New.
10583 (compat_x32_siginfo_t): Likewise.
10584 (compat_x32_siginfo_from_siginfo): Likewise.
10585 (siginfo_from_compat_x32_siginfo): Likewise.
10586 (linux_is_elf64): Likewise.
10587 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10588 and siginfo_from_compat_x32_siginfo for x32.
10589 (x86_arch_setup): Set linux_is_elf64.
10591 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10594 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10596 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10597 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10598 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10599 compatible with process.
10601 2012-04-12 Yao Qi <yao@codesourcery.com>
10603 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10604 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10605 (install-only, install-info, clean): Handle sub dir gnulib.
10606 (all-lib, am--refresh): New targets.
10607 (memmem.o): Remove target.
10608 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10609 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10610 (AC_REPLACE_FUNCS): Remove memmem.
10611 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10612 (AC_OUTPUT): Generate Makefile in gnulib/.
10613 * aclocal.m4, config.in, configure: Regenerated.
10615 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10617 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10619 2012-04-05 Pedro Alves <palves@redhat.com>
10621 -Werror=strict-aliasing
10623 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10626 2012-04-04 Pedro Alves <palves@redhat.com>
10628 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10629 (sparc_store_gregset_from_stack, sparc_store_gregset)
10630 (sparc_breakpoint_at): Fix formatting.
10632 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10634 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10636 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10637 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10638 * config.in: Regenerate.
10639 * configure: Likewise.
10641 2012-03-29 Pedro Alves <palves@redhat.com>
10643 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10644 Correct ptrace arguments.
10646 2012-03-28 Pedro Alves <palves@redhat.com>
10648 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10649 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10650 (IA64_FR1_REGNUM): New defines.
10651 (ia64_fetch_register): New.
10652 (the_low_target): Install it.
10653 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10655 * linux-low.c (linux_fetch_registers): Try the
10656 the_low_target.fetch_register hook first.
10658 * linux-arm-low.c (the_low_target): Adjust.
10659 * linux-bfin-low.c (the_low_target): Adjust.
10660 * linux-cris-low.c (the_low_target): Adjust.
10661 * linux-crisv32-low.c (the_low_target): Adjust.
10662 * linux-m32r-low.c (the_low_target): Adjust.
10663 * linux-m68k-low.c (the_low_target): Adjust.
10664 * linux-mips-low.c (the_low_target): Adjust.
10665 * linux-ppc-low.c (the_low_target): Adjust.
10666 * linux-s390-low.c (the_low_target): Adjust.
10667 * linux-sh-low.c (the_low_target): Adjust.
10668 * linux-sparc-low.c (the_low_target): Adjust.
10669 * linux-tic6x-low.c (the_low_target): Adjust.
10670 * linux-x86-low.c (the_low_target): Adjust.
10671 * linux-xtensa-low.c (the_low_target): Adjust.
10673 2012-03-26 Pedro Alves <palves@redhat.com>
10675 * server.c (handle_qxfer_libraries): Don't bail early if
10676 the_target->qxfer_libraries_svr4 is not NULL.
10678 2012-03-26 Pedro Alves <palves@redhat.com>
10680 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10682 2012-03-23 Pedro Alves <palves@redhat.com>
10684 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10685 "library-list-svr4" element's start tag when the the DSO list is
10688 2012-03-23 Pedro Alves <palves@redhat.com>
10690 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10691 a variable whose type size is the same as the inferior's pointer
10694 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10696 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10698 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10699 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10700 * linux-low.h: Include <signal.h>.
10701 (struct siginfo): Remove forward declaration.
10702 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10705 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10707 * .gitignore: Ignore more files.
10709 2012-03-19 Pedro Alves <palves@redhat.com>
10710 Jan Kratochvil <jan.kratochvil@redhat.com>
10712 * server.c (cont_thread, general_thread): Add describing comments.
10713 (start_inferior): Clear `cont_thread'.
10714 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10717 2012-03-15 Yao Qi <yao@codesourcery.com>
10719 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10721 (cmd_qtdp): ... here.
10723 2012-03-15 Yao Qi <yao@codesourcery.com>
10725 * tracepoint.c (struct tracepoint_action_ops): New.
10726 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10727 (m_tracepoint_action_download): New.
10728 (r_tracepoint_action_download): New.
10729 (x_tracepoint_action_download): New.
10730 (l_tracepoint_action_download): New.
10731 (add_tracepoint_action): Install `action->ops' according type.
10732 (download_tracepoint_1): Move code `download' function pointer
10733 of various tracepoint_action_ops.
10735 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10737 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10738 linux_ptrace_attach_warnings.
10740 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10742 * Makefile.in (linux-ptrace.o): New.
10743 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10744 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10745 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10746 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10747 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10749 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10751 2012-03-08 Yao Qi <yao@codesourcery.com>
10752 Pedro Alves <palves@redhat.com>
10754 Fix PR server/13392.
10755 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10756 offset of JMP insn.
10757 * tracepoint.c (remove_tracepoint): New.
10758 (cmd_qtdp): Call remove_tracepoint when failed to install.
10760 2012-03-07 Pedro Alves <palves@redhat.com>
10762 * linux-low.c (get_detach_signal): New.
10763 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10764 Pass on pending signals to PTRACE_DETACH. Check the result of the
10766 * server.c (program_signals, program_signals_p): New.
10767 (handle_general_set): Handle QProgramSignals.
10768 * server.h (program_signals, program_signals_p): Declare.
10770 2012-03-05 Pedro Alves <palves@redhat.com>
10771 Jan Kratochvil <jan.kratochvil@redhat.com>
10773 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10776 2012-03-03 Yao Qi <yao@codesourcery.com>
10778 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10779 agent_look_up_symbols.
10781 2012-03-03 Yao Qi <yao@codesourcery.com>
10783 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10784 (linux-x86-low.o): Likewise.
10785 * server.h: Remove in_process_agent_loaded.
10786 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10790 2012-03-03 Yao Qi <yao@codesourcery.com>
10792 * tracepoint.c (gdb_agent_capability): New global.
10793 (in_process_agent_loaded_ust): Renamed to
10794 `in_process_agent_supports_ust'.
10796 (in_process_agent_supports_ust): Call agent_capability_check.
10797 (clear_installed_tracepoints): Assert that agent supports
10800 2012-03-03 Yao Qi <yao@codesourcery.com>
10802 * linux-low.c (linux_supports_agent): New.
10803 (linux_target_ops): Initialize field `supports_agent' with
10804 linux_supports_agent.
10805 * target.h (struct target_ops) <supports_agent>: New.
10806 (target_supports_agent): New macro.
10807 * server.c (handle_general_set): Handle packet 'QAgent'.
10808 (handle_query): Send `QAgent+'.
10809 * Makefile.in (server.o): Depends on agent.h.
10811 2012-03-03 Yao Qi <yao@codesourcery.com>
10813 * Makefile.in (OBS): Add agent.o.
10814 Add new rule for agent.o.
10815 Track dependence of tracepoint.c on agent.h.
10816 * tracepoint.c (run_inferior_command_1):
10817 (run_inferior_command): Call agent_run_command.
10818 (gdb_ust_connect_sync_socket): Deleted. Move it to
10820 (resume_thread, stop_thread): Likewise.
10821 (gdb_ust_socket_init): Renamed to ...
10822 (gdb_agent_socket_init): ... New.
10823 (gdb_ust_thread): Renamed to ...
10824 (gdb_agent_helper_thread): ... New.
10825 (gdb_ust_init): Move some code to ...
10826 (gdb_agent_init): ... here. New.
10827 [HAVE_UST]: Call gdb_ust_init.
10828 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10829 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10830 * config.in, configure: Regenerated.
10832 2012-03-02 Pedro Alves <palves@redhat.com>
10834 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10835 * linux-low.c (struct simple_pid_list): New.
10836 (stopped_pids): New a struct simple_pid_list pointer.
10837 (add_to_pid_list, pull_pid_from_list): New.
10838 (handle_extended_wait): Don't assume the first signal new children
10839 report is SIGSTOP. Adjust call to pull_pid_from_list.
10840 (linux_wait_for_lwp): Adjust.
10842 2012-03-02 Yao Qi <yao@codesourcery.com>
10844 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10847 2012-03-02 Yao Qi <yao@codesourcery.com>
10849 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10850 `stop_pc' and `tpoint'. Update caller.
10852 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10854 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10855 * linux-low.c (use_linux_regsets): New macro.
10856 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10857 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10858 (linux_register_in_regsets): New function.
10859 (usr_fetch_inferior_registers): Skip registers covered by
10861 (usr_store_inferior_registers): Likewise.
10862 (usr_fetch_inferior_registers): New macro.
10863 (usr_store_inferior_registers): Likewise.
10864 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10865 (linux_store_registers): Likewise.
10866 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10868 (init_registers_mips64_dsp_linux): Likewise.
10869 (init_registers_mips_linux): New macro.
10870 (init_registers_mips_dsp_linux): Likewise.
10871 (mips_dsp_num_regs): Likewise.
10872 (DSP_BASE, DSP_CONTROL): New fallback macros.
10873 (mips_base_regs): New macro.
10874 (mips_regmap): Use it. Fix the size.
10875 (mips_dsp_regmap): New variable.
10876 (mips_dsp_regset_bitmap): Likewise.
10877 (mips_arch_setup): New function.
10878 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10880 (mips_cannot_store_register): Likewise.
10881 (the_low_target): Update .arch_setup, .num_regs and .regmap
10882 initializers. Add .regset_bitmap initializer.
10883 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10885 * linux-bfin-low.c (the_low_target): Likewise.
10886 * linux-cris-low.c (the_low_target): Likewise.
10887 * linux-crisv32-low.c (the_low_target): Likewise.
10888 * linux-ia64-low.c (the_low_target): Likewise.
10889 * linux-m32r-low.c (the_low_target): Likewise.
10890 * linux-m68k-low.c (the_low_target): Likewise.
10891 * linux-ppc-low.c (the_low_target): Likewise.
10892 * linux-s390-low.c (the_low_target): Likewise.
10893 * linux-sh-low.c (the_low_target): Likewise.
10894 * linux-sparc-low.c (the_low_target): Likewise.
10895 * linux-tic6x-low.c (the_low_target): Likewise.
10896 * linux-x86-low.c (the_low_target): Likewise.
10897 * linux-xtensa-low.c (the_low_target): Likewise.
10898 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10899 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10900 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10902 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10903 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10905 2012-02-29 Yao Qi <yao@codesourcery.com>
10906 Pedro Alves <palves@redhat.com>
10908 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10909 `step_over_finished' is true.
10911 2012-02-27 Pedro Alves <palves@redhat.com>
10913 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10914 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10916 2012-02-27 Pedro Alves <palves@redhat.com>
10919 * linux-low.c (pid_is_stopped): New.
10920 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10922 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10924 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10927 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10929 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10931 2012-02-24 Luis Machado <lgustavo@codesourcery>
10933 * server.c (handle_query): Advertise support for target-side
10934 breakpoint condition evaluation.
10935 (process_point_options): New function.
10936 (process_serial_event): When inserting a breakpoint, check for
10937 a target-side condition that should be evaluated.
10939 * mem-break.c: Include regcache.h and ax.h.
10940 (point_cond_list_t): New data structure.
10941 (breakpoint) <cond_list>: New field.
10942 (find_gdb_breakpoint_at): Make non-static.
10943 (delete_gdb_breakpoint_at): Clear any target-side
10945 (clear_gdb_breakpoint_conditions): New function.
10946 (add_condition_to_breakpoint): Likewise.
10947 (add_breakpoint_condition): Likewise.
10948 (gdb_condition_true_at_breakpoint): Likewise.
10949 (gdb_breakpoint_here): Return result directly instead
10950 of going through a local variable.
10952 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10953 (clear_gdb_breakpoint_conditions): Likewise.
10954 (add_breakpoint_condition): Likewise.
10955 (gdb_condition_true_at_breakpoint): Likewise.
10957 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10958 (need_step_over_p): Take target-side breakpoint condition into
10961 2012-02-24 Luis Machado <lgustavo@codesourcery>
10963 * server.h: Include tracepoint.h.
10964 (agent_mem_read, agent_get_trace_state_variable_value,
10965 agent_set_trace_state_variable_value,
10966 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10967 get_set_tsv_func_addr): New prototypes.
10969 * ax.h: New include file.
10970 * ax.c: New source file.
10972 * tracepoint.c: Include ax.h.
10973 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10974 agent_expr, eval_result_type): Move to ax.h.
10975 (parse_agent_expr): Rename to ...
10976 (gdb_parse_agent_expr): ... this, make it non-static and move
10978 (unparse_agent_expr) Rename to ...
10979 (gdb_unparse_agent_expr): ... this, make it non-static and move
10981 (eval_agent_expr): Rename to ...
10982 (eval_tracepoint_agent_expr): ... this.
10983 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10984 forward declarations.
10985 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10986 (agent_get_trace_state_variable_value): New function.
10987 (agent_set_trace_state_variable_value): New function.
10988 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10989 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10990 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10991 (condition_true_at_tracepoint): Likewise.
10992 (parse_agent_expr): Rename to ...
10993 (gdb_parse_agent_expr): ... this and move to ax.c.
10994 (unparse_agent_expr): Rename to ...
10995 (gdb_unparse_agent_expr): ... this and move to ax.c.
10996 (gdb_agent_op_name): Move to ax.c.
10997 (eval_agent_expr): Rename to ...
10998 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11000 (eval_tracepoint_agent_expr): New function.
11001 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11003 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11005 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11006 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11007 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11008 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11009 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11010 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11011 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11012 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11013 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11014 (compile_bytecodes): Remove forward declaration.
11015 (is_goto_target): Move to ax.c.
11016 (compile_bytecodes): Move to ax.c and call
11017 agent_get_trace_state_variable_value (...) and
11018 agent_set_trace_state_variable_value (...).
11020 * Makefile.in: Update ax.c and IPA dependencies.
11022 2012-02-24 Pedro Alves <palves@redhat.com>
11024 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11025 (cmd_bigqtbuffer_circular): ... this. Only handle
11026 'QTBuffer:circular:'.
11027 (handle_tracepoint_general_set): Adjust.
11029 2012-02-16 Yao Qi <yao@codesourcery.com>
11031 * inferiors.c: Move code to ...
11032 * dll.c: .... here. New.
11033 * server.h: Declare clear_dlls.
11034 * Makefile.in (SFILES): Add dll.c.
11038 2012-02-11 Yao Qi <yao@codesourcery.com>
11040 * server.c: (handle_monitor_command): Add a new parameter
11042 (handle_query): Update caller.
11044 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11046 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11047 * configure, config.in: Regenerate.
11048 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11051 2012-02-02 Pedro Alves <palves@redhat.com>
11053 Try SIGKILL first, then PTRACE_KILL.
11054 * linux-low.c (linux_kill_one_lwp): New.
11055 (linux_kill_one_lwp): Rename to ...
11056 (kill_one_lwp_callback): ... this. Use the new
11057 linux_kill_one_lwp.
11059 2012-02-02 Pedro Alves <palves@redhat.com>
11061 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11064 2012-01-27 Pedro Alves <palves@redhat.com>
11066 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11067 (elf_64_file_p): Make static.
11068 (linux_pid_exe_is_elf_64_file): New.
11069 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11070 Delete declarations.
11071 (linux_pid_exe_is_elf_64_file): Declare.
11072 * linux-x86-low.c (x86_arch_setup): Use
11073 linux_pid_exe_is_elf_64_file.
11075 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11077 * linux-low.c (linux_wait_for_event_1): Rename to ...
11078 (linux_wait_for_event): ... here and merge it with former
11079 linux_wait_for_event - new variable wait_ptid, use it.
11080 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11082 2012-01-23 Pedro Alves <palves@redhat.com>
11084 * server.c (main): Avoid yet another case of infinite loop while
11085 detaching/killing after a longjmp.
11087 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11090 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11092 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11094 * hostio.c (handle_readlink): New function.
11095 (handle_vFile): Call it to handle "vFile:readlink" packets.
11097 2012-01-20 Pedro Alves <palves@redhat.com>
11098 Ulrich Weigand <ulrich.weigand@linaro.org>
11100 * server.c (handle_v_requests): Only support vAttach and vRun to
11101 start multiple processes when in extended protocol mode.
11103 2012-01-17 Pedro Alves <palves@redhat.com>
11105 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11106 memalign plus mprotect to allocate the scratch buffer.
11108 2012-01-13 Pedro Alves <palves@redhat.com>
11110 * server.c (attach_inferior): Clear `cont_thread'.
11112 2012-01-13 Pedro Alves <palves@redhat.com>
11114 * server.c (main): Avoid infinite loop while detaching/killing
11117 2012-01-09 Doug Evans <dje@google.com>
11119 * server.c (start_inferior): Set last_ptid in --wrapper case.
11121 2012-01-06 Yao Qi <yao@codesourcery.com>
11123 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11125 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11127 2012-01-04 Yao Qi <yao@codesourcery.com>
11129 * tracepoint.c (cmd_qtdp): Print debug message
11130 for static tracepoint.
11132 2012-01-04 Yao Qi <yao@codesourcery.com>
11134 * tracepoint.c (trace_vdebug): Differentiate debug message
11135 between gdbserver and IPA.
11137 2012-01-03 Yao Qi <yao@codesourcery.com>
11139 * tracepoint.c (tracepoint_was_hit): Don't collect for
11142 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11144 * terminal.h: Reformat copyright header.
11146 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11148 * server.c (gdbserver_version): Update copyright year.
11149 * gdbreplay.c (gdbreplay_version): Likewise.
11151 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11153 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11156 2011-12-18 Hui Zhu <teawater@gmail.com>
11157 * linux-low.c (linux_create_inferior): Save return value to ret.
11159 2011-12-18 Hui Zhu <teawater@gmail.com>
11161 * linux-low.c (linux_create_inferior): Save return value to ret.
11163 2011-12-16 Doug Evans <dje@google.com>
11165 * linux-low.c (linux_create_inferior): If stdio connection,
11166 redirect stdin from /dev/null, stdout to stderr.
11167 * remote-utils.c (remote_is_stdio): New static global.
11168 (remote_connection_is_stdio): New function.
11169 (remote_prepare): Handle stdio connection.
11170 (remote_open): Ditto.
11171 (remote_close): Don't close stdin for stdio connections.
11172 (read_prim,write_prim): New functions. Replace all calls to
11173 read/write to these.
11174 * server.c (main): Watch for "-" argument. Move call to
11175 remote_prepare before start_inferior.
11176 * server.h (STDIO_CONNECTION_NAME): New macro.
11177 (remote_connection_is_stdio): Declare.
11179 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11180 in debugging output.
11182 2011-12-15 Yao Qi <yao@codesourcery.com>
11184 * tracepoint.c: Include sys/syscall.h.
11185 (gdb_ust_thread): Remove preprocessor conditional.
11187 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11189 * linux-low.c (linux_detach_one_lwp): Call
11190 the_low_target.prepare_to_resume before detaching.
11192 2011-12-14 Yao Qi <yao@codesourcery.com>
11194 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11197 2011-12-14 Yao Qi <yao@codesourcery.com>
11199 * i386-low.c (i386_low_stopped_data_address): Initialize local
11200 variable `control'.
11202 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11206 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11207 DR_CONTROL unless necessary. Extend comments.
11208 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11209 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11211 2011-12-13 Yao Qi <yao@codesourcery.com>
11213 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11215 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11217 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11219 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11220 Print new debug message for such case.
11222 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11224 Fix overlapping memcpy.
11225 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11226 the read_inferior_memory transfer.
11227 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11228 write_inferior_memory transfer.
11229 (set_fast_tracepoint_jump): New variable buf. Use it for the
11230 read_inferior_memory and write_inferior_memory transfers.
11231 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11232 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11233 Use it for the write_inferior_memory transfer.
11234 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11237 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11239 * linux-low.c (fetch_register, store_register): Make code
11240 consistent, fix formatting.
11242 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11244 * linux-low.c (usr_store_inferior_registers): Factor out code
11245 to handle individual registers into...
11246 (store_register): ... this new function.
11248 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11250 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11251 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11252 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11253 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11254 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11255 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11256 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11257 (srv_xmlfiles): Add new XML files.
11259 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11261 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11262 (init_registers_s390_linux32v1): Add prototype.
11263 (init_registers_s390_linux32v2): Likewise.
11264 (init_registers_s390_linux64v1): Likewise.
11265 (init_registers_s390_linux64v2): Likewise.
11266 (init_registers_s390x_linux64v1): Likewise.
11267 (init_registers_s390x_linux64v2): Likewise.
11268 (s390_num_regs): Increment to 52.
11269 (s390_regmap): Add orig_r2 register.
11270 (s390_num_regs_3264): Increment to 68.
11271 (s390_regmap_3264): Add orig_r2 register.
11272 (s390_collect_ptrace_register): Handle orig_r2 register.
11273 (s390_supply_ptrace_register): Likewise.
11274 (s390_fill_last_break): New function.
11275 (s390_store_last_break): Likewise.
11276 (s390_fill_system_call): New function.
11277 (s390_store_system_call): Likewise.
11278 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11280 (s390_check_regset): New function.
11281 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11282 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11283 Update target_regsets for available register sets.
11285 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11286 Jan Kratochvil <jan.kratochvil@redhat.com>
11288 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11289 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11291 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11292 * linux-low.h (struct process_info_private): New member r_debug.
11293 * server.c (handle_qxfer_libraries): Call
11294 the_target->qxfer_libraries_svr4.
11295 (handle_qxfer_libraries_svr4): New function.
11296 (qxfer_packets): New entry "libraries-svr4".
11297 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11298 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11299 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11300 PACKET_qXfer_libraries_svr4.
11302 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11304 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11305 PSW address/mask between 8-byte and 16-byte formats.
11306 (s390_supply_ptrace_register): Likewise.
11307 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11308 basic addressing mode bit.
11310 2011-11-24 Stan Shebs <stan@codesourcery.com>
11312 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11314 2011-11-17 Stan Shebs <stan@codesourcery.com>
11316 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11317 (tracing_start_time): New global.
11318 (tracing_stop_time): New global.
11319 (tracing_user_name): New global.
11320 (tracing_notes): New global.
11321 (tracing_stop_note): New global.
11322 (cmd_qtstart): Set traceframe_usage, start_time.
11323 (stop_tracing): Set stop_time.
11324 (cmd_qtstatus): Report additional status.
11325 (cmd_qtp): New function.
11326 (handle_tracepoint_query): Call it.
11327 (cmd_qtnotes): New function.
11328 (handle_tracepoint_general_set): Call it.
11329 (get_timestamp): Rename from tsv_get_timestamp.
11331 2011-11-14 Stan Shebs <stan@codesourcery.com>
11332 Kwok Cheung Yeung <kcy@codesourcery.com>
11334 * linux-x86-low.c (small_jump_insn): New.
11335 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11336 trampoline and error message, build a trampoline and issue a small
11337 jump instruction to it.
11338 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11339 trampoline and error message.
11340 (x86_get_min_fast_tracepoint_insn_len): New.
11341 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11342 * linux-low.h (struct linux_target_ops): Add arguments to
11343 install_fast_tracepoint_jump_pad operation, add new operation.
11344 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11346 (linux_get_min_fast_tracepoint_insn_len): New function.
11347 (linux_target_op): Add new operation.
11348 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11349 (gdb_trampoline_buffer_end): Ditto.
11350 (gdb_trampoline_buffer_error): Ditto.
11351 (struct ipa_sym_addresses): Add fields for new IPA variables.
11352 (symbol_list): Add entries for new IPA variables.
11353 (struct tracepoint): Add fields to hold the address range of the
11354 trampoline used by the tracepoint.
11355 (trampoline_buffer_head): New static variable.
11356 (trampoline_buffer_tail): Ditto.
11357 (claim_trampoline_space): New function.
11358 (have_fast_tracepoint_trampoline_buffer): New function.
11359 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11361 (install_fast_tracepoint): Ditto, also add error buffer argument.
11362 (cmd_qtminftpilen): New function.
11363 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11364 (fast_tracepoint_from_trampoline_address): New function.
11365 (fast_tracepoint_collecting): Handle trampoline as part of jump
11367 (set_trampoline_buffer_space): New function.
11368 (initialize_tracepoint): Initialize new IPA variables.
11369 * target.h (struct target_ops): Add arguments to
11370 install_fast_tracepoint_jump_pad operation, add new
11371 get_min_fast_tracepoint_insn_len operation.
11372 (target_get_min_fast_tracepoint_insn_len): New.
11373 (install_fast_tracepoint_jump_pad): Add arguments.
11374 * server.h (IPA_BUFSIZ): Define.
11375 * linux-i386-ipa.c: Include extra header files.
11376 (initialize_fast_tracepoint_trampoline_buffer): New function.
11377 (initialize_low_tracepoint): Call it.
11378 * server.h (set_trampoline_buffer_space): Declare.
11379 (claim_trampoline_space): Ditto.
11380 (have_fast_tracepoint_trampoline_buffer): Ditto.
11382 2011-11-14 Yao Qi <yao@codesourcery.com>
11384 * server.c (handle_query): Handle InstallInTrace for qSupported.
11385 * tracepoint.c (add_tracepoint): Sort list.
11386 (install_tracepoint, download_tracepoint): New.
11387 (cmd_qtdp): Call them to install and download tracepoints.
11388 (sort_tracepoints): Removed.
11389 (cmd_qtstart): Update.
11391 2011-11-14 Yao Qi <yao@codesourcery.com>
11393 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11394 * mem-break.h: Declare.
11395 * tracepoint.c (cmd_qtstart): Move some code to ...
11396 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11398 (download_tracepoints): Move some code to ...
11399 (download_tracepoint_1): ... here. New.
11401 2011-11-08 Yao Qi <yao@codesourcery.com>
11403 * remote-utils.c (relocate_instruction): A comment fix.
11405 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11407 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11408 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11409 dr_status_mirror and dr_control_mirror from debug_reg_state.
11410 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11411 (i386_initial_stuff): Remove use of deleted globals.
11412 (i386_get_thread_context, i386_set_thread_context,
11413 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11414 from debug_reg_state.
11416 2011-11-05 Yao Qi <yao@codesourcery.com>
11418 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11419 address as TPOINT's.
11421 2011-11-02 Stan Shebs <stan@codesourcery.com>
11423 * tracepoint.c (agent_mem_read_string): New function.
11424 (eval_agent_expr): Call it for tracenz.
11425 * server.c (handle_query): Report support for tracenz.
11427 2011-11-02 Yao Qi <yao@codesourcery.com>
11429 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11431 2011-11-02 Yao Qi <yao@codesourcery.com>
11433 * target.h: Fix a typo in comment.
11435 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11437 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11438 clobber the breakpoints' shadows with fast tracepoint jumps.
11439 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11440 * target.c (write_inferior_memory): Also pass MYADDR down to
11443 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11445 * configure.ac: Check support for personality routine.
11446 * configure: Regenerate.
11447 * config.in: Likewise.
11448 * linux-low.c: Include <sys/personality.h>.
11449 Define ADDR_NO_RANDOMIZE if necessary.
11450 (linux_create_inferior): Disable address space randomization when
11451 forking inferior, if requested.
11452 (linux_supports_disable_randomization): New function.
11453 (linux_target_ops): Install it.
11454 * server.h (disable_randomization): Declare.
11455 * server.c (disable_randomization): New global variable.
11456 (handle_general_set): Handle QDisableRandomization.
11457 (handle_query): Likewise for qSupported.
11458 (main): Support --disable-randomization and --no-disable-randomization
11459 command line arguments.
11460 * target.h (struct target_ops): Add supports_disable_randomization.
11461 (target_supports_disable_randomization): New macro.
11463 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11465 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11467 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11468 [!PT_GETDSBT] (target_loadmap): New definition.
11469 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11470 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11471 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11472 and PT_GETDSBT to LINUX_LOADMAP.
11473 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11474 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11476 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11478 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11479 (arm_linux_hwbp_cap): New static variable.
11480 (arm_linux_get_hwbp_cap): Replace by ...
11481 (arm_linux_init_hwbp_cap): ... this new function.
11482 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11483 (arm_linux_get_hw_watchpoint_count): Likewise.
11484 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11485 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11486 (arm_prepare_to_resume): Use perror_with_name instead of error.
11488 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11490 * linux-arm-low.c: Include <signal.h>.
11491 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11492 (struct arm_linux_hwbp_cap): New data type.
11493 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11494 (struct arm_linux_hw_breakpoint): New data type.
11495 (MAX_BPTS, MAX_WPTS): Define.
11496 (struct arch_process_info, struct arch_lwp_info): New data types.
11497 (arm_linux_get_hwbp_cap): New function.
11498 (arm_linux_get_hw_breakpoint_count): Likewise.
11499 (arm_linux_get_hw_watchpoint_count): Likewise.
11500 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11501 (arm_hwbp_control_initialize): Likewise.
11502 (arm_hwbp_control_is_enabled): Likewise.
11503 (arm_hwbp_control_is_initialized): Likewise.
11504 (arm_hwbp_control_disable): Likewise.
11505 (arm_linux_hw_breakpoint_equal): Likewise.
11506 (arm_linux_hw_point_initialize): Likewise.
11507 (struct update_registers_data): New data structure.
11508 (update_registers_callback: New function.
11509 (arm_insert_point): Likewise.
11510 (arm_remove_point): Likewise.
11511 (arm_stopped_by_watchpoint): Likewise.
11512 (arm_stopped_data_address): Likewise.
11513 (arm_new_process): Likewise.
11514 (arm_new_thread): Likewise.
11515 (arm_prepare_to_resume): Likewise.
11516 (the_low_target): Register arm_insert_point, arm_remove_point,
11517 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11518 arm_new_thread, and arm_prepare_to_resume.
11520 2011-09-15 Stan Shebs <stan@codesourcery.com>
11522 * server.h (struct emit_ops): Add compare-goto fields.
11523 * tracepoint.c (gdb_agent_op_sizes): New table.
11524 (emit_eq_goto): New function.
11525 (emit_ne_goto): New function.
11526 (emit_lt_goto): New function.
11527 (emit_le_goto): New function.
11528 (emit_gt_goto): New function.
11529 (emit_ge_goto): New function.
11530 (is_goto_target): New function.
11531 (compile_bytecodes): Recognize special cases of compare-goto
11532 combinations and call specialized emitters for them.
11533 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11534 (amd64_emit_ne_goto): New function.
11535 (amd64_emit_lt_goto): New function.
11536 (amd64_emit_le_goto): New function.
11537 (amd64_emit_gt_goto): New function.
11538 (amd64_emit_ge_goto): New function.
11539 (amd64_emit_ops): Add the new functions.
11540 (i386_emit_eq_goto): New function.
11541 (i386_emit_ne_goto): New function.
11542 (i386_emit_lt_goto): New function.
11543 (i386_emit_le_goto): New function.
11544 (i386_emit_gt_goto): New function.
11545 (i386_emit_ge_goto): New function.
11546 (i386_emit_ops): Add the new functions.
11548 2011-09-08 Stan Shebs <stan@codesourcery.com>
11550 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11551 (i386_emit_epilogue): Restore %ebx.
11553 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11555 * server.c (step_thread): Remove definition.
11556 (process_serial_event): Don't handle Hs.
11557 * server.h (step_thread): Remove declaration.
11558 * target.c (set_desired_inferior): Remove use of step_thread.
11560 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11562 * linux-low.c: Include linux-procfs.h.
11563 (linux_attach_lwp_1): Update comments.
11564 (linux_attach): Scan for existing threads when attaching to a
11565 process that is the tgid.
11566 * Makefile.in: Update dependencies.
11568 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11570 * configure.srv: Add linux-procfs.o dependencies.
11572 2011-08-14 Yao Qi <yao@codesourcery.com>
11574 * target.h (struct target_ops): Fix indent.
11575 * win32-low.c (win32_target_ops): Fix comment.
11577 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11578 Yao Qi <yao@codesourcery.com>
11580 * Makefile.in (clean): Remove tic6x-*.c files.
11581 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11582 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11583 (tic6x-c64xp-linux.c): Likewise.
11584 * configure.srv: Add support for tic6x-*-uclinux.
11585 * linux-tic6x-low.c: New.
11586 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11588 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11589 Yao Qi <yao@codesourcery.com>
11591 * target.h (struct target_ops): Add read_loadmap.
11592 * linux-low.c (struct target_loadseg): New type.
11593 (struct target_loadmap): New type.
11594 (linux_read_loadmap): New function.
11595 (linux_target_ops): Add linux_read_loadmap.
11596 * server.c (handle_query): Support qXfer:fdpic:read packet.
11597 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11600 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11602 * win32-low.c: Include <stdint.h>.
11604 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11606 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11607 to the inferior here.
11608 (i386_remove_aligned_watchpoint): Ditto.
11609 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11610 fit part of the watchpoint in the debug registers.
11611 (i386_update_inferior_debug_regs): New.
11612 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11613 registers, and only update the inferior on success.
11614 (i386_low_remove_watchpoint): Ditto.
11616 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11618 * linux-low.c (compare_ints, unique, list_threads, show_process,
11619 linux_core_of_thread): Delete.
11620 (linux_target_ops): Change linux_core_of_thread to
11621 linux_common_core_of_thread.
11622 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11623 * utils.c (malloc_failure): Change type of argument.
11624 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11625 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11626 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11627 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11628 (IPA_OBJS): Add common-utils-ipa.o.
11629 (ptid_h, linux_osdata_h): New macros.
11630 (server_h): Add common/common-utils.h, common/xml-utils.h,
11631 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11633 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11634 ptid.o, buffer.o): New rules.
11635 (linux-low.o): Add common/linux-osdata.h as a dependency.
11636 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11637 * configure.ac: Add AC_HEADER_DIRENT check.
11638 * config.in: Regenerate.
11639 * configure: Regenerate.
11640 * remote-utils.c (xml_escape_text): Delete.
11641 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11642 buffer_xml_printf): Move to common/buffer.c.
11643 * server.c (main): Remove call to initialize_inferiors.
11644 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11645 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11646 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11647 internal_error, gdb_assert, gdb_assert_fail): Delete.
11648 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11649 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11651 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11652 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11653 initialize_inferiors): Delete.
11655 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11657 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11660 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11662 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11664 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11666 2011-05-26 Yao Qi <yao@codesourcery.com>
11668 * Makefile.in (thread-db.o): Track dependence to
11669 common/gdb_thread_db.h.
11670 * thread-db.c: include gdb_thread_db.h from right place.
11672 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11674 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11675 __FILE__ and __LINE__ to internal_error.
11677 2011-05-13 Doug Evans <dje@google.com>
11679 * thread-db.c (try_thread_db_load_from_sdir): New function.
11680 (try_thread_db_load_from_dir): New function.
11681 (thread_db_load_search): Handle $sdir, ignore $pdir.
11682 Remove trying of system directories if search of
11683 libthread-db-search-path fails, that is now done via $sdir.
11685 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11687 * server.c (handle_query): Add EnableDisableTracepoints to the list
11688 of supported features.
11689 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11691 (cmd_qtenable_disable): New.
11692 (cmd_qtstart): Install tracepoints even if disabled.
11693 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11694 receiving a QTEnable or QTDisable packet.
11695 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11696 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11698 (gdb_probe): Skip data collection if static tracepoint is disabled.
11700 2011-05-10 Doug Evans <dje@google.com>
11702 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11704 2011-05-04 Doug Evans <dje@google.com>
11706 * linux-low.c (linux_join): Skip process lookup.
11707 * spu-low.c (spu_join): Ditto.
11708 * server.c (join_inferiors_callback): Delete.
11709 (process_serial_event): For 'D' packet (detach) call join_inferior
11712 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11714 * README: Don't mention xscale*-*-linux*.
11715 * configure.srv (xscale*-*-linux*): Don't handle target.
11717 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11719 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11721 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11722 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11723 (i386_emit_void_call_2): Likewise.
11725 2011-04-26 Yao Qi <yao@codesourcery.com>
11727 * linux-low.c: Move common macros to linux-ptrace.h.
11728 Include linux-ptrace.h.
11729 * Makefile.in (linux_ptrace_h): New.
11730 (linux-low.o): Depends on linux-ptrace.h.
11732 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11734 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11735 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11736 (remote_prepare): New function with most of the TCP code from ...
11737 (remote_open): ... here. Detect PORT here unconditionally. Move also
11738 setting transport_is_reliable.
11739 * server.c (run_once): New variable.
11740 (gdbserver_usage): Document it.
11741 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11742 the first run if RUN_ONCE.
11743 * server.h (run_once, remote_prepare): New declarations.
11745 2011-04-19 Tom Tromey <tromey@redhat.com>
11747 * win32-low.c (handle_load_dll): Remove duplicate "the".
11749 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11751 Remove support for old Cygwin 1.5 versions.
11752 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11753 function to avoid warning.
11754 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11757 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11759 * gdbserver/server.h (Macro _): Define it if not available.
11761 2011-03-14 Michael Snyder <msnyder@vmware.com>
11763 * hostio.c (handle_close): Remove unnecessary null test.
11765 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11767 * Makefile.in (maintainer-clean realclean distclean): Remove
11768 "make ... subdir_do" command.
11770 2011-03-10 Michael Snyder <msnyder@vmware.com>
11772 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11774 * server.c (handle_v_run): Free alloced buffer on early return.
11776 2011-03-09 Yao Qi <yao@codesourcery.com>
11779 2011-03-04 Yao Qi <yao@codesourcery.com>
11781 * Makefile.in: Remove GNU make feature --directory.
11783 2011-03-05 Yao Qi <yao@codesourcery.com>
11785 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11786 (subdir_do): New make target. Copied from gdb/Makefile.
11787 (maintainer-clean, realclean, distclean, clean): Call corresponding
11788 make targets in common/Makefile.
11790 2011-02-11 Yao Qi <yao@codesourcery.com>
11792 * configure.ac: Call AC_PROG_RANLIB.
11793 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11794 * configure: Regenerate.
11796 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11798 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11800 2011-03-06 Yao Qi <yao@codesourcery.com>
11802 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11804 2011-03-05 Yao Qi <yao@codesourcery.com>
11806 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11807 (subdir_do): New make target. Copied from gdb/Makefile.
11808 (maintainer-clean, realclean, distclean, clean): Call corresponding
11809 make targets in common/Makefile.
11811 2011-03-04 Yao Qi <yao@codesourcery.com>
11813 * Makefile.in: Remove GNU make feature --directory.
11815 2011-03-04 Michael Snyder <msnyder@vmware.com>
11817 * server.c (queue_stop_reply): Call xmalloc not malloc.
11819 2011-03-02 Michael Snyder <msnyder@vmware.com>
11821 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11823 2011-02-28 Michael Snyder <msnyder@vmware.com>
11825 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11826 (cmd_qtframe): Ditto.
11827 (cmd_qtbuffer): Ditto.
11828 (cmd_bigqtbuffer): Ditto.
11830 * utils.c (decimal2str): Initialize 'width' to nine, then
11831 don't mess with it.
11833 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11835 * hostio.c (require_data): Free *data, not data.
11837 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11839 * hostio.c (require_data): Use free, not xfree.
11841 2011-02-27 Michael Snyder <msnyder@vmware.com>
11843 * server.c (handle_query): Discard unused value.
11845 * hostio.c (require_data): Free malloc memory before returning
11848 2011-02-26 Michael Snyder <msnyder@vmware.com>
11850 * linux-low.c (list_threads): Call closedir for dirent.
11852 2011-02-27 Michael Snyder <msnyder@vmware.com>
11854 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11855 a case statement falls through.
11857 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11859 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11862 2011-02-26 Michael Snyder <msnyder@vmware.com>
11864 * utils.c (decimal2str): Eliminate dead code and dead param.
11865 (pulongest): Drop dead param from call to decimal2str.
11868 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11870 Revert the following patch (not approved yet):
11871 2011-02-21 Hui Zhu <teawater@gmail.com>
11872 * tracepoint.c (tp_printf): New function.
11873 (eval_agent_expr): Handle gdb_agent_op_printf.
11875 2011-02-21 Hui Zhu <teawater@gmail.com>
11877 * tracepoint.c (tp_printf): New function.
11878 (eval_agent_expr): Handle gdb_agent_op_printf.
11880 2011-02-18 Tom Tromey <tromey@redhat.com>
11882 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11883 (tracepoint.o): Likewise.
11884 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11885 (gdb_agent_op_names): Likewise.
11887 2011-02-18 Tom Tromey <tromey@redhat.com>
11889 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11890 gdb_agent_op_rot>: New constants.
11891 (gdb_agent_op_names): Add pick and roll.
11892 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11895 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11897 * aclocal.m4: Regenerated with aclocal-1.11.1.
11899 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11901 * server.c (handle_qxfer_traceframe_info): New.
11902 (qxfer_packets): Register "traceframe-info".
11903 (handle_query): Report support for qXfer:traceframe-info:read+.
11904 * tracepoint.c (match_blocktype): New.
11905 (traceframe_find_block_type): Rename to ...
11906 (traceframe_walk_blocks): ... this. Add callback filter argument,
11908 (traceframe_find_block_type): New, reimplemented on top of
11909 traceframe_walk_blocks.
11910 (build_traceframe_info_xml): New.
11911 (traceframe_read_info): New.
11912 * server.h (traceframe_read_info): Declare.
11914 2011-02-11 Yao Qi <yao@codesourcery.com>
11916 * configure.ac: Call AC_PROG_RANLIB.
11917 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11918 * configure: Regenerate.
11920 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11922 * server.c (gdb_read_memory): Change return semantics to allow
11924 (handle_search_memory_1): Adjust.
11925 (process_serial_event) <'m' packet>: Handle partial transfers.
11926 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11928 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11930 * regcache.c (init_register_cache): Initialize
11931 regcache->register_status.
11932 (free_register_cache): Release regcache->register_status.
11933 (regcache_cpy): Copy register_status.
11934 (registers_to_string): Print 'x's for unavailable registers.
11935 (supply_register): Mark the register's status valid or
11936 unavailable, depending on whether a buffer was passed in or not.
11937 (supply_register_zeroed): New.
11938 (supply_regblock): Mark the registers' status valid or
11939 unavailable, depending on whether a buffer was passed in or not.
11940 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11941 (struct regcache): New `register_status' field.
11942 (supply_register_zeroed): Declare.
11943 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11944 supply_register_zeroed, rather than passing a NULL buffer to
11946 * tracepoint.c (fetch_traceframe_registers): Update comment.
11948 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11950 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11953 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11955 * server.h (decode_xfer_write): Change prototype.
11956 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11957 and don't extract the annex here.
11958 * server.c (decode_xfer_read): Remove `annex' parameter,
11959 and don't extract the annex here.
11960 (decode_xfer): New.
11961 (struct qxfer): New.
11962 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11963 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11964 (handle_qxfer_statictrace): New functions, abstracted out from
11965 handle_query, and made to use the struct qxfer interface.
11966 (handle_threads_qxfer_proper): Rename to ...
11967 (handle_qxfer_threads_proper): ... this.
11968 (handle_threads_qxfer): Rename to ...
11969 (handle_qxfer_threads): ... this. Adjust.
11970 (qxfer_packets): New array.
11971 (handle_qxfer): New function.
11972 (handle_query): Use handle_qxfer.
11974 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11976 * gdbreplay.c: Shorten lines of >= 80 columns.
11977 * linux-low.c: Ditto.
11978 * linux-ppc-low.c: Ditto.
11979 * linux-s390-low.c: Ditto.
11980 * linux-sparc-low.c: Ditto.
11981 * linux-x86-low.c: Ditto.
11982 * linux-xtensa-low.c: Ditto.
11983 * mem-break.c: Ditto.
11984 * nto-low.c: Ditto.
11985 * regcache.h: Ditto.
11986 * remote-utils.c: Ditto.
11989 * thread-db.c: Ditto.
11990 * tracepoint.c: Ditto.
11992 * win32-low.h: Ditto.
11994 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11996 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11999 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12001 * server.c (gdbserver_version): Update copyright year in version
12003 * gdbreplay.c (gdbreplay_version): Ditto.
12005 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12007 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12008 * linux-bfin-low.c: New file.
12009 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12010 PT_DATA_ADDR for BFIN targets.
12011 * Makefile.in (SFILES): Add linux-bfin-low.c.
12012 (clean): Remove reg-bfin.c.
12013 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12014 * README: Mention supported Blackfin targets.
12016 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12018 * .gitignore: New file.
12020 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12022 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12024 2010-10-22 Jie Zhang <jie@codesourcery.com>
12026 * Makefile.in: Add FLAGS_TO_PASS variable.
12027 (install): Remove dependency of install-only and recursively
12028 invoke make for install-only.
12030 2010-10-04 Doug Evans <dje@google.com>
12032 * Makefile.in (uninstall): Use $(DESTDIR).
12034 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12038 * linux-x86-low.c (compat_siginfo_from_siginfo)
12039 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12040 si_code is < 0. Check for si_code == SI_TIMER before checking for
12043 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12045 * lynx-i386-low.c: New file.
12046 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12048 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12050 * lynx-low.c (ptrace_request_to_str): Remove handling for
12051 request values that have been removed in LynxOS 5.x.
12053 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12055 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12058 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12060 * configure.ac: Add --enable-inprocess-agent option.
12061 * configure: Rebuilt.
12063 2010-09-06 Yao Qi <yao@codesourcery.com>
12065 * linux-low.c (linux_kill): Remove unused variable.
12066 (linux_stabilize_threads): Likewise.
12067 * server.c (start_inferior): Likewise.
12068 (queue_stop_reply_callback): Likewise.
12069 * tracepoint.c (do_action_at_tracepoint): Likewise.
12071 2010-09-06 Yao Qi <yao@codesourcery.com>
12073 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12076 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12078 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12080 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12082 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12085 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12087 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12088 gdbserver/lynx-ppc-low.c: New files.
12089 * Makefile.in (lynx_low_h): New variable.
12090 (lynx-low.o, lynx-ppc-low.o): New rules.
12091 * configure.ac: On LynxOS, link with -lnetinet.
12092 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12093 * configure: regenerate.
12095 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12097 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12098 * configure.ac: Add check for vasprintf and vsnprintf.
12099 * configure, config.in: Regenerate.
12100 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12102 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12104 * gdbreplay.c: Move include of alloca.h up, next to include of
12106 * server.h: Add include of malloc.h.
12107 * mem-break.c: Remove include of malloc.h.
12108 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12110 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12112 * Makefile.in (memmem.o): Build with -Wno-error.
12114 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12116 * utils.c (xsnprintf): Make non-static.
12117 * server.h: Add xsnprintf declaration.
12118 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12119 replace calls to snprintf by calls to xsnprintf throughout.
12121 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12123 * configure.ac: Add configure check for alloca.
12124 * configure, config.in: Regenerate.
12125 * server.h: Include alloca.h if it exists.
12126 * gdbreplay.c: Include alloca.h if it exists.
12128 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12130 * linux-low.c (__SIGRTMIN): Define if not already defined.
12131 (linux_create_inferior): Check for __ANDROID__ rather than
12133 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12134 are already deferred.
12135 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12136 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12137 stopped and already has a pending signal to report.
12138 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12139 a pending signal to report or is moving out of a jump pad.
12140 (linux_init_signals): Check for __ANDROID__ rather than
12143 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12145 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12146 debug_threads check. Avoid a linear search when not doing debug
12149 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12151 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12152 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12153 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12154 (process_event): Change local fd's type to gdb_fildes_t.
12155 (create_file_handler): Adjust prototype.
12156 (delete_file_handler): Adjust prototype.
12157 (handle_file_event): Adjust prototype. Use pfildes.
12158 (create_file_event): Adjsut prototype.
12159 * remote-utils.c (remote_desc, listen_desc): Change type to
12161 * server.h: New gdb_fildes_t typedef.
12162 [USE_WIN32API]: Include winsock2.h.
12163 (delete_file_handler, add_file_handler): Adjust prototypes.
12164 (pfildes): Declare.
12165 * utils.c (pfildes): New.
12167 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12169 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12170 * configure: Regenerate.
12172 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12174 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12175 (linux_done_accessing_memory): ... this.
12176 (linux_target_ops): Adjust.
12177 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12178 * nto-low.c (nto_target_ops): Adjust comment.
12179 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12180 * spu-low.c (spu_target_ops): Adjust comment.
12181 * target.h (target_ops): Rename unprepare_to_access_memory field
12182 to done_accessing_memory.
12183 (unprepare_to_access_memory): Rename to ...
12184 (done_accessing_memory): ... this.
12186 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12188 * linux-low.c (linux_prepare_to_access_memory): New.
12189 (linux_unprepare_to_access_memory): New.
12190 (linux_target_ops): Install them.
12191 * server.c (read_memory): Rename to ...
12192 (gdb_read_memory): ... this. Use
12193 prepare_to_access_memory/prepare_to_access_memory.
12194 (write_memory): Rename to ...
12195 (gdb_write_memory): ... this. Use
12196 prepare_to_access_memory/prepare_to_access_memory.
12197 (handle_search_memory_1): Adjust.
12198 (process_serial_event): Adjust.
12199 * target.h (struct target_ops): New fields
12200 prepare_to_access_memory and unprepare_to_access_memory.
12201 (prepare_to_access_memory, unprepare_to_access_memory): New.
12202 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12203 prepare_to_access_memory/prepare_to_access_memory.
12204 * nto-low.c (nto_target_ops): Adjust.
12205 * spu-low.c (spu_target_ops): Adjust.
12206 * win32-low.c (win32_target_ops): Adjust.
12208 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12210 * Makefile.in (WARN_CFLAGS): Get it from configure.
12211 (WERROR_CFLAGS): New.
12212 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12213 * configure.ac: Introduce --enable-werror, which adds -Werror to
12214 the compiler command line. Enabled by default. Disable with
12215 --disable-werror. Add -Wdeclaration-after-statement
12216 Wpointer-arith and -Wformat-nonliteral to warning flags.
12217 * configure: Regenerate.
12219 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12221 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12223 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12225 * gdbreplay.c (remote_error): New.
12227 (expect): Use gdbchar. Check for error reading from GDB.
12228 Clarify sync error output.
12229 (play): Check for errors writing to GDB.
12230 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12231 * remote-utils.c (getpkt): Check for errors writing to the remote
12234 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12236 * linux-low.c (linux_wait_1): Move non-debugging code out of
12237 `debug_threads' control.
12239 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12241 * linux-low.c (linux_wait_1): Don't set last_status here.
12242 * server.c (push_event, queue_stop_reply_callback): Assert we're
12243 not pushing a TARGET_WAITKIND_IGNORE event.
12244 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12245 (myresume, handle_target_event): Set the thread's last_resume_kind
12246 and last_status from the target returned status.
12248 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12252 * linux-x86-low.c (update_debug_registers_callback): New.
12253 (i386_dr_low_set_addr): Use it.
12254 (i386_dr_low_get_addr): New.
12255 (i386_dr_low_set_control): Use update_debug_registers_callback.
12256 (i386_dr_low_get_control): New.
12257 (i386_dr_low_get_status): Adjust.
12258 * linux-low.c (linux_stop_lwp): New.
12259 * linux-low.h (linux_stop_lwp): Declare.
12261 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12262 argument instead of a i386_debug_reg_state.
12263 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12264 a i386_debug_reg_state.
12265 (i386_insert_aligned_watchpoint): Adjust.
12266 (i386_remove_aligned_watchpoint): Adjust.
12267 (i386_low_stopped_data_address): Read the debug registers from the
12268 inferior instead of from the mirrors.
12269 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12270 (i386_dr_low_get_addr): Declare.
12271 (i386_dr_low_get_control): Declare.
12272 (i386_dr_low_get_status): Change prototype.
12274 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12275 (i386_dr_low_get_addr): New.
12276 (i386_dr_low_get_control): New.
12277 (i386_dr_low_get_status): Adjust prototype. Return
12279 (i386_initial_stuff): Clear dr_status_mirror and
12281 (i386_get_thread_context): Adjust.
12282 (i386_set_thread_context): Adjust.
12283 (i386_thread_added): Adjust.
12285 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12287 * linux-low.h (linux_thread_area): Delete declaration.
12289 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12291 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12292 after its termination.
12294 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12296 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12297 (gdb_wants_all_stopped): Delete.
12298 (linux_wait_1): Don't call them.
12299 * server.c (handle_v_cont): Tag all threads as want-stopped.
12300 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12301 stopped as "client-wants-stopped".
12303 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12305 * Makefile.in (signals_h): New.
12306 (server_h): Depend on it.
12307 (server.o): Don't depend on $(signals_def).
12308 (signals.o): Depend on $(signals_def).
12310 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12312 * Makefile.in (signals_def): New.
12313 (server_h): Append include/gdb/signals.h and signals_def.
12314 (server.o): Append signals_def.
12316 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12318 * server.c (handle_target_event): Use target_signal_to_host for
12319 resume_info.sig initialization.
12320 * target.h (struct thread_resume) <sig>: New comment.
12322 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12324 * server.c (handle_query): strcpy() the returned string from paddress()
12325 instead of sprintf().
12326 * utils.c (paddress): Return phex_nz().
12328 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12330 * server.c (handle_v_cont): Call mourn_inferior if process
12332 (myresume): Likewise.
12334 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12336 Static tracepoints, and integration with UST.
12338 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12339 * mem-break.c (uninsert_all_breakpoints)
12340 (reinsert_all_breakpoints): New.
12341 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12342 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12343 (gdb_agent_ust_loaded, helper_thread_id)
12344 (gdb_agent_helper_thread_id): New macros.
12345 (struct ipa_sym_addresses): Add addr_ust_loaded,
12346 addr_helper_thread_id, addr_cmd_buf.
12347 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12348 (in_process_agent_loaded_ust): New.
12349 (write_e_ust_not_loaded): New.
12350 (maybe_write_ipa_ust_not_loaded): New.
12351 (struct collect_static_trace_data_action): New.
12352 (enum tracepoint_type) <static_tracepoint>: New.
12353 (struct tracepoint) <handle>: Mention static tracepoints.
12354 (struct static_tracepoint_ctx): New.
12355 (CMD_BUF_SIZE): New.
12356 (add_tracepoint_action): Handle static tracepoint actions.
12357 (unprobe_marker_at): New.
12358 (clear_installed_tracepoints): Handle static tracepoints.
12359 (cmd_qtdp): Handle static tracepoints.
12360 (probe_marker_at): New.
12361 (cmd_qtstart): Handle static tracepoints.
12362 (response_tracepoint): Handle static tracepoints.
12363 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12364 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12365 (get_context_regcache): Handle static tracepoints.
12366 (do_action_at_tracepoint): Handle static tracepoint actions.
12367 (traceframe_find_block_type): Handle static trace data blocks.
12368 (traceframe_read_sdata): New.
12369 (download_tracepoints): Download static tracepoint actions.
12370 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12371 (GDB_PROBE_NAME): New.
12373 (GET_UST_SYM): New.
12376 (ust_marker_to_static_tracepoint): New.
12378 (collect_ust_data_at_tracepoint): New.
12379 (gdb_ust_probe): New.
12380 (UNIX_PATH_MAX, SOCK_DIR): New.
12381 (gdb_ust_connect_sync_socket): New.
12382 (resume_thread, stop_thread): New.
12383 (run_inferior_command): New.
12384 (init_named_socket): New.
12385 (gdb_ust_socket_init): New.
12386 (cstr_to_hexstr): New.
12388 (first_marker, next_marker): New.
12389 (response_ust_marker): New.
12390 (cmd_qtfstm, cmd_qtsstm): New.
12391 (unprobe_marker_at, probe_marker_at): New.
12392 (cmd_qtstmat, gdb_ust_thread): New.
12393 (gdb_ust_init): New.
12394 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12395 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12396 (ST_REGENTRY): New.
12397 (x86_64_st_collect_regmap): New.
12398 (X86_64_NUM_ST_COLLECT_GREGS): New.
12399 (AMD64_RIP_REGNUM): New.
12400 (supply_static_tracepoint_registers): New.
12401 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12402 (ST_REGENTRY): New.
12403 (i386_st_collect_regmap): New.
12404 (i386_NUM_ST_COLLECT_GREGS): New.
12405 (supply_static_tracepoint_registers): New.
12406 * server.c (handle_query): Handle qXfer:statictrace:read.
12407 <qSupported>: Report support for StaticTracepoints, and
12408 qXfer:statictrace:read features.
12409 * server.h (traceframe_read_sdata)
12410 (supply_static_tracepoint_registers): Declare.
12411 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12412 (unpack_varlen_hex): Include in IPA build.
12413 * Makefile.in (ustlibs, ustinc): New.
12414 (IPA_OBJS): Add remote-utils-ipa.o.
12415 ($(IPA_LIB)): Link -ldl and -lpthread.
12417 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12418 * config.in, configure: Regenerate.
12420 2010-06-20 Ian Lance Taylor <iant@google.com>
12421 Pedro Alves <pedro@codesourcery.com>
12423 * linux-x86-low.c (always_true): Delete.
12424 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12425 trying to fool the compiler with always_true.
12427 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12429 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12430 conditions in gdbserver.
12432 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12434 * spu-low.c (spu_read_memory): Wrap around local store limit.
12435 (spu_write_memory): Likewise.
12437 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12439 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12440 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12442 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12444 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12445 uses with LONGEST uses.
12447 2010-06-14 Stan Shebs <stan@codesourcery.com>
12448 Pedro Alves <pedro@codesourcery.com>
12452 * linux-x86-low.c: Include limits.h.
12454 (always_true): New.
12457 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12458 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12459 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12460 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12461 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12462 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12463 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12464 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12465 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12466 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12467 (amd64_emit_void_call_2): New.
12468 (amd64_emit_ops): New.
12469 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12470 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12471 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12472 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12473 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12474 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12475 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12476 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12477 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12478 (i386_emit_stack_adjust, i386_emit_int_call_1)
12479 (i386_emit_void_call_2): New.
12480 (i386_emit_ops): New.
12481 (x86_emit_ops): New.
12482 (the_low_target): Install x86_emit_ops.
12483 * server.h (struct emit_ops): New.
12484 (get_raw_reg_func_addr): Declare.
12485 (current_insn_ptr, emit_error): Declare.
12486 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12487 (set_trace_state_variable_value): New defines.
12488 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12489 addr_get_trace_state_variable_value and
12490 addr_set_trace_state_variable_value.
12491 (symbol_list): New fields for get_raw_reg,
12492 get_trace_state_variable_value and set_trace_state_variable_value.
12493 (condfn): New typedef.
12494 (struct tracepoint): New field `compiled_cond'.
12495 (do_action_at_tracepoint): Clear compiled_cond.
12496 (get_trace_state_variable_value, set_trace_state_variable_value):
12498 (condition_true_at_tracepoint): If there's a compiled condition,
12500 (current_insn_ptr, emit_error): New globals.
12501 (struct bytecode_address): New.
12502 (get_raw_reg_func_addr): New.
12503 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12504 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12505 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12506 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12507 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12508 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12509 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12510 (compile_tracepoint_condition, compile_bytecodes): New.
12511 * target.h (emit_ops): Forward declare.
12512 (struct target_ops): New field emit_ops.
12513 (target_emit_ops): New.
12514 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12515 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12516 * linux-low.c (linux_emit_ops): New.
12517 (linux_target_ops): Install it.
12518 * linux-low.h (struct linux_target_ops): New field emit_ops.
12520 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12522 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12523 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12525 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12526 Stan Shebs <stan@codesourcery.com>
12528 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12529 (all): Depend on $(extra_libraries).
12530 (install-only): Install the IPA.
12531 (IPA_OBJS, IPA_LIB): New.
12532 (clean): Remove the IPA lib.
12533 (IPAGENT_CFLAGS): New.
12534 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12535 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12536 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12537 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12538 * configure.ac: Check for atomic builtins support in the compiler.
12539 (IPA_DEPFILES, extra_libraries): Define.
12540 * configure.srv (ipa_obj): Add description.
12541 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12542 (i[34567]86-*-linux*): Set ipa_obj.
12543 (x86_64-*-linux*): Set ipa_obj.
12544 * linux-low.c (stabilizing_threads): New.
12545 (supports_fast_tracepoints): New.
12546 (linux_detach): Stabilize threads before detaching.
12547 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12548 the lwp is either not stabilizing, or is moving out of a jump pad.
12549 (linux_fast_tracepoint_collecting): New.
12550 (maybe_move_out_of_jump_pad): New.
12551 (enqueue_one_deferred_signal): New.
12552 (dequeue_one_deferred_signal): New.
12553 (linux_wait_for_event_1): If moving out of a jump pad, defer
12554 pending signals to later.
12555 (linux_stabilize_threads): New.
12556 (linux_wait_1): Check if threads need moving out of jump pads, and
12558 (stuck_in_jump_pad_callback): New.
12559 (move_out_of_jump_pad_callback): New.
12560 (lwp_running): New.
12561 (linux_resume_one_lwp): Handle moving out of jump pads.
12562 (linux_set_resume_request): Dequeue deferred signals.
12563 (need_step_over_p): Also step over fast tracepoint jumps.
12564 (start_step_over): Also uninsert fast tracepoint jumps.
12565 (finish_step_over): Also reinsert fast tracepoint jumps.
12566 (linux_install_fast_tracepoint_jump): New.
12567 (linux_target_ops): Install linux_stabilize_threads and
12568 linux_install_fast_tracepoint_jump_pad.
12569 * linux-low.h (linux_target_ops) <get_thread_area,
12570 install_fast_tracepoint_jump_pad>: New fields.
12571 (struct lwp_info) <collecting_fast_tracepoint,
12572 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12573 (linux_get_thread_area): Declare.
12574 * linux-x86-low.c (jump_insn): New.
12575 (x86_get_thread_area): New.
12576 (append_insns): New.
12577 (push_opcode): New.
12578 (amd64_install_fast_tracepoint_jump_pad): New.
12579 (i386_install_fast_tracepoint_jump_pad): New.
12580 (x86_install_fast_tracepoint_jump_pad): New.
12581 (the_low_target): Install x86_get_thread_area and
12582 x86_install_fast_tracepoint_jump_pad.
12583 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12584 (struct fast_tracepoint_jump): New.
12585 (fast_tracepoint_jump_insn): New.
12586 (fast_tracepoint_jump_shadow): New.
12587 (find_fast_tracepoint_jump_at): New.
12588 (fast_tracepoint_jump_here): New.
12589 (delete_fast_tracepoint_jump): New.
12590 (set_fast_tracepoint_jump): New.
12591 (uninsert_fast_tracepoint_jumps_at): New.
12592 (reinsert_fast_tracepoint_jumps_at): New.
12593 (set_breakpoint_at): Use write_inferior_memory.
12594 (uninsert_raw_breakpoint): Use write_inferior_memory.
12595 (check_mem_read): Mask out fast tracepoint jumps.
12596 (check_mem_write): Mask out fast tracepoint jumps.
12597 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12598 (set_fast_tracepoint_jump): Declare.
12599 (delete_fast_tracepoint_jump)
12600 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12601 (reinsert_fast_tracepoint_jumps_at): Declare.
12602 * regcache.c: Don't compile many functions when building the
12603 in-process agent library.
12604 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12605 the register buffer in the heap.
12606 (free_register_cache): If the register buffer isn't owned by the
12607 regcache, don't free it.
12608 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12609 pre-existing register caches.
12610 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12612 (convert_ascii_to_int): : Constify `from' parameter type.
12613 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12614 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12615 the needed buffer in-place.
12616 (relocate_instruction): New.
12617 * server.c (handle_query) <qSymbols>: If the target supports
12618 tracepoints, give it a chance of looking up symbols. Report
12619 support for fast tracepoints.
12620 (handle_status): Stabilize threads.
12621 (process_serial_event): Adjust.
12622 * server.h (struct fast_tracepoint_jump): Forward declare.
12623 (struct process_info) <fast_tracepoint_jumps>: New field.
12624 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12625 (decode_X_packet, decode_M_packet): Adjust.
12626 (relocate_instruction): Declare.
12627 (in_process_agent_loaded): Declare.
12628 (tracepoint_look_up_symbols): Declare.
12629 (struct fast_tpoint_collect_status): Declare.
12630 (fast_tracepoint_collecting): Declare.
12631 (force_unlock_trace_buffer): Declare.
12632 (handle_tracepoint_bkpts): Declare.
12633 (initialize_low_tracepoint)
12634 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12635 * target.h (struct target_ops) <stabilize_threads,
12636 install_fast_tracepoint_jump_pad>: New fields.
12637 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12638 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12639 [HAVE_STDINT_H]: Include stdint.h.
12640 (trace_debug_1): Rename to ...
12641 (trace_vdebug): ... this.
12642 (trace_debug): Rename to ...
12643 (trace_debug_1): ... this. Add `level' parameter.
12644 (trace_debug): New.
12645 (ATTR_USED, ATTR_NOINLINE): New.
12646 (IP_AGENT_EXPORT): New.
12647 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12648 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12649 (about_to_request_buffer_space, trace_buffer_is_full)
12650 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12651 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12652 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12653 (traceframe_write_count, traceframes_created)
12654 (trace_state_variables)
12655 New renaming defines.
12656 (struct ipa_sym_addresses): New.
12657 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12658 (symbol_list): New.
12659 (ipa_sym_addrs): New.
12660 (all_tracepoint_symbols_looked_up): New.
12661 (in_process_agent_loaded): New.
12662 (write_e_ipa_not_loaded): New.
12663 (maybe_write_ipa_not_loaded): New.
12664 (tracepoint_look_up_symbols): New.
12665 (debug_threads) [IN_PROCESS_AGENT]: New.
12666 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12667 (UNKNOWN_SIDE_EFFECTS): New.
12668 (stop_tracing): New.
12669 (flush_trace_buffer): New.
12670 (stop_tracing_bkpt): New.
12671 (flush_trace_buffer_bkpt): New.
12672 (read_inferior_integer): New.
12673 (read_inferior_uinteger): New.
12674 (read_inferior_data_pointer): New.
12675 (write_inferior_data_pointer): New.
12676 (write_inferior_integer): New.
12677 (write_inferior_uinteger): New.
12678 (struct collect_static_trace_data_action): Delete.
12679 (enum tracepoint_type): New.
12680 (struct tracepoint) <type>: New field `type'.
12681 <actions_str, step_actions, step_actions_str>: Only include in
12683 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12684 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12685 (tracepoints): Use IP_AGENT_EXPORT.
12686 (last_tracepoint): Don't include in the IPA.
12687 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12688 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12689 (alloced_trace_state_variables): New.
12690 (trace_state_variables): Use IP_AGENT_EXPORT.
12691 (traceframe_t): Delete unused variable.
12692 (circular_trace_buffer): Don't include in the IPA.
12693 (trace_buffer_start): Delete.
12694 (struct trace_buffer_control): New.
12695 (trace_buffer_free): Delete.
12696 (struct ipa_trace_buffer_control): New.
12697 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12698 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12700 (trace_buffer_ctrl): New.
12701 (TRACE_BUFFER_CTRL_CURR): New.
12702 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12703 Reimplement as macros.
12704 (trace_buffer_wrap): Delete.
12705 (traceframe_write_count, traceframe_read_count)
12706 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12707 (struct tracepoint_hit_ctx) <type>: New field.
12708 (struct fast_tracepoint_ctx): New.
12709 (memory_barrier): New.
12711 (record_tracepoint_error): Update atomically in the IPA.
12712 (clear_inferior_trace_buffer): New.
12713 (about_to_request_buffer_space): New.
12714 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12715 updating the same buffer.
12716 (add_tracepoint): Default the tracepoint's type to trap
12717 tracepoint, and orig_size to -1.
12718 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12719 internal variables.
12720 (create_trace_state_variable): New parameter `gdb'. Handle it.
12721 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12722 (cmd_qtdp): Handle fast tracepoints.
12723 (cmd_qtdv): Adjust.
12724 (max_jump_pad_size): New.
12725 (gdb_jump_pad_head): New.
12726 (get_jump_space_head): New.
12727 (claim_jump_space): New.
12728 (sort_tracepoints): New.
12729 (MAX_JUMP_SIZE): New.
12730 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12732 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12733 support. Upload fast traceframes, and delete internal IPA
12735 (stop_tracing_handler): New.
12736 (flush_trace_buffer_handler): New.
12737 (cmd_qtstop): Upload fast tracepoints.
12738 (response_tracepoint): Handle fast tracepoints.
12739 (tracepoint_finished_step): Upload fast traceframes. Set the
12740 tracepoint hit context's tracepoint type.
12741 (handle_tracepoint_bkpts): New.
12742 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12743 type. Add comment about fast tracepoints.
12744 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12745 non-existing action_str field.
12746 (get_context_regcache): Handle fast tracepoints.
12747 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12749 (fast_tracepoint_from_jump_pad_address): New.
12750 (fast_tracepoint_from_ipa_tpoint_address): New.
12751 (collecting_t): New.
12752 (force_unlock_trace_buffer): New.
12753 (fast_tracepoint_collecting): New.
12755 (gdb_collect): New.
12756 (write_inferior_data_ptr): New.
12757 (target_tp_heap): New.
12758 (target_malloc): New.
12759 (download_agent_expr): New.
12761 (download_tracepoints): New.
12762 (download_trace_state_variables): New.
12763 (upload_fast_traceframes): New.
12764 (IPA_FIRST_TRACEFRAME): New.
12765 (IPA_NEXT_TRACEFRAME_1): New.
12766 (IPA_NEXT_TRACEFRAME): New.
12767 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12768 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12769 (gdb_jump_pad_buffer_end): New.
12770 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12771 (initialize_tracepoint): Adjust.
12772 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12773 buffer. Initialize the low module.
12774 * utils.c (PREFIX, TOOLNAME): New.
12775 (malloc_failure): Use PREFIX.
12776 (error): In the IPA, an error causes an exit.
12777 (fatal, warning): Use PREFIX.
12778 (internal_error): Use TOOLNAME.
12779 (NUMCELLS): Increase to 10.
12780 * configure, config.in: Regenerate.
12782 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12784 * server.c (handle_query) <qSupported>: Do two passes over the
12785 qSupported string to avoid nesting strtok.
12787 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12789 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12791 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12792 -Wl,--dynamic-list.
12793 * configure: Regenerate.
12794 * proc-service.list: New.
12796 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12798 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12801 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12803 * gdbreplay.c (remote_open): Check error return from socket() call by
12804 its equality to -1 not by it being negative.
12805 * remote-utils.c (remote_open): Likewise.
12807 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12809 * config.h: Regenerate.
12811 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12813 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12814 doesn't provide PTRACE_GET_THREAD_AREA.
12816 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12818 * linux-m68k-low.c: Include <asm/ptrace.h>
12819 (ps_get_thread_area): Implement.
12821 2010-05-03 Doug Evans <dje@google.com>
12823 * event-loop.c (struct callback_event): New struct.
12824 (callback_list): New global.
12825 (append_callback_event, delete_callback_event): New functions.
12826 (process_callback): New function.
12827 (start_event_loop): Call it.
12828 * remote-utils.c (NOT_SCHEDULED): Define.
12829 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12830 moved out of readchar.
12831 (readchar): Rewrite. Call reschedule before returning.
12832 (reset_readchar): New function.
12833 (remote_close): Call it.
12834 (process_remaining, reschedule): New functions.
12835 * server.h (callback_handler_func): New typedef.
12836 (append_callback_event, delete_callback_event): Declare.
12838 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12840 * proc-service.c (ps_pglobal_lookup): Use
12841 thread_db_look_up_one_symbol.
12842 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12843 parameter. Use it instead of all_symbols_looked_up.
12844 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12846 (all_symbols_looked_up): Don't declare.
12847 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12848 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12850 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12851 Set all_symbols_looked_up here.
12852 (thread_db_look_up_one_symbol): New.
12853 (thread_db_get_tls_address): Adjust.
12854 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12855 thread_db object on the heap, and tentatively set it in the
12857 (thread_db_init): Don't set all_symbols_looked_up here.
12858 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12860 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12862 * linux-low.c (linux_kill, linux_detach): Adjust.
12863 (status_pending_p_callback): Remove redundant statement. Check
12864 for !TARGET_WAITIKIND_IGNORE, instead of
12865 TARGET_WAITKIND_STOPPED.
12866 (handle_tracepoints): Make sure LWP is locked. Adjust.
12867 (linux_wait_for_event_1): Adjust.
12868 (linux_cancel_breakpoints): New.
12869 (unsuspend_one_lwp): New.
12870 (unsuspend_all_lwps): New.
12871 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12872 (send_sigstop_callback): Change return type to int, add new
12873 `except' parameter and handle it.
12874 (suspend_and_send_sigstop_callback): New.
12875 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12876 pass them down. If SUSPEND, also increment the lwp's suspend
12878 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12879 (need_step_over_p): Don't consider suspended LWPs.
12880 (start_step_over): Adjust.
12881 (proceed_one_lwp): Change return type to int, add new `except'
12882 parameter and handle it.
12883 (unsuspend_and_proceed_one_lwp): New.
12884 (proceed_all_lwps): Use find_inferior instead of
12886 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12887 also decrement the suspend count of LWPs. Pass `except' down,
12888 instead of hacking its suspend count.
12889 (linux_pause_all): Add `freeze' parameter. Adjust.
12890 (linux_unpause_all): New.
12891 (linux_target_ops): Install linux_unpause_all.
12892 * server.c (handle_status): Adjust.
12893 * target.h (struct target_ops): New fields `unpause_all' and
12894 `cancel_breakpoints'. Add new parameter to `pause_all'.
12895 (pause_all): Add new `freeze' parameter.
12896 (unpause_all): New.
12897 (cancel_breakpoints): New.
12898 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12899 cancel breakpoints.
12900 (cmd_qtstart): Pause threads.
12901 (stop_tracing): Pause threads, and cancel breakpoints.
12902 * win32-low.c (win32_target_ops): Adjust.
12904 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12906 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12907 the inferior right away from here...
12908 (linux_wait_1): ... to here, and adjust to check the thread's
12909 last_resume_kind instead of the lwp's step or stop_expected flags.
12911 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12913 * README: Use consistent `GDB' and `GDBserver' spellings.
12915 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12917 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12918 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12919 (linux_detach_one_lwp): Assume the lwp is stopped.
12920 (any_thread_of): Delete.
12921 (linux_detach): Stop all lwps here. Don't blindly delete all
12923 (delete_lwp_callback): New.
12924 (linux_mourn): Delete all lwps of the process that is gone.
12925 (linux_wait_1): Don't delete the last lwp of the process here.
12926 * mem-break.h (mark_breakpoints_out): Declare.
12927 * mem-break.c (mark_breakpoints_out): New.
12928 (free_all_breakpoints): Use it.
12929 * server.c (handle_target_event): If the process is gone, mark
12931 * thread-db.c (struct thread_db) <create_bp>: New field.
12932 (thread_db_enable_reporting): Fix prototype. Store a thread event
12933 breakpoint reference in the thread_db struct.
12934 (thread_db_load_search): Clear the thread_db object.
12935 (try_thread_db_load_1): Ditto.
12936 (switch_to_process): New.
12937 (disable_thread_event_reporting): Use it.
12938 (remove_thread_event_breakpoints): New.
12939 (thread_db_detach, thread_db_mourn): Use it.
12941 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12943 * linux-low.c (linux_enable_event_reporting): New.
12944 (linux_wait_for_event_1, handle_extended_wait): Use it.
12946 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12948 * linux-low.c (linux_kill_one_lwp, linux_kill)
12949 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12950 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12951 SIGSTOP even if the LWP is stopped.
12952 (send_sigstop_callback): New.
12953 (stop_all_lwps): Use send_sigstop_callback instead.
12954 (linux_resume_one_thread): Adjust.
12955 (proceed_one_lwp): Still proceed an LWP that the client has
12956 requested to stop, if we haven't reported it as stopped yet. Make
12957 sure that LWPs the client want stopped, have a pending SIGSTOP.
12959 2010-04-26 Doug Evans <dje@google.com>
12961 * server.c (handle_general_set): Make static.
12963 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12964 Print received char after testing for error/eof instead of before.
12965 (input_interrupt): Tweak comment.
12967 2010-04-23 Doug Evans <dje@google.com>
12969 * server.c (start_inferior): Print inferior argv if --debug.
12971 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12973 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12974 * nto-x86-low.c: Include server.h
12976 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12978 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12979 be consistent with other sources of this directory.
12980 (init_registers_amd64): Correct name of source file of this function
12983 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12985 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12986 64-bit executables.
12988 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12990 * win32-i386-low.c: Add 64-bit support.
12991 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12992 (init_registers_amd64): Declare.
12993 (mappings): Add 64-bit version of array.
12994 (init_windows_x86): New function.
12995 (the_low_target): Change init_arch field to init_windows_x86.
12997 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12999 * win32-low.c: Adapt to support also 64-bit architecture.
13000 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13001 (get_image_name): Use SIZE_T type for local variable `done'.
13002 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13003 (toolhelp_get_dll_name): Idem.
13004 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13005 Use uintptr_t typecast to avoid warning.
13006 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13007 (handle_exception): Use phex_nz to avoid warning.
13008 (win32_wait): Remove unused local variable `process'.
13010 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13012 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13015 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13017 * configure.ac: Use `ws2_32' library for srv_mingw.
13018 * configure: Regenerate.
13019 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13020 * remote-utils.c: Likewise.
13022 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13024 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13025 if __x86_64__ is defined.
13027 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13029 * configure: Regenerate.
13031 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13033 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13034 * target.h (target_ops): New get_tib_address field.
13035 * win32-low.h (win32_thread_info): Add thread_local_base field.
13036 * win32-low.c (child_add_thread): Add tlb argument.
13037 Set thread_local_base field to TLB.
13038 (get_child_debug_event): Adapt to child_add_thread change.
13039 (win32_get_tib_address): New function.
13040 (win32_target_ops): Set get_tib_address field to
13041 win32_get_tib_address.
13042 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13044 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13046 * linux-low.c (linux_mourn): Also remove the process.
13047 * server.c (handle_target_event): Don't remove the process here.
13048 * nto-low.c (nto_mourn): New.
13049 (nto_target_ops): Install it.
13050 * spu-low.c (spu_mourn): New.
13051 (spu_target_ops): Install it.
13052 * win32-low.c (win32_mourn): New.
13053 (win32_target_ops): Install it.
13055 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13057 * server.h (buffer_xml_printf): Remove redundant `;'.
13059 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13061 * regcache.c (set_register_cache): Invalidate regcaches before
13062 changing the register cache layout.
13063 (regcache_invalidate_one): Allow a NULL regcache.
13064 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13065 regcaches before changing the register cache layout or the target
13068 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13070 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13071 variable warning on Linux/x86-64.
13073 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13075 GDBserver disconnected tracing support.
13077 * linux-low.c (linux_remove_process): Delete.
13078 (add_lwp): Don't set last_resume_kind here.
13079 (linux_kill): Use `mourn'.
13080 (linux_detach): Use `thread_db_detach', and `mourn'.
13081 (linux_mourn): New.
13082 (linux_attach_lwp_1): Adjust comment.
13083 (linux_attach): last_resume_kind moved the thread_info; adjust.
13084 (status_pending_p_callback): Adjust.
13085 (linux_wait_for_event_1): Adjust.
13086 (count_events_callback, select_singlestep_lwp_callback)
13087 (select_event_lwp_callback, cancel_breakpoints_callback)
13088 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13089 (proceed_one_lwp): Adjust.
13090 (linux_async): Add debug output.
13091 (linux_thread_stopped): New.
13092 (linux_pause_all): New.
13093 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13095 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13096 (thread_db_free): Delete declaration.
13097 (thread_db_detach, thread_db_mourn): Declare.
13098 * thread-db.c (thread_db_init): Use thread_db_mourn.
13099 (thread_db_free): Delete, split in two.
13100 (disable_thread_event_reporting): New.
13101 (thread_db_detach): New.
13102 (thread_db_mourn): New.
13104 * server.h (struct thread_info) <last_resume_kind>: New field.
13105 <attached>: Add comment.
13106 <gdb_detached>: New field.
13107 (handler_func): Change return type to int.
13108 (handle_serial_event, handle_target_event): Ditto.
13109 (gdb_connected): Declare.
13111 (disconnected_tracing): Declare.
13112 (stop_tracing): Declare.
13114 * server.c (handle_query) <qSupported>: Report support for
13115 disconnected tracing.
13116 (queue_stop_reply_callback): Account for running threads.
13117 (gdb_wants_thread_stopped): New.
13118 (gdb_wants_all_threads_stopped): New.
13119 (gdb_reattached_process): New.
13120 (handle_status): Clear the `gdb_detached' flag of all processes.
13121 In all-stop, stop all threads.
13122 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13123 (process_serial_event): If the remote connection breaks, or if an
13124 exit was forced with "monitor exit", force an event loop exit.
13125 Handle disconnected tracing on detach.
13126 (handle_serial_event): Adjust.
13127 (handle_target_event): If GDB isn't connected, forward events back
13128 to the inferior, unless the last process exited, in which case,
13129 exit gdbserver. Adjust interface.
13131 * remote-utils.c (remote_open): Don't block in accept. Instead
13132 register an event loop source on the listen socket file
13133 descriptor. Refactor bits into ...
13134 (listen_desc): ... this new global.
13135 (gdb_connected): ... this new function.
13136 (enable_async_notification): ... this new function.
13137 (handle_accept_event): ... this new function.
13138 (remote_close): Clear remote_desc.
13140 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13142 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13144 (mourn_inferior): Define.
13145 (target_process_qsupported): Avoid the dangling else problem.
13146 (thread_stopped): Define.
13147 (pause_all): Define.
13148 (target_waitstatus_to_string): Declare.
13149 * target.c (target_waitstatus_to_string): New.
13151 * tracepoint.c (tracing): Make extern.
13152 (disconnected_tracing): New.
13153 (stop_tracing): Make extern. Handle tracing stops due to GDB
13155 (cmd_qtdisconnected): New.
13156 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13157 (handle_tracepoint_general_set): Handle QTDisconnected.
13159 * event-loop.c (event_handler_func): Change return type to int.
13160 (process_event): Bail out if the event handler wants the event
13162 (handle_file_event): Ditto.
13163 (start_event_loop): Bail out if the event handler wants the event
13166 * nto-low.c (nto_target_ops): Adjust.
13167 * spu-low.c (spu_wait): Don't remove the process here.
13168 (spu_target_ops): Adjust.
13169 * win32-low.c (win32_wait): Don't remove the process here.
13170 (win32_target_ops): Adjust.
13172 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13174 * regcache.c (realloc_register_cache): Invalidate inferior's
13175 regcache before recreating it.
13177 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13179 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13181 2010-04-09 Stan Shebs <stan@codesourcery.com>
13182 Pedro Alves <pedro@codesourcery.com>
13184 * server.h (LONGEST): New.
13185 (struct thread_info) <while_stepping>: New field.
13186 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13188 (initialize_tracepoint, handle_tracepoint_general_set)
13189 (handle_tracepoint_query, tracepoint_finished_step)
13190 (tracepoint_was_hit, release_while_stepping_state_list):
13191 (current_traceframe): Declare.
13192 * server.c (handle_general_set): Handle tracepoint packets.
13193 (read_memory): New.
13194 (write_memory): New.
13195 (handle_search_memory_1): Use read_memory.
13196 (handle_query): Report support for conditional tracepoints, trace
13197 state variables, and tracepoint sources. Handle tracepoint
13199 (main): Initialize the tracepoints module.
13200 (process_serial_event): Handle traceframe reads/writes.
13202 * linux-low.c (handle_tracepoints): New.
13203 (linux_wait_1): Call it.
13204 (linux_resume_one_lwp): Handle while-stepping.
13205 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13206 (linux_target_ops): Install them.
13207 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13209 * linux-x86-low.c (x86_supports_tracepoints): New.
13210 (the_low_target). Install it.
13212 * mem-break.h (delete_breakpoint): Declare.
13213 * mem-break.c (delete_breakpoint): Make external.
13215 * target.h (struct target_ops): Add `supports_tracepoints',
13216 `read_pc', and `write_pc' fields.
13217 (target_supports_tracepoints): Define.
13218 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13221 * regcache.h (struct regcache) <registers_owned>: New field.
13222 (init_register_cache, regcache_cpy): Declare.
13223 (regcache_read_pc, regcache_write_pc): Declare.
13224 (register_cache_size): Declare.
13225 (supply_regblock): Declare.
13226 * regcache.c (init_register_cache): New.
13227 (new_register_cache): Use it.
13228 (regcache_cpy): New.
13229 (register_cache_size): New.
13230 (supply_regblock): New.
13231 (regcache_read_pc, regcache_write_pc): New.
13233 * tracepoint.c: New.
13235 * Makefile.in (OBS): Add tracepoint.o.
13236 (tracepoint.o): New rule.
13238 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13240 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13242 (i386-mmx.c): Likewise.
13243 (i386-mmx-linux.o): Likewise.
13244 (i386-mmx-linux.c): Likewise.
13246 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13247 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13248 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13249 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13251 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13252 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13253 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13255 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13257 * Makefile.in (clean): Updated.
13259 (i386-avx.c): Likewise.
13260 (i386-avx-linux.o): Likewise.
13261 (i386-avx-linux.c): Likewise.
13262 (amd64-avx.o): Likewise.
13263 (amd64-avx.c): Likewise.
13264 (amd64-avx-linux.o): Likewise.
13265 (amd64-avx-linux.c): Likewise.
13267 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13268 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13269 (srv_amd64_regobj): Add amd64-avx.o.
13270 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13271 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13272 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13273 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13274 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13275 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13276 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13278 * i387-fp.c: Include "i386-xstate.h".
13280 (i387_cache_to_xsave): Likewise.
13281 (i387_xsave_to_cache): Likewise.
13282 (x86_xcr0): Likewise.
13284 * i387-fp.h (i387_cache_to_xsave): Likewise.
13285 (i387_xsave_to_cache): Likewise.
13286 (x86_xcr0): Likewise.
13288 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13289 * linux-crisv32-low.c (target_regsets): Likewise.
13290 * linux-m68k-low.c (target_regsets): Likewise.
13291 * linux-mips-low.c (target_regsets): Likewise.
13292 * linux-ppc-low.c (target_regsets): Likewise.
13293 * linux-s390-low.c (target_regsets): Likewise.
13294 * linux-sh-low.c (target_regsets): Likewise.
13295 * linux-sparc-low.c (target_regsets): Likewise.
13296 * linux-xtensa-low.c (target_regsets): Likewise.
13298 * linux-low.c: Include <sys/uio.h>.
13299 (regsets_fetch_inferior_registers): Support nt_type.
13300 (regsets_store_inferior_registers): Likewise.
13301 (linux_process_qsupported): New.
13302 (linux_target_ops): Add linux_process_qsupported.
13304 * linux-low.h (regset_info): Add nt_type.
13305 (linux_target_ops): Add process_qsupported.
13307 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13309 (init_registers_i386_avx_linux): New.
13310 (init_registers_amd64_avx_linux): Likewise.
13311 (xmltarget_i386_linux_no_xml): Likewise.
13312 (xmltarget_amd64_linux_no_xml): Likewise.
13313 (PTRACE_GETREGSET): Likewise.
13314 (PTRACE_SETREGSET): Likewise.
13315 (x86_fill_xstateregset): Likewise.
13316 (x86_store_xstateregset): Likewise.
13317 (use_xml): Likewise.
13318 (x86_linux_update_xmltarget): Likewise.
13319 (x86_linux_process_qsupported): Likewise.
13320 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13321 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13322 init_registers_i386_linux here. Call
13323 x86_linux_update_xmltarget.
13324 (the_low_target): Add x86_linux_process_qsupported.
13326 * server.c (handle_query): Call target_process_qsupported.
13328 * target.h (target_ops): Add process_qsupported.
13329 (target_process_qsupported): New.
13331 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13333 * inferiors.c (add_thread): Set last_status kind to
13334 TARGET_WAITKIND_IGNORE.
13335 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13336 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13337 (linux_wait_1): Move `thread' local definition to block that uses
13338 it. Don't NULL initialize `event_child'.
13339 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13340 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13341 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13343 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13345 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13346 an extended waitstatus, or by a watchpoint.
13347 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13348 thread was stepping or has been stopped by a watchpoint.
13350 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13352 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13353 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13354 of another, then delete the previous, and validate all
13356 (validate_inserted_breakpoint): New.
13357 (delete_disabled_breakpoints): New.
13358 (validate_breakpoints): New.
13359 (check_mem_read): Validate breakpoints before trusting their
13360 shadow. Delete disabled breakpoints.
13361 (check_mem_write): Validate breakpoints before trusting they
13362 should be inserted. Delete disabled breakpoints.
13363 * mem-break.h (validate_breakpoints):
13364 * server.c (handle_query): Validate breakpoints when we see a
13367 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13369 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13370 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13371 if we could tell there's a GDB breakpoint at stop_pc.
13372 (need_step_over_p): Don't do a step over if we find a GDB
13373 breakpoint at the resume PC.
13375 * mem-break.c (struct raw_breakpoint): New.
13376 (enum bkpt_type): New type `gdb_breakpoint'.
13377 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13378 fields. New field `raw'.
13379 (find_raw_breakpoint_at): New.
13380 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13381 breakpoint instead.
13382 (set_breakpoint_at): Adjust.
13383 (delete_raw_breakpoint): New.
13384 (release_breakpoint): New.
13385 (delete_breakpoint): Rename to...
13386 (delete_breakpoint_1): ... this. Add proc parameter. Use
13387 release_breakpoint. Return ENOENT.
13388 (delete_breakpoint): Reimplement.
13389 (find_breakpoint_at): Delete.
13390 (find_gdb_breakpoint_at): New.
13391 (delete_breakpoint_at): Delete.
13392 (set_gdb_breakpoint_at): New.
13393 (delete_gdb_breakpoint_at): New.
13394 (gdb_breakpoint_here): New.
13395 (set_reinsert_breakpoint): Use release_breakpoint.
13396 (uninsert_breakpoint): Rename to ...
13397 (uninsert_raw_breakpoint): ... this.
13398 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13399 (reinsert_raw_breakpoint): Change parameter type to
13401 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13403 (check_breakpoints): Adjust. Use release_breakpoint.
13404 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13405 (breakpoint_inserted_here): Ditto.
13406 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13407 Don't trust the breakpoint's shadow if it is not inserted.
13408 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13409 (delete_all_breakpoints): Adjust.
13410 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13411 use delete_breakpoint_1.
13413 * mem-break.h (breakpoints_supported): Delete declaration.
13414 (set_gdb_breakpoint_at): Declare.
13415 (gdb_breakpoint_here): Declare.
13416 (delete_breakpoint_at): Delete.
13417 (delete_gdb_breakpoint_at): Declare.
13419 * server.h (struct raw_breakpoint): Forward declare.
13420 (struct process_info): New field `raw_breakpoints'.
13422 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13425 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13427 * linux-low.c (status_pending_p_callback): Fix comment.
13428 (linux_wait_for_event_1): Move most of the internal breakpoint
13429 handling from here...
13430 (linux_wait_1): ... to here.
13431 (count_events_callback): New.
13432 (select_singlestep_lwp_callback): New.
13433 (select_event_lwp_callback): New.
13434 (cancel_breakpoints_callback): New.
13435 (select_event_lwp): New.
13436 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13437 priority to all LWPs that have had events that should be reported
13438 to the client. Cancel breakpoints when about to reporting the
13439 event to the client, not while stopping lwps. No longer cancel
13440 finished single-steps here.
13441 (cancel_finished_single_step): Delete.
13442 (cancel_finished_single_steps): Delete.
13444 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13446 * mem-break.c (enum bkpt_type): New.
13447 (struct breakpoint): New field `type'.
13448 (set_breakpoint_at): Change return type to struct breakpoint
13449 pointer. Set type to `other_breakpoint' by default.
13450 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13451 in the breakpoint list.
13452 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13453 (reinsert_breakpoint): Rename to ...
13454 (reinsert_raw_breakpoint): ... this.
13455 (reinsert_breakpoints_at): Adjust.
13456 * mem-break.h (struct breakpoint): Declare.
13457 (set_breakpoint_at): Change return type to struct breakpoint
13460 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13462 * server.c (handle_query): Assign, not compare.
13464 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13466 Teach linux gdbserver to step-over-breakpoints.
13468 * linux-low.c (can_hardware_single_step): New.
13469 (supports_breakpoints): New.
13470 (handle_extended_wait): If stopping threads, read the stop pc of
13471 the new cloned LWP.
13473 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13474 low target doesn't support retrieving the PC.
13475 (add_lwp): Set last_resume_kind to resume_continue.
13476 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13477 (linux_attach): Don't clear stop_expected. Set the lwp's
13478 last_resume_kind to resume_stop.
13479 (linux_detach_one_lwp): Don't check for removed breakpoints.
13480 (check_removed_breakpoint): Delete.
13481 (status_pending_p): Rename to ...
13482 (status_pending_p_callback): ... this. Don't check for removed
13483 breakpoints. Don't consider threads that are stopped from GDB's
13485 (linux_wait_for_lwp): Always read the stop_pc here.
13486 (cancel_breakpoint): New.
13487 (step_over_bkpt): New global.
13488 (linux_wait_for_event_1): Implement stepping over breakpoints.
13489 (gdb_wants_lwp_stopped): New.
13490 (gdb_wants_all_stopped): New.
13491 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13492 single-step traps here. Store the thread's last reported target
13494 (send_sigstop): Don't clear stop_expected. Always set it,
13496 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13497 (cancel_finished_single_step): New.
13498 (cancel_finished_single_steps): New.
13499 (wait_for_sigstop): Don't cancel finished single-step traps here.
13500 (linux_resume_one_lwp): Don't check for removed breakpoints.
13501 Don't set `step' on non-hardware step archs.
13502 (linux_set_resume_request): Ignore resume_stop requests if already
13503 stopping or stopped. Set the lwp's last_resume_kind.
13504 (resume_status_pending_p): Don't check for removed breakpoints.
13505 (need_step_over_p): New.
13506 (start_step_over): New.
13507 (finish_step_over): New.
13508 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13509 requests. Clear the thread's last reported target waitstatus.
13510 Don't use the `suspended' flag. Don't consider pending breakpoints.
13511 (linux_resume): Start a step-over if necessary.
13512 (proceed_one_lwp): New.
13513 (proceed_all_lwps): New.
13514 (unstop_all_lwps): New.
13515 * linux-low.h (struct lwp_info): Rewrite comment for the
13516 `suspended' flag. Add the `stop_pc' field. Delete the
13517 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13518 Add `'last_resume_kind' and `need_step_over' fields.
13519 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13520 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13521 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13522 (set_raw_breakpoint_at): New.
13523 (set_breakpoint_at): Rewrite to use it.
13524 (reinsert_breakpoint_handler): Delete.
13525 (set_reinsert_breakpoint): New.
13526 (reinsert_breakpoint_by_bp): Delete.
13527 (delete_reinsert_breakpoints): New.
13528 (uninsert_breakpoint): Rewrite.
13529 (uninsert_breakpoints_at): New.
13530 (reinsert_breakpoint): Rewrite.
13531 (reinsert_breakpoints_at): New.
13532 (check_breakpoints): Rewrite.
13533 (breakpoint_here): New.
13534 (breakpoint_inserted_here): New.
13535 (check_mem_read): Adjust.
13536 * mem-break.h (breakpoints_supported, breakpoint_here)
13537 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13538 (reinsert_breakpoint_by_bp): Delete declaration.
13539 (delete_reinsert_breakpoints): Declare.
13540 (reinsert_breakpoint): Delete declaration.
13541 (reinsert_breakpoints_at): Declare.
13542 (uninsert_breakpoint): Delete declaration.
13543 (uninsert_breakpoints_at): Declare.
13544 (check_breakpoints): Adjust prototype.
13545 * server.h: Adjust include order.
13546 (struct thread_info): Declare here. Add a `last_status' field.
13548 2010-03-23 Michael Snyder <msnyder@vmware.com>
13550 * server.c (crc32): New function.
13551 (handle_query): Add handling for 'qCRC:' request.
13553 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13555 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13556 lwp had been stopped by a watchpoint.
13558 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13560 * server.h (internal_error): Declare.
13561 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13562 * utils.c (internal_error): New function.
13564 2010-03-15 Andreas Schwab <schwab@redhat.com>
13566 * configure.srv: Fix typo setting srv_regobj.
13568 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13570 * linux-low.c (fetch_register): Avoid passing a non string literal
13572 (usr_store_inferior_registers): Ditto.
13574 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13576 * linux-low.c (linux_write_memory): Bail out early if peeking
13579 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13581 * linux-low.h (struct lwp_info): New fields
13582 `stopped_by_watchpoint' and `stopped_data_address'.
13583 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13584 here, and cache them in the lwp object.
13585 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13587 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13589 (linux_stopped_by_watchpoint): Rewrite.
13590 (linux_stopped_data_address): Rewrite.
13592 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13594 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13595 switching the current inferior, not before.
13597 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13599 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13600 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13601 i386-linux.c and amd64-linux.c.
13602 (reg-i386.o): Removed.
13603 (reg-i386.c): Likewise.
13604 (reg-i386-linux.o): Likewise.
13605 (reg-i386-linux.c): Likewise.
13606 (reg-x86-64.o): Likewise.
13607 (reg-x86-64.c): Likewise.
13608 (reg-x86-64-linux.o): Likewise.
13609 (reg-x86-64-linux.c): Likewise.
13611 (i386.c): Likewise.
13612 (i386-linux.o): Likewise.
13613 (i386-linux.c): Likewise.
13614 (amd64.o): Likewise.
13615 (amd64.c): Likewise.
13616 (amd64-linux.o): Likewise.
13617 (amd64-linux.c): Likewise.
13619 * configure.srv (srv_i386_regobj): New.
13620 (srv_i386_linux_regobj): Likewise.
13621 (srv_amd64_regobj): Likewise.
13622 (srv_amd64_linux_regobj): Likewise.
13623 (srv_i386_32bit_xmlfiles): Likewise.
13624 (srv_i386_64bit_xmlfiles): Likewise.
13625 (srv_i386_xmlfiles): Likewise.
13626 (srv_amd64_xmlfiles): Likewise.
13627 (srv_i386_linux_xmlfiles): Likewise.
13628 (srv_amd64_linux_xmlfiles): Likewise.
13629 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13630 srv_xmlfiles to $srv_i386_xmlfiles.
13631 (i[34567]86-*-mingw32ce*): Likewise.
13632 (i[34567]86-*-mingw*): Likewise.
13633 (i[34567]86-*-nto*): Likewise.
13634 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13635 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13636 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13637 (x86_64-*-linux*): Likewise.
13639 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13640 (init_registers_amd64_linux): New.
13641 (x86_arch_setup): Replace init_registers_x86_64_linux with
13642 init_registers_amd64_linux.
13644 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13646 * configure.ac: Check for libdl. If it is not available link against
13647 static libthread_db.
13648 * configure: Regenerate.
13650 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13654 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13655 handing a read watchpoint.
13656 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13658 2010-02-12 Doug Evans <dje@google.com>
13660 * linux-low.c (linux_supports_tracefork_flag): Document.
13661 (linux_look_up_symbols): Add comment.
13663 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13665 * regcache.c (supply_register): Clear regcache if buf is NULL.
13667 2010-02-02 Nicolas Roche <roche@sourceware.org>
13668 Joel Brobecker <brobecker@adacore.com>
13670 * inferiors.c (find_inferior): Add function documentation.
13671 (unloaded_dll): Handle the case where the unloaded dll has not
13672 been previously registered in the dll list.
13674 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13676 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13677 (thumb2_breakpoint): New.
13678 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13680 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13682 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13683 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13686 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13688 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13690 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13692 * linux-s390-low.c (s390_collect_ptrace_register)
13693 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13695 2010-01-21 Doug Evans <dje@google.com>
13697 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13698 (PTRACE_ARG4_TYPE): New macro.
13699 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13700 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13701 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13702 (usr_store_inferior_registers): Ditto.
13703 (linux_read_memory, linux_write_memory): Ditto.
13704 (linux_test_for_tracefork): Ditto.
13706 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13707 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13709 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13711 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13714 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13716 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13717 prototype to take a regcache. Adjust.
13719 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13721 * regcache.h (struct thread_info): Forward declare.
13722 (struct regcache): New.
13723 (new_register_cache): Adjust prototype.
13724 (get_thread_regcache): Declare.
13725 (free_register_cache): Adjust prototype.
13726 (registers_to_string, registers_from_string): Ditto.
13727 (supply_register, supply_register_by_name, collect_register)
13728 (collect_register_as_string, collect_register_by_name): Ditto.
13729 * regcache.c (struct inferior_regcache_data): Delete.
13730 (get_regcache): Rename to ...
13731 (get_thread_regcache): ... this. Adjust. Switch inferior before
13732 fetching registers.
13733 (regcache_invalidate_one): Adjust.
13734 (regcache_invalidate): Fix prototype.
13735 (new_register_cache): Return the new register cache.
13736 (free_register_cache): Change prototype.
13737 (realloc_register_cache): Adjust.
13738 (registers_to_string): Change prototype to take a regcache. Adjust.
13739 (registers_from_string): Ditto.
13740 (register_data): Ditto.
13741 (supply_register): Ditto.
13742 (supply_register_by_name): Ditto.
13743 (collect_register): Ditto.
13744 (collect_register_as_string): Ditto.
13745 (collect_register_by_name): Ditto.
13746 * server.c (process_serial_event): Adjust.
13747 * linux-low.h (regset_fill_func, regset_store_func): Change
13749 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13751 * linux-low.c (get_stop_pc): Adjust.
13752 (check_removed_breakpoint): Adjust.
13753 (linux_wait_for_event): Adjust.
13754 (linux_resume_one_lwp): Adjust.
13755 (fetch_register): Add regcache parameter. Adjust.
13756 (usr_store_inferior_registers): Ditto.
13757 (regsets_fetch_inferior_registers): Ditto.
13758 (regsets_store_inferior_registers): Ditto.
13759 (linux_fetch_registers, linux_store_registers): Ditto.
13760 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13762 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13764 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13765 prototype to take a regcache.
13766 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13767 * remote-utils.c (convert_ascii_to_int, outreg)
13768 (prepare_resume_reply): Change prototype to take a regcache.
13770 * target.h (struct target_ops) <fetch_registers, store_registers>:
13771 Change prototype to take a regcache.
13772 (fetch_inferior_registers, store_inferior_registers): Change
13773 prototype to take a regcache. Adjust.
13774 * proc-service.c (ps_lgetregs): Adjust.
13775 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13776 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13777 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13778 take a regcache. Adjust.
13779 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13780 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13781 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13782 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13783 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13784 (cris_cannot_fetch_register):
13785 (cris_breakpoint_at): Change prototype to take a regcache.
13787 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13788 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13789 to take a regcache. Adjust.
13790 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13792 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13793 take a regcache. Adjust.
13794 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13795 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13796 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13797 * linux-mips-low.c (mips_get_pc):
13798 (mips_set_pc): Change prototype to take a regcache. Adjust.
13799 (mips_reinsert_addr): Adjust.
13800 (mips_collect_register): Change prototype to take a regcache.
13802 (mips_supply_register):
13803 (mips_collect_register_32bit, mips_supply_register_32bit)
13804 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13805 (mips_store_fpregset): Ditto.
13806 * linux-ppc-low.c (ppc_supply_ptrace_register)
13807 (ppc_supply_ptrace_register): Ditto.
13808 (parse_spufs_run): Adjust.
13809 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13810 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13811 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13812 take a regcache. Adjust.
13813 * linux-s390-low.c (s390_collect_ptrace_register)
13814 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13815 (s390_set_pc): Change prototype to take a regcache. Adjust.
13816 (s390_arch_setup): Adjust.
13817 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13818 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13819 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13820 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13821 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13823 (sparc_breakpoint_at): Adjust.
13824 * linux-xtensa-low.c (xtensa_fill_gregset):
13825 (xtensa_store_gregset):
13826 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13827 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13828 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13829 prototype to take a regcache. Adjust.
13830 * win32-arm-low.c (arm_fetch_inferior_register)
13831 (arm_store_inferior_register): Change prototype to take a
13833 * win32-i386-low.c (i386_fetch_inferior_register)
13834 (i386_store_inferior_register): Change prototype to take a
13836 * win32-low.c (child_fetch_inferior_registers)
13837 (child_store_inferior_registers): Change prototype to take a
13839 (win32_wait): Adjust.
13840 (win32_fetch_inferior_registers): Change prototype to take a
13842 (win32_store_inferior_registers): Adjust.
13843 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13844 store_inferior_register>: Change prototype to take a regcache.
13846 2010-01-20 Doug Evans <dje@google.com>
13848 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13850 (linux_wait_for_event1, linux_init_signals): Ditto.
13851 (W_STOPCODE): Provide definition if missing.
13853 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13855 * linux-low.c (linux_core_of_thread): New.
13856 (compare_ints, show_process, list_threads): New.
13857 (linux_qxfer_osdata): Report threads and cores.
13858 (linux_target_op): Register linux_core_of_thread.
13859 * remote-utils.c (prepare_resume_reply): Report the core.
13860 (buffer_xml_printf): Support %d specifier.
13861 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13863 (handle_query): Handle qXfer:threads. Announce availability
13865 * target.h (struct target_ops): New field core_of_thread.
13867 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13869 * Makefile.in (clean): Remove new generated files.
13870 (reg-s390.o, reg-s390.c): Remove rules.
13871 (reg-s390x.o, reg-s390x.c): Likewise.
13872 (s390-linux32.o, s390-linux32.c): Add rules.
13873 (s390-linux64.o, s390-linux64.c): Likewise.
13874 (s390x-linux64.o, s390x-linux64.c): Likewise.
13875 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13876 * linux-s390-low.c: Include <elf.h>.
13877 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13878 (init_registers_s390): Remove prototype.
13879 (init_registers_s390x): Likewise.
13880 (init_registers_s390_linux32): Add prototype.
13881 (init_registers_s390_linux64): Likewise.
13882 (init_registers_s390x_linux64): Likewise.
13883 (s390_num_regs_3264): New define.
13884 (s390_regmap_3264): New global variable.
13885 (s390_cannot_fetch_register): Remove obsolete check.
13886 (s390_cannot_store_register): Likewise.
13887 (s390_collect_ptrace_register): Handle upper/lower register halves.
13888 (s390_supply_ptrace_register): Likewise.
13889 (s390_fill_gregset): Update to register number changes.
13890 (s390_get_hwcap): New routine.
13891 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13892 Install appropriate regmap and register set.
13894 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13896 * server.c (gdbserver_version): Update copyright year to 2010.
13897 * gdbreplay.c (gdbreplay_version): Likewise.
13899 2009-12-28 Doug Evans <dje@google.com>
13901 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13902 elf/external.h. Include <elf.h> instead but only if necessary.
13904 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13906 * linux-low.c (linux_remove_process): Remove `detaching'
13907 parameter. Don't release/detach from thread_db here.
13908 (linux_kill): Release/detach from thread_db here, ...
13909 (linux_detach): ... and here, before actually detaching.
13910 (linux_wait_1): ... and here, when a process exits.
13911 * thread-db.c (any_thread_of): New.
13912 (thread_db_free): Switch the current inferior to a thread of the
13915 2009-12-21 Doug Evans <dje@google.com>
13917 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13919 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13920 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13921 warning ifndef __NR_tkill. Move setting of errno there too.
13922 Delete unnecessary resetting of errno after syscall.
13923 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13925 * configure.ac: Check for dladdr.
13926 * config.in: Regenerate.
13927 * configure: Regenerate.
13928 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13929 (try_thread_db_load): Update.
13931 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13933 2009-12-18 Doug Evans <dje@google.com>
13935 * event-loop.c: Include unistd.h if it exists.
13937 * linux-low.c (my_waitpid): Move definition away from being in
13938 between linux_tracefork_child/linux_test_for_tracefork.
13940 * gdb_proc_service.h (psaddr_t): Fix type.
13941 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13942 signature to match glibc.
13944 2009-12-16 Doug Evans <dje@google.com>
13946 * linux-low.c (linux_read_memory): Fix argument to read.
13948 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13950 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13951 events, don't leave current_inferior pointing at null.
13953 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13955 * win32-low.c (LOG): Delete.
13956 (OUTMSG): Output to stderr.
13957 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13958 on compile time LOG macro.
13959 (win32_wait): Fix debug output.
13961 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13963 * win32-low.c (win32_add_one_solib): If the dll name is
13964 "ntdll.dll", prepend the system directory to the dll path.
13966 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13968 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13970 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13971 Vladimir Prus <vladimir@codesourcery.com>
13973 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13974 * configure.ac: Check for __mcoldfire__ and set
13975 gdb_cv_m68k_is_coldfire.
13976 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13977 reg-cf.o and reg-m68k.o.
13978 * configure: Regenerated.
13980 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13982 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13983 Pass it to thread_db_free.
13984 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13985 proper `detaching' argument to linux_remove_process.
13986 * linux-low.h (thread_db_free): Add `detaching' parameter.
13987 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13989 (thread_db_free): Add `detaching' parameter. Only
13990 call td_ta_clear_event if detaching from process.
13992 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13994 * thread-db.c (thread_db_free): Fix typo.
13996 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13999 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14001 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14003 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14004 with an i686 compiler.
14005 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14007 * configure: Rebuilt.
14009 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14013 * server.c (handle_search_memory_1): Correct read_addr initialization
14014 in loop for searching subsequent chunks.
14016 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14018 * configure.ac: New --with-libthread-db option.
14019 * thread-db.c: Allow direct dependence on libthread_db.
14020 (thread_db_free): Adjust.
14021 * config.in: Regenerate.
14022 * configure: Likewise.
14024 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14027 * thread-db.c (attach_thread): New function.
14028 (maybe_attach_thread): Return success/failure.
14029 (find_new_threads_callback): Adjust.
14030 (thread_db_find_new_threads): Loop until no new threads.
14032 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14034 * proc-service.c (ps_lgetregs): Formatting.
14036 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14038 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14039 * configure.ac: Adjust.
14040 * linux-low.h (struct process_info_private): Move members to struct
14042 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14043 * linux-low.c (linux_remove_process): Adjust.
14044 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14045 * server.c (handle_query): Move code ...
14046 (handle_monitor_command): ... here. New function.
14047 * target.h (struct target_ops): New member.
14048 * thread-db.c (struct thread_db): New.
14049 (libthread_db_search_path): New variable.
14050 (thread_db_create_event, thread_db_enable_reporting)
14051 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14052 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14053 (try_thread_db_load_1, dladdr_to_soname): New functions.
14054 (try_thread_db_load, thread_db_load_search): New functions.
14055 (thread_db_init): Search for libthread_db.
14056 (thread_db_free): New function.
14057 (thread_db_handle_monitor_command): Likewise.
14058 * config.in: Regenerate.
14059 * configure: Regenerate.
14061 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14063 * spu-low.c (spu_kill): Wait for inferior to terminate.
14064 Call clear_inferiors.
14065 (spu_detach): Call clear_inferiors.
14067 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14069 * aclocal.m4: Regenerate.
14070 * config.in: Likewise.
14071 * configure: Likewise.
14073 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14075 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14076 (parse_spufs_run): New function.
14077 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14078 (ppc_breakpoint_at): Handle SPU breakpoints.
14080 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14082 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14083 (SPUFS_MAGIC): Define.
14084 (spu_enumerate_spu_ids): New function.
14085 (linux_qxfer_spu): New function.
14086 (linux_target_ops): Install linux_qxfer_spu.
14088 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14090 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14091 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14092 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14093 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14094 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14095 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14096 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14097 (init_registers_powerpc_cell32l): Add prototype.
14098 (init_registers_powerpc_cell64l): Likewise.
14099 (ppc_arch_setup): Detect Cell/B.E. architecture.
14101 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14103 * Makefile.in (datarootdir): New variable.
14105 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14107 * linux-low.c (linux_write_memory): Update debugging output.
14108 * Makefile.in (clean): Add new descriptions.
14109 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14110 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14111 * configure.srv: Add new files for arm*-*-linux*.
14112 * linux-arm-low.c: Add new declarations.
14113 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14114 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14115 (HWCAP_VFPv3D16): New.
14116 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14117 instead of __IWMMXT__.
14118 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14119 (arm_arch_setup): New.
14120 (target_regsets): Remove #ifdef. Add VFP regset.
14121 (the_low_target): Use arm_arch_setup.
14123 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14125 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14126 the main thread again.
14128 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14130 Adding Neutrino gdbserver.
14131 * configure: Regenerated.
14132 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14133 * configure.srv (i[34567]86-*-nto*): New target.
14134 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14135 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14136 (nto_comctrl) [__QNX__]: New function.
14137 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14139 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14141 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14144 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14145 Pedro Alves <pedro@codesourcery.com>
14147 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14148 don't support CONTEXT_EXTENDED_REGISTERS.
14149 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14150 (the_low_target): Install them.
14151 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14152 failing with ERROR_PIPE_NOT_CONNECTED.
14154 2009-06-30 Doug Evans <dje@google.com>
14155 Pierre Muller <muller@ics.u-strasbg.fr>
14157 Add h/w watchpoint support to x86-linux, win32-i386.
14158 * Makefile.in (SFILES): Add i386-low.c
14159 (i386_low_h): Define.
14160 (i386-low.o): Add dependencies.
14161 (linux-x86-low.o): Add i386-low.h dependency.
14162 (win32-i386-low.o): Ditto.
14163 * i386-low.c: New file.
14164 * i386-low.h: New file.
14165 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14166 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14167 * linux-low.c (linux_add_process): Initialize arch_private.
14168 (linux_remove_process): Free arch_private.
14169 (add_lwp): Initialize arch_private.
14170 (delete_lwp): Free arch_private.
14171 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14173 * linux-low.h (process_info_private): New member arch_private.
14174 (lwp_info): New member arch_private.
14175 (linux_target_ops): New members new_process, new_thread,
14177 (ptid_of): New macro.
14178 * linux-x86-low.c: Include stddef.h, i386-low.h.
14179 (arch_process_info): New struct.
14180 (arch_lwp_info): New struct.
14181 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14182 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14183 (i386_dr_low_get_status): New function.
14184 (x86_insert_point, x86_remove_point): New functions.
14185 (x86_stopped_by_watchpoint): New function.
14186 (x86_stopped_data_address): New function.
14187 (x86_linux_new_process, x86_linux_new_thread): New functions.
14188 (x86_linux_prepare_to_resume): New function.
14189 (the_low_target): Add entries for insert_point, remove_point,
14190 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14192 * server.c (debug_hw_points): New global.
14193 (monitor_show_help): Document set debug-hw-points.
14194 (handle_query): Process "set debug-hw-points".
14195 * server.h (debug_hw_points): Declare.
14196 (paddress): Declare.
14197 * utils.c (NUMCELLS, CELLSIZE): New macros.
14198 (get_sell, xsnprintf, paddress): New functions.
14199 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14200 remove_point, stopped_by_watchpoint, stopped_data_address.
14201 * win32-i386-low.c: Include i386-low.h.
14202 (debug_reg_state): Replaces dr.
14203 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14204 (i386_dr_low_get_status): New function.
14205 (i386_insert_point, i386_remove_point): New functions.
14206 (i386_stopped_by_watchpoint): New function.
14207 (i386_stopped_data_address): New function.
14208 (i386_initial_stuff): Update.
14209 (get_thread_context,set_thread_context,i386_thread_added): Update.
14210 (the_low_target): Add entries for insert_point,
14211 remove_point, stopped_by_watchpoint, stopped_data_address.
14212 * win32-low.c (win32_insert_watchpoint): New function.
14213 (win32_remove_watchpoint): New function.
14214 (win32_stopped_by_watchpoint): New function.
14215 (win32_stopped_data_address): New function.
14216 (win32_target_ops): Add entries for insert_watchpoint,
14217 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14218 * win32-low.h (win32_target_ops): New members insert_point,
14219 remove_point, stopped_by_watchpoint, stopped_data_address.
14221 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14223 * server.c (process_serial_event): Re-return unsupported, not
14224 error, if the type isn't recognized. Re-allow supporting only
14225 insert or remove packets. Also call require_running for
14226 breakpoints. Add missing break statement to default case. Tidy.
14227 * target.h (struct target_ops): Rename insert_watchpoint to
14228 insert_point, and remove_watchpoint to remove_point.
14230 * linux-low.h (struct linux_target_ops): Likewise.
14231 * linux-low.c (linux_insert_watchpoint): Rename to ...
14232 (linux_insert_point): ... this. Adjust.
14233 (linux_remove_watchpoint): Rename to ...
14234 (linux_remove_point): ... this. Adjust.
14235 (linux_target_ops): Adjust.
14236 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14237 (cris_insert_point): ... this.
14238 (cris_remove_watchpoint): Rename to ...
14239 (cris_remove_point): ... this.
14240 (the_low_target): Adjust.
14242 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14244 * server.c (handle_v_kill): Pass signal_pid to
14245 kill_inferior if multi_process is zero.
14247 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14249 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14250 * target.h (target_ops): Comment for *_watchpoint to make it clear
14251 the functions can get types '0' and '1'.
14253 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14255 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14256 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14257 * regcache.c (get_regcache): Likewise.
14258 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14259 * win32-low.c (child_fetch_inferior_registers): Remove check for
14262 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14263 Pedro Alves <pedro@codesourcery.com>
14265 * target.h (struct target_ops) <supports_multi_process>: New
14267 (target_supports_multi_process): New.
14268 * server.c (handle_query): Even if GDB reports support, only
14269 enable multi-process if the target also supports it. Report
14270 multi-process support only if the target backend supports it.
14271 * linux-low.c (linux_supports_multi_process): New function.
14272 (linux_target_ops): Install it as target_supports_multi_process
14275 2009-05-24 Doug Evans <dje@google.com>
14277 Global renaming of find_thread_pid to find_thread_ptid.
14278 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14279 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14280 All callers updated.
14282 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14283 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14286 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14287 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14288 (linux_resume_one_lwp): Ditto.
14290 2009-05-23 Doug Evans <dje@google.com>
14292 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14293 from struct inferior_list_entry * to struct lwp_info *.
14294 All callers updated.
14296 2009-05-13 Doug Evans <dje@google.com>
14298 * linux-x86-low.c: Don't include assert.h.
14299 (x86_siginfo_fixup): Use fatal, not assert.
14300 (x86_arch_setup): Fix comment.
14302 2009-05-12 Doug Evans <dje@google.com>
14304 Biarch support for i386/amd64 gdbserver.
14305 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14306 Add linux-x86-low.c.
14307 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14308 (linux-x86-low.o): Add.
14309 * linux-x86-64-low.c: Delete.
14310 * linux-i386-low.c: Delete.
14311 * linux-x86-low.c: New file.
14312 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14314 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14316 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14317 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14318 (linux_child_pid_to_exec_file): New function.
14319 (elf_64_header_p, elf_64_file_p): New functions.
14320 (siginfo_fixup): New function.
14321 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14322 give target a chance to convert layout.
14323 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14324 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14326 2009-05-07 Doug Evans <dje@google.com>
14328 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14329 (regsets_store_inferior_registers): Ditto.
14331 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14335 * linux-low.c (must_set_ptrace_flags): Delete.
14336 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14338 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14339 `lwp->must_set_ptrace_flags' instead.
14340 (linux_wait_for_event_1): Set ptrace options here.
14341 (linux_wait_1): ... not here.
14343 2009-04-30 Doug Evans <dje@google.com>
14345 * inferiors.c (started_inferior_callback): New function.
14346 (attached_inferior_callback): New function.
14347 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14348 * server.c (print_started_pid, print_attached_pid): New functions.
14349 (detach_or_kill_for_exit): New function.
14350 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14351 * server.h (have_started_inferiors_p): Declare.
14352 (have_attached_inferiors_p): Declare.
14354 * inferiors.c (remove_process): Fix memory leak, free process.
14355 * linux-low.c (linux_remove_process): New function.
14356 (linux_kill): Call it instead of remove_process.
14357 (linux_detach, linux_wait_1): Ditto.
14359 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14361 * configure.srv: Add x86 Windows CE target.
14363 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14365 * inferiors.c (get_thread_process): Make global.
14366 * server.h (get_thread_process): Add prototype.
14367 * thread-db.c (find_one_thread): Use get_thread_process
14368 instead of current_process.
14369 (thread_db_get_tls_address): Do not crash if called when
14370 thread layer is not yet initialized.
14372 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14374 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14375 * spu-low.c (current_tid): Rename to ...
14376 (current_ptid): ... this.
14377 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14378 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14379 ptid_get_lwp (current_ptid) instead of current_tid.
14380 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14381 instead of current_tid. Use find_process_pid to verify pid
14382 argument is valid. Pass proper argument to remove_process.
14383 (spu_thread_alive): Compare current_ptid instead of current_tid.
14384 (spu_resume): Likewise.
14386 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14388 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14391 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14393 Implement the multiprocess extensions, and add linux multiprocess
14396 * server.h (ULONGEST): Declare.
14397 (struct ptid, ptid_t): New.
14398 (minus_one_ptid, null_ptid): Declare.
14399 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14400 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14401 (struct inferior_list_entry): Change `id' type from unsigned from
14403 (struct sym_cache, struct breakpoint, struct
14404 process_info_private): Forward declare.
14405 (struct process_info): Declare.
14406 (current_process): Declare.
14407 (all_processes): Declare.
14408 (initialize_inferiors): Declare.
14409 (add_thread): Adjust to use ptid_t.
14410 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14411 (add_process, remove_process, find_thread_pid): Declare.
14412 (find_inferior_id): Adjust to use ptid_t.
14413 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14414 (multi_process): Declare.
14415 (push_event): Adjust to use ptid_t.
14416 (read_ptid, write_ptid): Declare.
14417 (prepare_resume_reply): Adjust to use ptid_t.
14418 (clear_symbol_cache): Declare.
14419 * inferiors.c (all_processes): New.
14420 (null_ptid, minus_one_ptid): New.
14421 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14422 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14423 (add_thread): Change unsigned long to ptid. Remove gdb_id
14425 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14426 (gdb_id_to_thread): Rename to ...
14427 (find_thread_pid): ... this. Change unsigned long to ptid.
14428 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14429 (loaded_dll, pull_pid_from_list): Adjust.
14430 (add_process, remove_process, find_process_pid)
14431 (get_thread_process, current_process, initialize_inferiors): New.
14432 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14433 (struct target_waitstatus) <related_pid>: Ditto.
14434 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14435 return type to int.
14436 (struct target_ops) <join>: Add `pid' argument.
14437 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14438 (struct target_ops) <wait>: Add `ptid' field. Change return type
14440 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14441 (mywait): Add `ptid' argument. Change return type to ptid_t.
14442 (target_pid_to_str): Declare.
14443 * target.c (set_desired_inferior): Adjust to use ptids.
14444 (mywait): Add new `ptid' argument. Adjust.
14445 (target_pid_to_str): New.
14446 * mem-break.h (free_all_breakpoints): Declare.
14447 * mem-break.c (breakpoints): Delelete.
14448 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14449 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14450 to use per-process breakpoint list.
14451 (free_all_breakpoints): New.
14452 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14453 (symbol_cache, all_symbols_looked_up): Delete.
14455 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14457 (prepare_resume_reply): Change ptid argument's type from unsigned
14458 long to ptid_t. Adjust. Implement W;process and X;process.
14459 (free_sym_cache, clear_symbol_cache): New.
14460 (look_up_one_symbol): Adjust to per-process symbol cache. *
14461 * server.c (cont_thread, general_thread, step_thread): Change type
14463 (attached): Delete.
14464 (multi_process): New.
14465 (last_ptid): Change type to ptid_t.
14466 (struct vstop_notif) <ptid>: Change type to ptid_t.
14467 (queue_stop_reply, push_event): Change `ptid' argument's type to
14469 (discard_queued_stop_replies): Add `pid' argument.
14470 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14471 changes. Don't reference the `attached' global.
14472 (attach_inferior): Adjust to mywait interface changes.
14473 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14474 features. Handle and report "multiprocess+". Handle
14476 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14478 (handle_v_kill): New.
14479 (handle_v_stopped): Adjust to use target_pid_to_str.
14480 (handle_v_requests): Allow multiple attaches and runs when
14481 multiprocess extensions are in effect. Handle "vKill".
14482 (myresume): Adjust to use ptids.
14483 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14484 (handle_status): Adjust to discard_queued_stop_replies interface
14486 (first_thread_of, kill_inferior_callback)
14487 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14488 (main): Call initialize_inferiors. Adjust to use ptids, killing
14489 and detaching from all inferiors. Handle multiprocess packet
14491 * linux-low.h: Include gdb_proc_service.h.
14492 (struct process_info_private): New.
14493 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14494 <lwpid_of>: Use ptid_get_lwp.
14495 (get_lwp_thread): Adjust.
14496 (struct lwp_info): Add `dead' member.
14497 (find_lwp_pid): Declare.
14498 * linux-low.c (thread_db_active): Delete.
14499 (new_inferior): Adjust comment.
14500 (inferior_pid): Delete.
14501 (linux_add_process): New.
14502 (handle_extended_wait): Adjust.
14503 (add_lwp): Change unsigned long to ptid.
14504 (linux_create_inferior): Add process to processes table. Adjust
14505 to use ptids. Don't set new_inferior here.
14506 (linux_attach_lwp): Rename to ...
14507 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14508 it. Adjust to use ptids.
14509 (linux_attach_lwp): New.
14510 (linux_attach): Add process to processes table. Don't set
14512 (struct counter): New.
14513 (second_thread_of_pid_p, last_thread_of_process_p): New.
14514 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14515 multiple processes.
14516 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14517 processes. Remove process from process table.
14518 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14519 to multiple processes.
14520 (any_thread_of): New.
14521 (linux_detach): Add `pid' argument, and handle it. Remove process
14522 from processes table.
14523 (linux_join): Add `pid' argument. Handle it.
14524 (linux_thread_alive): Change unsighed long argument to ptid_t.
14525 Consider dead lwps as not being alive.
14526 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14527 threads we're not interested in.
14528 (same_lwp, find_lwp_pid): New.
14529 (linux_wait_for_lwp): Change `pid' argument's type from int to
14531 (linux_wait_for_event): Rename to ...
14532 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14533 from int to ptid_t. Adjust.
14534 (linux_wait_for_event): New.
14535 (linux_wait_1): Add `ptid' argument. Change return type to
14536 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14537 that exit from the process table.
14538 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14540 (mark_lwp_dead): New.
14541 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14542 stopping all threads, mark its main lwp as dead.
14543 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14545 (fetch_register, usr_store_inferior_registers)
14546 (regsets_fetch_inferior_registers)
14547 (regsets_store_inferior_registers, linux_read_memory)
14548 (linux_write_memory): Inline `inferior_pid'.
14549 (linux_look_up_symbols): Adjust to use per-process
14550 `thread_db_active'.
14551 (linux_request_interrupt): Adjust to use ptids.
14552 (linux_read_auxv): Inline `inferior_pid'.
14553 (initialize_low): Don't reference thread_db_active.
14554 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14555 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14556 (ps_getpid): Return the pid of the current inferior.
14557 * thread-db.c (proc_handle, thread_agent): Delete.
14558 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14560 (find_one_thread): Change argument type to ptid_t. Adjust to
14562 (maybe_attach_thread): Adjust to per-process data and ptids.
14563 (thread_db_find_new_threads): Ditto.
14564 (thread_db_init): Ditto.
14565 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14566 processes table. Adjust to use ptids.
14567 (spu_kill, spu_detach): Adjust interface. Remove process from
14569 (spu_join, spu_thread_alive): Adjust interface.
14570 (spu_wait): Adjust interface. Remove process from processes
14571 table. Adjust to use ptids.
14572 * win32-low.c (current_inferior_tid): Delete.
14573 (current_inferior_ptid): New.
14574 (debug_event_ptid): New.
14575 (thread_rec): Take a ptid. Adjust.
14576 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14577 (child_delete_thread): Ditto.
14578 (do_initial_child_stuff): Add `attached' argument. Add process to
14580 (child_fetch_inferior_registers, child_store_inferior_registers):
14582 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14583 (win32_attach): Pass 1 to do_initial_child_stuff.
14584 (win32_kill): Adjust interface. Remove process from processes
14586 (win32_detach): Ditto.
14587 (win32_join): Adjust interface.
14588 (win32_thread_alive): Take a ptid.
14589 (win32_resume): Adjust to use ptids.
14590 (get_child_debug_event): Ditto.
14591 (win32_wait): Adjust interface. Remove exiting process from
14594 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14596 Non-stop mode support.
14598 * server.h (non_stop): Declare.
14599 (gdb_client_data, handler_func): Declare.
14600 (delete_file_handler, add_file_handler, start_event_loop):
14602 (handle_serial_event, handle_target_event, push_event)
14603 (putpkt_notif): Declare.
14604 * target.h (enum resume_kind): New.
14605 (struct thread_resume): Replace `step' field by `kind' field.
14606 (TARGET_WNOHANG): Define.
14607 (struct target_ops) <wait>: Add `options' argument.
14608 <supports_non_stop, async, start_non_stop>: New fields.
14609 (target_supports_non_stop, target_async): New.
14610 (start_non_stop): Declare.
14611 (mywait): Add `options' argument.
14612 * target.c (mywait): Add `options' argument. Print child exit
14613 notifications here.
14614 (start_non_stop): New.
14615 * server.c (non_stop, own_buf, mem_buf): New globals.
14616 (struct vstop_notif): New.
14617 (notif_queue): New global.
14618 (queue_stop_reply, push_event, discard_queued_stop_replies)
14619 (send_next_stop_reply): New.
14620 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14622 (attach_inferior): In non-stop mode, don't wait for the target
14624 (handle_general_set): Handle QNonStop.
14625 (handle_query): When handling qC, return the current general
14626 thread, instead of the first thread of the list.
14627 (handle_query): If the backend supports non-stop mode, include
14628 QNonStop+ in the qSupported query response.
14629 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14631 (handle_v_attach, handle_v_run): Handle non-stop mode.
14632 (handle_v_stopped): New.
14633 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14634 (myresume): Adjust to use resume_kind. Handle non-stop.
14635 (queue_stop_reply_callback): New.
14636 (handle_status): Handle non-stop mode.
14637 (main): Clear non_stop flag on reconnection. Use the event-loop.
14638 Refactor serial protocol handling from here ...
14639 (process_serial_event): ... to this new function. When GDB
14640 selects any thread, select one here. In non-stop mode, wait until
14641 GDB acks all pending events before exiting.
14642 (handle_serial_event, handle_target_event): New.
14643 * remote-utils.c (remote_open): Install remote_desc in the event
14645 (remote_close): Remove remote_desc from the event loop.
14646 (putpkt_binary): Rename to...
14647 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14648 (putpkt_binary): New as wrapper around putpkt_binary_1.
14649 (putpkt_notif): New.
14650 (prepare_resume_reply): In non-stop mode, don't change the
14652 * event-loop.c: New.
14653 * Makefile.in (OBJ): Add event-loop.o.
14654 (event-loop.o): New rule.
14656 * linux-low.h (pid_of): Moved here.
14658 (get_lwp_thread): Use lwpid_of.
14659 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14660 * linux-low.c (pid_of): Delete.
14661 (inferior_pid): Use lwpid_of.
14662 (linux_event_pipe): New.
14663 (target_is_async_p): New.
14665 (handle_extended_wait): Use lwpid_of.
14666 (add_lwp): Don't set lwpid field.
14667 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14668 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14669 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14670 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14671 first. Adjust to linux_wait_for_event interface changes. Use
14673 (linux_detach): Don't delete the main lwp here.
14674 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14675 (status_pending_p): Don't consider explicitly suspended lwps.
14676 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14677 pointer. Add OPTIONS argument. Change return type to int. Use
14678 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14679 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14680 pointer. Add status pointer argument. Return a pid instead of a
14681 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14682 changes. In non-stop mode, don't switch to a random thread.
14683 (linux_wait): Rename to...
14684 (linux_wait_1): ... this. Add target_options argument, and handle
14685 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14686 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14687 clean exit and signal exit code. Don't stop all threads in
14688 non-stop mode. In all-stop mode, only stop all threads when
14689 reporting a stop to GDB. Handle explicit thread stop requests.
14690 (async_file_flush, async_file_mark): New.
14692 (send_sigstop): Use lwpid_of.
14693 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14694 interface changes. In non-stop mode, don't switch to a random
14696 (linux_resume_one_lwp): Use lwpid_of.
14697 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14698 (linux_resume_one_thread): ... this. Handle resume_stop. In
14699 non-stop mode, don't look for pending flag in all threads.
14700 (resume_status_pending_p): Don't consider explicitly suspended
14702 (my_waitpid): Reimplement. Emulate __WALL.
14703 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14705 (sigchld_handler, linux_supports_non_stop, linux_async)
14706 (linux_start_non_stop): New.
14707 (linux_target_ops): Register linux_supports_non_stop, linux_async
14708 and linux_start_non_stop.
14709 (initialize_low): Install SIGCHLD handler.
14710 * thread-db.c (thread_db_create_event, find_one_thread)
14711 (thread_db_get_tls_address): Use lwpid_of.
14712 * win32-low.c (win32_detach): Adjust to use resume_kind.
14713 (win32_wait): Add `options' argument.
14714 * spu-low.c (spu_resume): Adjust to use resume_kind.
14715 (spu_wait): Add `options' argument.
14717 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14719 Decouple target code from remote protocol.
14721 * target.h (enum target_waitkind): New.
14722 (struct target_waitstatus): New.
14723 (struct target_ops) <wait>: Return an unsigned long. Take a
14724 target_waitstatus pointer instead of a char pointer.
14725 (mywait): Likewise.
14726 * target.c (mywait): Change prototype to return an unsigned long.
14727 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14728 * server.h (thread_from_wait, old_thread_from_wait): Delete
14730 (prepare_resume_reply): Change prototype to take a
14732 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14733 (last_status, last_ptid): New.
14734 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14735 pid instead of a signal.
14736 (attach_inferior): Remove "status" and "signal" parameters.
14738 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14740 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14741 (handle_v_requests, myresume): Remove "status" and "signal"
14742 parameters. Adjust.
14743 (handle_status): New.
14744 (main): Delete local `status'. Adjust.
14745 * remote-utils.c: Include target.h.
14746 (prepare_resume_reply): Change prototype to take a
14747 target_waitstatus. Adjust.
14749 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14751 * spu-low.c (spu_wait): Adjust.
14752 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14754 (win32_wait): Adjust.
14756 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14758 * target.h (struct thread_resume): Delete leave_stopped member.
14759 (struct target_ops): Add a `n' argument to the `resume' callback.
14760 * server.c (start_inferior): Adjust.
14761 (handle_v_cont, myresume): Adjust.
14762 * linux-low.c (check_removed_breakpoint): Adjust to resume
14763 interface change, and to removed leave_stopped field.
14764 (resume_ptr): Delete.
14765 (struct thread_resume_array): New.
14766 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14767 resume interface change.
14768 (linux_continue_one_thread, linux_queue_one_thread)
14769 (resume_status_pending_p): Check if the resume field is NULL
14770 instead of checking the leave_stopped member.
14771 (linux_resume): Adjust to the target resume interface change.
14772 * spu-low.c (spu_resume): Adjust to the target resume interface
14774 * win32-low.c (win32_detach, win32_resume): Ditto.
14776 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14778 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14780 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14782 (linux_continue_one_thread): Only preserve the stepping flag if
14783 there's a pending breakpoint.
14785 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14787 * server.c (main): After the inferior having exited, call
14788 remote_close before exiting gdbserver.
14790 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14792 Fix size of FPSCR in Power 7 processors.
14793 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14794 (PPC_FEATURE_HAS_DFP): New #define.
14795 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14798 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14800 * server.c (handle_query) Whitespace and formatting.
14802 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14804 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14805 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14806 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14807 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14808 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14809 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14810 Makefile.in, configure.ac: Fix whitespace throughout.
14811 * configure: Regenerate.
14813 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14815 * inferiors.c (find_inferior): Make it safe for the callback
14816 function to delete the currently iterated inferior.
14818 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14820 * Makefile.in (linuw_low_h): Move higher.
14821 (thread-db.o): Depend on $(linux_low_h).
14823 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14825 Rename "process" to "lwp" throughout.
14827 * linux-low.c (all_processes): Rename to...
14828 (all_lwps): ... this.
14829 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14830 (add_process): Rename to ...
14831 (add_lwp): ... this. Adjust.
14832 (linux_create_inferior): Adjust.
14833 (linux_attach_lwp): Adjust.
14834 (linux_attach): Adjust.
14835 (linux_kill_one_process): Rename to ...
14836 (linux_kill_one_lwp): ... this. Adjust.
14837 (linux_kill): Adjust.
14838 (linux_detach_one_process): Rename to ...
14839 (linux_detach_one_lwp): ... this. Adjust.
14840 (linux_detach): Adjust.
14841 (check_removed_breakpoint): Adjust.
14842 (status_pending_p): Adjust.
14843 (linux_wait_for_process): Rename to ...
14844 (linux_wait_for_lwp): ... this. Adjust.
14845 (linux_wait_for_event): Adjust.
14846 (send_sigstop): Adjust.
14847 (wait_for_sigstop): Adjust.
14848 (stop_all_processes): Rename to ...
14849 (stop_all_lwps): ... this.
14850 (linux_resume_one_process): Rename to ...
14851 (linux_resume_one_lwp): ... this. Adjust.
14852 (linux_set_resume_request, linux_continue_one_thread)
14853 (linux_queue_one_thread, resume_status_pending_p)
14854 (usr_store_inferior_registers, regsets_store_inferior_registers)
14855 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14857 * linux-low.h (get_process): Rename to ...
14858 (get_lwp): ... this. Adjust.
14859 (get_thread_process): Rename to ...
14860 (get_thread_lwp): ... this. Adjust.
14861 (get_process_thread): Rename to ...
14862 (get_lwp_thread): ... this. Adjust.
14863 (struct process_info): Rename to ...
14864 (struct lwp_info): ... this.
14865 (all_processes): Rename to ...
14866 (all_lwps): ... this.
14867 * proc-service.c (ps_lgetregs): Adjust.
14868 * thread-db.c (thread_db_create_event, find_one_thread)
14869 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14871 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14873 * server.c (handle_query): Handle "qAttached".
14875 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14877 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14878 GPLv3, update license URL.
14880 2009-03-01 Doug Evans <dje@google.com>
14882 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14883 (server_h): Add gdb_signals.h.
14884 (signals.o): Update.
14885 * server.h (target_signal_from_host,target_signal_to_host_p)
14886 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14888 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14890 * remote-utils.c (getpkt): Also generate remote-debug
14891 information if noack_mode is set.
14893 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14895 * server.c (handle_query): Report qXfer:siginfo:read and
14896 qXfer:siginfo:write as supported and handle them.
14897 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14898 * linux-low.c (linux_xfer_siginfo): New.
14899 (linux_target_ops): Set it.
14901 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14903 * server.c (gdbserver_usage): Mention --remote-debug.
14904 (main): Accept '--remote-debug' switch.
14906 2009-01-18 Doug Evans <dje@google.com>
14908 * regcache.c (new_register_cache): No need to check result of xcalloc.
14909 * server.c (handle_search_memory): Back out calls to xmalloc,
14910 result is checked and error is returned to user upon failure.
14911 (handle_query): Ditto. Add more checks for result of malloc.
14912 (handle_v_cont): Check result of malloc, report error back to
14914 (handle_v_run): Ditto. Call freeargv.
14915 * server.h (freeargv): Declare.
14916 * utils.c (freeargv): New fn.
14918 2009-01-15 Doug Evans <dje@google.com>
14920 * gdbreplay.c (perror_with_name): Make arg const char *.
14921 * server.h (target_signal_to_name): Make return type const char *.
14922 * thread-db.c (thread_db_err_str): Make return type const char *.
14923 * utils.c (perror_with_name): Make arg const char *.
14925 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14927 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14928 when handling a EXIT_PROCESS_DEBUG_EVENT.
14930 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14932 * gdbreplay.c (gdbreplay_version): Update copyright year.
14933 * server.c (gdbserver_version): Likewise.
14935 2009-01-05 Doug Evans <dje@google.com>
14937 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14938 (handle_extended_wait): Improve comment.
14940 2008-12-13 Doug Evans <dje@google.com>
14942 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14943 * server.h (ATTR_MALLOC): New macro.
14944 (xmalloc,xcalloc,xstrdup): Declare.
14945 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14946 * inferiors.c: Ditto.
14947 * linux-low.c: Ditto.
14948 * mem-break.c: Ditto.
14949 * regcache.c: Ditto.
14950 * remote-utils.c: Ditto.
14953 * win32-low.c: Ditto.
14955 2008-12-12 Doug Evans <dje@google.com>
14957 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14958 in debugging printf.
14960 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14962 2008-12-09 Doug Evans <dje@google.com>
14964 * linux-low.h (struct process_info): Delete member tid, unused.
14965 * thread-db.c (find_one_thread): Update.
14966 (maybe_attach_thread): Update.
14968 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14970 * target.h (struct target_ops): Add qxfer_osdata member.
14971 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14973 (linux_qxfer_osdata): New functions.
14974 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14976 * server.c (handle_query): Handle "qXfer:osdata:read:".
14977 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14978 (buffer_xml_printf): New functions.
14979 * server.h (struct buffer): New.
14980 (buffer_grow_str, buffer_grow_str0): New macros.
14981 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14982 (buffer_xml_printf): Declare.
14984 2008-11-24 Doug Evans <dje@google.com>
14986 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14988 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14990 * server.c (handle_v_run): Always use the supplied argument list.
14992 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14994 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14995 (xtensa_regmap_table): Add entry for scompare1.
14997 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14999 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15000 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15001 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15002 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15003 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15004 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15005 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15006 XML target descriptions.
15007 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15008 when inferior is running on an ISA 2.05 or later processor. Add
15009 special case to return offset for full 64-bit slot of FPSCR when
15012 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15014 * Makefile.in (SFILES, clean): Added sparc64 files.
15015 (reg-sparc64.o, reg-sparc64.c): New.
15016 * configure.srv (sparc*-*-linux*): New configuration.
15017 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15018 syscall arguments for SPARC.
15019 (regsets_store_inferior_registers): Likewise.
15020 * linux-sparc-low.c: New file.
15022 2008-10-21 Doug Evans <dje@google.com>
15024 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15025 (READLINE_DIR,READLINE_DEP): Delete.
15026 (INTERNAL_CFLAGS): Update.
15027 (LINTFLAGS): Update.
15029 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15031 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15032 whole argv from the last run, not just argv[0].
15034 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15036 * regcache.c (new_register_cache): Return NULL if the register
15037 cache size isn't known yet.
15038 (free_register_cache): Avoid dereferencing a NULL regcache.
15040 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15042 * configure.srv: Merge MIPS and MIPS64.
15044 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15046 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15048 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15050 * Makefile.in: Add required vsx dependencies.
15052 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15053 Declare init_registers_powerpc_vsx32l.
15054 Declare init_registers_powerpc_vsx64l.
15055 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15056 (ppc_arch_setup): Check for VSX in hwcap.
15057 (ppc_fill_vsxregset): New function.
15058 (ppc_store_vsxregset): New function.
15059 Add new VSX entry in regset_info target_regsets.
15061 * configure.srv: Add new VSX dependencies.
15063 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15065 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15066 (remote_open): Set or clear transport_is_reliable.
15067 (putpkt_binary): Don't expect acks in noack mode.
15068 (getpkt): Don't send ack/nac in noack mode.
15069 * server.c (handle_general_set): Handle QStartNoAckMode.
15070 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15072 (main): Reset noack_mode on every connection.
15073 * server.h (noack_mode): Declare.
15075 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15077 * Makefile.in (GDBREPLAY_OBS): New variable.
15078 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15080 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15081 Daniel Jacobowitz <dan@codesourcery.com>
15083 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15084 (usr_store_inferior_registers): Likewise.
15085 (regsets_store_inferior_registers): Likewise.
15087 2008-07-31 Rolf Jansen <rj@surtec.com>
15088 Pedro Alves <pedro@codesourcery.com>
15090 * configure.ac: Check for memmem declaration.
15091 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15092 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15093 (disable_packet_qfThreadInfo): Unconditionally compile.
15094 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15095 * configure, config.in: Regenerate.
15097 2008-07-28 Doug Kwan <dougkwan@google.com>
15099 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15100 (linux_write_memory): Remove declaration of errno.
15102 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15104 * linux-low.c (handle_extended_wait): Do not use "status"
15105 variable uninitialized.
15107 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15109 * server.c (handle_v_attach): Inhibit reporting dll changes.
15111 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15113 * remote-utils.c (prepare_resume_reply): If requested, don't
15114 output "thread:TID" in the T stop reply.
15116 * server.c (disable_packet_vCont, disable_packet_Tthread)
15117 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15118 (handle_query): If requested, disable support for qC, qfThreadInfo
15120 (handle_v_requests): If requested, disable support for vCont.
15121 (gdbserver_show_disableable): New.
15122 (main): Handle --disable-packet and --disable-packet=LIST.
15124 * server.h (disable_packet_vCont, disable_packet_Tthread)
15125 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15127 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15129 * server.c (gdbserver_usage): Mention --version.
15131 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15133 * Makefile.in (gdbreplay.o): New rule.
15135 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15137 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15138 message, not gdbserver.
15140 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15141 Nathan Sidwell <nathan@codesourcery.com>
15142 Joseph Myers <joseph@codesourcery.com>
15144 * acinclude.m4: Include ../../config/acx.m4.
15145 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15146 * configure, config.in: Regenerate.
15147 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15148 * server.c (gdbserver_version): Print PKGVERSION.
15149 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15150 (main): Adjust gdbserver_usage calls.
15151 * gdbreplay.c (version, host_name): Add declarations.
15152 (gdbreplay_version, gdbreplay_usage): New.
15153 (main): Accept --version and --help options.
15155 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15157 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15158 (arm_breakpoint_at): Handle Thumb.
15159 (the_low_target): Add comment.
15161 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15163 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15165 2008-05-09 Doug Evans <dje@google.com>
15167 * server.h (decode_search_memory_packet): Declare.
15168 * remote-utils.c (decode_search_memory_packet): New fn.
15169 * server.c (handle_search_memory_1): New fn.
15170 (handle_search_memory): New fn.
15171 (handle_query): Process qSearch:memory packets.
15173 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15175 * regcache.c (registers_length): Remove.
15176 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15177 full register packet.
15178 * regcache.h (registers_length): Remove prototype.
15179 * server.h (PBUFSIZ): Define to 16384.
15181 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15183 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15184 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15185 powerpc-64l.o, and powerpc-altivec64l.o.
15186 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15187 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15188 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15189 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15190 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15193 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15194 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15195 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15196 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15197 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15198 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15199 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15200 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15201 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15202 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15205 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15206 (init_registers_powerpc_32l): ... this new prototype.
15207 (init_registers_powerpc_32): Remove, replace by ...
15208 (init_registers_powerpc_altivec32l): ... this new prototype.
15209 (init_registers_powerpc_e500): Remove, replace by ...
15210 (init_registers_powerpc_e500l): ... this new prototype.
15211 (init_registers_ppc64): Remove, replace by ...
15212 (init_registers_powerpc_64l): ... this new prototype.
15213 (init_registers_powerpc_64): Remove, replace by ...
15214 (init_registers_powerpc_altivec64l): ... this new prototype.
15215 (ppc_num_regs): Set to 73.
15216 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15217 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15218 (ppc_cannot_store_register): Handle orig_r3 and trap.
15219 (ppc_arch_setup): Update init_registers_... calls.
15220 (ppc_fill_gregset): Handle orig_r3 and trap.
15222 * inferiors.c (clear_inferiors): Reset current_inferior.
15224 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15226 * acinclude.m4: Add override.m4.
15227 * configure: Regenerate.
15229 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15231 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15232 initial call to init_register_ppc64.
15234 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15236 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15237 single powerpc*-*-linux* case.
15238 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15240 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15242 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15243 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15245 * linux-ppc-low.c: Include <elf.h>.
15246 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15247 (ppc_hwcap): New global variable.
15248 (ppc_regmap): Remove __SPE__ #ifdef sections.
15249 (ppc_regmap_e500): New global variable.
15250 (ppc_cannot_store_register): Update __SPE__ special case.
15251 (ppc_get_hwcap): New function.
15252 (ppc_arch_setup): Use it to determine whether inferior supports
15253 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15254 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15255 Do not access registers if target does not support AltiVec.
15256 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15257 Do not access registers if target does not support SPE.
15258 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15260 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15262 * linux-low.c (disabled_regsets, num_regsets): New.
15263 (use_regsets_p): Delete.
15264 (linux_wait_for_process): Clear disabled_regsets.
15265 (regsets_fetch_inferior_registers): Check and set it.
15266 (regsets_store_inferior_registers): Likewise.
15267 (linux_fetch_registers, linux_store_registers): Do not use
15269 (initialize_low): Allocate disabled_regsets.
15271 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15273 * Makefile.in (LIBOBJS): New.
15274 (OBS): Use LIBOBJS.
15275 (memmem.o): New rule.
15276 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15277 * configure: Regenerated.
15279 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15281 * server.c (handle_query): Never return "unsupported" for
15282 qXfer:features:read queries.
15284 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15286 * server.c (get_features_xml): Fix inverted condition.
15287 (handle_query): Always support qXfer:feature:read.
15289 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15291 * server.c (wrapper_argv): New.
15292 (start_inferior): Handle wrapper_argv. If set, expect an extra
15294 (gdbserver_usage): Document --wrapper.
15295 (main): Parse --wrapper.
15297 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15299 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15300 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15301 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15302 (ppc_set_pc): Likewise.
15303 (ppc_arch_setup): New function.
15304 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15305 of collect_register.
15306 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15308 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15310 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15311 instead of linux-ppc64-low.o.
15312 * linux-ppc64-low.c: Remove file.
15313 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15314 (linux-ppc64-low.o): Remove rule.
15316 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15317 (init_registers_powerpc_64): Likewise.
15318 (ppc_regmap): Conditionally define depending on __powerpc64__.
15319 (ppc_cannot_store_register): Do not special-case "fpscr" when
15320 compiled on __powerpc64__.
15321 (ppc_collect_ptrace_register): New function.
15322 (ppc_supply_ptrace_register): New function.
15323 (ppc_breakpoint): Change type to "unsigned int".
15324 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15325 (the_low_target): Conditionally provide initializers for the
15326 arch_setup member depending on __powerpc64__. Install
15327 collect_ptrace_register and supply_ptrace_register members.
15329 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15331 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15332 * server.c (gdbserver_xmltarget): Define.
15333 (get_features_xml): Use it to replace "target.xml" and arch_string.
15335 * configure.srv: Remove srv_xmltarget. Add XML files that were
15336 mentioned there to srv_xmlfiles instead. Remove conditional tests
15337 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15338 srv_xmlfiles and srv_regobj to include all possible choices.
15339 * configure.ac (srv_xmltarget): Remove.
15340 (srv_xmlfiles): Do not add "target.xml".
15341 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15342 checks for supplementary target information.
15343 * configure: Regenerate.
15344 * Makefile.in (XML_TARGET): Remove.
15345 (target.xml): Remove rule.
15346 (clean): Do not clean up target.xml.
15347 (.PRECIOUS): Do not mention target.xml.
15349 * target.h (struct target_ops): Remove arch_string member.
15350 * linux-low.c (linux_arch_string): Remove.
15351 (linux_target_ops): Remove arch_string initializer.
15352 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15353 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15354 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15355 * spu-low.c (spu_arch_string): Remove.
15356 (spu_target_ops): Remove arch_string initializer.
15357 * win32-low.c (win32_arch_string): Remove.
15358 (win32_target_ops): Remove arch_string initializer.
15359 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15360 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15361 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15363 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15365 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15366 by collect_ptrace_register and supply_ptrace_register hooks.
15367 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15368 instead of checking for the_low_target.left_pad_xfer.
15369 (usr_store_inferior_registers): Use collect_ptrace_register callback
15370 instead of checking for the_low_target.left_pad_xfer.
15372 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15373 (s390_supply_ptrace_register): Likewise.
15374 (s390_fill_gregset): Call s390_collect_ptrace_register.
15375 (the_low_target): Update.
15377 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15378 (ppc_supply_ptrace_register): Likewise.
15379 (the_low_target): Update.
15381 * linux-i386-low.c (the_low_target): Update.
15382 * linux-x86-64-low.c (the_low_target): Update.
15384 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15386 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15387 reg-s390.o and reg-s390x.o.
15389 * linux-low.c (new_inferior): New global variable.
15390 (linux_create_inferior, linux_attach): Set it.
15391 (linux_wait_for_process): Call the_low_target.arch_setup after the
15392 target has stopped for the first time.
15393 (initialize_low): Do not call the_low_target.arch_setup.
15395 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15396 (s390_set_pc): Likewise.
15397 (s390_arch_setup): New function.
15398 (the_low_target): Use s390_arch_setup as arch_setup routine.
15400 * regcache.c (realloc_register_cache): New function.
15401 (set_register_cache): Call it for each existing regcache.
15403 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15405 * server.h (init_registers): Remove prototype.
15407 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15408 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15409 instead of init_registers ().
15410 * linux-arm-low.c (init_registers_arm): Add prototype.
15411 (init_registers_arm_with_iwmmxt): Likewise.
15412 (the_low_target): Add initializer for arch_setup field.
15413 * linux-cris-low.c (init_registers_cris): Add prototype.
15414 (the_low_target): Add initializer for arch_setup field.
15415 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15416 (the_low_target): Add initializer for arch_setup field.
15417 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15418 (the_low_target): Add initializer for arch_setup field.
15419 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15420 (the_low_target): Add initializer for arch_setup field.
15421 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15422 (the_low_target): Add initializer for arch_setup field.
15423 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15424 (the_low_target): Add initializer for arch_setup field.
15425 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15426 (init_registers_mips64_linux): Likewise.
15427 (the_low_target): Add initializer for arch_setup field.
15428 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15429 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15430 (the_low_target): Add initializer for arch_setup field.
15431 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15432 (init_registers_powerpc_64): Likewise.
15433 (the_low_target): Add initializer for arch_setup field.
15434 * linux-s390-low.c (init_registers_s390): Add prototype.
15435 (init_registers_s390x): Likewise.
15436 (the_low_target): Add initializer for arch_setup field.
15437 * linux-sh-low.c (init_registers_sh): Add prototype.
15438 (the_low_target): Add initializer for arch_setup field.
15439 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15440 (the_low_target): Add initializer for arch_setup field.
15441 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15442 (the_low_target): Add initializer for arch_setup field.
15444 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15445 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15446 instead of init_registers ().
15447 * win32-arm-low.c (init_registers_arm): Add prototype.
15448 (the_low_target): Add initializer for arch_setup field.
15449 * win32-i386-low.c (init_registers_i386): Add prototype.
15450 (the_low_target): Add initializer for arch_setup field.
15452 * spu-low.c (init_registers_spu): Add prototype.
15453 (initialize_low): Call initialie_registers_spu () instead of
15454 initialize_registers ().
15456 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15458 * server.c (handle_v_requests): When handling the vRun and vAttach
15459 packets, if already debugging a process, don't kill it. Return an
15462 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15464 * server.c (handle_query): Correct length check.
15466 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15468 * win32-low.c (do_initial_child_stuff): Add process handle
15469 parameter. Set current_process_handle and current_process_id from the
15470 parameters. Clear globals.
15471 (win32_create_inferior): Don't set current_process_handle and
15472 current_process_id here. Instead pass them on the call to
15473 do_initial_child_stuff.
15474 (win32_attach): Likewise.
15475 (win32_clear_inferiors): New.
15476 (win32_kill): Don't close the current process handle or the
15477 current thread handle here. Instead call win32_clear_inferiors.
15478 (win32_detach): Don't open a new handle to the process. Call
15479 win32_clear_inferiors.
15480 (win32_join): Don't rely on current_process_handle; open a new
15481 handle using the process id.
15482 (win32_wait): Call win32_clear_inferiors when the inferior process
15485 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15487 * server.c (monitor_show_help): Add "exit".
15489 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15491 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15492 (clean): Add reg-xtensa.c.
15493 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15494 * configure.srv (xtensa*-*-linux*) New target.
15495 * linux-xtensa-low.c: New.
15496 * xtensa-xtregs.c: New.
15498 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15500 * hostio.c: Don't include errno.h.
15501 (errno_to_fileio_errno): Move to hostio-errno.
15502 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15503 error number outputting to the target->hostio_last_error callback.
15504 (hostio_packet_error): Use FILEIO_EINVAL directly.
15505 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15506 calls to hostio_error.
15507 * hostio-errno.c: New.
15508 * server.h (hostio_last_error_from_errno): Declare.
15509 * target.h (target_ops): Add hostio_last_error member.
15510 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15511 as hostio_last_error handler.
15512 * spu-low.c (spu_target_ops): Likewise.
15513 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15514 (wince_hostio_last_error): New functions.
15515 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15516 as hostio_last_error handler.
15517 (win32_target_ops) [!_WIN32_WCE]: Register
15518 hostio_last_error_from_errno as hostio_last_error handler.
15519 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15520 (hostio-errno.o): New rule.
15521 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15522 * configure.srv (srv_hostio_err_objs): New variable. Default to
15524 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15525 * configure: Regenerate.
15527 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15529 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15530 (linux_kill, linux_detach): Clean up the process list.
15531 * remote-utils.c (remote_open): Improve port number parsing.
15532 (putpkt_binary, input_interrupt): Only send interrupts if the target
15534 * server.c (extended_protocol): Make static.
15535 (attached): Define earlier.
15536 (exit_requested, response_needed, program_argv): New variables.
15537 (target_running): New.
15538 (start_inferior): Clear attached here.
15539 (attach_inferior): Set attached here.
15540 (require_running): Define.
15541 (handle_query): Use require_running and target_running. Implement
15543 (handle_v_attach, handle_v_run): New.
15544 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15545 (gdbserver_usage): Update.
15546 (main): Redo argument parsing. Handle --debug and --multi. Handle
15547 --attach along with other options or after the port. Save
15548 program_argv. Support no initial program. Resynchronize
15549 communication with GDB after an error. Handle "monitor exit".
15550 Use require_running and target_running. Always allow the extended
15551 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15552 restart in extended mode.
15553 * README: Refer to the GDB manual. Update --attach usage.
15555 2007-12-20 Andreas Schwab <schwab@suse.de>
15557 * linux-low.c (STACK_SIZE): Define.
15558 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15559 (linux_test_for_tracefork): Likewise.
15561 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15563 * linux-low.c (linux_wait_for_event): Update messages. Do not
15564 reinsert auto-delete breakpoints.
15565 * mem-break.c (struct breakpoint): Change return type of handler to
15567 (set_breakpoint_at): Update handler type.
15568 (reinsert_breakpoint_handler): Return 1 instead of calling
15570 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15572 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15573 * mem-break.h (set_breakpoint_at): Update handler type.
15574 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15575 * win32-low.c (auto_delete_breakpoint): New.
15576 (get_child_debug_event): Use it.
15578 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15580 * configure.ac: Check for pread and pwrite.
15581 * hostio.c (handle_pread): Fall back to lseek and read.
15582 (handle_pwrite): Fall back to lseek and write.
15583 * config.in, configure: Regenerated.
15585 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15587 * server.c (myresume): Add own_buf argument.
15588 (main): Update calls.
15590 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15592 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15593 * remote-utils.c (remote_open): Do not call disable_async_io.
15594 (block_async_io): Delete.
15595 (unblock_async_io): Make static.
15596 (initialize_async_io): New.
15597 * server.c (handle_v_cont): Handle async I/O here.
15598 (myresume): Likewise. Move other common resume tasks here...
15599 (main): ... from here. Call initialize_async_io. Disable async
15600 I/O before the main loop.
15601 * server.h (initialize_async_io): Declare.
15602 (block_async_io, unblock_async_io): Delete prototypes.
15603 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15605 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15607 * remote-utils.c (readchar): Allow binary data in received messages.
15609 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15611 * win32-low.c (attaching): New global.
15612 (win32_create_inferior): Clear the `attaching' global.
15613 (win32_attach): Set the `attaching' global.
15614 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15615 attaching. Only set a breakpoint at the entry point if not
15618 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15620 * server.c (main): Don't report dll events on the initial
15621 connection on attaches.
15623 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15625 * server.c (main): Relax numerical bases supported for the pid of
15626 the --attach command line argument.
15628 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15630 * win32-low.c (win32_attach): Call OpenProcess before
15631 DebugActiveProcess, not after. Add last error output to error
15634 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15636 * win32-low.c (win32_get_thread_context)
15637 (win32_set_thread_context): New functions.
15638 (thread_rec): Use win32_get_thread_context.
15639 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15640 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15643 2007-12-03 Leo Zayas
15644 Pedro Alves <pedro_alves@portugalmail.pt>
15646 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15648 (child_add_thread): Minor cleanup.
15649 (child_continue): Resume artificially suspended threads before
15650 calling ContinueDebugEvent.
15651 (suspend_one_thread): New.
15652 (fake_breakpoint_event): New.
15653 (get_child_debug_event): Change return type to int. Check here if
15654 gdb sent an interrupt request. If a soft interrupt was requested,
15655 fake a breakpoint event. Return 0 if there is no event to handle,
15657 (win32_wait): Don't check here if gdb sent an interrupt request.
15658 Ensure there is a valid event to handle.
15659 (win32_request_interrupt): Add soft interruption method as last
15662 2007-12-03 Leo Zayas
15663 Pedro Alves <pedro_alves@portugalmail.pt>
15665 * win32-low.h (win32_thread_info): Add descriptions to the
15666 structure members. Replace `suspend_count' counter by a
15668 * win32-low.c (thread_rec): Update condition of when to get the
15669 context from the inferior. Rely on ContextFlags being set if it
15670 has already been retrieved. Only suspend the inferior thread if
15671 we haven't already. Warn if that fails.
15672 (continue_one_thread): s/suspend_count/suspended/. Only call
15673 ResumeThread once. Warn if that fails.
15675 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15677 * win32-low.c (win32_wait): Don't read from the inferior when it
15678 has already exited.
15680 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15682 * Makefile.in (win32_low_h): New variable.
15683 (win32-low.o): Add dependency on $(win32_low_h).
15684 (win32-arm-low.o, win32-i386-low.o): New rules.
15686 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15688 * hostio.c: Correct copyright year.
15690 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15692 * Makefile.in (OBS): Add hostio.o.
15693 (hostio.o): New rule.
15694 * server.h (handle_vFile): Declare.
15695 * hostio.c: New file.
15696 * server.c (handle_v_requests): Take packet_len and new_packet_len
15697 for binary packets. Call handle_vFile.
15698 (main): Update call to handle_v_requests.
15700 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15702 * linux-low.c: Include <sched.h>.
15704 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15706 * linux-low.c (linux_tracefork_grandchild): New.
15707 (linux_tracefork_child): Use clone.
15708 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15710 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15712 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15714 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15716 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15718 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15720 * inferiors.c (change_inferior_id): Delete.
15721 (add_pid_to_list, pull_pid_from_list): New.
15722 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15723 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15724 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15725 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15726 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15727 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15728 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15729 (using_threads): Always set to 1.
15730 (handle_extended_wait): New.
15731 (add_process): Do not set TID.
15732 (linux_create_inferior): Set must_set_ptrace_flags.
15733 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15734 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15735 (linux_thread_alive): Rename TID argument to LWPID.
15736 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15737 (linux_wait_for_event): Do not use TID or check using_threads. Update
15738 call to dead_thread_notify. Call handle_extended_wait.
15739 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15740 (send_sigstop): Delete sigstop_sent.
15741 (wait_for_sigstop): Avoid TID.
15742 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15743 (linux_test_for_tracefork): New.
15744 (linux_lookup_signals): Use thread_db_active and
15745 linux_supports_tracefork_flag.
15746 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15747 * linux-low.h (get_process_thread): Avoid TID.
15748 (struct process_ifo): Move thread_known and tid to the end. Remove
15750 (linux_attach_lwp, thread_db_init): Update prototypes.
15751 * server.h (change_inferior_id): Delete prototype.
15752 (add_pid_to_list, pull_pid_from_list): New prototypes.
15753 * thread-db.c (thread_db_use_events): New.
15754 (find_first_thread): Rename to...
15755 (find_one_thread): ...this. Update callers and messages. Do not
15756 call fatal. Check thread_db_use_events. Do not call
15757 change_inferior_id or new_thread_notify.
15758 (maybe_attach_thread): Update. Do not call new_thread_notify.
15759 (thread_db_init): Set thread_db_use_events. Check use_events.
15760 * utils.c (fatal, warning): Correct message prefix.
15762 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15764 * Makefile.in (clean): Remove new files.
15765 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15766 (powerpc-64.o, powerpc-64.c): New rules.
15767 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15768 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15770 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15772 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15773 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15774 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15775 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15776 (target_regsets): Add AltiVec and SPE register sets.
15777 * configure.ac: Check for AltiVec and SPE.
15778 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15779 (ppc_fill_vrregset, ppc_store_vrregset): New.
15780 (target_regsets): Add AltiVec register set.
15781 * configure: Regenerated.
15783 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15785 * linux-low.c (O_LARGEFILE): Define.
15786 (linux_read_memory): Use /proc/PID/mem.
15787 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15788 * configure, config.in: Regenerated.
15790 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15792 * linux-low.c (linux_wait_for_event): Do not pass signals while
15795 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15797 * win32-low.c (create_process): New.
15798 (win32_create_inferior): Use create_process instead of
15799 CreateProcess. If create_process failed retry appending an ".exe"
15800 suffix. Store the GetLastError result immediatelly after
15801 create_process calls and use it on the call to error.
15803 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15805 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15807 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15809 * configure.ac: Switch license to GPLv3.
15811 2007-08-01 Michael Snyder <msnyder@access-company.com>
15813 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15815 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15817 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15819 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15820 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15821 CloseToolhelp32Snapshot.
15822 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15823 CloseToolhelp32Snapshot.
15825 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15827 * server.c (main): Check for inferior exit before main loop.
15829 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15831 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15832 instead of on tmp_desc.
15834 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15835 Daniel Jacobowitz <dan@codesourcery.com>
15837 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15838 (add_thread): Minor cleanups.
15839 (clear_inferiors): Move lower in the file. Clear the DLL
15841 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15842 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15843 (xml_escape_text): New.
15844 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15846 (handle_v_cont): Report errors.
15847 (gdbserver_version): Update.
15848 (main): Correct size of own_buf. Do not report initial DLL events.
15849 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15850 (unloaded_dll, xml_escape_text): New.
15851 * win32-low.c (enum target_waitkind): Update comments.
15852 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15853 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15854 (win32_EnumProcessModules, win32_GetModuleInformation)
15855 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15856 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15857 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15858 (win32_Module32First, win32_Module32Next, load_toolhelp)
15859 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15860 (get_child_debug_event): Handle DLL events.
15861 (win32_wait): Likewise.
15863 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15865 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15866 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15868 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15870 * win32-low.c (handle_output_debug_string): Ignore event if not
15873 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15875 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15877 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15879 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15881 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15883 * inferiors.c (change_inferior_id): Add comment.
15884 * linux-low.c (check_removed_breakpoint): Add an early
15885 prototype. Improve debug output.
15886 (linux_attach): Doc update.
15887 (linux_detach_one_process, linux_detach): Clean up before releasing
15889 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15890 * linux-low.h (struct process_info): Doc improvement.
15891 * mem-break.c (delete_all_breakpoints): New.
15892 * mem-break.h (delete_all_breakpoints): New prototype.
15893 * thread-db.c (find_first_thread): New.
15894 (thread_db_create_event): Call it instead of
15895 thread_db_find_new_threads. Clean up unused variables.
15896 (maybe_attach_thread): Remove first thread handling.
15897 (thread_db_find_new_threads): Use find_first_thread.
15898 (thread_db_get_tls_address): Likewise.
15900 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15902 * thread-db.c (thread_db_find_new_threads): Add prototype.
15903 (thread_db_create_event): Check for the main thread before adding
15905 (maybe_attach_thread): Only enable event reporting if TID == 0.
15906 (thread_db_get_tls_address): Check for new threads.
15908 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15910 * linux-low.c (linux_create_inferior): Try execv before execvp.
15911 * spu-low.c (spu_create_inferior): Likewise.
15913 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15915 * linux-low.c (linux_create_inferior): Change execv to execvp.
15916 * spu-low.c (spu_create_inferior): Likewies.
15918 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15920 * Makefile.in (clean): Clean new files instead of deleted ones.
15921 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15922 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15924 * configure.srv: Specify XML files and new regformats for MIPS and
15926 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15927 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15928 an entry for the restart register.
15929 (mips_cannot_fetch_register, mips_cannot_store_register)
15930 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15931 register names to match the XML descriptions.
15932 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15933 restart register instead of $0.
15935 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15936 Markus Deuling <deuling@de.ibm.com>
15938 * remote-utils.c (decode_xfer_write): New function.
15939 * server.h (decode_xfer_write): Add prototype.
15940 * server.c (handle_query): Add PACKET_LEN argument. Support
15941 qXfer:spu:read and qXfer:spu:write packets.
15942 (main): Pass packet_len to handle_query.
15943 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15944 * target.h (target_ops): Add qxfer_spu.
15946 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15948 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15949 accessing non-seekable spufs files.
15951 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15953 * server.c (handle_query): Add reply for qC packet.
15955 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15956 Leo Zayas <lerele@champenstudios@com>
15958 * server.h (check_remote_input_interrupt_request): New function.
15959 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15960 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15961 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15962 (check_remote_input_interrupt_request): New function.
15963 * server.h (check_remote_input_interrupt_request): Declare.
15964 * win32-low.c (winapi_DebugBreakProcess,
15965 winapi_GenerateConsoleCtrlEvent): New typedefs.
15966 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15968 (win32_wait): Check for remote interrupt request
15969 with check_remote_input_interrupt_request.
15970 (win32_request_interrupt): New function.
15971 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15973 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15975 * win32-low.c (debug_registers_changed,
15976 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15977 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15978 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15979 (thread_rec): Get context using the low target.
15980 (child_add_thread): Call thread_added on the low target,
15981 which does the same thing.
15983 (do_initial_child_stuff): Remove debug registers references.
15984 Set context using the low target. Resume threads after
15985 setting the contexts.
15986 (child_continue): Remove dead variable. Remove debug
15987 registers references.
15988 (child_fetch_inferior_registers): Go through the low target.
15989 (do_child_store_inferior_registers): Remove.
15990 (child_store_inferior_registers): Go through the low target.
15991 (win32_resume): Remove debug registers references.
15992 Set context using the low target.
15993 (handle_exception): Change return type to void. Don't record
15994 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15995 first chance exception.
15996 (get_child_debug_event): Change return type to void. Remove
15997 goto loop. Always return after waiting for debug event.
15998 (win32_wait): Convert to switch statement. Handle spurious
16001 * win32-i386-low.c (debug_registers_changed,
16002 debug_registers_used): New.
16003 (initial_stuff): Rename to ...
16004 (i386_initial_stuff): ... this. Clear debug registers
16006 (store_debug_registers): Delete.
16007 (i386_get_thread_context): New.
16008 (load_debug_registers): Delete.
16009 (i386_set_thread_context): New.
16010 (i386_thread_added): New.
16011 (single_step): Rename to ...
16012 (i386_single_step): ... this.
16013 (do_fetch_inferior_registers): Rename to ...
16014 (i386_fetch_inferior_register): ... this.
16015 (i386_store_inferior_register): New.
16016 (the_low_target): Adapt to new interface.
16018 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16019 (arm_get_thread_context): New.
16020 (arm_set_thread_context): New.
16022 (do_fetch_inferior_registers): Rename to ...
16023 (arm_fetch_inferior_register): ... this.
16024 (arm_store_inferior_register): New.
16025 (arm_wince_breakpoint): Reimplement as unsigned long.
16026 (arm_wince_breakpoint_len): Define.
16027 (the_low_target): Adapt to new interface.
16029 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16030 load_debug_registers. Add get_thread_context, set_thread_context,
16031 thread_added and store_inferior_register. Rename
16032 fetch_inferior_registers to fetch_inferior_register.
16033 (regptr): Remove declaration.
16035 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16037 * linux-low.c (linux_detach): Change return type to int. Return 0.
16038 * spu-low.c (spu_detach): Likewise.
16040 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16042 * target.h (target_ops): Change return type of detach to int.
16044 (join_inferior): New.
16045 * server.c (main): Don't skip detach support on mingw32.
16046 If the inferior doesn't support detaching return error.
16047 Call join_inferior instead of using waitpid.
16048 * linux-low.c (linux_join): New.
16049 (linux_target_op): Add linux_join.
16050 * spu-low.c (spu_join): New.
16051 (spu_target_ops): Add spu_join.
16052 * win32-low.c (win32_detach): Adapt to new interface.
16053 Reopen current_process_handle before detaching. Issue a child
16054 resume before detaching.
16056 (win32_target_op): Add win32_join.
16058 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16060 * win32-low.c (win32-attach): Fix return value.
16061 * target.h (target_ops): Describe ATTACH return values.
16063 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16065 * win32-low.c (GETPROCADDRESS): Define.
16066 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16067 (winapi_DebugSetProcessKillOnExit): Likewise.
16068 (win32_create_inferior): Force usage of ansi CreateProcessA.
16069 (win32_attach): Use GETPROCADDRESS.
16070 (win32_detach): Likewise.
16072 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16074 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16076 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16078 * win32-low.c: Commit leftover changes from 2007-03-29.
16080 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16082 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16083 fields short instead of int. Add explicit padding.
16084 (i387_cache_to_fsave): Remove unnecessary casts.
16085 (i387_fsave_to_cache): Doc fix.
16086 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16088 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16090 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16091 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16093 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16095 * configure.srv (arm*-*-mingw32ce*): Move near the other
16098 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16100 * configure.ac: Add errno checking.
16101 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16102 sys/file.h and malloc.h.
16103 (AC_CHECK_DECLS): Add perror.
16104 (srv_mingwce): Handle.
16105 * configure.srv (i[34567]86-*-cygwin*): Add
16106 win32-i386-low.o to srv_tgtobj.
16107 (i[34567]86-*-mingw*): Likewise.
16108 (arm*-*-mingw32ce*): Add case.
16109 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16110 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16111 [__MINGW32CE__] (strerror): New function.
16112 [__MINGW32CE__] (errno): Define to GetLastError.
16113 [__MINGW32CE__] (COUNTOF): New macro.
16114 (remote_open): Remove extra close call.
16115 * mem-break.c (delete_breakpoint_at): New function.
16116 * mem-break.h (delete_breakpoint_at): Declare.
16117 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16118 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16119 [USE_WIN32API] (read, write): Add char* casts.
16120 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16121 * server.h: Include wincecompat.h on Windows CE.
16122 [HAVE_ERRNO_H]: Check.
16123 (perror): Declare if not declared.
16124 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16125 (perror_with_name): Remove errno declaration.
16126 * wincecompat.h: New.
16127 * wincecompat.c: New.
16128 * win32-low.h: New.
16129 * win32-arm-low.c: New.
16130 * win32-i386-low.c: New.
16131 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16132 (OUTMSG2): Make it safe.
16134 (COUNTOF): New macro.
16135 (NUM_REGS): Get it from the low target.
16136 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16137 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16138 (thread_rec): Let low target handle debug registers.
16139 (child_add_thread): Likewise.
16140 (child_init_thread_list): Likewise.
16141 (continue_one_thread): Likewise.
16143 (do_child_fetch_inferior_registers): Move to ...
16144 * win32-i386-low.c: ... here, and rename to ...
16145 (do_fetch_inferior_registers): ... this.
16146 * win32-low.c (child_fetch_inferior_registers):
16147 Go through the low target.
16148 (do_child_store_inferior_registers): Use regptr.
16149 (strwinerror): New function.
16150 (win32_create_inferior): Handle Windows CE.
16151 Use strwinerror instead of strerror on Windows error
16152 codes. Add program to the error output.
16153 Don't close the main thread handle on Windows CE.
16154 (win32_attach): Use coredll.dll on Windows CE.
16155 (win32_kill): Close current process and current
16157 (win32_detach): Use coredll.dll on Windows CE.
16158 (win32_resume): Let low target handle debug registers, and
16160 (handle_exception): Add/Remove initial breakpoint. Avoid
16161 non-existant WSTOPSIG on Windows CE.
16162 (win32_read_inferior_memory): Cast to remove warning.
16163 (win32_arch_string): Go through the low target.
16164 (initialize_low): Call set_breakpoint_data with the low
16165 target's breakpoint.
16166 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16167 FOP_REGNUM, mappings): Move to ...
16168 * win32-i386-low.c: ... here.
16169 * win32-low.c (win32_thread_info): Move to ...
16170 * win32-low.h: ... here.
16171 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16172 win32-arm-low.c and wincecompat.c.
16173 (all:): Add $EXEEXT.
16174 (install-only:): Likewise.
16175 (gdbserver:): Likewise.
16176 (gdbreplay:): Likewise.
16177 * config.in: Regenerate.
16178 * configure: Regenerate.
16180 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16182 * win32-low.c: Rename typedef thread_info to
16183 win32_thread_info throughout.
16185 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16187 * win32-i386-low.c: Rename to ...
16188 * win32-low.c: ... this.
16189 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16190 * Makefile.in: Likewise.
16192 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16194 * remote-utils.c (monitor_output): Constify msg parameter.
16195 * server.h (monitor_output): Likewise.
16196 * win32-i386-low.c (handle_output_debug_string): New.
16197 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16198 handle_output_debug_string.
16199 (get_child_debug_event): Likewise.
16201 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16203 * server.c (main): Correct strtoul check.
16205 2007-03-27 Jon Ringle <jon@ringle.org>
16207 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16209 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16211 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16213 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16215 * terminal.h: Check HAVE_SGTTY_H.
16217 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16219 * remote-utils.c (remote_open): Print out the assigned port number.
16221 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16223 * remote-utils.c (monitor_output): New function.
16224 * server.c (debug_threads): Define here.
16225 (monitor_show_help): New function.
16226 (handle_query): Handle qRcmd.
16227 (main): Do not handle 'd' packet.
16228 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16229 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16232 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16234 * Makefile.in (EXEEXT): New.
16235 (clean): Use $(EXEEXT).
16237 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16239 * target.h (target_ops): Rename send_signal to request_interrupt,
16240 and remove enum target_signal parameter.
16241 * linux-low.c (linux_request_interrupt): Rename from
16242 linux_send_signal, and always send SIGINT.
16243 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16244 and always send SIGINT.
16245 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16247 (input_interrupt): Likewise.
16249 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16251 * server.c (get_features_xml): Check if target implemented
16253 * win32-i386-low.c (win32_arch_string): New.
16254 (win32_target_ops): Add win32_arch_string as arch_string member.
16256 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16258 * spu-low.c (spu_arch_string): New.
16259 (spu_target_ops): Add spu_arch_string.
16261 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16263 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16264 * configure.ac: Do not check for terminal.h.
16265 * configure, config.in: Regenerated.
16267 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16269 * Makefile.in (OBS): Add $(XML_BUILTIN).
16270 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16272 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16273 (arm-with-iwmmxt.c): New.
16274 * config.in, configure: Regenerate.
16275 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16276 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16277 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16278 (arm*-*-linux*): Add iWMMXt and regset support.
16279 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16280 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16281 (arm_store_wmmxregset, target_regsets): New.
16282 * server.c (get_features_xml): Take annex argument. Check builtin
16284 (handle_query): Handle multiple annexes.
16286 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16288 * remote-utils.c [USE_WIN32API] (read, write): Define.
16289 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16292 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16294 * linux-i386-low.c (the_low_target): Set arch_string.
16295 * linux-x86-64-low.c (the_low_target): Likewise.
16296 * linux-low.c (linux_arch_string): New.
16297 (linux_target_ops): Add it.
16298 * linux-low.h (struct linux_target_ops): Add arch_string.
16299 * server.c (write_qxfer_response): Use const void * for DATA.
16300 (get_features_xml): New.
16301 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16302 * target.h (struct target_ops): Add arch_string method.
16304 2007-01-03 Denis Pilat <denis.pilat@st.com>
16305 Daniel Jacobowitz <dan@codesourcery.com>
16307 * linux-low.c (linux_kill): Handle being called with no threads.
16308 * win32-i386-low.c (win32_kill): Likewise.
16309 (get_child_debug_event): Clear current_process_handle.
16311 2006-12-30 Denis PILAT <denis.pilat@st.com>
16312 Daniel Jacobowitz <dan@codesourcery.com>
16314 * remote-utils.c (remote_open): Check the type of specified
16315 serial port devices before opening them.
16316 * server.c (main): Kill the inferior if an error occurs during
16317 the first remote_open.
16319 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16321 * README: Update supported targets.
16323 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16325 * Makefile.in (clean): Remove reg-mips64.c.
16326 (reg-mips64.c, reg-mips64.o): New rules.
16327 * configure.srv: Handle mips64. Include regset support for mips.
16328 * linux-mips-low.c (union mips_register): New.
16329 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16330 (mips_breakpoint, mips_breakpoint_at): Use int.
16331 (mips_collect_register, mips_supply_register)
16332 (mips_collect_register_32bit, mips_supply_register_32bit)
16333 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16334 (mips_store_fpregset, target_regsets): New.
16335 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16337 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16339 * configure.srv: Add target "spu*-*-*".
16340 * Makefile.in (clean): Remove reg-spu.c.
16341 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16342 * spu-low.c: New file.
16344 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16346 * configure.ac: Correct td_thr_tls_get_addr test.
16347 * configure: Regenerated.
16349 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16351 * linux-low.c (linux_wait_for_event): Reformat. Use the
16352 pass_signals array.
16353 * remote-utils.c (decode_address_to_semicolon): New.
16354 * server.c (pass_signals, handle_general_set): New.
16355 (handle_query): Mention QPassSignals for qSupported.
16356 (main): Call handle_general_set.
16357 * server.h (pass_signals, decode_address_to_semicolon): New.
16359 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16361 * server.c (handle_query): Correct error handling for read_auxv.
16363 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16365 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16366 and srv_linux_thread_db to yes.
16367 * linux-s390-low.c (s390_fill_gregset): New function.
16368 (target_regsets): Define data structure.
16370 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16372 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16373 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16374 * config.in, configure: Regenerated.
16375 * inferiors.c (gdb_id_to_thread): New function.
16376 (gdb_id_to_thread_id): Use it.
16377 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16378 * linux-low.h (struct process_info): Add th member.
16379 (thread_db_get_tls_address): New prototype.
16380 * remote-utils.c (decode_address): Make non-static.
16381 * server.c (handle_query): Handle qGetTLSAddr.
16382 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16383 * target.h (struct target_ops): Add get_tls_address.
16384 * thread-db.c (maybe_attach_thread): Save the thread handle.
16385 (thread_db_get_tls_address): New.
16387 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16389 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16390 (linux_resume_one_process): Take a siginfo_t *. Update all
16391 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16392 (struct pending_signals): Add a siginfo_t.
16393 (linux_wait_for_process): Always set last_status.
16394 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16395 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16396 * linux-low.h (struct process_info): Add last_status.
16398 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16400 * remote-utils.c (try_rle): New function.
16401 (putpkt_binary): Use it.
16403 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16405 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16406 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16407 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16408 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16409 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16412 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16414 * server.c (terminal_fd): New variable.
16415 (old_foreground_pgrp): Likewise.
16416 (restore_old_foreground_pgrp): New function.
16417 (start_inferior): Record the terminal file descriptor in terminal_fd
16418 and its original foreground group in old_foreground_pgrp. Register
16419 restore_old_foreground_pgrp with atexit().
16421 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16423 * server.c (handle_query): Correct qPart to qXfer.
16425 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16427 * configure.ac: Check for more headers which are missing on
16428 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16429 * configure.srv: Add Cygwin and mingw32.
16430 * remote-utils.c: Don't include headers unconditionally which
16431 are missing on mingw32. Include <winsock.h> for mingw32.
16432 (remote_open): Adjust for mingw32 support. Flush
16433 standard error after writing to it.
16434 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16435 (unblock_async_io, enable_async_io, disable_async_io)
16436 (readchar, getpkt): Update for Winsock support.
16437 (prepare_resume_reply): Expect a protocol signal number.
16438 * server.c: Disable <sys/wait.h> on mingw32.
16439 (start_inferior): Adjust for mingw32 support. Flush
16440 standard error after writing to it.
16441 (attach_inferior): Likewise. Use protocol signal
16443 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16445 * win32-i386-low.c: New file.
16446 * Makefile.in (XM_CLIBS): Set.
16447 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16448 (win32-i386-low.o): New dependency rule.
16449 * linux-low.c (linux_wait): Use target signal numbers.
16450 * target.h (struct target_ops): Doc fix.
16451 * server.h (target_signal_to_name): New prototype.
16452 * gdbreplay.c: Don't include headers unconditionally which
16453 are missing on mingw32. Include <winsock.h> for mingw32.
16454 (remote_close, remote_open): Adjust for Winsock support.
16455 * configure, config.in: Regenerated.
16457 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16459 * server.c (decode_xfer_read, write_qxfer_response): New.
16460 (handle_query): Take a packet length argument. Handle
16461 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16462 the qSupported response.
16463 (main): Update call to handle_query.
16465 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16467 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16468 (putpkt_binary): Renamed from putpkt and adjusted for binary
16470 (putpkt): New wrapper for putpkt_binary.
16471 (readchar): Don't mask off the high bit.
16472 (decode_X_packet): New function.
16473 * server.c (main): Call putpkt_binary if a handler sets the packet
16474 length. Save the length of the incoming packet. Handle 'X'.
16475 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16477 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16479 * server.c (handle_query): Handle qSupported.
16481 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16483 * remote-utils.c (all_symbols_looked_up): New variable.
16484 (look_up_one_symbol): Check it.
16485 * server.h (look_up_one_symbol): New declaration.
16486 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16488 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16490 * Makefile.in (linux-arm-low.o): Update dependencies.
16491 * linux-arm-low.c: Include "gdb_proc_service.h".
16492 (PTRACE_GET_THREAD_AREA): Define.
16493 (ps_get_thread_area): New function.
16495 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16497 * configure.srv (m68k*-*-uclinux*): New target.
16498 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16499 (linux_resume_one_process): Remove extraneous cast.
16500 (linux_read_offsets): New.
16501 (linux_target_op): Add linux_read_offsets on mmuless systems.
16502 * server.c (handle_query): Add qOffsets logic.
16503 * target.h (struct target_ops): Add read_offsets.
16505 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16507 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16508 (PTRACE_GET_THREAD_AREA): Define.
16509 (ps_get_thread_area): New function.
16510 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16511 (linux-x86-64-low.o): Update.
16513 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16515 * configure.ac: Remove checks for prfpregset_t.
16516 * gdb_proc_service.h: New file.
16517 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16518 new "gdb_proc_service.h".
16519 * proc-service.c: Likewise.
16520 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16521 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16522 * Makefile.in (gdb_proc_service_h): Updated.
16523 * configure, config.in: Regenerated.
16525 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16527 * remote-utils.c (prepare_resume_reply): Move declaration
16528 of gdb_id_from_wait to the top of the block.
16530 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16532 * linux-low.c (regsets_store_inferior_registers): Read the regset
16533 from the target before filling it.
16535 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16537 * server.c (attach_inferior): Return SIGTRAP for a successful
16540 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16542 * Makefile.in (OBS): Add version.o.
16543 (STAGESTUFF): Delete.
16544 (version.o): Add dependencies.
16545 (version.c): Replace rule.
16546 (clean): Remove version.c.
16547 * server.c (gdbserver_version): New.
16548 (gdbserver_usage): Use printf.
16549 (main): Handle --version and --help.
16550 * server.h (version, host_name): Add declarations.
16552 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16564 * linux-x86-64-low.c:
16566 * linux-s390-low.c:
16567 * linux-ppc64-low.c:
16569 * linux-mips-low.c:
16570 * linux-m68k-low.c:
16571 * linux-m32r-low.c:
16574 * linux-ia64-low.c:
16575 * linux-i386-low.c:
16576 * linux-crisv32-low.c:
16588 * gdbserver.1: Add (C) after Copyright. Update the FSF
16591 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16593 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16594 (arm_breakpoint_at): Recognize both breakpoints.
16595 (the_low_target): Use the correct breakpoint instruction.
16597 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16599 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16600 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16601 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16602 (the_low_target): Update.
16604 2005-10-25 Andreas Schwab <schwab@suse.de>
16606 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16608 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16609 (ia64_num_regs): Reduce to 462.
16611 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16613 * acinclude.m4: Correct quoting.
16614 * aclocal.m4: Regenerated.
16616 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16617 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16618 (thread_db_init): Call thread_db_err_str.
16619 * configure.ac: Check for TD_VERSION.
16620 * config.in, configure: Regenerated.
16622 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16624 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16626 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16628 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16629 is not available. Define HAVE_PTRACE_GETREGS if it is.
16630 * config.in, configure: Regenerated.
16631 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16632 * linux-i386-low.c, linux-m68k-low.c: Update to use
16633 HAVE_PTRACE_GETREGS.
16634 * linux-low.c (regsets_fetch_inferior_registers)
16635 (regsets_store_inferior_registers): Only return 0 if we processed
16637 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16638 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16640 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16642 * inferiors.c (struct thread_info): Add gdb_id.
16643 (add_thread): Add gdb_id argument.
16644 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16645 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16646 calls to add_thread.
16647 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16648 * server.c (handle_query): Use thread_to_gdb_id.
16649 (handle_v_cont, main): Use gdb_id_to_thread_id.
16650 * server.h (add_thread): Update prototype.
16651 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16654 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16656 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16657 left-padded registers.
16658 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16659 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16661 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16663 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16664 * configure: Regenerate.
16665 * config.in: Regenerate.
16666 * server.h (NEED_DECLARATION_STRERROR):
16667 Replace with !HAVE_DECL_STRERROR.
16669 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16671 * linux-low.c (linux_wait, linux_send_signal): Don't test
16672 an unsigned long variable for > 0 if it could be MAX_ULONG.
16673 * server.c (myresume): Likewise.
16674 * target.c (set_desired_inferior): Likewise.
16676 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16678 * configure.ac: Simplify and improve check for socklen_t.
16679 * configure, config.in: Regenerate.
16681 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16683 * acconfig.h: Remove.
16684 * configure.ac: Add a test for socklen_t. Use three-argument
16685 AC_DEFINE throughout.
16686 * config.in: Regenerated using autoheader 2.59.
16687 * configure: Regenerated.
16689 * gdbreplay.c (socklen_t): Provide a default.
16690 (remote_open): Use socklen_t.
16691 * remote-utils.c (socklen_t): Provide a default.
16692 (remote_open): Use socklen_t.
16693 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16696 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16698 * linux-low.c (linux_read_memory, linux_write_memory)
16699 (linux_read_auxv): Likewise.
16700 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16701 (check_mem_write): Likewise.
16702 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16704 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16705 (registers_from_string, register_data): Likewise.
16706 * server.c (handle_query, main): Likewise.
16707 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16708 (decode_M_packet): Likewise.
16709 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16710 * target.h (struct target_ops): Update read_memory, write_memory,
16712 (read_inferior_memory, write_inferior_memory): Update.
16713 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16714 to unsigned char *.
16715 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16716 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16717 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16718 linux-s390-low.c, linux-sh-low.c: Update for changes in
16719 read_inferior_memory and the_low_target->breakpoint.
16721 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16723 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16724 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16725 * configure.srv: Add powerpc64-*-linux*.
16726 * linux-ppc64-low.c: New file.
16728 2005-05-23 Orjan Friberg <orjanf@axis.com>
16730 * linux-cris-low.c: New file with support for CRIS.
16731 * linux-crisv32-low.c: Ditto for CRISv32.
16732 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16733 (clean): Add reg-cris.c and reg-crisv32.c.
16734 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16735 reg-crisv32.o, and reg-crisv32.c to make rules.
16736 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16737 recognized targets.
16739 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16741 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16742 of sizeof (PTRACE_XFER_TYPE).
16743 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16745 2005-05-12 Orjan Friberg <orjanf@axis.com>
16747 * target.h (struct target_ops): Add insert_watchpoint,
16748 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16749 pointers for hardware watchpoint support.
16750 * linux-low.h (struct linux_target_ops): Ditto.
16751 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16752 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16753 to linux_target_ops.
16754 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16756 * server.c (main): Recognize 'Z' and 'z' packets.
16758 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16760 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16761 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16762 (the_low_target): Add new members.
16764 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16766 * proc-service.c (ps_lgetregs): Search all_processes instead of
16769 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16771 * server.c (start_inferior): Change return type to int.
16772 (attach_inferior): Change sigptr to int *.
16773 (handle_v_cont, handle_v_requests): Change signal to int *.
16774 (main): Change signal to int.
16776 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16778 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16779 * configure.srv: Add m32r*-*-linux*.
16780 * linux-m32r-low.c: New file.
16782 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16784 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16786 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16788 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16789 Take unsigned long arguments for PIDs.
16790 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16791 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16792 (wait_for_sigstop, linux_resume_one_process)
16793 (regsets_fetch_inferior_registers, linux_send_signal)
16794 (linux_read_auxv): Likewise. Update the types of variables holding
16795 PIDs. Update format string specifiers.
16796 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16797 * remote-utils.c (prepare_resume_reply): Likewise.
16798 * server.c (cont_thread, general_thread, step_thread)
16799 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16801 (handle_query): Update format specifiers.
16802 (handle_v_cont, main): Use strtoul for thread IDs.
16803 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16804 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16805 (general_thread, step_thread, thread_from_wait)
16806 (old_thread_from_wait): Update.
16807 * target.h (struct thread_resume): Use unsigned long for THREAD.
16808 (struct target_ops): Use unsigned long for arguments to attach and
16811 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16813 * acinclude.m4: Include bfd/bfd.m4 directly.
16814 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16815 <agriffis@toolchain.org>.
16816 * aclocal.m4, configure: Regenerated.
16818 2005-01-07 Andrew Cagney <cagney@gnu.org>
16820 * configure.ac: Rename configure.in, require autoconf 2.59.
16821 * configure: Re-generate.
16823 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16825 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16826 LIBS when finished.
16827 * aclocal.m4: Regenerated.
16828 * configure: Regenerated.
16830 2004-11-21 Andreas Schwab <schwab@suse.de>
16832 * linux-m68k-low.c (m68k_num_gregs): Define.
16833 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16834 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16835 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16836 (m68k_breakpoint_at): New. Add to the_low_target.
16838 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16839 srv_linux_thread_db to yes.
16841 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16843 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16844 (ARCH_SET_FS): Likewise.
16845 (ARCH_GET_FS): Likewise.
16846 (ARCH_GET_GS): Likewise.
16848 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16850 * linux-i386-low.c (ps_get_thread_area): New.
16851 * linux-x86-64-low.c (ps_get_thread_area): New.
16852 * linux-low.c: Include <sys/syscall.h>.
16853 (linux_kill_one_process): Don't kill the first thread here.
16854 (linux_kill): Kill the first thread here.
16855 (kill_lwp): New function.
16856 (send_sigstop, linux_send_signal): Use it.
16857 * proc-service.c: Clean up #ifdefs.
16858 (fpregset_info): Delete.
16859 (ps_lgetregs): Update and enable implementation.
16860 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16862 * remote-utils.c (struct sym_cache, symbol_cache): New.
16863 (input_interrupt): Print a clearer message.
16864 (async_io_enabled): New variable.
16865 (enable_async_io, disable_async_io): Use it. Update comments.
16866 (look_up_one_symbol): Use the symbol cache.
16867 * thread-db.c (thread_db_look_up_symbols): New function.
16868 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16870 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16872 * configure.in: Test for -rdynamic.
16873 * configure: Regenerated.
16874 * Makefile (INTERNAL_LDFLAGS): New.
16875 (gdbserver, gdbreplay): Use it.
16877 2004-09-02 Andrew Cagney <cagney@gnu.org>
16879 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16881 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16883 * linux-low.c (linux_wait): Clear all_processes list also.
16885 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16887 * linux-low.c: Include <errno.h>. Remove extern declaration of
16890 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16892 * gdbreplay.c, server.h, utils.c: Update copyright years.
16894 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16896 * server.c (main): Print child status or termination signal from
16897 variable 'signal', not 'sig'.
16899 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16901 * linux-low.c (linux_read_memory): Change return type to
16902 int. Check for and return error from ptrace().
16903 * target.c (read_inferior_memory): Change return type to int. Pass
16904 back return status from the_target->read_memory().
16905 * target.h (struct target_ops): Adapt *read_memory() prototype.
16907 (read_inferior_memory): Adapt prototype.
16908 * server.c (main): Return an error packet if
16909 read_inferior_memory() returns an error.
16911 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16913 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16914 Unify with other clean targets.
16916 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16918 * server.c (handle_v_cont): Call set_desired_inferior.
16920 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16922 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16924 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16926 * linux-low.c (linux_wait): Unblock async I/O.
16927 (linux_resume): Block and enable async I/O.
16928 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16929 * server.h (block_async_io, unblock_async_io): Add prototypes.
16931 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16933 * remote-utils.c (remote_open): Print a status notice after
16934 opening a TCP port.
16935 * server.c (attach_inferior): Print a status notice after
16938 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16940 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16942 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16944 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16946 * server.c, target.h: Update copyright years.
16948 2004-02-25 Roland McGrath <roland@redhat.com>
16950 * target.h (struct target_ops): New member `read_auxv'.
16951 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16952 * linux-low.c (linux_read_auxv): New function.
16953 (linux_target_ops): Initialize `read_auxv' member to that.
16955 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16957 Committed by Jim Blandy <jimb@redhat.com>.
16959 * linux-s390-low.c (s390_num_regs): Update.
16960 (s390_regmap): Remove control registers. Use __s390x__ predefine
16961 instead of GPR_SIZE to distiguish s390 and s390x targets.
16963 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16965 * linux-low.c: Update copyright year.
16966 (check_removed_breakpoint): Clear pending_is_breakpoint.
16967 (linux_set_resume_request, linux_queue_one_thread)
16968 (resume_status_pending_p): New functions.
16969 (linux_continue_one_thread): Use process->resume.
16970 (linux_resume): Only resume threads if there are no pending events.
16971 * linux-low.h (struct process_info): Add resume request
16974 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16976 * regcache.c (new_register_cache): Clear the allocated register
16977 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16979 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16981 * linux-low.c (linux_resume): Take a struct thread_resume *
16983 (linux_wait): Update call.
16984 (resume_ptr): New static variable.
16985 (linux_continue_one_thread): Renamed from
16986 linux_continue_one_process. Use resume_ptr.
16987 (linux_resume): Use linux_continue_one_thread.
16988 * server.c (handle_v_cont, handle_v_requests): New functions.
16989 (myresume): New function.
16990 (main): Handle 'v' case.
16991 * target.h (struct thread_resume): New type.
16992 (struct target_ops): Change argument of "resume" to struct
16994 (myresume): Delete macro.
16996 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16998 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16999 (uninstall): Support DESTDIR.
17001 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17003 * configure.srv: Add xscale*linux copy of arm*linux entry.
17005 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17007 * linux-arm-low.c (arm_reinsert_addr): New function.
17008 (the_low_target): Add arm_reinsert_addr.
17010 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17012 * mem-break.c: Remove whitespace at end of file.
17014 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17016 * configure.in: Check whether we need to prototype strerror.
17017 * server.h: Optionally prototype strerror.
17018 * gdbreplay.c (perror_with_name): Use strerror.
17019 * linux-low.c (linux_attach_lwp): Use strerror.
17020 * utils.c (perror_with_name): Use strerror.
17021 * config.in, configure: Regenerated.
17023 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17025 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17026 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17028 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17030 * Makefile.in (SFILES): Update.
17031 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17032 low-sun3.c: Remove files.
17034 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17036 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17037 (linux_detach_one_process, linux_detach): New functions.
17038 (linux_target_ops): Add linux_detach.
17039 * server.c (main): Handle 'D' packet.
17040 * target.h (struct target_ops): Add "detach" member.
17041 (detach_inferior): Define.
17043 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17045 From Kelley Cook <kelleycook@wideopenwest.com>:
17046 * configure.srv: Accept i[34567]86 variants.
17048 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17050 * linux-low.c (linux_wait_for_event): Correct comment typos.
17051 (linux_resume_one_process): Call check_removed_breakpoint.
17052 (linux_send_signal): New function.
17053 (linux_target_ops): Add linux_send_signal.
17054 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17056 * target.h (struct target_ops): Add send_signal.
17058 2003-05-29 Jim Blandy <jimb@redhat.com>
17060 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17061 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17062 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17063 away part of the register's value.
17065 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17067 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17068 (linux_wait_for_event, linux_init_signals): Likewise.
17070 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17072 * configure.in: Check for stdlib.h.
17073 * configure: Regenerated.
17074 * config.in: Regenerated.
17076 2003-01-04 Andreas Schwab <schwab@suse.de>
17078 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17080 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17082 * Makefile.in: Remove obsolete code.
17084 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17086 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17087 defined(PT_FPR0_HI).
17089 2002-11-17 Stuart Hughes <seh@zee2.com>
17091 * linux-arm-low.c (arm_num_regs): Increase.
17092 (arm_regmap): Include status register.
17094 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17096 * linux-low.c (register_addr): Remove incorrect -1 check.
17098 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17100 * linux-low.c (linux_create_inferior): Call setpgid. Return
17102 (unstopped_p, linux_signal_pid): Remove.
17103 (linux_target_ops): Remove linux_signal_pid.
17104 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17105 global instead of target method.
17106 * target.h (struct target_ops): Remove signal_pid. Update comment
17107 for create_inferior.
17108 * server.c (signal_pid): New variable.
17109 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17110 gdbserver. Set the child to be the foreground process group.
17111 (attach_inferior): Set signal_pid.
17113 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17115 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17117 2002-08-20 Jim Blandy <jimb@redhat.com>
17119 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17122 2002-08-01 Andrew Cagney <cagney@redhat.com>
17124 * Makefile.in: Make chill references obsolete.
17126 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17128 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17129 * configure: Regenerate.
17130 * config.in: Regenerate.
17132 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17134 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17135 (perror_with_name, remote_close, remote_open, expect, play): Static.
17137 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17139 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17140 byte offsets instead of an array of indexes.
17141 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17143 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17145 * regcache.c: Add comment.
17147 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17149 * thread-db.c: New file.
17150 * proc-service.c: New file.
17151 * acinclude.m4: New file.
17152 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17153 proc-service.o, and thread-db.o.
17154 (linux-low.o): Add USE_THREAD_DB.
17155 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17156 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17157 * aclocal.m4: Regenerated.
17158 * config.in: Regenerated.
17159 * configure: Regenerated.
17160 * configure.in: Check for proc_service.h, sys/procfs.h,
17161 thread_db.h, and linux/elf.h headrs.
17162 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17163 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17164 Check for -lthread_db and thread support.
17165 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17166 PowerPC, and SuperH.
17167 * i387-fp.c: Constify arguments.
17168 * i387-fp.h: Likewise.
17169 * inferiors.c: (struct thread_info): Renamed from
17170 `struct inferior_info'. Remove PID member. Use generic inferior
17171 list header. All uses updated.
17172 (inferiors, signal_pid): Removed.
17173 (all_threads): New variable.
17174 (get_thread): Define.
17175 (add_inferior_to_list): New function.
17176 (for_each_inferior): New function.
17177 (change_inferior_id): New function.
17178 (add_inferior): Removed.
17179 (remove_inferior): New function.
17180 (add_thread): New function.
17181 (free_one_thread): New function.
17182 (remove_thread): New function.
17183 (clear_inferiors): Use for_each_inferior and free_one_thread.
17184 (find_inferior): New function.
17185 (find_inferior_id): New function.
17186 (inferior_target_data): Update argument type.
17187 (set_inferior_target_data): Likewise.
17188 (inferior_regcache_data): Likewise.
17189 (set_inferior_regcache_data): Likewise.
17190 * linux-low.c (linux_bp_reinsert): Remove.
17191 (all_processes, stopping_threads, using_thrads)
17192 (struct pending_signals, debug_threads, pid_of): New.
17193 (inferior_pid): Replace with macro.
17194 (struct inferior_linux_data): Remove.
17195 (get_stop_pc, add_process): New functions.
17196 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17197 Use add_process and add_thread.
17198 (linux_attach_lwp): New function, based on old linux_attach. Use
17199 add_process and add_thread. Set stop_expected for new threads.
17200 (linux_attach): New function.
17201 (linux_kill_one_process): New function.
17202 (linux_kill): Kill all LWPs.
17203 (linux_thread_alive): Use find_inferior_id.
17204 (check_removed_breakpoints, status_pending_p): New functions.
17205 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17206 Update. Use WNOHANG. Wait for cloned processes also. Update process
17207 struct for the found process.
17208 (linux_wait_for_event): New function.
17209 (linux_wait): Use it. Support LWPs.
17210 (send_sigstop, wait_for_sigstop, stop_all_processes)
17211 (linux_resume_one_process, linux_continue_one_process): New functions.
17212 (linux_resume): Support LWPs.
17213 (REGISTER_RAW_SIZE): Remove.
17214 (fetch_register): Use register_size instead. Call supply_register.
17215 (usr_store_inferior_registers): Likewise. Call collect_register.
17216 Fix recursive case.
17217 (regsets_fetch_inferior_registers): Improve error message.
17218 (regsets_store_inferior_registers): Add debugging.
17219 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17220 (unstopped_p, linux_signal_pid): New functions.
17221 (linux_target_ops): Add linux_signal_pid.
17222 (linux_init_signals): New function.
17223 (initialize_low): Call it. Initialize using_threads.
17224 * regcache.c (inferior_regcache_data): Add valid
17226 (get_regcache): Fetch registers lazily. Add fetch argument
17227 and update all callers.
17228 (regcache_invalidate_one, regcache_invalidate): New
17230 (new_register_cache): Renamed from create_register_cache.
17231 Return the new regcache.
17232 (free_register_cache): Change argument to a void *.
17233 (registers_to_string, registers_from_string): Call get_regcache
17234 with fetch flag set.
17235 (register_data): Make static. Pass fetch flag to get_regcache.
17236 (supply_register): Call get_regcache with fetch flag clear.
17237 (collect_register): Call get_regcache with fetch flag set.
17238 (collect_register_as_string): New function.
17239 * regcache.h: Update.
17240 * remote-utils.c (putpkt): Flush after debug output and use
17242 Handle input interrupts while waiting for an ACK.
17243 (input_interrupt): Use signal_pid method.
17244 (getpkt): Flush after debug output and use stderr.
17245 (outreg): Use collect_register_as_string.
17246 (new_thread_notify, dead_thread_notify): New functions.
17247 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17248 and general_thread.
17249 (look_up_one_symbol): Flush after debug output.
17250 * server.c (step_thread, server_waiting): New variables.
17251 (start_inferior): Don't use signal_pid. Update call to mywait.
17252 (attach_inferior): Update call to mywait.
17253 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17254 (main): Don't fetch/store registers explicitly. Use
17255 set_desired_inferior. Support proposed ``Hs'' packet. Update
17257 * server.h: Update.
17258 (struct inferior_list, struct_inferior_list_entry): New.
17259 * target.c (set_desired_inferior): New.
17260 (write_inferior_memory): Constify.
17261 (mywait): New function.
17262 * target.h: Update.
17263 (struct target_ops): New signal_pid method.
17264 (mywait): Removed macro, added prototype.
17266 * linux-low.h (regset_func): Removed.
17267 (regset_fill_func, regset_store_func): New.
17268 (enum regset_type): New.
17269 (struct regset_info): Add type field. Use new operation types.
17270 (struct linux_target_ops): stop_pc renamed to get_pc.
17271 Add decr_pc_after_break and breakpoint_at.
17272 (get_process, get_thread_proess, get_process_thread)
17273 (strut process_info, all_processes, linux_attach_lwp)
17274 (thread_db_init): New.
17276 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17277 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17278 (the_low_target): Add new members.
17279 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17280 (i386_store_fpxregset): Constify.
17281 (target_regsets): Add new kind identifier.
17282 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17283 (i386_set_pc): Add debugging.
17284 (i386_breakpoint_at): New function.
17285 (the_low_target): Add new members.
17286 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17287 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17288 (mips_breakpoint_at): New.
17289 (the_low_target): Add new members.
17290 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17291 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17292 (the_low_target): Add new members.
17293 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17294 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17295 (the_low_target): Add new members.
17296 * linux-x86-64-low.c (target_regsets): Add new kind
17299 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17301 From Martin Pool <mbp@samba.org>:
17302 * server.c (gdbserver_usage): New function.
17305 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17307 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17308 stop_at -> stop_pc.
17310 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17312 * Makefile.in: Remove obsolete code.
17314 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17316 * linux-low.c (regsets_fetch_inferior_registers),
17317 (regsets_store_inferior_registers): Removed cast to int from
17319 * regcache.h: Added declaration of struct inferior_info.
17321 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17323 * inferiors.c (struct inferior_info): Add regcache_data.
17324 (add_inferior): Call create_register_cache.
17325 (clear_inferiors): Call free_register_cache.
17326 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17327 * regcache.c (struct inferior_regcache_data): New.
17328 (registers): Remove.
17329 (get_regcache): New function.
17330 (create_register_cache, free_register_cache): New functions.
17331 (set_register_cache): Don't initialize the register cache here.
17332 (registers_to_string, registers_from_string, register_data): Call
17334 * regcache.h: Add prototypes.
17335 * server.h: Likewise.
17337 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17339 * mem-break.c: New file.
17340 * mem-break.h: New file.
17341 * Makefile.in: Add mem-break.o rule; update server.h
17343 * inferiors.c (struct inferior_info): Add target_data
17345 (clear_inferiors): Free target_data member if set.
17346 (inferior_target_data, set_inferior_target_data): New functions.
17347 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17348 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17349 * linux-low.c (linux_bp_reinsert): New variable.
17350 (struct inferior_linux_data): New.
17351 (linux_create_inferior): Use set_inferior_target_data.
17352 (linux_attach): Likewise. Call add_inferior.
17353 (linux_wait_for_one_inferior): New function.
17354 (linux_wait): Call it.
17355 (linux_write_memory): Add const.
17356 (initialize_low): Call set_breakpoint_data.
17357 * linux-low.h (struct linux_target_ops): Add breakpoint
17359 * server.c (attach_inferior): Remove extra add_inferior
17361 * server.h: Include mem-break.h. Update inferior.c
17363 * target.c (read_inferior_memory)
17364 (write_inferior_memory): New functions.
17365 * target.h (read_inferior_memory)
17366 (write_inferior_memory): Change macros to prototypes.
17367 (struct target_ops): Update comments. Add const to write_memory
17370 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17372 * linux-low.c (usr_store_inferior_registers): Support
17373 registers which are allowed to fail to store.
17374 * linux-low.h (linux_target_ops): Likewise.
17375 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17376 (ppc_cannot_store_register): FPSCR may not be storable.
17378 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17380 * server.h: Include <string.h> if HAVE_STRING_H.
17381 * ChangeLog: Correct paths in last ChangeLog entry.
17383 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17385 * linux-low.h: Remove obsolete prototypes.
17386 (struct linux_target_ops): New.
17387 (extern the_low_target): New.
17388 * linux-low.c (num_regs, regmap): Remove declarations.
17389 (register_addr): Use the_low_target explicitly.
17390 (fetch_register): Likewise.
17391 (usr_fetch_inferior_registers): Likewise.
17392 (usr_store_inferior_registers): Likewise.
17393 * linux-arm-low.c (num_regs): Remove.
17394 (arm_num_regs): Define.
17395 (arm_regmap): Renamed from regmap, made static.
17396 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17398 (arm_cannot_store_register): Renamed from cannot_store_register,
17400 (the_low_target): New.
17401 * linux-i386-low.c (num_regs): Remove.
17402 (i386_num_regs): Define.
17403 (i386_regmap): Renamed from regmap, made static.
17404 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17406 (i386_cannot_store_register): Renamed from cannot_store_register,
17408 (the_low_target): New.
17409 * linux-ia64-low.c (num_regs): Remove.
17410 (ia64_num_regs): Define.
17411 (ia64_regmap): Renamed from regmap, made static.
17412 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17414 (ia64_cannot_store_register): Renamed from cannot_store_register,
17416 (the_low_target): New.
17417 * linux-m68k-low.c (num_regs): Remove.
17418 (m68k_num_regs): Define.
17419 (m68k_regmap): Renamed from regmap, made static.
17420 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17422 (m68k_cannot_store_register): Renamed from cannot_store_register,
17424 (the_low_target): New.
17425 * linux-mips-low.c (num_regs): Remove.
17426 (mips_num_regs): Define.
17427 (mips_regmap): Renamed from regmap, made static.
17428 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17430 (mips_cannot_store_register): Renamed from cannot_store_register,
17432 (the_low_target): New.
17433 * linux-ppc-low.c (num_regs): Remove.
17434 (ppc_num_regs): Define.
17435 (ppc_regmap): Renamed from regmap, made static.
17436 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17438 (ppc_cannot_store_register): Renamed from cannot_store_register,
17440 (the_low_target): New.
17441 * linux-s390-low.c (num_regs): Remove.
17442 (s390_num_regs): Define.
17443 (s390_regmap): Renamed from regmap, made static.
17444 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17446 (s390_cannot_store_register): Renamed from cannot_store_register,
17448 (the_low_target): New.
17449 * linux-sh-low.c (num_regs): Remove.
17450 (sh_num_regs): Define.
17451 (sh_regmap): Renamed from regmap, made static.
17452 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17454 (sh_cannot_store_register): Renamed from cannot_store_register,
17456 (the_low_target): New.
17457 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17458 (the_low_target): New.
17460 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17462 * Makefile.in: Add stamp-h target.
17463 * configure.in: Create stamp-h.
17464 * configure: Regenerated.
17466 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17468 * inferiors.c: New file.
17469 * target.c: New file.
17470 * target.h: New file.
17471 * Makefile.in: Add target.o and inferiors.o. Update
17473 * linux-low.c (inferior_pid): New static variable,
17474 moved from server.c.
17475 (linux_create_inferior): Renamed from create_inferior.
17476 Call add_inferior. Return 0 on success instead of a PID.
17477 (linux_attach): Renamed from myattach.
17478 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17479 (linux_thread_alive): Renamed from mythread_alive.
17480 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17482 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17483 (regsets_store_inferior_registers): Correct error message.
17484 Add missing ``return 0''.
17485 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17486 (linux_store_registers): Renamed from store_inferior_registers.
17487 (linux_read_memory): Renamed from read_inferior_memory.
17488 (linux_write_memory): Renamed from write_inferior_memory.
17489 (linux_target_ops): New structure.
17490 (initialize_low): Call set_target_ops ().
17491 * remote-utils.c (unhexify): New function.
17492 (hexify): New function.
17493 (input_interrupt): Send signals to ``signal_pid''.
17494 * server.c (inferior_pid): Remove.
17495 (start_inferior): Update create_inferior call.
17496 (attach_inferior): Call add_inferior.
17497 (handle_query): New function.
17498 (main): Call handle_query for `q' packets.
17499 * server.h: Include "target.h". Remove obsolete prototypes.
17500 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17502 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17504 * Makefile.in: Add WARN_CFLAGS. Update configury
17506 * configure.in: Check for <string.h>
17507 * configure: Regenerate.
17508 * config.in: Regenerate.
17509 * gdbreplay.c: Include needed system headers.
17510 (remote_open): Remove strchr prototype.
17511 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17512 * regcache.c (supply_register): Change buf argument to const void *.
17513 (supply_register_by_name): Likewise.
17514 (collect_register): Change buf argument to void *.
17515 (collect_register_by_name): Likewise.
17516 * regcache.h: Add missing prototypes.
17517 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17518 * server.c (handle_query): New function.
17519 (attached): New static variable, moved out of main.
17520 (main): Quiet longjmp clobber warnings.
17521 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17522 * utils.c (error): Remove NORETURN.