1 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
3 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4 and powerpc-cell64l-ipa.o.
5 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
6 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
7 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
10 * spu-low.c: Remove file.
12 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
13 (parse_spufs_run): Remove.
14 (ppc_get_pc): Remove Cell/B.E. support.
15 (ppc_set_pc): Likewise.
16 (ppc_breakpoint_at): Likewise.
17 (ppc_arch_setup): Likewise.
18 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
19 tdesc_powerpc_cell32l.
20 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
21 or init_registers_powerpc_cell32l.
22 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
23 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
24 or init_registers_powerpc_cell32l.
25 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
26 (init_registers_powerpc_cell32l): Remove prototype.
27 (init_registers_powerpc_cell64l): Likewise.
29 * target.h (struct target_ops): Remove qxfer_spu member.
30 * server.c (handle_qxfer_spu): Remove.
31 (qxfer_packets): Remove entry for "spu".
32 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
33 * linux-low.c (SPUFS_MAGIC): Remove.
34 (spu_enumerate_spu_ids): Remove.
35 (linux_qxfer_spu): Remove.
36 (linux_target_ops): Remove qxfer_spu member.
37 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
38 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
39 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
41 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
43 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
44 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
45 * config.in: Regenerate.
46 * configure: Regenerate.
48 2019-08-15 Tom Tromey <tromey@adacore.com>
50 * target.c (target_write_memory): Use gdb::byte_vector.
52 2019-08-15 Tom Tromey <tromey@adacore.com>
54 * tracepoint.c (write_inferior_data_pointer)
55 (write_inferior_integer, write_inferior_int8)
56 (write_inferior_uinteger, m_tracepoint_action_download)
57 (r_tracepoint_action_download, x_tracepoint_action_download)
58 (l_tracepoint_action_download, clear_inferior_trace_buffer)
59 (download_agent_expr, download_tracepoint_1)
60 (download_trace_state_variables, upload_fast_traceframes): Update.
61 * server.c (gdb_write_memory): Update.
62 * remote-utils.c (relocate_instruction): Update.
63 * proc-service.c (ps_pdwrite): Update.
64 * mem-break.c (remove_memory_breakpoint)
65 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
66 (uninsert_fast_tracepoint_jumps_at)
67 (reinsert_fast_tracepoint_jumps_at): Update.
68 * linux-x86-low.c (append_insns)
69 (i386_install_fast_tracepoint_jump_pad)
70 (amd64_write_goto_address, i386_write_goto_address): Update.
71 * linux-s390-low.c (append_insns, s390_write_goto_address):
73 * linux-ppc-low.c (ppc_relocate_instruction)
74 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
75 (ppc_write_goto_address): Update.
76 * linux-aarch64-low.c (append_insns): Update.
77 * target.h (struct target_ops): Update.
78 (write_inferior_memory): Don't declare.
79 * target.c (target_write_memory): Rename from
80 write_inferior_memory. Remove old target_write_memory.
82 2019-08-15 Tom Tromey <tromey@adacore.com>
84 * target.c (write_inferior_memory): Use std::vector.
86 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
89 * configure.ac: Drop enable-libmcheck support.
90 * configure, config.in: Rebuild.
91 * acinclude.m4: Don't include it.
93 2019-07-19 Alan Hayward <alan.hayward@arm.com>
95 * configure.srv: Remove Arm xml files.
97 2019-07-19 Alan Hayward <alan.hayward@arm.com>
99 * configure.srv: Add new files. Remove xml generated files.
100 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
102 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
103 * linux-aarch32-tdesc.c: New file.
104 * linux-aarch32-tdesc.h: New file.
105 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
106 * linux-arm-low.c (init_registers_arm, tdesc_arm)
107 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
108 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
109 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
110 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
111 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
112 (arm_read_description): Call arm_linux_read_description.
113 (initialize_low_arch): Don't init registers.
114 * linux-arm-tdesc.c: New file.
115 * linux-arm-tdesc.h: New file.
117 2019-07-10 Alan Hayward <alan.hayward@arm.com>
119 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
120 Move counter inside for.
121 (arm_read_description): Check ptrace earlier.
122 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
124 2019-07-09 Tom Tromey <tom@tromey.com>
126 * configure: Rebuild.
127 * configure.ac: Change common to gdbsupport.
128 * acinclude.m4: Change common to gdbsupport.
129 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
130 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
131 common to gdbsupport.
132 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
133 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
134 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
135 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
136 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
137 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
138 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
139 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
140 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
141 common to gdbsupport.
143 2019-07-04 Alan Hayward <alan.hayward@arm.com>
145 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
147 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
149 2019-07-04 Alan Hayward <alan.hayward@arm.com>
151 * configure.srv: Remove legacy xml.
152 * linux-aarch64-low.c (initialize_low_arch): Remove
153 initialize_low_tdesc call.
154 * linux-aarch64-tdesc-selftest.c: Remove file.
155 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
156 * linux-x86-low.c (initialize_low_arch): Remove
157 initialize_low_tdesc call.
158 * linux-x86-tdesc-selftest.c: Remove file.
159 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
161 2019-06-20 Tom de Vries <tdevries@suse.de>
163 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
164 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
166 2019-06-19 Tom de Vries <tdevries@suse.de>
168 * debug.h (debug_write): Change return type to ssize_t.
169 * debug.c (debug_write): Same.
171 2019-06-14 Tom Tromey <tom@tromey.com>
173 * configure.ac: Use new path to gnulib.
174 * configure: Rebuild.
175 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
178 2019-06-11 Tom Tromey <tom@tromey.com>
180 * Makefile.in (SFILES): Add alloc.c.
182 (IPA_OBJS): Add alloc-ipa.o.
183 (alloc-ipa.o): New target.
184 (%.o: ../%.c): New pattern rule.
186 2019-06-10 Tom Tromey <tromey@adacore.com>
188 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
189 end warning with a newline.
190 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
192 * thread-db.c (attach_thread): Don't end warning with a newline.
193 (thread_db_notice_clone): Likewise.
194 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
196 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
197 end warning with a newline.
199 2019-06-04 Pedro Alves <palves@redhat.com>
201 * server.c (captured_main): Use make_unique_xstrdup.
203 2019-06-02 Tom Tromey <tom@tromey.com>
205 * gdbreplay.c (fromhex): Remove.
206 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
208 2019-05-29 Tom Tromey <tromey@adacore.com>
210 * configure: Rebuild.
212 2019-05-06 Kevin Buettner <kevinb@redhat.com>
214 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
215 sign extension code on 32-bit builds.
217 2019-05-03 Eli Zaretskii <eliz@gnu.org>
220 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
222 2019-04-19 Tom Tromey <tom@tromey.com>
224 * server.c (struct vstop_notif): Derive from notif_event.
226 (queue_stop_reply): Update.
227 (remove_all_on_match_ptid): Change type. Rewrite.
228 (discard_queued_stop_replies): Rewrite.
229 (in_queued_stop_replies_ptid): Change type.
230 (in_queued_stop_replies): Rewrite.
231 (notif_stop): Update.
232 (queue_stop_reply_callback): Update.
233 (captured_main): Don't call initialize_notif.
234 (push_stop_notification): Update.
235 * notif.c (notif_write_event, handle_notif_ack)
236 (notif_event_enque, notif_push): Update.
237 (notif_event_xfree, initialize_notif): Remove.
238 * notif.h (struct notif_event): Include <list>, not
240 (struct notif_server) <queue>: Now a std::list.
241 (notif_event_p): Remove typedef.
242 (initialize_notif): Don't declare.
243 (struct notif_event): Add virtual destructor.
245 2019-04-17 Alan Hayward <alan.hayward@arm.com>
247 * ax.c (ax_vdebug): Call debug_printf.
248 * debug.c (debug_write): New function.
249 * debug.h (debug_write): New declaration.
250 * linux-low.c (sigchld_handler): Call debug_write.
252 2019-04-17 Alan Hayward <alan.hayward@arm.com>
254 * debug.c (debug_set_output): New function.
255 (debug_vprintf): Send output to debug_file.
256 (debug_flush): Likewise.
257 * debug.h (debug_set_output): New declaration.
258 * server.c (handle_monitor_command): Add debug-file option.
259 (captured_main): Likewise.
261 2019-04-17 Alan Hayward <alan.hayward@arm.com>
263 * debug.c (remote_debug): Add definition.
264 * debug.h (remote_debug): Add declaration.
265 * hostio.c (remote_debug): Remove declaration.
266 * remote-utils.c (struct ui_file): Likewise.
267 (remote_debug): Likewise.
268 * remote-utils.h (remote_debug): Likewise,
269 * server.c (remote_debug): Remove definition.
271 2019-04-10 Kevin Buettner <kevinb@redhat.com>
273 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
274 when using a 64-bit gdbserver.
276 2019-04-09 Tom Tromey <tromey@adacore.com>
278 * linux-low.c (select_event_lwp): Use find_thread_in_random.
280 2019-04-08 Tom Tromey <tom@tromey.com>
282 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
284 (linux_resume_one_lwp): Likewise.
286 2019-04-08 Tom Tromey <tom@tromey.com>
288 * gdbreplay.c: Update.
289 * linux-low.c: Update.
292 2019-04-08 Tom Tromey <tom@tromey.com>
294 * server.c: Use C++ exception handling.
295 * linux-low.c: Use C++ exception handling.
296 * gdbreplay.c: Use C++ exception handling.
298 2019-04-08 Tom Tromey <tom@tromey.com>
300 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
301 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
302 (captured_main, main): Update.
303 * gdbreplay.c (main): Update.
305 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
307 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
308 value in argument pointer, return 1 if the entry is found and 0
309 otherwise. Move comment.
310 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
311 * linux-low.h (linux_get_auxv): Declare.
312 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
314 2019-04-05 Tom Tromey <tromey@adacore.com>
316 * server.c (gdbserver_usage): Use upper-case for metasyntactic
319 2019-03-28 Alan Hayward <alan.hayward@arm.com>
321 * linux-low.c (AT_HWCAP2): Add define if not already included.
323 2019-03-26 Alan Hayward <alan.hayward@arm.com>
325 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
326 (aarch64_arch_setup): Call linux_get_hwcap.
327 * linux-arm-low.c (arm_get_hwcap): Remove function.
328 (arm_read_description): Call linux_get_hwcap.
329 * linux-low.c (linux_get_auxv): New function.
330 (linux_get_hwcap): Likewise.
331 (linux_get_hwcap2): Likewise.
332 * linux-low.h (linux_get_hwcap): New declaration.
333 (linux_get_hwcap2): Likewise.
334 * linux-ppc-low.c (ppc_get_auxv): Remove function.
335 (ppc_arch_setup): Call linux_get_hwcap.
336 * linux-s390-low.c (s390_get_hwcap): Remove function.
337 (s390_arch_setup): Call linux_get_hwcap.
339 2019-03-22 Alan Hayward <alan.hayward@arm.com>
340 Jiong Wang <jiong.wang@arm.com>
342 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
343 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
345 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
347 2019-03-22 Alan Hayward <alan.hayward@arm.com>
348 Jiong Wang <jiong.wang@arm.com>
350 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
351 (aarch64_get_hwcap): New function.
352 (aarch64_arch_setup): Read APIA hwcap.
354 2019-03-22 Alan Hayward <alan.hayward@arm.com>
355 Jiong Wang <jiong.wang@arm.com>
357 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
358 (initialize_low_tracepoint): Likewise.
359 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
360 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
361 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
362 (aarch64_linux_read_description): Likewise.
363 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
365 2019-03-12 John Baldwin <jhb@FreeBSD.org>
367 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
368 i386_create_target_description for 'segments' parameter.
369 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
370 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
371 * win32-i386-low.c (i386_arch_setup): Likewise.
373 2019-03-12 Tom Tromey <tromey@adacore.com>
375 * linux-low.c (iterate_over_lwps): Update.
377 2019-03-06 Tom Tromey <tom@tromey.com>
379 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
380 (captured_main): Use SCOPE_EXIT.
382 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
384 * configure.srv: Use '$enable_unittest' instead of '$development'
385 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
388 2019-02-27 Tom Tromey <tromey@adacore.com>
390 * gdbreplay.c (logchar): Handle \r\n.
392 2019-02-07 Alan Hayward <alan.hayward@arm.com>
394 * linux-low.c (linux_attach): Add process before lwp.
395 * server.c (attach_inferior): Check if already attached.
397 2019-02-07 Tom Tromey <tom@tromey.com>
399 * x86-tdesc.h: Rename include guard.
400 * x86-low.h: Add include guard.
401 * wincecompat.h: Rename include guard.
402 * win32-low.h: Add include guard.
403 * utils.h: Rename include guard.
404 * tracepoint.h: Rename include guard.
405 * tdesc.h: Rename include guard.
406 * target.h: Rename include guard.
407 * server.h: Rename include guard.
408 * remote-utils.h: Rename include guard.
409 * regcache.h: Rename include guard.
410 * nto-low.h: Rename include guard.
411 * notif.h: Add include guard.
412 * mem-break.h: Rename include guard.
413 * lynx-low.h: Add include guard.
414 * linux-x86-tdesc.h: Add include guard.
415 * linux-s390-tdesc.h: Add include guard.
416 * linux-ppc-tdesc-init.h: Add include guard.
417 * linux-low.h: Add include guard.
418 * linux-aarch64-tdesc.h: Add include guard.
419 * linux-aarch32-low.h: Add include guard.
420 * inferiors.h: Rename include guard.
421 * i387-fp.h: Rename include guard.
422 * hostio.h: Rename include guard.
423 * gdbthread.h: Rename include guard.
424 * gdb_proc_service.h: Rename include guard.
425 * event-loop.h: Rename include guard.
426 * dll.h: Rename include guard.
427 * debug.h: Rename include guard.
428 * ax.h: Rename include guard.
430 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
433 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
434 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
436 2019-01-25 Tom Tromey <tom@tromey.com>
438 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
440 2019-01-25 Tom Tromey <tom@tromey.com>
442 * win32-low.c: Fix common/ includes.
443 * win32-i386-low.c: Fix common/ includes.
444 * tracepoint.c: Fix common/ includes.
445 * thread-db.c: Fix common/ includes.
446 * target.h: Fix common/ includes.
447 * symbol.c: Fix common/ includes.
448 * spu-low.c: Fix common/ includes.
449 * server.h: Fix common/ includes.
450 * server.c: Fix common/ includes.
451 * remote-utils.c: Fix common/ includes.
452 * regcache.h: Fix common/ includes.
453 * regcache.c: Fix common/ includes.
454 * nto-x86-low.c: Fix common/ includes.
455 * notif.h: Fix common/ includes.
456 * mem-break.h: Fix common/ includes.
457 * lynx-low.c: Fix common/ includes.
458 * lynx-i386-low.c: Fix common/ includes.
459 * linux-x86-tdesc-selftest.c: Fix common/ includes.
460 * linux-x86-low.c: Fix common/ includes.
461 * linux-low.c: Fix common/ includes.
462 * inferiors.h: Fix common/ includes.
463 * i387-fp.c: Fix common/ includes.
464 * hostio.c: Fix common/ includes.
465 * hostio-errno.c: Fix common/ includes.
466 * gdbthread.h: Fix common/ includes.
467 * gdbreplay.c: Fix common/ includes.
468 * fork-child.c: Fix common/ includes.
469 * event-loop.c: Fix common/ includes.
471 (enum gdb_agent_op): Fix common/ includes.
473 2019-01-21 Tom Tromey <tom@tromey.com>
475 * tracepoint.c: Fix includes.
476 * remote-utils.c: Fix includes.
477 * linux-x86-low.c: Fix includes.
479 2019-01-01 Joel Brobecker <brobecker@adacore.com>
481 * gdbreplay.c (gdbreplay_version): Update copyright year in
483 * server.c (gdbserver_version): Likewise.
485 2018-12-05 Alan Hayward <alan.hayward@arm.com>
487 * linux-low.c (add_lwp): Switch ordering.
489 2018-11-29 Tom Tromey <tom@tromey.com>
491 * win32-low.c (win32_join): Take pid, not process.
492 * target.h (struct target_ops) <join>: Change argument type.
493 (join_inferior): Change argument name.
494 * spu-low.c (spu_join): Take pid, not process.
495 * server.c (handle_detach): Preserve pid before destroying
497 * lynx-low.c (lynx_join): Take pid, not process.
498 * linux-low.c (linux_join): Take pid, not process.
500 2018-11-23 Alan Hayward <alan.hayward@arm.com>
502 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
503 (aarch64_cannot_fetch_register): Likewise.
504 (struct linux_target_ops): Update references.
506 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
508 * linux-ppc-low.c: Include nat/linux-ptrace.h.
510 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
512 * configure.srv (ipa_ppc_linux_regobj): Add
513 powerpc-isa207-htm-vsx32l-ipa.o and
514 powerpc-isa207-htm-vsx64l-ipa.o.
515 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
516 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
517 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
518 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
519 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
520 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
521 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
522 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
523 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
524 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
525 (init_registers_powerpc_isa207_htm_vsx32l)
526 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
527 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
528 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
529 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
530 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
531 (ppc_store_tm_ctarregset): New functions.
532 (ppc_regsets): Add entries for HTM regsets.
533 (ppc_arch_setup): Set htm in features struct when needed. Set
534 sizes for the HTM regsets.
535 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
536 (initialize_low_arch): Call
537 init_registers_powerpc_isa207_htm_vsx32l and
538 init_registers_powerpc_isa207_htm_vsx64l.
539 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
540 PPC_TDESC_ISA207_HTM_VSX.
541 (initialize_low_tracepoint): Call
542 init_registers_powerpc_isa207_htm_vsx32l and
543 init_registers_powerpc_isa207_htm_vsx64l.
545 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
547 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
548 rs6000/power-linux-pmu.xml to srv_xmlfiles.
549 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
550 (ppc_store_pmuregset): New functions.
551 (ppc_regsets): Add entries for ebb and pmu regsets.
552 (ppc_arch_setup): Set isa207 in features struct if the ebb and
553 pmu regsets are available. Set sizes for these regsets.
555 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
557 * configure.srv (ipa_ppc_linux_regobj): Add
558 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
559 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
560 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
561 rs6000/powerpc-isa207-vsx32l.xml, and
562 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
563 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
564 <PPC_TDESC_ISA207_VSX>: New enum value.
565 (init_registers_powerpc_isa207_vsx32l): Declare.
566 (init_registers_powerpc_isa207_vsx64l): Declare.
567 * linux-ppc-low.c (ppc_fill_tarregset): New function.
568 (ppc_store_tarregset): New function.
569 (ppc_regsets): Add entry for the TAR regset.
570 (ppc_arch_setup): Set isa207 in features struct when needed. Set
571 size for the TAR regsets.
572 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
573 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
574 and init_registers_powerpc_isa207_vsx64l.
575 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
576 (initialize_low_tracepoint): Call
577 init_registers_powerpc_isa207_vsx32l and
578 init_registers_powerpc_isa207_vsx64l.
580 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
581 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
583 * configure.srv (ipa_ppc_linux_regobj): Add
584 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
585 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
586 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
587 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
588 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
589 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
590 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
591 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
592 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
593 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
594 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
595 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
596 (ppc_hwcap): Add comment.
597 (ppc_hwcap2): New global.
598 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
599 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
600 (ppc_regsets): Add entries for the DSCR and PPR regsets.
601 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
602 when needed. Set sizes for the the DSCR and PPR regsets.
603 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
604 (initialize_low_arch): Call
605 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
606 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
607 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
608 PPC_TDESC_ISA205_PPR_DSCR_VSX.
609 (initialize_low_tracepoint): Call
610 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
611 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
613 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
615 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
617 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
618 Simon Marchi <simark@simark.ca>
620 * acinclude.m4: Include "../selftest.m4".
621 * configure: Regenerate.
622 * configure.ac: Use "GDB_AC_SELFTEST".
623 * configure.srv: Use "$enable_unittests" instead of
624 "$development" when checking whether unit tests have been
626 * server.c (captured_main): Update message informing that
627 selftests have been disabled.
629 2018-10-04 Tom Tromey <tom@tromey.com>
631 * configure: Rebuild.
633 2018-10-04 Tom Tromey <tom@tromey.com>
635 * server.c (handle_status): Rename inner "thread".
636 (process_serial_event): Declare "res" in 'm' case.
637 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
638 (iterate_over_lwps): Rename inner "thread".
639 (linux_qxfer_libraries_svr4): Rename inner "len".
640 * gdbthread.h (find_thread_in_random): Rename inner "thread".
642 2018-10-01 Gary Benson <gbenson@redhat.com>
644 * gdb_proc_service.h: Moved common code to
645 common/gdb_proc_service.h.
647 2018-10-01 Gary Benson <gbenson@redhat.com>
649 * gdb_proc_service.h: Synchronize comments and whitespace with
650 GDB's version of this file.
652 2018-09-25 Tom Tromey <tom@tromey.com>
654 * configure: Rebuild.
655 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
657 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
659 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
660 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
661 ($(IPA_LIB)): Sort IPA_OBJS.
663 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
665 * Makefile.in: Remove references to $(ADD_DEPS).
667 2018-09-16 Tom Tromey <tom@tromey.com>
669 * remote-utils.c (remote_open): Use GNU style for metasyntactic
671 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
674 2018-09-05 Tom Tromey <tom@tromey.com>
676 * configure: Rebuild.
678 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
681 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
683 2018-08-27 Tom Tromey <tom@tromey.com>
686 * configure: Rebuild.
688 2018-08-27 Tom Tromey <tom@tromey.com>
690 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
691 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
692 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
693 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
694 (s390x_emit_stack_adjust): Add casts to unsigned char.
696 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
700 * server.h (struct client_state) <disable_randomization>:
703 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
705 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
707 (mips_supply_ptrace_register): Likewise.
709 2018-07-22 Tom Tromey <tom@tromey.com>
711 * configure: Rebuild.
713 2018-07-22 Tom Tromey <tom@tromey.com>
715 * win32-low.c (win32_create_inferior): Remove unused variables.
716 * gdbreplay.c (remote_open): Remove unused variable.
717 * remote-utils.c (remote_prepare): Remove unused variable.
718 * x86-tdesc.h (X86_TDESC_H): Define.
719 (amd64_expedite_regs): Define conditionally.
720 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
721 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
722 * remote-utils.c (readchar): Remove unused variable.
724 2018-07-13 Pedro Alves <palves@redhat.com>
726 * linux-low.c (linux_kill): Change parameter to process_info
727 pointer instead of pid. Adjust.
728 * lynx-low.c (lynx_kill): Likewise.
729 * nto-low.c (nto_kill): Likewise.
730 * spu-low.c (spu_kill): Likewise.
731 * win32-low.c (win32_kill): Likewise.
732 * server.c (handle_v_kill, kill_inferior_callback)
733 (detach_or_kill_for_exit): Adjust.
734 * target.c (kill_inferior): Change parameter to process_info
735 pointer instead of pid. Adjust.
736 * target.h (struct target_ops) <kill>: Change parameter to
737 process_info pointer instead of pid. Adjust all implementations
739 (kill_inferior): Likewise.
741 2018-07-13 Pedro Alves <palves@redhat.com>
743 * linux-low.c (linux_detach, linux_join): Change parameter to
744 process_info pointer instead of pid. Adjust.
745 * lynx-low.c (lynx_detach, lynx_join): Likewise.
746 * nto-low.c (nto_detach): Likewise.
747 * spu-low.c (spu_detach, spu_join): Likewise.
748 * win32-low.c (win32_detach, win32_join): Likewise.
749 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
750 * target.h (struct target_ops) <detach, join>: Change parameter to
751 process_info pointer instead of pid. Adjust all implementations
753 (detach_inferior, join_inferior): Rename 'pid' parameter to
756 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
757 Jan Kratochvil <jan.kratochvil@redhat.com>
758 Paul Fertser <fercerpav@gmail.com>
759 Tsutomu Seki <sekiriki@gmail.com>
761 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
762 (OBS): Add 'common/netstuff.o'.
763 (GDBREPLAY_OBS): Likewise.
764 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
765 (remote_open): Implement support for IPv6
767 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
769 (handle_accept_event): Accept connections from IPv6 sources.
770 (remote_prepare): Handle IPv6-style hostnames; implement
771 support for IPv6 connections.
772 (remote_open): Implement support for printing connections from
775 2018-07-11 Pedro Alves <palves@redhat.com>
778 * mem-break.c (any_persistent_commands): Add process_info
779 parameter and use it instead of relying on the current process.
780 Change return type to bool.
781 * mem-break.h (any_persistent_commands): Add process_info
782 parameter and change return type to bool.
783 * server.c (handle_detach): Remove require_running_or_return call.
784 Look up the process_info for the process we're about to detach.
785 If not found, return back error to GDB. Adjust
786 any_persistent_commands call to pass down a process pointer.
788 2018-07-11 Pedro Alves <palves@redhat.com>
790 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
791 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
792 instead of collect_register_by_name.
793 * regcache.c (regcache_raw_get_unsigned_by_name): New.
794 * regcache.h (regcache_raw_get_unsigned_by_name): New.
796 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
797 Pedro Alves <palves@redhat.com>
799 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
801 2018-07-03 Tom Tromey <tom@tromey.com>
803 * linux-low.c: Update.
804 * lynx-low.c: Update.
805 * mem-break.c: Update.
807 * remote-utils.c: Update.
811 * win32-low.c: Update.
813 2018-07-03 Tom Tromey <tom@tromey.com>
817 2018-07-03 Tom Tromey <tom@tromey.com>
819 * linux-low.c: Update.
821 2018-07-03 Tom Tromey <tom@tromey.com>
825 2018-07-03 Tom Tromey <tom@tromey.com>
827 * linux-low.c: Update.
828 * linux-mips-low.c: Update.
829 * lynx-low.c: Update.
831 * remote-utils.c: Update.
835 * thread-db.c: Update.
837 2018-07-03 Tom Tromey <tom@tromey.com>
839 * linux-low.c: Update.
840 * linux-mips-low.c: Update.
841 * lynx-low.c: Update.
842 * mem-break.c: Update.
844 * remote-utils.c: Update.
848 * tracepoint.c: Update.
850 2018-07-03 Tom Tromey <tom@tromey.com>
852 * linux-low.c: Update.
853 * linux-ppc-low.c: Update.
854 * linux-x86-low.c: Update.
855 * proc-service.c: Update.
858 * thread-db.c: Update.
859 * win32-low.c: Update.
861 2018-07-03 Tom Tromey <tom@tromey.com>
863 * linux-low.c: Update.
864 * lynx-low.c: Update.
866 * remote-utils.c: Update.
868 * thread-db.c: Update.
869 * win32-low.c: Update.
871 2018-06-29 Joel Brobecker <brobecker@adacore.com>
873 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
874 parameter in call to 'amd64_create_target_description'.
876 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
878 * x86-tdesc.h: Remove executable permission flag.
880 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
882 * configure.ac: Remove AC_PREREQ, add missing quoting.
883 * configure: Re-generate.
884 * config.in: Re-generate.
885 * aclocal.m4: Re-generate.
887 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
889 * tracepoint.h (current_traceframe): Remove declaration.
891 2018-06-18 Alan Hayward <alan.hayward@arm.com>
893 * linux-aarch64-low.c (is_sve_tdesc): New function.
894 (aarch64_sve_regs_copy_to_regcache): Likewise.
895 (aarch64_sve_regs_copy_from_regcache): Likewise.
896 (aarch64_regs_info): Add SVE checks.
897 (initialize_low_arch): Initialize SVE.
899 2018-06-18 Alan Hayward <alan.hayward@arm.com>
901 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
903 2018-06-11 Alan Hayward <alan.hayward@arm.com>
905 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
906 (initialize_low_tracepoint): Likewise
907 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
908 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
910 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
912 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
914 2018-06-11 Alan Hayward <alan.hayward@arm.com>
916 * server.h (PBUFSIZ): Increase size
918 2018-06-11 Alan Hayward <alan.hayward@arm.com>
920 * regcache.c (regcache::raw_compare): New function.
921 * regcache.h (regcache::raw_compare): New declaration.
923 2018-06-11 Alan Hayward <alan.hayward@arm.com>
925 * regcache.c (new_register_cache): Use new.
926 (free_register_cache): Use delete.
927 (register_data): Use const.
928 (supply_register): Move body inside regcache.
929 (regcache::raw_supply): New override function.
930 (collect_register): Move body inside regcache.
931 (regcache::raw_collect): New override function.
932 (regcache::get_register_status): New override function.
933 * regcache.h (struct regcache): Inherit from reg_buffer_common.
935 2018-06-09 Tom Tromey <tom@tromey.com>
937 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
939 (event_queue): Use std::queue.
940 (gdb_event_xfree): Remove.
941 (initialize_event_loop, process_event, wait_for_event): Update.
943 2018-06-08 Stan Cox <scox@redhat.com>
945 * win32-low.c (win32_create_inferior): last_ptid and last_status
946 moved to client_state.
948 2018-06-08 Pedro Alves <palves@redhat.com>
950 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
951 common/common-exceptions.o, common/common-utils.o,
952 common/errors.o, common/print-utils.o and utils.o.
953 * gdbreplay.c: Include "common-defs.h" instead of the two
954 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
955 string.h or alloca.h.
956 (perror_with_name): Delete.
957 (remote_open): Use xstrdup instead of strdup.
958 (main): Rename to ...
959 (captured_main): ... this.
962 2018-06-08 Tom Tromey <tom@tromey.com>
964 * linux-low.c (linux_low_read_btrace): Update.
966 2018-06-04 Stan Cox <scox@redhat.com>
968 * server.h (struct client_state): New.
969 * server.c (cont_thread, general_thread, multi_process)
970 (report_fork_events, report_vfork_events, report_exec_events)
971 (report_thread_events, swbreak_feature, hwbreak_feature)
972 (vCont_supported, disable_randomization, pass_signals)
973 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
974 Moved to client_state.
975 * remote-utils.c (remote_debug, noack_mode)
976 (transport_is_reliable): Moved to client_state.
977 * tracepoint.c (current_traceframe): Moved to client_state.
980 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
981 linux-low.c, remote-utils.h, target.c: Use client_state.
983 2018-05-31 Alan Hayward <alan.hayward@arm.com>
985 * configure.srv: Add new c/h file.
987 2018-05-31 Alan Hayward <alan.hayward@arm.com>
989 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
992 2018-05-25 Maciej W. Rozycki <macro@mips.com>
994 * gdb.arch/mips-fpregset-core.exp: New test.
995 * gdb.arch/mips-fpregset-core.c: New test source.
997 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1000 * hostio.c (require_int): Do not report overflow for integers
1001 between 0xfffffff and 0x7fffffff.
1003 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1005 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1006 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1007 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1009 (the_low_target): Wire them.
1011 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1013 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1014 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1015 mode. Call collect_register_by_name with vscr using
1016 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1017 (ppc_store_vrregset): Add and set vscr_offset variable as in
1018 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1021 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1023 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1024 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1025 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1027 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1029 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1030 (ppc_store_vsxregset): Likewise.
1031 (ppc_fill_vrregset): Likewise.
1032 (ppc_store_vrregset): Likewise.
1033 (ppc_fill_evrregset): Likewise.
1034 (ppc_store_evrregset): Likewise.
1035 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1036 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1039 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1041 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1042 wordsize of the inferior. Call ppc_linux_target_wordsize.
1044 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1046 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1047 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1048 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1049 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1050 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1051 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1052 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1053 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1054 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1055 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1056 (tdesc_powerpc_e500l): Remove.
1057 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1058 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1059 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1060 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1062 (ppc_arch_setup): Remove target description matching code. Fill a
1063 ppc_linux_features struct and call ppc_linux_match_description
1066 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1068 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1069 width of the requested register exceeds the width of the
1071 (mips_cannot_store_register): Likewise.
1073 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1075 * linux-mips-low.c (mips_fetch_register): New function. Update
1077 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1078 (the_low_target): Wire `mips_fetch_register'.
1080 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1082 * lynx-i386-low.c (LYNXOS_178): New macro.
1083 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1084 the layout on LynxOS-178.
1085 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1086 handle floating point registers that are not supported by
1089 2018-05-10 Tom Tromey <tom@tromey.com>
1091 * configure: Rebuild.
1093 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1096 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1097 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1098 Use it to set the expedite_regs field in the given tdesc.
1099 * x86-tdesc.h: New file.
1100 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1101 Adjust following the addition of the new expedite_regs parameter
1102 to init_target_desc.
1103 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1104 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1105 (i386_linux_read_description, amd64_linux_read_description):
1106 Adjust following the addition of the new expedite_regs parameter
1107 to init_target_desc.
1108 * lynx-i386-low.c: #include "x86-tdesc.h".
1109 (lynx_i386_arch_setup): Adjust following the addition of the new
1110 expedite_regs parameter to init_target_desc.
1111 * nto-x86-low.c: #include "x86-tdesc.h".
1112 (nto_x86_arch_setup): Adjust following the addition of the new
1113 expedite_regs parameter to init_target_desc.
1114 * win32-i386-low.c: #include "x86-tdesc.h".
1115 (i386_arch_setup): Adjust following the addition of the new
1116 expedite_regs parameter to init_target_desc.
1118 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1121 * win32-low.c (win32_create_inferior): Add call to my_wait
1122 setting last_status global.
1124 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1127 * win32-low.c (create_process): Only call gdb_tilde_expand if
1128 inferior_cwd is not NULL.
1130 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1132 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1133 registers to the cache if their values have changed.
1134 (i387_xsave_to_cache): Provide default values for x87 control
1135 registers when these features are available, but disabled.
1136 * regcache.c (supply_register_by_name_zeroed): New function.
1137 * regcache.h (supply_register_by_name_zeroed): Declare new
1140 2018-05-07 Tom Tromey <tom@tromey.com>
1142 * configure: Rebuild.
1144 2018-05-04 Tom Tromey <tom@tromey.com>
1146 * configure: Rebuild.
1148 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1149 Pedro Alves <palves@redhat.com>
1151 * linux-aarch64-low.c (aarch64_stopped_data_address):
1154 2018-04-27 Tom Tromey <tom@tromey.com>
1156 * configure: Rebuild.
1158 2018-04-23 Tom Tromey <tom@tromey.com>
1160 * configure: Rebuild.
1162 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1164 * Makefile.in (depcomp): Add "..".
1165 (all_deps_files): New and use it.
1167 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1169 * configure.srv (aarch64*-*-linux*): Don't include xml.
1170 (i[34567]86-*-cygwin*): Likewise.
1171 (i[34567]86-*-linux*): Likewise.
1172 (i[34567]86-*-lynxos*): Likewise.
1173 (i[34567]86-*-mingw32ce*): Likewise.
1174 (i[34567]86-*-mingw*): Likewise.
1175 (i[34567]86-*-nto*): Likewise.
1176 (tic6x-*-uclinux): Likewise.
1177 (x86_64-*-linux*): Likewise.
1178 (x86_64-*-mingw*): Likewise.
1179 (x86_64-*-cygwin*): Likewise.
1181 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1183 * tdesc.c: Remove xml parameter.
1185 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1187 * server.c (get_features_xml): Remove cast.
1188 * tdesc.c (void target_desc::accept): Fill in function.
1189 (tdesc_get_features_xml): Remove old xml creation.
1190 (print_xml_feature::visit_pre): Add xml vistor.
1191 * tdesc.h (struct target_desc): Make xmltarget mutable.
1192 (tdesc_get_features_xml): Remove declaration.
1194 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1196 * tdesc.c (tdesc_architecture_name): Add new function.
1197 (tdesc_osabi_name): Likewise.
1198 (tdesc_get_features_xml): Use new functions.
1200 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1202 * tdesc.c (tdesc_create_flags): Remove.
1203 (tdesc_add_flag): Likewise.
1204 (tdesc_named_type): Likewise.
1205 (tdesc_create_union): Likewise.
1206 (tdesc_create_struct): Likewise.
1207 (tdesc_create_vector): Likewise.
1208 (tdesc_add_bitfield): Likewise.
1209 (tdesc_add_field): Likewise.
1210 (tdesc_set_struct_size): Likewise.
1212 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1214 * tdesc.c (~target_desc): Remove implictly deleted items.
1215 (init_target_desc): Iterate all features.
1216 (tdesc_get_features_xml): Use vector.
1217 (tdesc_create_feature): Create feature.
1218 * tdesc.h (tdesc_feature) Remove
1219 (target_desc): Add features.
1221 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1223 * Makefile.in: Add common/tdesc.c
1224 * tdesc.c (init_target_desc): init all reg_defs from register
1226 (tdesc_create_reg): Create tdesc_reg.
1227 * tdesc.h (tdesc_feature): Add register vector.
1229 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1231 * tdesc.h (struct target_desc) <features>: Change type to
1232 std::vector<std::string>.
1233 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1235 (tdesc_get_features_xml): Likewise.
1236 (tdesc_create_feature): Likewise.
1238 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1240 * regcache.c (find_register_by_number): Return a ref.
1241 (find_regno): Use references.
1242 (register_size): Likewise.
1243 (register_data): Likewise.
1244 * tdesc.c (target_desc::~target_desc): Remove free calls.
1245 (target_desc::operator==): Use std::vector compare.
1246 (init_target_desc): Use reference.
1247 (tdesc_create_reg): Use reg constructors.
1248 * tdesc.h (struct target_desc): Replace pointer with object.
1250 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1252 * regcache.c (find_register_by_number): Make static.
1253 (find_regno): Use find_register_by_number
1254 * regcache.h (struct reg): Remove declaration.
1256 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1258 * tdesc.c (target_desc::~target_desc): Move to here.
1259 (target_desc::operator==): Likewise.
1260 * tdesc.h (target_desc::~target_desc): Move from here.
1261 (target_desc::operator==): Likewise.
1263 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1265 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1267 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1269 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1271 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1272 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1273 and init_registers_s390_gs_linux64.
1275 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1277 * linux-s390-low.c (s390_fill_gs): Remove function.
1278 (s390_fill_gsbc): Remove function.
1279 (s390_regsets): Set fill functions for the guarded storage regsets
1282 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1284 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1285 the word size. Add comment.
1286 (s390_get_wordsize): New function.
1287 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1288 pswm with it. Instead, use s390_get_wordsize to determine the
1289 word size first and derive the correct tdesc from that directly.
1291 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1293 * Makefile.in: Include silent-rules.mk.
1294 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1295 (COMPILE): Add ECHO_CXX.
1296 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1297 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1298 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1299 (version-generated.c): Add ECHO_GEN.
1300 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1301 (IPAGENT_COMPILE): Add ECHO_CXX.
1302 (%-generated.c): Add ECHO_REGDAT.
1304 2018-03-14 Tom Tromey <tom@tromey.com>
1307 * ax.c (ax_printf): Special case for NULL.
1309 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1311 * linux-low.c (linux_qxfer_libraries_svr4): Use
1312 xml_escape_text_append.
1314 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1316 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1318 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1320 * server.c (handle_general_set): Remove unnecessary xstrdup.
1322 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1324 * server.c (parse_debug_format_options): Adjust to
1325 delim_string_to_char_ptr_vec changes.
1326 * thread-db.c (thread_db_load_search): Adjust to
1327 dirnames_to_char_ptr_vec changes.
1329 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1331 * target.h (target_enable_btrace, target_disable_btrace)
1332 (target_read_btrace, target_read_btrace_conf): Turn macro into
1333 inline function. Throw error if target method is not defined.
1334 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1335 check for btrace target method. Be prepared to handle exceptions
1336 from btrace target methods.
1338 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1340 * server.c (captured_main): Change order of error message printed
1341 when the current working directory cannot be found.
1343 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1345 * server.c: Include "filenames.h" and "pathstuff.h".
1346 (program_name): Delete variable.
1347 (program_path): New anonymous class.
1348 (get_exec_wrapper): Use "program_path" instead of
1350 (handle_v_run): Likewise.
1351 (captured_main): Likewise.
1352 (process_serial_event): Likewise.
1354 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1356 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1357 (OBJS): Add "pathstuff.o".
1358 * server.c (current_directory): New global variable.
1359 (captured_main): Initialize "current_directory".
1361 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1363 * tdesc.c: Use common/tdesc.h.
1364 * tdesc.h: Likewise.
1366 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1367 Simon Marchi <simon.marchi@ericsson.com>
1369 * Makefile.in: Switch order of make rules.
1371 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1373 * Makefile.in: Add common directory in build.
1374 * configure.ac: Add common reference.
1375 * configure: Regenerate.
1377 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1379 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1380 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1381 * spu-low.c (spu_target_ops): Likewise.
1382 * win32-low.c (win32_target_ops): Likewise.
1383 * server.c (supported_btrace_packets): Report packets unconditionally.
1384 * target.h (target_ops) <supports_btrace>: Remove.
1385 (target_supports_btrace): Remove.
1387 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1389 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1390 (handle_btrace_disable): Change return type to void. Use exceptions
1392 (handle_btrace_general_set): Catch exception and copy message to
1395 2018-02-08 Tom Tromey <tom@tromey.com>
1397 * linux-low.c (install_software_single_step_breakpoints): Use
1398 make_scoped_restore.
1399 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1400 (do_restore_current_thread_cleanup): Remove.
1401 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1404 2018-02-08 Tom Tromey <tom@tromey.com>
1406 * mem-break.c (set_raw_breakpoint_at): Use
1407 gdb::unique_xmalloc_ptr.
1409 2018-01-30 Pedro Alves <palves@redhat.com>
1412 * target.c (target_terminal::terminal_state): Rename to ...
1413 (target_terminal::m_terminal_state): ... this.
1415 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1417 * linux-low.c (handle_extended_wait): Surround call to
1418 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1420 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1422 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1423 linux_ptrace_attach_fail_reason_string now returning an
1425 (linux_attach): Likewise.
1426 * thread-db.c (attach_thread): Likewise.
1428 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1431 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1432 checking for fs_base/gs_base fields in struct user_regs_struct.
1433 * configure: Regenerate.
1435 2018-01-16 Yao Qi <yao.qi@linaro.org>
1438 * linux-low.c (fetch_register): Call supply_register instead of
1441 2018-01-08 Yao Qi <yao.qi@linaro.org>
1442 Simon Marchi <simon.marchi@ericsson.com>
1444 * Makefile.in (OBS): Remove selftest.o.
1445 * configure.ac: Set srv_selftest_objs if $development is true.
1446 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1447 * configure: Re-generated.
1448 * server.c (captured_main): Wrap variable selftest_filter with
1451 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1453 * server.c (parse_debug_format_options): Return std::string.
1454 (handle_monitor_command, captured_main): Adjust.
1456 2018-01-05 Pedro Alves <palves@redhat.com>
1459 * server.c (captured_main): Pass quiet=false to
1460 save_original_signals_state.
1462 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1464 * gdbreplay.c (gdbreplay_version): Update copyright year in
1466 * server.c (gdbserver_version): Likewise.
1468 2017-12-08 Tom Tromey <tom@tromey.com>
1470 * ax.c (ax_printf): Update.
1472 2017-12-07 Yao Qi <yao.qi@linaro.org>
1474 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1475 aarch64_linux_read_description.
1476 * linux-amd64-ipa.c (idx2mask): New array.
1477 (get_ipa_tdesc): Move idx2mask out.
1478 (initialize_low_tracepoint): Initialize target descriptions.
1479 * linux-i386-ipa.c (idx2mask): New array.
1480 (get_ipa_tdesc): Move idx2mask out.
1481 (initialize_low_tracepoint): Initialize target descriptions.
1483 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1485 * tdesc.c (struct tdesc_type): Change return type.
1486 (tdesc_add_flag): Change parameter type.
1487 (tdesc_add_bitfield): Likewise.
1488 (tdesc_add_field): Likewise.
1489 (tdesc_set_struct_size): Likewise.
1491 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1493 * regcache.c (registers_to_string): Remove unused variable.
1495 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1497 * inferiors.c (for_each_inferior_with_data): Remove.
1498 * inferiors.h (for_each_inferior_with_data): Remove.
1499 * server.c (handle_qxfer_threads_worker): Change parameter type.
1500 (handle_qxfer_threads_proper): Use for_each_thread.
1502 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1504 * inferiors.c (for_each_inferior): Remove.
1505 (clear_inferiors): Use for_each_thread.
1506 * inferiors.h (for_each_inferior): Remove.
1507 * linux-low.c (linux_wait_for_event_filtered): Use
1509 (linux_stabilize_threads): Likewise.
1510 * regcache.c (regcache_release): Likewise.
1511 * server.c (gdb_wants_all_threads_stopped): Likewise.
1512 (clear_pending_status_callback): Remove.
1513 (handle_status): Use for_each_thread.
1514 (captured_main): Likewise.
1515 * win32-low.c (child_init_thread_list): Likewise.
1516 (win32_clear_inferiors): Likewise.
1517 (fake_breakpoint_event): Likewise.
1519 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1521 * inferiors.h (find_inferior): Remove.
1522 * inferiors.c (find_inferior): Remove.
1524 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1526 * linux-low.c (resume_status_pending_p): Update comment.
1527 (need_step_over_p): Update comment.
1529 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1531 * linux-low.c (proceed_one_lwp): Return void, change parameter
1533 (unsuspend_and_proceed_one_lwp): Likewise.
1534 (proceed_all_lwps): Use for_each_thread.
1535 (unstop_all_lwps): Likewise.
1537 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1539 * linux-low.c (linux_resume_one_thread): Return void, take
1541 (linux_resume): Use for_each_thread.
1543 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1545 * linux-low.c (send_sigstop_callback): Return void, change
1546 parameter type. Rename to...
1547 (send_sigstop): ... this.
1548 (suspend_and_send_sigstop_callback): Return void, change parameter
1550 (suspend_and_send_sigstop): ... this.
1551 (stop_all_lwps): Use for_each_thread.
1553 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1555 * linux-low.c (lwp_running): Return bool, remove unused
1557 (linux_stabilize_threads): Use find_thread.
1559 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1561 * linux-low.c (select_singlestep_lwp_callback): Remove.
1562 (count_events_callback): Remove.
1563 (select_event_lwp_callback): Remove.
1564 (select_event_lwp): Use find_thread/for_each_thread.
1566 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1568 * linux-low.c (not_stopped_callback): Return bool, take filter
1570 (linux_wait_for_event_filtered): Use find_thread.
1571 (linux_wait_1): Likewise.
1573 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1575 * linux-low.c (same_lwp): Remove.
1576 (find_lwp_pid): Use find_thread.
1578 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1580 * linux-low.c (delete_lwp_callback): Remove.
1581 (linux_mourn): Use for_each_thread.
1583 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1585 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1586 args parameter, don't check for pid.
1587 (linux_detach): Use for_each_thread.
1589 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1591 * linux-low.c (struct counter): Remove.
1592 (second_thread_of_pid_p): Remove.
1593 (last_thread_of_process_p): Use find_thread.
1595 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1597 * inferiors.c (find_inferior_in_random): Remove.
1598 * inferiors.h (find_inferior_in_random): Remove.
1599 * linux-low.c (status_pending_p_callback): Return bool, accept
1600 parameter ptid directly.
1601 (linux_wait_for_event_filtered): Use find_thread_in_random.
1602 (linux_wait_1): Likewise.
1604 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1606 * inferiors.c (find_inferior_id): Remove.
1607 (find_thread_ptid): Move implemention from find_inferior_id to
1609 * inferiors.h (find_inferior_id): Remove.
1610 * server.c (handle_status): Use find_thread_ptid.
1611 (process_serial_event): Likewise.
1612 * thread-db.c (find_one_thread): Likewise.
1613 (thread_db_thread_handle): Likewise.
1614 * win32-low.c (thread_rec): Likewise.
1615 (child_delete_thread): Likewise.
1616 (win32_thread_alive): Likewise.
1617 (get_child_debug_event): Likewise.
1619 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1621 * linux-mips-low.c (update_watch_registers_callback): Return
1622 void, remove pid_p parameter, don't check for pid.
1623 (mips_insert_point, mips_remove_point): Use for_each_thread.
1625 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1627 * lynx.low (lynx_delete_thread_callback): Remove.
1628 (lynx_mourn): Use for_each_thread.
1630 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1632 * regcache.c (regcache_invalidate_one): Remove.
1633 (regcache_invalidate_pid): use for_each_thread.
1635 2017-11-26 Tom Tromey <tom@tromey.com>
1637 * linux-low.c (linux_create_inferior): Update.
1639 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1641 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1643 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1645 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1646 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1647 * linux-aarch64-tdesc-selftest.c: New file.
1648 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1650 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1652 * configure.srv: Add new file.
1653 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1654 * linux-aarch64-tdesc-selftest.c: New file.
1655 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1657 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1659 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1660 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1661 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1663 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1665 * configure.srv: Add new files.
1666 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1667 aarch64_linux_read_description.
1668 * linux-aarch64-low.c (aarch64_linux_read_description):
1669 Merge with aarch64_arch_setup.
1670 (aarch64_arch_setup): Call aarch64_linux_read_description.
1671 * linux-aarch64-tdesc.c: New file.
1672 * linux-aarch64-tdesc.h: New file.
1674 2017-11-24 Yao Qi <yao.qi@linaro.org>
1676 * configure.srv: Set $srv_regobj for tic6x-linux.
1677 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1678 (tic6x_read_description): Move some code to tic6x_arch_setup.
1679 (tic6x_tdesc_test): New function.
1680 (initialize_low_arch): Call selftests::register_test.
1682 2017-11-22 Yao Qi <yao.qi@linaro.org>
1684 * remote-utils.c (prepare_resume_reply): Use memcpy.
1686 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1688 * linux-low.c (kill_one_lwp_callback): Return void, take
1689 argument directly, don't filter on pid.
1690 (linux_kill): Use for_each_thread.
1692 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1694 * linux-low.c (need_step_over_p): Return bool, remove dummy
1696 (linux_resume, proceed_all_lwps): Use find_thread.
1698 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1700 * linux-low.c (resume_status_pending_p): Return bool, remove
1702 (linux_resume): Use find_thread.
1704 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1706 * linux-low.c (struct thread_resume_array): Remove.
1707 (linux_set_resume_request): Return void, take arguments
1709 (linux_resume): Use for_each_thread.
1711 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1713 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1714 return bool, remove data argument.
1715 (linux_stabilize_threads): Use find_thread.
1717 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1719 * linux-low.c (unsuspend_one_lwp): Remove.
1720 (unsuspend_all_lwps): Use for_each_thread, inline code from
1723 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1725 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1726 * linux-low.c (struct iterate_over_lwps_args): Remove.
1727 (iterate_over_lwps_filter): Remove.
1728 (iterate_over_lwps): Use find_thread.
1730 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1732 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1733 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1734 code from reset_lwp_ptrace_options_callback.
1736 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1738 * linux-arm-low.c (struct update_registers_data): Remove.
1739 (update_registers_callback): Return void, take arguments
1740 directly, don't check thread's pid.
1741 (arm_insert_point, arm_remove_point): Use for_each_thread.
1743 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1745 * win32-low.c (continue_one_thread): Return void, take argument
1747 (child_continue): Use for_each_thread.
1749 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1751 * win32-i386-low.c (update_debug_registers_callback): Rename
1753 (update_debug_registers): ... this, return void, remove pid_p arg.
1754 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1756 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1758 * inferiors.h (struct process_info): Add constructor, initialize
1760 <syscalls_to_catch>: Change type to std::vector<int>.
1761 * inferiors.c (add_process): Allocate process_info with new.
1762 (remove_process): Free process_info with delete.
1763 * linux-low.c (handle_extended_wait): Adjust.
1764 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1765 * server.c (handle_general_set): Adjust.
1767 2017-11-16 Pedro Alves <palves@redhat.com>
1769 * remote-utils.c (remote_close): Block SIGIO signals instead of
1770 uninstalling the SIGIO handler.
1772 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1774 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1776 2017-11-16 Yao Qi <yao.qi@linaro.org>
1778 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1779 (tic6x_store_gregset): Likewise.
1780 (tic6x_usrregs_info): Move it up.
1782 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1784 * Makefile.in: Update arch rules.
1785 * configure.srv: Explicitly mark arch/ files.
1787 2017-11-13 Andreas Schwab <schwab@suse.de>
1789 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1791 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1793 2017-11-06 Pedro Alves <palves@redhat.com>
1795 * config.in, configure: Regenerate.
1797 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1799 * target.c (struct thread_search): Remove.
1800 (thread_search_callback): Remove.
1801 (prepare_to_access_memory): Use for_each_thread instead of
1802 find_inferior. Inline code from thread_search_callback.
1804 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1806 * server.c (struct visit_actioned_threads_data): Remove.
1807 (visit_actioned_threads): Change prototype to take arguments
1809 (resume): Use find_thread instead of find_inferior.
1811 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1813 * server.c (queue_stop_reply_callback): Change prototype, return
1815 (find_status_pending_thread_callback): Remove.
1816 (handle_status): Replace find_inferior with find_thread and
1819 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1821 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1823 (aarch64_store_gregset): Likewise.
1824 (aarch64_fill_fpregset): Likewise.
1825 (aarch64_store_fpregset): Likewise.
1827 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1829 * gdbthread.h (find_thread, for_each_thread): New functions.
1830 * inferiors.c (thread_of_pid): Remove.
1831 (find_any_thread_of_pid): Use find_thread.
1832 * linux-low.c (num_lwps): Use for_each_thread.
1834 2017-10-17 Yao Qi <yao.qi@linaro.org>
1836 * Makefile.in: Remove one rule.
1837 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1839 2017-10-17 Yao Qi <yao.qi@linaro.org>
1841 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1842 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1844 2017-10-17 Yao Qi <yao.qi@linaro.org>
1846 * configure.srv: Rename arm.o with arch/arm.o.
1848 2017-10-17 Yao Qi <yao.qi@linaro.org>
1850 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1851 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1852 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1853 (arch-i386.o, arch-amd64.o): Remove rules.
1854 (arch/%.o): New rule.
1855 Update POSTCOMPILE and COMPILE.pre.
1856 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1857 * configure: Re-generated.
1858 * configure.srv: Replace arch-i386.o with arch/i386.o.
1859 Replace arch-amd64.o with arch/amd64.o.
1861 2017-10-16 Yao Qi <yao.qi@linaro.org>
1863 * configure: Regenerated.
1865 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1867 * inferiors.h: (struct inferior_list): Remove.
1868 (struct inferior_list_entry); Remove.
1869 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1870 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1871 get_first_inferior): Remove.
1872 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1873 find_inferior_id, find_inferior_in_random): Change signature.
1874 * inferiors.c (all_threads): Change type to
1875 std::list<thread_info *>.
1876 (get_thread): Remove macro.
1877 (find_inferior, find_inferior_id): Change signature, implement
1879 (find_inferior_in_random): Change signature, implement using
1880 find_thread_in_random.
1881 (for_each_inferior, for_each_inferior_with_data): Change
1882 signature, implement using for_each_thread.
1883 (add_inferior_to_list, remove_inferior): Remove.
1884 (add_thread, get_first_thread, thread_of_pid,
1885 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1886 (get_first_inferior, one_inferior_p, clear_inferior_list):
1888 (clear_inferiors, get_thread_process): Update.
1889 * gdbthread.h: Include <list>.
1890 (struct thread_info) <entry>: Remove field.
1892 (all_threads): Change type to std::list<thread_info *>.
1893 (get_first_inferior): Add doc.
1894 (find_thread, for_each_thread, find_thread_in_random): New
1896 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1897 * linux-arm-low.c (update_registers_callback): Update.
1898 * linux-low.c (second_thread_of_pid_p): Update.
1899 (kill_one_lwp_callback, linux_detach_lwp_callback,
1900 delete_lwp_callback, status_pending_p_callback, same_lwp,
1901 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1902 iterate_over_lwps, not_stopped_callback,
1903 resume_stopped_resumed_lwps, count_events_callback,
1904 select_singlestep_lwp_callback, select_event_lwp_callback,
1905 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1906 suspend_and_send_sigstop_callback, wait_for_sigstop,
1907 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1908 lwp_running, linux_set_resume_request, resume_status_pending_p,
1909 need_step_over_p, start_step_over, linux_resume_one_thread,
1910 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1911 reset_lwp_ptrace_options_callback): Update.
1912 * linux-mips-low.c (update_watch_registers_callback): Update.
1913 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1915 (free_register_cache_thread_one): Remove.
1916 (regcache_release): Update.
1917 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1918 handle_qxfer_threads_worker): Update.
1919 (handle_query): Update, use list iterator.
1920 (visit_actioned_threads, handle_pending_status,
1921 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1922 clear_pending_status_callback, set_pending_status_callback,
1923 find_status_pending_thread_callback, handle_status,
1924 process_serial_event): Update.
1925 * target.c (thread_search_callback): Update.
1926 * thread-db.c (thread_db_get_tls_address): Update.
1927 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1929 * win32-i386-low.c (update_debug_registers_callback): Update.
1930 * win32-low.c (delete_thread_info, child_delete_thread,
1931 continue_one_thread, suspend_one_thread,
1932 get_child_debug_event): Adjust.
1934 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1936 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1937 * inferiors.h: Include <list>.
1938 (struct process_info) <entry>: Remove field.
1940 (pid_of): Change macro to function.
1941 (ptid_of, lwpid_of): Remove macro.
1942 (all_processes): Change type to std::list<process_info *>.
1943 (ALL_PROCESSES): Remove macro.
1944 (for_each_process, find_process): New function.
1945 * inferiors.c (all_processes): Change type to
1946 std::list<process_info *>.
1947 (find_thread_process): Adjust.
1948 (add_process): Likewise.
1949 (remove_process): Likewise.
1950 (find_process_pid): Likewise.
1951 (get_first_process): Likewise.
1952 (started_inferior_callback): Remove.
1953 (have_started_inferiors_p): Adjust.
1954 (attached_inferior_callback): Remove.
1955 (have_attached_inferiors_p): Adjust.
1956 * linux-low.c (check_zombie_leaders): Likewise.
1957 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1958 (x86_linux_update_xmltarget): Adjust.
1959 * server.c (handle_query): Likewise.
1960 (gdb_reattached_process): Remove.
1961 (handle_status): Adjust.
1962 (kill_inferior_callback): Likewise.
1963 (detach_or_kill_inferior): Remove.
1964 (print_started_pid): Likewise.
1965 (print_attached_pid): Likewise.
1966 (detach_or_kill_for_exit): Update.
1967 (process_serial_event): Likewise.
1968 * linux-arm-low.c (arm_new_fork): Likewise.
1970 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1972 * dll.h: Include <list>.
1973 (struct dll_info): Add constructor.
1974 <entry>: Remove field.
1975 (all_dlls): Change type to std::list<dll_info>.
1976 * dll.c: Include <algorithm>.
1977 (get_dll): Remove macro.
1978 (all_dlls): Change type to std::list<dll_info *>.
1979 (free_one_dll): Remove.
1980 (match_dll): Likewise.
1981 (loaded_dll): Adjust.
1982 (unloaded_dll): Adjust to all_dlls type change, use
1983 std::find_if. Inline code from match_dll.
1984 (clear_dlls): Adjust to all_dlls type change.
1985 * server.c (emit_dll_description): Remove.
1986 (handle_qxfer_libraries): Adjust to all_dlls type change,
1987 integrate emit_dll_description's functionality.
1989 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1991 * linux-low.h (struct linux_target_ops) <delete_process>: New
1993 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1994 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1995 (struct linux_target_ops): Add delete_process callback.
1996 * linux-arm-low.c (arm_delete_process): New.
1997 (struct linux_target_ops): Add delete_process callback.
1998 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1999 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2000 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2001 * linux-mips-low.c (mips_linux_delete_process): New.
2002 (struct linux_target_ops): Add delete_process callback.
2003 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2004 * linux-s390-low.c (struct linux_target_ops): Likewise.
2005 * linux-sh-low.c (struct linux_target_ops): Likewise.
2006 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2007 * linux-tile-low.c (struct linux_target_ops): Likewise.
2008 * linux-x86-low.c (x86_linux_delete_process): New.
2009 (struct linux_target_ops): Add delete_process callback.
2010 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2012 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2014 * linux-aarch64-low.c (the_low_target): Add thread delete
2016 * linux-arm-low.c (arm_delete_thread): New function.
2017 (the_low_target): Add thread delete callback.
2018 * linux-bfin-low.c (the_low_target): Likewise.
2019 * linux-crisv32-low.c (the_low_target): Likewise.
2020 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2022 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2024 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2025 * linux-mips-low.c (mips_linux_delete_thread): New function.
2026 (the_low_target): Add thread delete callback.
2027 * linux-ppc-low.c (the_low_target): Likewise.
2028 * linux-s390-low.c (the_low_target): Likewise.
2029 * linux-sh-low.c (the_low_target): Likewise.
2030 * linux-tic6x-low.c (the_low_target): Likewise.
2031 * linux-tile-low.c (the_low_target): Likewise.
2032 * linux-x86-low.c (the_low_target): Likewise.
2033 * linux-xtensa-low.c (the_low_target): Likewise.
2035 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2037 * win32-low.c: Include "common-inferior.h".
2039 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2041 * inferiors.c (set_inferior_cwd): New function.
2042 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2043 (handle_query): Inform that QSetWorkingDir is supported.
2044 * win32-low.c (create_process): Pass the inferior's cwd to
2047 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2049 * inferiors.c (current_inferior_cwd): New global variable.
2050 (get_inferior_cwd): New function.
2051 * inferiors.h (struct process_info) <cwd>: New field.
2053 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2055 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2056 (OBS): Add gdb_tilde_expand.o.
2058 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2060 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2061 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2063 2017-09-29 Pedro Alves <palves@redhat.com>
2065 * ax.c (gdb_parse_agent_expr): Constify.
2066 * ax.h (gdb_parse_agent_expr): Constify.
2067 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2069 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2070 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2071 * remote-utils.h (read_ptid): Constify.
2072 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2073 (process_point_options, process_serial_event): Constify.
2074 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2075 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2076 (cmd_qtbuffer): Constify.
2078 2017-09-29 Pedro Alves <palves@redhat.com>
2080 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2083 2017-09-29 Pedro Alves <palves@redhat.com>
2085 * linux-low.c (handle_extended_wait): Pass parent thread instead
2086 of process to thread_db_notice_clone.
2087 * linux-low.h (thread_db_notice_clone): Replace parent process
2088 parameter with parent thread parameter.
2089 * thread-db.c (find_one_thread): Add comment.
2090 (thread_db_notice_clone): Replace parent process parameter with
2091 parent thread parameter. Temporarily switch to the parent thread.
2093 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2095 * gdbthread.h: Include "common-gdbthread.h".
2096 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2097 "if" when validating the ptid.
2098 * remote-utils.c: Include "gdbthread.h".
2099 (prepare_resume_reply): Use "switch_to_thread".
2100 * target.c (done_accessing_memory): Likewise.
2102 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2104 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2105 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2106 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2107 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2108 s390x-gs-linux64-ipa.o to ipa_obj.
2109 * linux-s390-low.c (HWCAP_S390_GS): New define.
2110 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2112 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2113 (s390_arch_setup): Check for guarded-storage support and choose
2115 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2116 init_registers_s390x_gs_linux64.
2117 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2119 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2120 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2122 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2124 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2126 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2128 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2129 (thread_db_thread_handle): Declare.
2130 * linux-low.c (linux_target_ops): Initialize thread_handle.
2131 * server.c (handle_qxfer_threads_worker): Add support for
2133 * target.h (struct target_ops): Add new function pointer,
2135 (target_thread_handle): Define.
2136 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2138 (thread_db_thread_handle): New function.
2140 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2142 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2143 * linux-low.h (thread_db_notice_clone): Declare.
2144 * thread-db.c (thread_db_notice_clone): New function.
2146 2017-09-21 Pedro Alves <palves@redhat.com>
2148 * server.c (gdb_read_memory, handle_status, process_serial_event)
2149 (handle_serial_event, handle_target_event): Adjust to
2150 set_desired_thread prototype change.
2151 * target.c (set_desired_thread): Remove 'use_general' parameter
2153 * target.h (set_desired_thread): Remove 'use_general' parameter.
2155 2017-09-20 Tom Tromey <tom@tromey.com>
2157 * target.c (target_terminal::terminal_state): Define.
2158 (target_terminal::init): Rename from target_terminal_init.
2159 (target_terminal::inferior): Rename from
2160 target_terminal_inferior.
2161 (target_terminal::ours): Rename from target_terminal_ours.
2162 (target_terminal::ours_for_output, target_terminal::info): New.
2164 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2166 * server.c (accumulate_file_name_length): Remove.
2167 (emit_dll_description): Adjust to std::string change.
2168 (handle_qxfer_libraries): Use std::string to hold document.
2170 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2172 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2173 return type of xml_escape_text.
2174 * server.c (emit_dll_description): Likewise.
2176 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2178 * server.c (captured_main): Accept argument for --selftest.
2179 Update run_tests call.
2180 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2181 when registering selftests.
2183 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2185 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2186 instead of "VEC" for "target_desc.reg_defs".
2187 (regcache_cpy): Likewise.
2188 (registers_to_string): Likewise.
2189 (registers_from_string): Likewise.
2190 (find_regno): Likewise.
2191 (supply_regblock): Likewise.
2192 (regcache_raw_read_unsigned): Likewise.
2193 * tdesc.c (init_target_desc): Likewise.
2194 (tdesc_create_reg): Likewise.
2195 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2196 (struct target_desc) <reg_defs>: Convert to "std::vector".
2197 (target_desc): Do not initialize "reg_defs".
2198 (~target_desc): Update code to use "std::vector" instead of "VEC"
2199 for "target_desc.reg_defs".
2200 (operator==): Likewise.
2202 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2204 * inferiors.h (thread_to_gdb_id): Remove.
2205 * inferiors.c (thread_to_gdb_id): Remove.
2206 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2207 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2208 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2210 * nto-low.c (nto_fetch_registers, nto_store_registers,
2211 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2213 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2215 * inferiors.h (gdb_id_to_thread_id): Remove.
2216 * inferiors.c (gdb_id_to_thread_id): Remove.
2217 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2218 removal. Move pid declaration closer to where it's used.
2220 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2222 * server.c (handle_detach): New function.
2223 (process_serial_event): Move code out, call handle_detach.
2225 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2227 * server.c (require_running): Rename to ...
2228 (require_running_or_return): ... this ...
2229 (require_running_or_break): ... and this.
2230 (handle_query, process_serial_event): Adjust.
2232 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2234 * linux-low.c (linux_set_resume_request): Remove unused
2237 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2239 * server.c (first_thread_of): Remove.
2240 (process_serial_event): Replace usage of first_thread_of with
2241 find_any_thread_of_pid.
2242 * tracepoint.c (same_process_p): Remove.
2243 (gdb_agent_about_to_close): Replace usage of same_process_p with
2244 find_any_thread_of_pid.
2245 * linux-x86-low.c (same_process_callback): Remove.
2246 (x86_arch_setup_process_callback): Replace usage of
2247 same_process_callback with find_any_thread_of_pid.
2248 * thread-db.c (any_thread_of): Remove.
2249 (switch_to_process): Replace usage of any_thread_of with
2250 find_any_thread_of_pid.
2251 * inferiors.c (thread_pid_matches_callback): Remove.
2252 (find_thread_process): Adjust to use find_any_thread_of_pid.
2254 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2256 * regcache.c (get_thread_regcache): Guard calls to "memset"
2259 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2261 * linux-low.c (handle_extended_wait): Use
2262 "allocate_target_description" instead of "XNEW".
2263 * linux-x86-low.c (initialize_low_arch): Likewise.
2265 2017-09-05 Yao Qi <yao.qi@linaro.org>
2267 * configure.srv (srv_i386_regobj): Remove.
2268 (srv_amd64_regobj): Remove.
2269 (srv_regobj): Set it to "" for x86 non-linux targets.
2270 * linux-x86-tdesc.c (i386_linux_read_description):
2271 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2272 (init_registers_i386): Remove the declaration.
2273 (tdesc_i386): Remove the declaration.
2274 (lynx_i386_arch_setup): Call i386_create_target_description.
2275 * nto-x86-low.c: Likewise.
2276 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2277 [!__x86_64__]: include arch/i386.h.
2278 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2280 2017-09-05 Yao Qi <yao.qi@linaro.org>
2282 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2283 i386/amd64-XXX-linux from it.
2285 2017-09-05 Yao Qi <yao.qi@linaro.org>
2287 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2289 (ipa_amd64_linux_regobj): Remove.
2290 (ipa_x32_linux_regobj): Remove.
2292 2017-09-05 Yao Qi <yao.qi@linaro.org>
2294 * Makefile.in (arch-amd64.o): New rule.
2295 * configure.srv: Append arch-amd64.o.
2296 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2297 (get_ipa_tdesc): Call amd64_linux_read_description.
2298 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2299 and init_registers_amd64_XXX.
2300 * linux-x86-low.c (x86_linux_read_description): Call
2301 amd64_linux_read_description.
2302 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2303 (initialize_low_arch): Don't call init_registers_x32_XXX and
2304 init_registers_amd64_XXX.
2305 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2306 and tdesc_amd64_XXX.
2307 [__x86_64__] (amd64_tdesc_test): New function.
2308 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2309 and init_registers_amd64_XXX.
2310 * linux-x86-tdesc.c: Include arch/amd64.h.
2311 (xcr0_to_tdesc_idx): New function.
2312 (i386_linux_read_description): New function.
2313 (amd64_get_ipa_tdesc_idx): New function.
2314 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2315 (amd64_get_ipa_tdesc): Declare.
2317 2017-09-05 Yao Qi <yao.qi@linaro.org>
2319 * configure.srv (srv_i386_linux_xmlfiles): Remove
2320 i386/i386-XXX-linux.xml from it.
2322 2017-09-05 Yao Qi <yao.qi@linaro.org>
2324 * configure.srv: Set srv_i386_linux_regobj empty if $development
2326 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2327 initialize_low_tdesc.
2328 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2329 with #if initialize_low_tdesc.
2330 * linux-x86-tdesc-selftest.c: New file.
2331 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2333 2017-09-05 Yao Qi <yao.qi@linaro.org>
2335 * Makefile.in (arch-i386.o): New rule.
2336 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2337 (x86_64-*-linux*): Likewise.
2338 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2339 include arch/i386.h.
2340 (i386_linux_read_description): Remove code and call
2341 i386_create_target_description.
2342 * tdesc.c (allocate_target_description): New function.
2343 * tdesc.h (set_tdesc_architecture): Remove declaration.
2344 (set_tdesc_osabi): Likewise.
2346 2017-09-05 Yao Qi <yao.qi@linaro.org>
2348 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2349 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2350 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2352 * server.c (get_features_xml): Call tdesc_get_features_xml.
2353 * tdesc.c (set_tdesc_architecture): New function.
2354 (set_tdesc_osabi): New function.
2355 (tdesc_get_features_xml): New function.
2356 (tdesc_create_feature): Add an argument.
2357 * tdesc.h (struct target_desc) <features>: New field.
2358 <arch, osabi>: New field.
2359 (~target_desc): xfree features, arch, and osabi.
2360 (target_desc::oerator==): Don't compare .xmltarget.
2361 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2362 (set_tdesc_osabi): Likewise.
2363 (tdesc_get_features_xml): Likewise.
2365 2017-09-05 Yao Qi <yao.qi@linaro.org>
2367 * linux-x86-tdesc.c: Include selftest.h.
2368 (i386_tdesc_test): New function.
2369 (initialize_low_tdesc): Call selftests::register_test.
2370 * tdesc.h: Include regdef.h.
2371 (target_desc): Override operator == and !=.
2373 2017-09-05 Yao Qi <yao.qi@linaro.org>
2375 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2376 (ipa_obj): Likewise.
2377 * linux-i386-ipa.c: Include common/x86-xstate.h
2378 (get_ipa_tdesc): Call i386_linux_read_description.
2379 (initialize_low_tracepoint): Don't call init_registers_XXX
2380 functions, call initialize_low_tdesc instead.
2381 * linux-x86-low.c (x86_linux_read_description): Call
2382 i386_linux_read_description.
2383 (initialize_low_arch): Don't call init_registers_i386_XXX
2384 functions, call initialize_low_tdesc.
2385 * linux-x86-tdesc.c: New file.
2386 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2387 (i386_get_ipa_tdesc_idx): Declare.
2388 (i386_get_ipa_tdesc): Declare.
2389 (initialize_low_tdesc): Declare.
2391 2017-09-05 Yao Qi <yao.qi@linaro.org>
2393 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2396 2017-09-05 Yao Qi <yao.qi@linaro.org>
2398 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2399 * regcache.c (get_thread_regcache): Use VEC_length.
2400 (init_register_cache): Likewise.
2401 (regcache_cpy): Likewise.
2402 (registers_to_string): Iterate reg_defs via VEC_iterate.
2403 (find_regno): Likewise.
2404 (find_register_by_number): Use VEC_index.
2405 (register_size): Call find_register_by_number.
2406 (register_data): Call find_register_by_number.
2407 (supply_regblock): Use VEC_length.
2408 (regcache_raw_read_unsigned): Likewise.
2409 * tdesc.c (init_target_desc): Iterate reg_defs via
2411 (default_description): Update initializer.
2412 (copy_target_description): Don't update field num_registers.
2413 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2414 <num_registers>: Remove.
2416 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2418 * Makefile.in (.SECONDARY): Define target.
2420 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2422 * linux-low.c (linux_wait_1): Adjust.
2423 * server.c (queue_stop_reply_callback): Adjust.
2425 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2427 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2428 QEnvironmentUnset and QEnvironmentReset packets.
2429 (handle_query): Inform remote that QEnvironmentHexEncoded,
2430 QEnvironmentUnset and QEnvironmentReset are supported.
2432 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2434 * inferiors.h (inferior_target_data): Rename to ...
2435 (thread_target_data): ... this.
2436 (inferior_regcache_data): Rename to ...
2437 (thread_regcache_data): ... this.
2438 (set_inferior_regcache_data): Rename to ...
2439 (set_thread_regcache_data): ... this.
2440 * inferiors.c (inferior_target_data): Rename to ...
2441 (thread_target_data): ... this.
2442 (inferior_regcache_data): Rename to ...
2443 (thread_regcache_data): ... this.
2444 (set_inferior_regcache_data): Rename to ...
2445 (set_thread_regcache_data): ... this.
2446 (free_one_thread): Update.
2447 * linux-low.h (get_thread_lwp): Update.
2448 * regcache.c (get_thread_regcache): Update.
2449 (regcache_invalidate_thread): Update.
2450 (free_register_cache_thread): Update.
2451 * win32-i386-low.c (update_debug_registers_callback): Update.
2452 (win32_get_current_dr): Update.
2453 * win32-low.c (thread_rec): Update.
2454 (delete_thread_info): Update.
2455 (continue_one_thread): Update.
2456 (suspend_one_thread): Update.
2458 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2460 * inferiors.c (set_inferior_target_data): Remove.
2461 * inferiors.h (set_inferior_target_data): Remove.
2463 2017-08-18 Yao Qi <yao.qi@linaro.org>
2465 * Makefile.in (OBS): Add selftest.o.
2466 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2467 * configure, config.in: Re-generated.
2468 * server.c: Include common/sefltest.h.
2469 (captured_main): Handle option --selftest.
2471 2017-08-09 Yao Qi <yao.qi@linaro.org>
2473 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2474 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2475 i386-avx-mpx.o and i386-mmx.o.
2476 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2477 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2478 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2479 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2480 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2481 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2482 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2483 i386/amd64-avx-mpx.xml.
2485 2017-08-09 Yao Qi <yao.qi@linaro.org>
2487 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2488 and x32-avx-avx512.o.
2489 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2490 i386/x32-avx-avx512.xml.
2492 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2494 * tracepoint.h (enum class fast_tpoint_collect_result): New
2496 (fast_tracepoint_collecting): Change return type to
2497 fast_tpoint_collect_result.
2498 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2499 * linux-low.h: Include tracepoint.h.
2500 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2501 fast_tpoint_collect_result.
2502 * linux-low.c (handle_tracepoints): Adjust.
2503 (linux_fast_tracepoint_collecting): Change return type to
2504 fast_tpoint_collect_result.
2505 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2506 linux_wait_1, stuck_in_jump_pad_callback,
2507 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2508 proceed_one_lwp): Adjust to type change.
2510 2017-07-10 Yao Qi <yao.qi@linaro.org>
2512 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2514 2017-06-29 Yao Qi <yao.qi@linaro.org>
2516 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2518 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2520 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2522 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2524 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2526 * linux-low.c (linux_create_inferior): Adjust code to access the
2527 environment information via 'gdb_environ' class.
2528 * lynx-low.c (lynx_create_inferior): Likewise.
2529 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2530 (get_environ): Return a pointer to 'our_environ'.
2531 (captured_main): Initialize 'our_environ'.
2532 * server.h (get_environ): Adjust prototype.
2533 * spu-low.c (spu_create_inferior): Adjust code to access the
2534 environment information via 'gdb_environ' class.
2536 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2538 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2539 usage of "register" keyword.
2541 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2543 * configure: Re-generate.
2545 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2547 * configure: Re-generate.
2549 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2551 * Makefile.in (COMPILE.pre): Add "-x c++".
2553 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2555 * fork-child.c: Conditionally include <signal.h>.
2557 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2559 * server.c (handle_general_set): Handle new packet
2560 "QStartupWithShell".
2561 (handle_query): Add "QStartupWithShell" to the list of supported
2563 (gdbserver_usage): Add help text explaining the
2564 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2566 (captured_main): Recognize and act upon the presence of the new
2569 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2570 Pedro Alves <palves@redhat.com>
2572 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2573 * configure: Regenerate.
2574 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2576 (i[34567]86-*-lynxos*): Likewise.
2577 (spu*-*-*): Likewise.
2578 * fork-child.c: New file.
2579 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2581 (linux_ptrace_fun): New function.
2582 (linux_create_inferior): Adjust function prototype to reflect
2583 change on "target.h". Adjust function code to use
2585 (linux_request_interrupt): Delete "signal_pid".
2586 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2587 (lynx_ptrace_fun): New function.
2588 (lynx_create_inferior): Adjust function prototype to reflect
2589 change on "target.h". Adjust function code to use
2591 * nto-low.c (nto_create_inferior): Adjust function prototype and
2592 code to reflect change on "target.h". Update comments.
2593 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2594 "common-terminal.h" and "environ.h".
2595 (terminal_fd): Moved to fork-child.c.
2596 (old_foreground_pgrp): Likewise.
2597 (restore_old_foreground_pgrp): Likewise.
2598 (last_status): Make it global.
2599 (last_ptid): Likewise.
2600 (our_environ): New variable.
2601 (startup_with_shell): Likewise.
2602 (program_name): Likewise.
2603 (program_argv): Rename to...
2604 (program_args): ...this.
2605 (wrapper_argv): New variable.
2606 (start_inferior): Delete function.
2607 (get_exec_wrapper): New function.
2608 (get_exec_file): Likewise.
2609 (get_environ): Likewise.
2610 (prefork_hook): Likewise.
2611 (post_fork_inferior): Likewise.
2612 (postfork_hook): Likewise.
2613 (postfork_child_hook): Likewise.
2614 (handle_v_run): Update code to deal with arguments coming from the
2615 remote host. Update calls from "start_inferior" to
2617 (captured_main): Likewise. Initialize environment variable. Call
2619 * server.h (post_fork_inferior): New prototype.
2620 (get_environ): Likewise.
2621 (last_status): Declare.
2622 (last_ptid): Likewise.
2623 (signal_pid): Likewise.
2624 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2625 (spu_ptrace_fun): New function.
2626 (spu_create_inferior): Adjust function prototype to reflect change
2627 on "target.h". Adjust function code to use "fork_inferior".
2628 * target.c (target_terminal_init): New function.
2629 (target_terminal_inferior): Likewise.
2630 (target_terminal_ours): Likewise.
2631 * target.h: Include <vector>.
2632 (struct target_ops) <create_inferior>: Update prototype.
2633 (create_inferior): Update macro.
2634 * utils.c (gdb_flush_out_err): New function.
2635 * win32-low.c (win32_create_inferior): Adjust function prototype
2636 and code to reflect change on "target.h".
2638 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2640 * inferiors.c (switch_to_thread): New function.
2642 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2644 * Makefile.in (SFILE): Add "common/job-control.c".
2645 (OBS): Add "job-control.o".
2647 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2649 * Makefile: Remove "@host_makefile_frag@".
2651 2017-05-05 Pedro Alves <palves@redhat.com>
2653 * configure: Regenerate.
2655 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2657 * configure: Regenerate.
2659 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2661 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2662 software_single_step change of return type to
2663 std::vector<CORE_ADDR>.
2664 * linux-low.c (install_software_single_step_breakpoints):
2666 * linux-low.h (install_software_single_step_breakpoints):
2669 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2671 * remote-utils.c: Include "gdb_termios.h" instead of
2673 * terminal.h: Delete file.
2675 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2677 * server.c: Include <vector>.
2678 <program_argv, wrapper_argv>: Convert to std::vector.
2679 (start_inferior): Rewrite function to use C++.
2680 (handle_v_run): Likewise. Update code that calculates the argv
2681 based on the vRun packet; use C++.
2682 (captured_main): Likewise.
2684 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2686 * server.c (handle_v_cont): Initialize thread_resume::thread
2689 2017-04-05 Pedro Alves <palves@redhat.com>
2691 * configure: Regenerate.
2693 2017-04-05 Pedro Alves <palves@redhat.com>
2695 * gdbreplay.c (sync_error): Constify.
2696 * linux-x86-low.c (push_opcode): Constify.
2698 2017-04-05 Pedro Alves <palves@redhat.com>
2700 * win32-low.c (get_child_debug_event)
2701 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2702 Report TARGET_WAITKIND_SPURIOUS instead.
2704 2017-04-05 Pedro Alves <palves@redhat.com>
2706 * remote-utils.c (remote_prepare, remote_open): Constify.
2707 * remote-utils.h (remote_prepare, remote_open): Constify.
2708 * server.c (captured_main): Constify 'port' handling.
2710 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2712 * Makefile.in (clean): Clear .deps.
2714 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2716 * .gitignore: Remove generated files, replace with wildcard.
2717 * (clean): Replace removal of generated files with wildcard.
2718 (version.c): Replace with...
2719 (version-generated.c): ...this.
2720 (xml-builtin.c): Replace with...
2721 (xml-builtin-generated.c): ...this.
2722 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2723 (%.c: *regformats*): Replace with...
2724 (%-generated.c: *regformats*): ...this.
2726 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2728 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2729 (xtensa_fill_gregset): Call collect_register_by_name for
2731 (xtensa_store_gregset): Call supply_register_by_name for
2734 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2736 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2737 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2738 (xtensa_store_gregset): Call supply_register for all registers in
2739 a0_regnum..a0_regnum + C0_NREGS range.
2741 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2743 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2744 (ax-ipa.o: ax.c): Remove.
2745 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2746 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2747 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2748 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2749 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2751 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2753 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2754 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2755 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2756 (errors-ipa.o: ../common/errors.c): Remove.
2757 (format-ipa.o: ../common/format.c): Remove.
2758 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2760 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2762 * Makefile.in (%-ipa.o: %.c): New rule.
2763 (tracepoint-ipa.o: tracepoint.c): Remove.
2764 (utils-ipa.o: utils.c): Remove.
2765 (remote-utils-ipa.o: remote-utils.c): Remove.
2766 (regcache-ipa.o: regcache.c): Remove.
2767 (i386-linux-ipa.o: i386-linux.c): Remove.
2768 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2769 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2770 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2771 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2772 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2773 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2774 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2775 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2776 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2777 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2778 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2779 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2780 (aarch64-ipa.o: aarch64.c): Remove.
2781 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2782 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2783 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2784 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2785 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2786 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2787 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2788 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2789 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2790 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2791 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2792 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2793 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2794 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2795 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2796 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2797 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2798 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2799 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2800 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2801 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2802 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2803 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2804 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2805 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2806 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2807 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2808 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2809 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2810 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2811 (tdesc-ipa.o: tdesc.c): Remove.
2812 (x32-linux-ipa.o: x32-linux.c): Remove.
2813 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2814 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2816 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2818 * Makefile.in (%.o: ../arch/%.c): New rule.
2819 (arm.o: ../arch/arm.c): Remove.
2820 (arm-linux.o: ../arch/arm-linux.c): Remove.
2821 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2822 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2824 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2826 * Makefile.in (%.o: ../nat/%.c): New rule.
2827 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2828 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2829 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2830 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2831 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2832 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2833 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2834 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2835 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2836 (linux-personality.o: ../nat/linux-personality.c): Remove.
2837 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2838 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2839 (x86-linux.o: ../nat/x86-linux.c): Remove.
2840 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2841 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2843 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2845 * Makefile.in (%.o: ../common/%.c): New rule.
2846 (signals.o: ../common/signals.c): Remove.
2847 (print-utils.o: ../common/print-utils.c): Remove.
2848 (rsp-low.o: ../common/rsp-low.c): Remove.
2849 (common-utils.o: ../common/common-utils.c): Remove.
2850 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2851 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2852 (vec.o: ../common/vec.c): Remove.
2853 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2854 (xml-utils.o: ../common/xml-utils.c): Remove.
2855 (ptid.o: ../common/ptid.c): Remove.
2856 (buffer.o: ../common/buffer.c): Remove.
2857 (format.o: ../common/format.c): Remove.
2858 (filestuff.o: ../common/filestuff.c): Remove.
2859 (agent.o: ../common/agent.c): Remove.
2860 (errors.o: ../common/errors.c): Remove.
2861 (environ.o: ../common/environ.c): Remove.
2862 (common-debug.o: ../common/common-debug.c): Remove.
2863 (cleanups.o: ../common/cleanups.c): Remove.
2864 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2865 (fileio.o: ../common/fileio.c): Remove.
2866 (common-regcache.o: ../common/common-regcache.c): Remove.
2867 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2868 (new-op.o: ../common/new-op.c): Remove.
2869 (btrace-common.o: ../common/btrace-common.c): Remove.
2871 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2873 * Makefile.in (%.o: ../target/%.c): New rule.
2874 (waitstatus.o: ../target/waitstatus.c): Remove.
2876 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2879 (%.c: ../regformats/%.dat,
2880 (%.c: ../regformats/arm/%.dat,
2881 (%.c: ../regformats/i386/%.dat,
2882 (%.c: ../regformats/rs6000/%.dat): New rules.
2883 (aarch64.c): Remove.
2884 (reg-arm.c): Remove.
2885 (arm-with-iwmmxt.c): Remove.
2886 (arm-with-vfpv2.c): Remove.
2887 (arm-with-vfpv3.c): Remove.
2888 (arm-with-neon.c): Remove.
2889 (reg-bfin.c): Remove.
2890 (reg-cris.c): Remove.
2891 (reg-crisv32.c): Remove.
2893 (i386-linux.c): Remove.
2894 (i386-avx.c): Remove.
2895 (i386-avx-linux.c): Remove.
2896 (i386-avx-avx512.c): Remove.
2897 (i386-avx-avx512-linux.c): Remove.
2898 (i386-mpx.c): Remove.
2899 (i386-mpx-linux.c): Remove.
2900 (i386-avx-mpx-avx512-pku.c): Remove.
2901 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2902 (i386-avx-mpx.c): Remove.
2903 (i386-avx-mpx-linux.c): Remove.
2904 (i386-mmx.c): Remove.
2905 (i386-mmx-linux.c): Remove.
2906 (reg-ia64.c): Remove.
2907 (reg-m32r.c): Remove.
2908 (reg-m68k.c): Remove.
2910 (mips-linux.c): Remove.
2911 (mips-dsp-linux.c): Remove.
2912 (mips64-linux.c): Remove.
2913 (mips64-dsp-linux.c): Remove.
2914 (nios2-linux.c): Remove.
2915 (powerpc-32.c): Remove.
2916 (powerpc-32l.c): Remove.
2917 (powerpc-altivec32l.c): Remove.
2918 (powerpc-cell32l.c): Remove.
2919 (powerpc-vsx32l.c): Remove.
2920 (powerpc-isa205-32l.c): Remove.
2921 (powerpc-isa205-altivec32l.c): Remove.
2922 (powerpc-isa205-vsx32l.c): Remove.
2923 (powerpc-e500l.c): Remove.
2924 (powerpc-64l.c): Remove.
2925 (powerpc-altivec64l.c): Remove.
2926 (powerpc-cell64l.c): Remove.
2927 (powerpc-vsx64l.c): Remove.
2928 (powerpc-isa205-64l.c): Remove.
2929 (powerpc-isa205-altivec64l.c): Remove.
2930 (powerpc-isa205-vsx64l.c): Remove.
2931 (s390-linux32.c): Remove.
2932 (s390-linux32v1.c): Remove.
2933 (s390-linux32v2.c): Remove.
2934 (s390-linux64.c): Remove.
2935 (s390-linux64v1.c): Remove.
2936 (s390-linux64v2.c): Remove.
2937 (s390-te-linux64.c): Remove.
2938 (s390-vx-linux64.c): Remove.
2939 (s390-tevx-linux64.c): Remove.
2940 (s390x-linux64.c): Remove.
2941 (s390x-linux64v1.c): Remove.
2942 (s390x-linux64v2.c): Remove.
2943 (s390x-te-linux64.c): Remove.
2944 (s390x-vx-linux64.c): Remove.
2945 (s390x-tevx-linux64.c): Remove.
2946 (tic6x-c64xp-linux.c): Remove.
2947 (tic6x-c64x-linux.c): Remove.
2948 (tic6x-c62x-linux.c): Remove.
2950 (reg-sparc64.c): Remove.
2951 (reg-spu.c): Remove.
2953 (amd64-linux.c): Remove.
2954 (amd64-avx.c): Remove.
2955 (amd64-avx-linux.c): Remove.
2956 (amd64-avx-avx512.c): Remove.
2957 (amd64-avx-avx512-linux.c): Remove.
2958 (amd64-mpx.c): Remove.
2959 (amd64-mpx-linux.c): Remove.
2960 (amd64-avx-mpx-avx512-pku.c): Remove.
2961 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2962 (amd64-avx-mpx.c): Remove.
2963 (amd64-avx-mpx-linux.c): Remove.
2965 (x32-linux.c): Remove.
2966 (x32-avx.c): Remove.
2967 (x32-avx-linux.c): Remove.
2968 (x32-avx-avx512.c): Remove.
2969 (x32-avx-avx512-linux.c): Remove.
2970 (reg-xtensa.c): Remove.
2971 (reg-tilegx.c): Remove.
2972 (reg-tilegx32.c): Remove.
2974 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2976 * Makefile.in (SFILES): Add "common/environ.c".
2977 (OBJS): Add "common/environ.h".
2979 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2981 * configure.ac: Check if the fs_base and gs_base members of
2982 `struct user_regs_struct' exist.
2983 * config.in: Regenerated.
2984 * configure: Likewise.
2986 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2988 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2990 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2991 (get_next_pcs_syscall_next_pc): Likewise.
2993 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2995 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2996 * nto-x86-low.c: Likewise.
2998 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3000 * Makefile.in: Include disable-implicit-rules.mk.
3002 2016-11-23 Pedro Alves <palves@redhat.com>
3004 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3005 (debug_vprintf): Use std::chrono::steady_clock instead of
3006 gettimeofday. Use '.' instead of ':'.
3007 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3008 (get_timestamp): Use std::chrono::steady_clock instead of
3011 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3013 * Makefile.in: Fix whitespace formatting.
3015 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3017 * Makefile.in (SFILES, OBS): Flatten list and order
3020 2016-11-23 Pedro Alves <palves@redhat.com>
3022 * event-loop.c (handle_file_event): Use warning.
3023 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3024 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3027 2016-11-23 Pedro Alves <palves@redhat.com>
3029 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3031 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3032 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3033 debug_printf and debug_flush for debug output.
3034 * server.c (handle_general_set): Likewise.
3035 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3038 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3040 * Makefile.in (.c.o): Replace rule with ...
3041 (%.o: %.c): ... this one.
3043 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3045 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3046 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3048 * configure.ac: Remove checks for the make program.
3049 * configure: Re-generate.
3051 2016-10-28 Pedro Alves <palves@redhat.com>
3053 * Makefile.in (CXX_DIALECT): Get from configure.
3054 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3055 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3056 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3057 * config.in: Regenerate.
3058 * configure: Regenerate.
3060 2016-10-27 Yao Qi <yao.qi@linaro.org>
3062 * linux-low.c (linux_supports_range_stepping): Return true if
3063 can_software_single_step return true.
3065 2016-10-27 Yao Qi <yao.qi@linaro.org>
3067 * inferiors.c (find_inferior_in_random): New function.
3068 * inferiors.h (find_inferior_in_random): Declare.
3069 * linux-low.c (linux_wait_for_event_filtered): Call
3070 find_inferior_in_random instead of find_inferior.
3072 2016-10-27 Yao Qi <yao.qi@linaro.org>
3074 * linux-low.c (linux_wait_1): If single-step breakpoints are
3075 inserted, remove them.
3077 2016-10-26 Pedro Alves <palves@redhat.com>
3079 * linux-low.c (handle_extended_wait): Link parent/child fork
3081 (linux_wait_1): Unlink them.
3082 (linux_set_resume_request): Ignore resume requests for
3083 already-resumed and unhandled fork child threads.
3084 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3085 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3087 (handle_v_requests) <vCont>: Don't call require_running.
3088 * server.h (in_queued_stop_replies): New declaration.
3090 2016-10-24 Yao Qi <yao.qi@linaro.org>
3093 * linux-aarch64-low.c (append_insns): Cast the return value to
3096 2016-10-10 Yao Qi <yao.qi@linaro.org>
3098 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3100 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3102 * target.c (target_supports_multi_process): New function, moved
3104 * target.h (target_supports_multi_process): ... here. Remove
3107 2016-10-05 Tom Tromey <tom@tromey.com>
3110 * tracepoint.c (handle_tracepoint_bkpts): Check
3111 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3113 2016-10-05 Yao Qi <yao.qi@linaro.org>
3115 * configure.srv: Update the path of arm-*.xml files.
3117 2016-10-05 Terry Guo <terry.guo@arm.com>
3118 Yao Qi <yao.qi@linaro.org>
3120 * Makefile.in: Adjust the path of rules.
3121 * configure.srv: Update the path of xml files.
3122 * regformats/arm-with-iwmmxt.dat: Regenerated.
3123 * regformats/arm-with-neon.dat: Likewise.
3124 * regformats/arm-with-vfpv2.dat: Likewise.
3125 * regformats/arm-with-vfpv3.dat Likewise.
3127 2016-09-30 Yao Qi <yao.qi@linaro.org>
3130 * target.c (target_stop_and_wait): Don't call
3131 target_continue_no_signal, use resume_stop instead.
3133 2016-09-26 Yao Qi <yao.qi@linaro.org>
3135 * linux-low.c (linux_wait_1): Call debug_exit.
3137 2016-09-23 Pedro Alves <palves@redhat.com>
3139 * Makefile.in (SFILES): Add common/new-op.c.
3140 (OBS): Add common/new-op.o.
3141 (new-op.o): New rule.
3143 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3145 * .gitinore: Ignore more files.
3147 2016-09-21 Yao Qi <yao.qi@linaro.org>
3149 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3152 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3154 * server.c (start_inferior): Call target_mourn_inferior instead of
3155 mourn_inferior; pass ptid_t argument to it.
3157 (handle_target_event): Likewise.
3158 * target.c (target_mourn_inferior): New function.
3159 * target.h (mourn_inferior): Delete macro.
3161 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3163 * linux-low.c (lwp_is_stepping): New function.
3165 2016-09-06 Carl Love <cel@us.ibm.com>
3167 * server.c (start_inferior): Fixed comment, requested comment change
3168 didn't get updated correctly. Removed reference to ptrace () call as
3169 it is only true on Linux systems.
3171 2016-09-06 Carl Love <cel@us.ibm.com>
3173 * server.c (start_inferior): Do not call
3174 function target_post_create_inferior () if the
3175 inferior process has already exited.
3177 2016-09-05 Pedro Alves <palves@redhat.com>
3179 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3180 (COMPILE.pre, CC_LD): Use CXX directly.
3181 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3182 * acinclude.m4: Don't include build-with-cxx.m4.
3183 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3184 * configure: Regenerate.
3186 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3189 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3190 call writing data to own_buf.
3192 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3194 * target.c (mywait): Call target_wait instead of
3196 (target_wait): New function.
3198 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3200 * server.c (start_inferior): New variable 'ptid'. Replace calls
3201 to the_target->resume by target_continue{,_no_signal}, depending
3203 * target.c (target_stop_and_wait): Call target_continue_no_signal
3204 instead of the_target->resume.
3205 (target_continue): New function.
3207 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3209 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3211 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3214 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3216 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3217 * linux-arm-low.c (ps_get_thread_area): Likewise.
3218 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3219 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3220 * linux-mips-low.c (ps_get_thread_area): Likewise.
3221 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3222 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3223 * linux-x86-low.c (ps_get_thread_area): Likewise.
3224 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3226 2016-08-19 Pedro Alves <palves@redhat.com>
3228 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3230 2016-08-19 Pedro Alves <palves@redhat.com>
3232 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3233 comment. Use memcpy instead of casting through unsigned long.
3235 2016-08-19 Pedro Alves <palves@redhat.com>
3237 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3238 allocating around 0x80000000.
3240 2016-08-19 Pedro Alves <palves@redhat.com>
3243 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3244 (x32-avx512-linux-ipa.o): New rules.
3245 * configure.ac (x86_64-*-linux*): New x32 check.
3246 * configure.srv (ipa_x32_linux_regobj): New.
3247 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3248 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3250 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3252 * configure: Regenerate.
3254 2016-08-09 Pedro Alves <palves@redhat.com>
3257 * Makefile.in (OBS): Add signals-state-save-restore.o.
3258 (signals-state-save-restore.o): New rule.
3259 * config.in: Regenerate.
3260 * configure: Regenerate.
3261 * linux-low.c: Include "signals-state-save-restore.h".
3262 (linux_create_inferior): Call
3263 restore_original_signals_state.
3264 * server.c: Include "dispositions-save-restore.h".
3265 (captured_main): Call save_original_signals_state.
3267 2016-08-05 Pedro Alves <palves@redhat.com>
3269 * configure: Regenerate.
3271 2016-08-04 Yao Qi <yao.qi@linaro.org>
3273 * linux-low.c (regsets_fetch_inferior_registers): Check
3274 errno is ESRCH or not.
3276 2016-08-02 Yao Qi <yao.qi@linaro.org>
3278 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3279 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3280 (thread_db_load_search): Update.
3281 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3282 td_ta_set_event and td_ta_event_getmsg.
3284 2016-07-26 Pedro Alves <palves@redhat.com>
3287 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3288 of unsigned long for 64-bit registers and use uint32_t instead of
3289 unsigned int for 32-bit registers.
3291 2016-07-26 Pedro Alves <palves@redhat.com>
3293 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3296 2016-07-21 Tom Tromey <tom@tromey.com>
3298 * configure: Rebuild.
3300 2016-07-21 Yao Qi <yao.qi@linaro.org>
3302 * mem-break.c (find_gdb_breakpoint): Cast bp to
3303 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3305 2016-07-21 Yao Qi <yao.qi@linaro.org>
3307 * server.c (handle_v_requests): Support s and S actions
3308 if target_supports_software_single_step return true.
3310 2016-07-21 Yao Qi <yao.qi@linaro.org>
3312 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3313 is resume_step, call maybe_hw_step.
3314 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3316 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3318 (proceed_one_lwp): If resume request is resume_step, install
3319 reinsert breakpoints and call maybe_hw_step.
3321 2016-07-21 Yao Qi <yao.qi@linaro.org>
3323 * linux-low.c (proceed_one_lwp): Declare.
3324 (linux_resume_one_thread): Remove local variable 'step'.
3325 Lift code enqueue signal. Call proceed_one_lwp instead of
3326 linux_resume_one_lwp.
3328 2016-07-21 Yao Qi <yao.qi@linaro.org>
3330 * linux-low.c (linux_resume_one_thread): Call
3331 enqueue_pending_signal.
3333 2016-07-21 Yao Qi <yao.qi@linaro.org>
3335 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3336 * inferiors.c (do_restore_current_thread_cleanup): New function.
3337 (make_cleanup_restore_current_thread): Likewise.
3338 * linux-low.c (install_software_single_step_breakpoints): Call
3339 make_cleanup_restore_current_thread. Switch current_thread to
3342 2016-07-21 Yao Qi <yao.qi@linaro.org>
3344 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3345 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3346 (clone_one_breakpoint): Likewise.
3347 (delete_reinsert_breakpoints): Change parameter to thread.
3349 (has_reinsert_breakpoints): Likewise.
3350 (uninsert_reinsert_breakpoints): Likewise.
3351 (reinsert_reinsert_breakpoints): Likewise.
3352 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3353 (delete_reinsert_breakpoints): Likewise.
3354 (reinsert_reinsert_breakpoints): Likewise.
3355 (uninsert_reinsert_breakpoints): Likewise.
3356 (has_reinsert_breakpoints): Likewise.
3358 2016-07-21 Yao Qi <yao.qi@linaro.org>
3360 * inferiors.c (get_thread_process): Make parameter const.
3361 * inferiors.h (get_thread_process): Update declaration.
3362 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3363 Add new parameters child_thread and parent_thread. Callers
3365 * mem-break.h (clone_all_breakpoints): Update declaration.
3367 2016-07-21 Yao Qi <yao.qi@linaro.org>
3369 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3370 <command_list, handler>: Remove.
3371 (struct gdb_breakpoint): New.
3372 (struct other_breakpoint): New.
3373 (struct reinsert_breakpoint): New.
3374 (is_gdb_breakpoint): New function.
3375 (any_persistent_commands): Update command_list if
3376 is_gdb_breakpoint returns true.
3377 (set_breakpoint): Create breakpoints according to their types.
3378 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3379 (set_gdb_breakpoint_1): Likewise.
3380 (set_gdb_breakpoint): Likewise.
3381 (clear_breakpoint_conditions): Change parameter type to
3382 'struct gdb_breakpoint *'.
3383 (clear_breakpoint_commands): Likewise.
3384 (clear_breakpoint_conditions_and_commands): Likewise.
3385 (add_condition_to_breakpoint): Likewise.
3386 (add_breakpoint_condition): Likewise.
3387 (add_commands_to_breakpoint): Likewise.
3388 (check_breakpoints): Check other_breakpoint.
3389 (clone_one_breakpoint): Clone breakpopint according to its type.
3390 * mem-break.h (struct gdb_breakpoint): Declare.
3391 (set_gdb_breakpoint): Update declaration.
3392 (clear_breakpoint_conditions_and_commands): Likewise.
3393 (add_breakpoint_condition): Likewise.
3394 (add_breakpoint_commands): Likewise.
3395 * server.c (process_point_options): Change parameter type to
3396 'struct gdb_breakpoint *'.
3398 2016-07-21 Yao Qi <yao.qi@linaro.org>
3400 * mem-break.c (set_breakpoint_at): Rename it to ...
3401 (set_breakpoint_type_at): ... it.
3402 (set_breakpoint_at): Call set_breakpoint_type_at.
3403 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3404 * mem-break.h (set_breakpoint_at): Update comments.
3406 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3408 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3410 (nios2_store_gregset): Likewise.
3412 2016-07-01 Pedro Alves <palves@redhat.com>
3413 Antoine Tremblay <antoine.tremblay@ericsson.com>
3415 * linux-low.c: Change interface to take the target lwp_info
3416 pointer directly and return void. Handle detaching from a zombie
3418 (linux_detach_lwp_callback): New function.
3419 (linux_detach): Detach from the leader thread after detaching from
3422 2016-06-28 Yao Qi <yao.qi@linaro.org>
3424 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3425 for variable new_offset.
3426 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3427 (aarch64_ftrace_insn_reloc_cb): Likewise.
3428 (aarch64_ftrace_insn_reloc_tb): Likewise.
3429 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3430 PRIx64 instead of PRIx32.
3432 2016-06-28 Yao Qi <yao.qi@linaro.org>
3434 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3435 (the_low_target): Install arm_get_syscall_trapinfo.
3437 2016-06-28 Yao Qi <yao.qi@linaro.org>
3439 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3441 (the_low_target): Install aarch64_get_syscall_trapinfo.
3443 2016-06-28 Yao Qi <yao.qi@linaro.org>
3445 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3447 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3448 Remove parameter sysno.
3449 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3452 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3454 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3455 (s390_emit_ne_goto): Likewise.
3456 (s390_emit_lt_goto): Likewise.
3457 (s390_emit_le_goto): Likewise.
3458 (s390_emit_gt_goto): Likewise.
3459 (s390_emit_ge_goto): Likewise.
3460 (s390x_emit_eq_goto): Likewise.
3461 (s390x_emit_ne_goto): Likewise.
3462 (s390x_emit_lt_goto): Likewise.
3463 (s390x_emit_le_goto): Likewise.
3464 (s390x_emit_gt_goto): Likewise.
3465 (s390x_emit_ge_goto): Likewise.
3466 (s390_emit_ops_impl): Mark variable static.
3467 (s390x_emit_ops): Likewise.
3469 2016-06-17 Yao Qi <yao.qi@linaro.org>
3471 * linux-low.c (handle_extended_wait): Call
3472 uninsert_reinsert_breakpoints for the parent process. Remove
3473 reinsert breakpoints from the child process. Reinsert them to
3474 the parent process when vfork is done.
3475 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3476 (reinsert_reinsert_breakpoints): New function.
3477 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3478 (reinsert_reinsert_breakpoints): Declare.
3480 2016-06-17 Yao Qi <yao.qi@linaro.org>
3482 * linux-low.c (handle_extended_wait): If the parent is doing
3483 step-over, remove the reinsert breakpoints from the forked child.
3485 2016-06-17 Yao Qi <yao.qi@linaro.org>
3487 * linux-low.c (unsuspend_all_lwps): Declare.
3488 (linux_low_filter_event): If thread exited, call finish_step_over.
3489 If step-over is finished, unsuspend other threads.
3491 2016-06-17 Yao Qi <yao.qi@linaro.org>
3493 * linux-low.c (linux_resume_one_lwp_throw): Assert
3494 has_reinsert_breakpoints returns false.
3495 * mem-break.c (delete_disabled_breakpoints): Assert
3496 bp type isn't reinsert_breakpoint.
3498 2016-06-17 Yao Qi <yao.qi@linaro.org>
3500 * linux-low.c (maybe_hw_step): New function.
3501 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3502 (finish_step_over): Switch current_thread to lwp temporarily,
3503 and assert has_reinsert_breakpoints returns true.
3504 (proceed_one_lwp): Call maybe_hw_step.
3505 * mem-break.c (has_reinsert_breakpoints): New function.
3506 * mem-break.h (has_reinsert_breakpoints): Declare.
3508 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3510 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3512 2016-05-17 Yao Qi <yao.qi@linaro.org>
3514 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3515 instead of find_inferior.
3517 2016-05-05 Yao Qi <yao.qi@linaro.org>
3519 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3520 Initialize res to zero.
3522 2016-05-05 Yao Qi <yao.qi@linaro.org>
3524 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3527 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3529 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3530 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3531 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3533 2016-04-28 Par Olsson <par.olsson@windriver.com>
3534 Simon Marchi <simon.marchi@ericsson.com>
3536 * tracepoint.c (write_inferior_int8): New function.
3537 (cmd_qtenable_disable): Write enable flag using
3538 write_inferior_int8.
3540 2016-04-25 Yao Qi <yao.qi@linaro.org>
3542 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3543 (need_step_over_p): Return zero if the LWP has pending signals
3544 can be delivered on software single step target.
3546 2016-04-25 Yao Qi <yao.qi@linaro.org>
3548 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3549 return instead of error.
3551 2016-04-22 Yao Qi <yao.qi@linaro.org>
3553 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3556 2016-04-22 Yao Qi <yao.qi@linaro.org>
3558 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3559 signal when stepping over breakpoint with software single
3562 2016-04-21 Pedro Alves <palves@redhat.com>
3564 * linux-s390-low.c (s390_collect_ptrace_register)
3565 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3567 (s390_check_regset): Use void * instead of gdb_byte *.
3569 2016-04-20 Pedro Alves <palves@redhat.com>
3571 * configure: Renegerate.
3573 2016-04-20 Yao Qi <yao.qi@linaro.org>
3575 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3576 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3578 (arm_store_gregset): Likewise.
3580 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3582 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3583 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3584 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3585 (amd64-avx-mpx-linux.c): New rules.
3586 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3587 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3588 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3589 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3590 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3591 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3592 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3593 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3594 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3595 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3596 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3597 * linux-x86-low.c (x86_linux_read_description): Add case for
3598 X86_XSTATE_AVX_MPX_MASK.
3599 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3600 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3601 init_registers_i386_avx_mpx_linux.
3602 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3603 (initialize_low_tracepoint): Call
3604 init_registers_i386_avx_mpx_linux.
3605 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3606 (initialize_low_tracepoint): Call
3607 init_registers_amd64_avx_mpx_linux.
3608 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3609 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3610 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3613 2016-04-18 Pedro Alves <palves@redhat.com>
3615 * configure: Regenerate.
3617 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3619 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3620 (aarch64_emit_sub): Likewise.
3622 2016-04-12 Pedro Alves <palves@redhat.com>
3624 * utils.c (prepare_to_throw_exception): Delete.
3626 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3628 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3630 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3632 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3634 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3636 * linux-aarch64-ipa.c: Add <elf.h> include.
3637 * linux-ppc-ipa.c: Add <elf.h> include.
3638 * linux-s390-ipa.c: Add <elf.h> include.
3640 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3642 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3643 (get_raw_reg_ptr): Likewise.
3644 (get_trace_state_variable_value_ptr): Likewise.
3645 (set_trace_state_variable_value_ptr): Likewise.
3646 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3649 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3650 Marcin Kościelnicki <koriakin@0x04.net>
3653 * linux-ppc-low.c (emit_insns): New function.
3654 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3655 (ppc_emit_prologue): New function.
3656 (ppc_emit_epilogue): New function.
3657 (ppc_emit_add): New function.
3658 (ppc_emit_sub): New function.
3659 (ppc_emit_mul): New function.
3660 (ppc_emit_lsh): New function.
3661 (ppc_emit_rsh_signed): New function.
3662 (ppc_emit_rsh_unsigned): New function.
3663 (ppc_emit_ext): New function.
3664 (ppc_emit_zero_ext): New function.
3665 (ppc_emit_log_not): New function.
3666 (ppc_emit_bit_and): New function.
3667 (ppc_emit_bit_or): New function.
3668 (ppc_emit_bit_xor): New function.
3669 (ppc_emit_bit_not): New function.
3670 (ppc_emit_equal): New function.
3671 (ppc_emit_less_signed): New function.
3672 (ppc_emit_less_unsigned): New function.
3673 (ppc_emit_ref): New function.
3674 (ppc_emit_const): New function.
3675 (ppc_emit_reg): New function.
3676 (ppc_emit_pop): New function.
3677 (ppc_emit_stack_flush): New function.
3678 (ppc_emit_swap): New function.
3679 (ppc_emit_stack_adjust): New function.
3680 (ppc_emit_call): New function.
3681 (ppc_emit_int_call_1): New function.
3682 (ppc_emit_void_call_2): New function.
3683 (ppc_emit_if_goto): New function.
3684 (ppc_emit_goto): New function.
3685 (ppc_emit_eq_goto): New function.
3686 (ppc_emit_ne_goto): New function.
3687 (ppc_emit_lt_goto): New function.
3688 (ppc_emit_le_goto): New function.
3689 (ppc_emit_gt_goto): New function.
3690 (ppc_emit_ge_goto): New function.
3691 (ppc_write_goto_address): New function.
3692 (ppc_emit_ops_impl): New static variable.
3693 (ppc64v1_emit_prologue): New function.
3694 (ppc64v2_emit_prologue): New function.
3695 (ppc64_emit_epilogue): New function.
3696 (ppc64_emit_add): New function.
3697 (ppc64_emit_sub): New function.
3698 (ppc64_emit_mul): New function.
3699 (ppc64_emit_lsh): New function.
3700 (ppc64_emit_rsh_signed): New function.
3701 (ppc64_emit_rsh_unsigned): New function.
3702 (ppc64_emit_ext): New function.
3703 (ppc64_emit_zero_ext): New function.
3704 (ppc64_emit_log_not): New function.
3705 (ppc64_emit_bit_and): New function.
3706 (ppc64_emit_bit_or): New function.
3707 (ppc64_emit_bit_xor): New function.
3708 (ppc64_emit_bit_not): New function.
3709 (ppc64_emit_equal): New function.
3710 (ppc64_emit_less_signed): New function.
3711 (ppc64_emit_less_unsigned): New function.
3712 (ppc64_emit_ref): New function.
3713 (ppc64_emit_const): New function.
3714 (ppc64v1_emit_reg): New function.
3715 (ppc64v2_emit_reg): New function.
3716 (ppc64_emit_pop): New function.
3717 (ppc64_emit_stack_flush): New function.
3718 (ppc64_emit_swap): New function.
3719 (ppc64v1_emit_call): New function.
3720 (ppc64v2_emit_call): New function.
3721 (ppc64v1_emit_int_call_1): New function.
3722 (ppc64v2_emit_int_call_1): New function.
3723 (ppc64v1_emit_void_call_2): New function.
3724 (ppc64v2_emit_void_call_2): New function.
3725 (ppc64_emit_if_goto): New function.
3726 (ppc64_emit_eq_goto): New function.
3727 (ppc64_emit_ne_goto): New function.
3728 (ppc64_emit_lt_goto): New function.
3729 (ppc64_emit_le_goto): New function.
3730 (ppc64_emit_gt_goto): New function.
3731 (ppc64_emit_ge_goto): New function.
3732 (ppc64v1_emit_ops_impl): New static variable.
3733 (ppc64v2_emit_ops_impl): New static variable.
3734 (ppc_emit_ops): New function.
3735 (linux_low_target): Wire in ppc_emit_ops.
3737 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3738 Marcin Kościelnicki <koriakin@0x04.net>
3741 * Makefile.in: Add powerpc-*-ipa.o
3742 * configure.srv: Add ipa_obj for powerpc*-linux.
3743 * linux-ppc-ipa.c: New file.
3744 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3746 (PPC_FIELD): New macro.
3747 (PPC_SEXT): New macro.
3748 (PPC_OP6): New macro.
3749 (PPC_BO): New macro.
3750 (PPC_LI): New macro.
3751 (PPC_BD): New macro.
3752 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3753 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3754 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3755 (ppc_get_thread_area): New function.
3756 (is_elfv2_inferior): New function.
3757 (gen_ds_form): New function.
3758 (GEN_STD): New macro.
3759 (GEN_STDU): New macro.
3760 (GEN_LD): New macro.
3761 (GEN_LDU): New macro.
3762 (gen_d_form): New function.
3763 (GEN_ADDI): New macro.
3764 (GEN_ADDIS): New macro.
3765 (GEN_LI): New macro.
3766 (GEN_LIS): New macro.
3767 (GEN_ORI): New macro.
3768 (GEN_ORIS): New macro.
3769 (GEN_LWZ): New macro.
3770 (GEN_STW): New macro.
3771 (GEN_STWU): New macro.
3772 (gen_xfx_form): New function.
3773 (GEN_MFSPR): New macro.
3774 (GEN_MTSPR): New macro.
3775 (GEN_MFCR): New macro.
3776 (GEN_MTCR): New macro.
3777 (GEN_SYNC): New macro.
3778 (GEN_LWSYNC): New macro.
3779 (gen_x_form): New function.
3780 (GEN_OR): New macro.
3781 (GEN_MR): New macro.
3782 (GEN_LWARX): New macro.
3783 (GEN_STWCX): New macro.
3784 (GEN_CMPW): New macro.
3785 (gen_md_form): New function.
3786 (GEN_RLDICL): New macro.
3787 (GEN_RLDICR): New macro.
3788 (gen_i_form): New function.
3790 (GEN_BL): New macro.
3791 (gen_b_form): New function.
3792 (GEN_BNE): New macro.
3793 (GEN_LOAD): New macro.
3794 (GEN_STORE): New macro.
3795 (gen_limm): New function.
3796 (gen_atomic_xchg): New function.
3797 (gen_call): New function.
3798 (ppc_relocate_instruction): New function.
3799 (ppc_install_fast_tracepoint_jump_pad): New function.
3800 (ppc_get_min_fast_tracepoint_insn_len): New function.
3801 (ppc_get_ipa_tdesc_idx): New function.
3802 (the_low_target): Wire in the new functions.
3803 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3805 * linux-ppc-tdesc.h: New file.
3807 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3809 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3810 (alloc_jump_pad_buffer): New function.
3811 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3812 (alloc_jump_pad_buffer): New function.
3813 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3814 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3815 (alloc_jump_pad_buffer): New function.
3816 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3817 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3818 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3819 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3821 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3823 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3824 * linux-amd64-ipa.c: Likewise.
3825 * linux-i386-ipa.c: Likewise.
3826 * linux-s390-ipa.c: Likewise.
3827 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3828 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3829 set_trace_state_variable_value_ptr.
3830 (struct ipa_sym_addresses): Likewise.
3831 (symbol_list): Likewise.
3832 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3833 accessing gdb_collect directly.
3834 (gdb_collect_ptr_type): New typedef.
3835 (get_raw_reg_ptr_type): New typedef.
3836 (get_trace_state_variable_value_ptr_type): New typedef.
3837 (set_trace_state_variable_value_ptr_type): New typedef.
3838 (gdb_collect_ptr): New global.
3839 (get_raw_reg_ptr): New global.
3840 (get_trace_state_variable_value_ptr): New global.
3841 (set_trace_state_variable_value_ptr): New global.
3842 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3843 accessing get_raw_reg directly.
3844 (get_get_tsv_func_addr): Likewise for
3845 get_trace_state_variable_value_ptr.
3846 (get_set_tsv_func_addr): Likewise for
3847 set_trace_state_variable_value_ptr.
3848 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3850 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3852 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3854 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3856 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3858 (relocate_instruction): Remove own_buf.
3859 * server.c (own_buf): Make global.
3860 (handle_v_requests): Make global.
3861 * server.h (own_buf): New declaration.
3862 (handle_v_requests): New prototype.
3864 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3867 * linux-s390-low.c (add_insns): New function.
3868 (s390_emit_prologue): New function.
3869 (s390_emit_epilogue): New function.
3870 (s390_emit_add): New function.
3871 (s390_emit_sub): New function.
3872 (s390_emit_mul): New function.
3873 (s390_emit_lsh): New function.
3874 (s390_emit_rsh_signed): New function.
3875 (s390_emit_rsh_unsigned): New function.
3876 (s390_emit_ext): New function.
3877 (s390_emit_log_not): New function.
3878 (s390_emit_bit_and): New function.
3879 (s390_emit_bit_or): New function.
3880 (s390_emit_bit_xor): New function.
3881 (s390_emit_bit_not): New function.
3882 (s390_emit_equal): New function.
3883 (s390_emit_less_signed): New function.
3884 (s390_emit_less_unsigned): New function.
3885 (s390_emit_ref): New function.
3886 (s390_emit_if_goto): New function.
3887 (s390_emit_goto): New function.
3888 (s390_write_goto_address): New function.
3889 (s390_emit_litpool): New function.
3890 (s390_emit_const): New function.
3891 (s390_emit_call): New function.
3892 (s390_emit_reg): New function.
3893 (s390_emit_pop): New function.
3894 (s390_emit_stack_flush): New function.
3895 (s390_emit_zero_ext): New function.
3896 (s390_emit_swap): New function.
3897 (s390_emit_stack_adjust): New function.
3898 (s390_emit_set_r2): New function.
3899 (s390_emit_int_call_1): New function.
3900 (s390_emit_void_call_2): New function.
3901 (s390_emit_eq_goto): New function.
3902 (s390_emit_ne_goto): New function.
3903 (s390_emit_lt_goto): New function.
3904 (s390_emit_le_goto): New function.
3905 (s390_emit_gt_goto): New function.
3906 (s390_emit_ge_goto): New function.
3907 (s390x_emit_prologue): New function.
3908 (s390x_emit_epilogue): New function.
3909 (s390x_emit_add): New function.
3910 (s390x_emit_sub): New function.
3911 (s390x_emit_mul): New function.
3912 (s390x_emit_lsh): New function.
3913 (s390x_emit_rsh_signed): New function.
3914 (s390x_emit_rsh_unsigned): New function.
3915 (s390x_emit_ext): New function.
3916 (s390x_emit_log_not): New function.
3917 (s390x_emit_bit_and): New function.
3918 (s390x_emit_bit_or): New function.
3919 (s390x_emit_bit_xor): New function.
3920 (s390x_emit_bit_not): New function.
3921 (s390x_emit_equal): New function.
3922 (s390x_emit_less_signed): New function.
3923 (s390x_emit_less_unsigned): New function.
3924 (s390x_emit_ref): New function.
3925 (s390x_emit_if_goto): New function.
3926 (s390x_emit_const): New function.
3927 (s390x_emit_call): New function.
3928 (s390x_emit_reg): New function.
3929 (s390x_emit_pop): New function.
3930 (s390x_emit_stack_flush): New function.
3931 (s390x_emit_zero_ext): New function.
3932 (s390x_emit_swap): New function.
3933 (s390x_emit_stack_adjust): New function.
3934 (s390x_emit_int_call_1): New function.
3935 (s390x_emit_void_call_2): New function.
3936 (s390x_emit_eq_goto): New function.
3937 (s390x_emit_ne_goto): New function.
3938 (s390x_emit_lt_goto): New function.
3939 (s390x_emit_le_goto): New function.
3940 (s390x_emit_gt_goto): New function.
3941 (s390x_emit_ge_goto): New function.
3942 (s390_emit_ops): New function.
3943 (struct linux_target_ops): Fill in emit_ops hook.
3945 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3948 * Makefile.in: Add s390 IPA files.
3949 * configure.srv: Build IPA for s390.
3950 * linux-s390-ipa.c: New file.
3951 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3952 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3953 (tdesc_s390_linux32): Likewise.
3954 (init_registers_s390_linux32v1): Likewise.
3955 (tdesc_s390_linux32v1): Likewise.
3956 (init_registers_s390_linux32v2): Likewise.
3957 (tdesc_s390_linux32v2): Likewise.
3958 (init_registers_s390_linux64): Likewise.
3959 (tdesc_s390_linux64): Likewise.
3960 (init_registers_s390_linux64v1): Likewise.
3961 (tdesc_s390_linux64v1): Likewise.
3962 (init_registers_s390_linux64v2): Likewise.
3963 (tdesc_s390_linux64v2): Likewise.
3964 (init_registers_s390_te_linux64): Likewise.
3965 (tdesc_s390_te_linux64): Likewise.
3966 (init_registers_s390_vx_linux64): Likewise.
3967 (tdesc_s390_vx_linux64): Likewise.
3968 (init_registers_s390_tevx_linux64): Likewise.
3969 (tdesc_s390_tevx_linux64): Likewise.
3970 (init_registers_s390x_linux64): Likewise.
3971 (tdesc_s390x_linux64): Likewise.
3972 (init_registers_s390x_linux64v1): Likewise.
3973 (tdesc_s390x_linux64v1): Likewise.
3974 (init_registers_s390x_linux64v2): Likewise.
3975 (tdesc_s390x_linux64v2): Likewise.
3976 (init_registers_s390x_te_linux64): Likewise.
3977 (tdesc_s390x_te_linux64): Likewise.
3978 (init_registers_s390x_vx_linux64): Likewise.
3979 (tdesc_s390x_vx_linux64): Likewise.
3980 (init_registers_s390x_tevx_linux64): Likewise.
3981 (tdesc_s390x_tevx_linux64): Likewise.
3982 (have_hwcap_s390_vx): New static variable.
3983 (s390_arch_setup): Fill have_hwcap_s390_vx.
3984 (s390_get_thread_area): New function.
3985 (s390_ft_entry_gpr_esa): New const.
3986 (s390_ft_entry_gpr_zarch): New const.
3987 (s390_ft_entry_misc): New const.
3988 (s390_ft_entry_fr): New const.
3989 (s390_ft_entry_vr): New const.
3990 (s390_ft_main_31): New const.
3991 (s390_ft_main_64): New const.
3992 (s390_ft_exit_fr): New const.
3993 (s390_ft_exit_vr): New const.
3994 (s390_ft_exit_misc): New const.
3995 (s390_ft_exit_gpr_esa): New const.
3996 (s390_ft_exit_gpr_zarch): New const.
3997 (append_insns): New function.
3998 (s390_relocate_instruction): New function.
3999 (s390_install_fast_tracepoint_jump_pad): New function.
4000 (s390_get_min_fast_tracepoint_insn_len): New function.
4001 (s390_get_ipa_tdesc_idx): New function.
4002 (struct linux_target_ops): Wire in the above functions.
4003 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4004 * linux-s390-tdesc.h: New file.
4006 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4008 * linux-s390-low.c (s390_supports_tracepoints): New function.
4009 (struct linux_target_ops): Fill supports_tracepoints hook.
4011 2016-03-18 Yao Qi <yao.qi@linaro.org>
4013 * linux-low.c (lwp_signal_can_be_delivered): New function.
4014 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4016 2016-03-18 Yao Qi <yao.qi@linaro.org>
4018 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4019 0 if signal is enqueued. Remove 'signal' from one debugging
4020 message. Move one debugging message to some lines below.
4021 Remove code setting 'signal' to 0.
4023 2016-03-18 Yao Qi <yao.qi@linaro.org>
4025 * linux-low.c (linux_low_filter_event): Remove redundant
4026 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4028 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4030 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4031 (struct linux_target_ops): Wire in the above.
4033 2016-03-03 Yao Qi <yao.qi@linaro.org>
4035 * linux-low.c: Update comments to start_step_over.
4037 2016-03-03 Yao Qi <yao.qi@linaro.org>
4040 * linux-low.c (handle_extended_wait): Set child suspended
4041 if event_lwp->bp_reinsert isn't zero.
4043 2016-03-02 Yao Qi <yao.qi@linaro.org>
4045 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4046 enqueue_pending_signal.
4048 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4050 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4053 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4055 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4056 (s390_regmap_3264) [!__s390x__]: New global.
4057 (s390_collect_ptrace_register): Skip map entries containing -1.
4058 (s390_supply_ptrace_register): Ditto.
4059 (s390_fill_gprs_high): New function.
4060 (s390_store_gprs_high): New function.
4061 (s390_regsets): Add NT_S390_HIGH_GPRS.
4062 (s390_get_hwcap): Enable on 31-bit.
4063 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4064 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4065 Detect NT_S390_HIGH_GPRS.
4066 (s390_usrregs_info_3264): Enable on 31-bit.
4067 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4068 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4070 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4073 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4074 * configure.srv: Ditto.
4075 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4076 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4077 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4078 (init_registers_amd64_linux): Remove prototype.
4079 (tdesc_amd64_linux): Remove declaration.
4080 (get_ipa_tdesc): New function.
4081 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4082 initialize remaining tdescs.
4083 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4084 (init_registers_i386_linux): Remove prototype.
4085 (tdesc_i386_linux): Remove declaration.
4086 (get_ipa_tdesc): New function.
4087 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4088 initialize remaining tdescs.
4089 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4090 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4091 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4092 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4093 (x86_get_ipa_tdesc_idx): New function.
4094 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4095 * linux-x86-tdesc.h: New file.
4096 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4097 (target_get_ipa_tdesc_idx): New macro.
4098 * tracepoint.c (ipa_tdesc_idx): New macro.
4099 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4100 (symbol_list): Add ipa_tdesc_idx.
4101 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4102 (ipa_tdesc): Remove.
4103 (ipa_tdesc_idx): New variable.
4104 (get_context_regcache): Use get_ipa_tdesc.
4105 (gdb_collect): Ditto.
4107 * tracepoint.h (get_ipa_tdesc): New prototype.
4108 (ipa_tdesc): Remove.
4110 2016-02-24 Pedro Alves <palves@redhat.com>
4112 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4113 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4114 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4115 Factor out common code between the USE_SIGTRAP_SIGINFO and
4116 !USE_SIGTRAP_SIGINFO blocks.
4117 (linux_low_filter_event): Call save_stop_reason instead of
4118 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4120 (linux_wait_1): Update comments.
4122 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4124 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4125 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4126 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4127 ppc_insert_point, ppc_remove_point.
4129 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4131 * linux-s390-low.c (s390_supports_z_point_type): New function.
4132 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4134 2016-02-16 Yao Qi <yao.qi@linaro.org>
4136 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4137 PC. Get pc from regcache_read_pc.
4139 2016-02-12 Yao Qi <yao.qi@linaro.org>
4141 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4142 or linux_get_pc_32bit.
4143 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4145 2016-02-12 Yao Qi <yao.qi@linaro.org>
4147 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4148 arm_linux_get_next_pcs_fixup.
4150 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4152 * tracepoint.c (x_tracepoint_action_download): Change
4153 write_inferior_data_ptr to write_inferior_data_pointer.
4154 (cmd_qtstart): Likewise.
4155 (write_inferior_data_ptr): Remove.
4156 (download_agent_expr): Change write_inferior_data_ptr to
4157 write_inferior_data_pointer.
4158 (download_tracepoint_1): Likewise.
4159 (download_tracepoint): Likewise.
4160 (download_trace_state_variables): Likewise.
4162 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4163 Marcin Kościelnicki <koriakin@0x04.net>
4165 * tracepoint.c (struct tracepoint_action_ops): Remove.
4166 (struct tracepoint_action): Remove ops.
4167 (m_tracepoint_action_download, r_tracepoint_action_download)
4168 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4169 size and offset accordingly.
4170 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4171 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4172 (tracepoint_action_send, tracepoint_action_download): New functions.
4173 Helpers for trace action handlers.
4174 (add_tracepoint_action): Remove setup actions ops.
4175 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4177 2016-02-10 Yao Qi <yao.qi@linaro.org>
4179 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4181 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4183 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4185 * configure: Regenerate.
4187 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4189 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4190 void * to gdb_byte *.
4191 * linux-low.c (siginfo_fixup): Likewise.
4192 (linux_xfer_siginfo): Likewise.
4193 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4195 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4197 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4199 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4201 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4203 * linux-x86-low.c [__x86_64__]: Include
4204 "nat/amd64-linux-siginfo.h".
4205 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4206 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4207 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4208 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4209 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4210 (cpt_si_fd, si_timerid, si_overrun): Move from
4211 nat/amd64-linux-siginfo.c.
4212 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4214 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4216 * server.c (skip_to_semicolon): Remove.
4217 (process_point_options): Use strchrnul instead of
4220 2016-01-26 Yao Qi <yao.qi@linaro.org>
4222 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4223 * linux-low.c (install_software_single_step_breakpoints): Don't
4224 call regcache_read_pc.
4225 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4228 2016-01-26 Yao Qi <yao.qi@linaro.org>
4230 * linux-low.c (install_software_single_step_breakpoints): Call
4231 regcache_read_pc instead of get_pc.
4233 2016-01-26 Yao Qi <yao.qi@linaro.org>
4235 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4236 (unblock_async_io): Rename to ...
4237 (block_unblock_async_io): ... it. New function.
4238 (enable_async_io): Don't install SIGIO handler. Unblock it
4240 (disable_async_io): Don't ignore SIGIO. Block it instead.
4241 (initialize_async_io): Install SIGIO handler. Don't call
4244 2016-01-26 Yao Qi <yao.qi@linaro.org>
4246 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4247 first character is '\003', call *the_target->request_interrupt.
4249 2016-01-25 Yao Qi <yao.qi@linaro.org>
4251 * remote-utils.c (new_thread_notify): Remove.
4252 (dead_thread_notify): Likewise.
4253 * remote-utils.h (new_thread_notify): Remove declaration.
4254 (dead_thread_notify): Likewise.
4256 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4258 * gdb.trace/pending.exp: Fix expected message on continue.
4260 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4262 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4263 it works properly on big-endian machines where sizeof (CORE_ADDR)
4266 2016-01-21 Pedro Alves <palves@redhat.com>
4268 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4269 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4270 * configure: Regenerate.
4272 2016-01-21 Yao Qi <yao.qi@linaro.org>
4274 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4275 is_thumb and set it according to CPSR saved on the stack.
4276 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4277 arm_sigreturn_next_pc.
4279 2016-01-18 Yao Qi <yao.qi@linaro.org>
4281 * linux-low.c (linux_set_pc_64bit): New function.
4282 (linux_get_pc_64bit): New function.
4283 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4285 * linux-sparc-low.c (debug_threads): Remove declaration.
4286 (sparc_get_pc): Remove.
4287 (the_low_target): Use linux_get_pc_64bit instead of
4289 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4290 (the_low_target): Use linux_get_pc_64bit and
4293 2016-01-18 Yao Qi <yao.qi@linaro.org>
4295 * linux-arm-low.c (debug_threads): Remove declaration.
4296 (arm_get_pc, arm_set_pc): Remove.
4297 (the_low_target): Use linux_get_pc_32bit and
4299 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4300 (the_low_target): Use linux_get_pc_32bit and
4302 * linux-cris-low.c (debug_threads): Remove declaration.
4303 (cris_get_pc, cris_set_pc,): Remove.
4304 (the_low_target): Use linux_get_pc_32bit and
4306 * linux-crisv32-low.c (debug_threads): Remove declaration.
4307 (cris_get_pc, cris_set_pc): Remove.
4308 (the_low_target): Use linux_get_pc_32bit and
4310 * linux-low.c: Include inttypes.h.
4311 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4312 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4313 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4314 (the_low_target): Use linux_get_pc_32bit and
4316 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4317 (the_low_target): Use linux_get_pc_32bit and
4319 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4320 (the_low_target): Use linux_get_pc_32bit and
4322 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4323 (the_low_target): Use linux_get_pc_32bit and
4325 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4326 (the_low_target): Use linux_get_pc_32bit and
4329 2016-01-18 Gary Benson <gbenson@redhat.com>
4331 * configure.ac (AC_FUNC_FORK): New check.
4332 * config.in: Regenerate.
4333 * configure: Likewise.
4335 2016-01-14 Yao Qi <yao.qi@linaro.org>
4337 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4338 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4339 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4340 arm_get_next_pcs_ctor.
4342 2016-01-12 Josh Stone <jistone@redhat.com>
4343 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4345 * inferiors.h: Include "gdb_vecs.h".
4346 (struct process_info): Add syscalls_to_catch.
4347 * inferiors.c (remove_process): Free syscalls_to_catch.
4348 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4349 syscall_return stops.
4350 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4351 * server.c (handle_general_set): Handle QCatchSyscalls.
4352 (handle_query): Report support for QCatchSyscalls.
4353 * target.h (struct target_ops): Add supports_catch_syscall.
4354 (target_supports_catch_syscall): New macro.
4355 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4356 (struct lwp_info): Add syscall_state.
4357 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4358 Maintain syscall_state and syscalls_to_catch across exec.
4359 (get_syscall_trapinfo): New function, proxy to the_low_target.
4360 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4361 (linux_low_filter_event): Toggle syscall_state entry/return for
4362 syscall traps, and set it ignored for all others.
4363 (gdb_catching_syscalls_p): New function.
4364 (gdb_catch_this_syscall_p): New function.
4365 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4366 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4367 (linux_supports_catch_syscall): New function.
4368 (linux_target_ops): Install it.
4369 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4370 (the_low_target): Install it.
4372 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4374 * acinclude.m4: Include new ../warning.m4 file.
4375 * configure: Regenerated.
4376 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4378 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4380 * ax.c (is_goto_target): Mark static.
4381 * linux-low.c (register_addr): Likewise.
4382 (linux_fetch_registers, linux_store_registers): Likewise.
4383 * mem-break.c (any_persistent_commands): Fix old prototype.
4384 (add_commands_to_breakpoint): Mark static.
4385 * regcache.c (find_register_by_name): Delete unused func.
4386 * remote-utils.c (hex_or_minus_one): Mark static.
4387 * server.c (monitor_show_help): Mark static.
4388 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4389 handle_v_requests): Likewise.
4391 2016-01-12 Pedro Alves <palves@redhat.com>
4393 Remove use of the registered trademark symbol throughout.
4395 2016-01-08 Yao Qi <yao.qi@linaro.org>
4397 * remote-utils.c (getpkt): If c is '\003', call target hook
4400 2016-01-06 Yao Qi <yao.qi@linaro.org>
4402 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4403 linux-aarch32-low.c.
4404 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4405 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4406 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4407 (thumb2_breakpoint): Declare.
4408 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4409 linux-aarch32-low.h.
4410 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4411 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4412 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4414 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4416 * gdbreplay.c (gdbreplay_version): Change copyright year in
4418 * server.c (gdbserver_version): Likewise.
4420 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4422 * server.c (crc32_table): Delete.
4423 (crc32): Use libiberty's xcrc32 function.
4425 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4427 * lynx-low.c (lynx_delete_thread_callback): New function.
4428 (lynx_mourn): Properly delete our process and all of its
4429 threads. Remove call to clear_inferiors.
4431 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4433 * target.c (thread_search_callback): Add check that
4434 the thread_stopped target callback is not NULL before
4437 2015-12-21 Yao Qi <yao.qi@linaro.org>
4439 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4442 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4444 * server.c (handle_query): Call target_supports_software_single_step.
4446 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4448 * linux-low.c (single_step): New function.
4449 (linux_resume_one_lwp_throw): Call single_step.
4450 (start_step_over): Likewise.
4452 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4454 * Makefile.in (SFILES): Append arch/arm-linux.c,
4455 arch/arm-get-next-pcs.c.
4456 (arm-linux.o): New rule.
4457 (arm-get-next-pcs.o): New rule.
4458 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4460 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4461 to linux-aarch32-low.c.
4462 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4463 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4464 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4465 (thumb2_breakpoint_len): Likewise.
4466 (arm_is_thumb_mode): Make non-static.
4467 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4468 from linux-aarch32-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): New declaration.
4474 * linux-arm-low.c: Include arch/arm-linux.h
4475 aarch/arm-get-next-pcs.h, sys/syscall.h.
4476 (get_next_pcs_ops): New struct.
4477 (get_next_pcs_addr_bits_remove): New function.
4478 (get_next_pcs_is_thumb): New function.
4479 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4480 (arm_sigreturn_next_pc): Likewise.
4481 (get_next_pcs_syscall_next_pc): Likewise.
4482 (arm_gdbserver_get_next_pcs): Likewise.
4483 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4485 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4486 * server.h: Include gdb_vecs.h.
4488 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4490 * Makefile.in (SFILES): Append common/common-regcache.c.
4491 (OBS): Append common-regcache.o.
4492 (common-regcache.o): New rule.
4493 * regcache.c (init_register_cache): Initialize cache to
4495 (regcache_raw_read_unsigned): New function.
4496 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4497 register_status enum.
4499 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4501 * linux-aarch64-low.c (the_low_targets): Rename
4502 breakpoint_reinsert_addr to get_next_pcs.
4503 * linux-arm-low.c (the_low_targets): Likewise.
4504 * linux-bfin-low.c (the_low_targets): Likewise.
4505 * linux-cris-low.c (the_low_targets): Likewise.
4506 * linux-crisv32-low.c (the_low_targets): Likewise.
4507 * linux-low.c (can_software_single_step): Likewise.
4508 (install_software_single_step_breakpoints): New function.
4509 (start_step_over): Use install_software_single_step_breakpoints.
4510 * linux-low.h: New CORE_ADDR vector.
4511 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4513 * linux-mips-low.c (the_low_targets): Likewise.
4514 * linux-nios2-low.c (the_low_targets): Likewise.
4515 * linux-sparc-low.c (the_low_targets): Likewise.
4517 2015-12-17 Pedro Alves <palves@redhat.com>
4519 * linux-low.c (linux_kill_one_lwp): Remove references to
4521 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4523 (linux_init_signals): Delete.
4524 (initialize_low): Adjust.
4525 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4527 2015-12-16 Pedro Alves <palves@redhat.com>
4529 * configure.ac (compiler warning flags): When testing a
4530 -Wno-foo option, check whether -Wfoo works instead.
4531 * configure: Regenerate.
4533 2015-12-11 Don Breazeal <donb@codesourcery.com>
4535 * server.c (process_serial_event): Don't exit from gdbserver
4536 in remote mode if there are still active inferiors.
4538 2015-12-11 Yao Qi <yao.qi@linaro.org>
4540 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4541 arm_breakpoint_at if the process is 32-bit.
4543 2015-12-11 Yao Qi <yao.qi@linaro.org>
4545 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4548 2015-12-07 Yao Qi <yao.qi@linaro.org>
4550 * configure.srv: Append arm.o to srv_tgtobj for
4551 aarch64*-*-linux* target.
4552 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4553 from linux-arm-low.c.
4554 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4555 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4556 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4557 (thumb2_breakpoint_len): Likewise.
4558 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4559 (arm_breakpoint_kinds): Likewise.
4560 (arm_breakpoint_kind_from_pc): Likewise.
4561 (arm_sw_breakpoint_from_kind): Likewise.
4562 (arm_breakpoint_kind_from_current_state): Likewise.
4563 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4564 (arm_sw_breakpoint_from_kind): Declare.
4565 (arm_breakpoint_kind_from_current_state): Declare.
4566 (arm_breakpoint_at): Declare.
4567 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4568 arm_sw_breakpoint_from_kind if process is 32-bit.
4569 (aarch64_breakpoint_kind_from_pc): New function.
4570 (aarch64_breakpoint_kind_from_current_state): New function.
4571 (the_low_target): Initialize fields breakpoint_kind_from_pc
4572 and breakpoint_kind_from_current_state.
4573 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4574 linux-aarch32-low.c.
4575 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4576 (arm_breakpoint, arm_breakpoint_len): Likewise.
4577 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4578 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4579 (arm_is_thumb_mode): Likewise.
4580 (arm_breakpoint_at): Likewise.
4581 (arm_breakpoint_kind_from_pc): Likewise.
4582 (arm_sw_breakpoint_from_kind): Likewise.
4583 (arm_breakpoint_kind_from_current_state): Likewise.
4586 2015-08-04 Yao Qi <yao.qi@linaro.org>
4588 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4589 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4590 * server.c (extended_protocol): Remove "static".
4591 * server.h (extended_protocol): Declare it.
4593 2015-12-04 Josh Stone <jistone@redhat.com>
4595 * target.h (struct target_ops) <arch_setup>: Rename to ...
4596 (struct target_ops) <post_create_inferior>: ... this.
4597 (target_arch_setup): Rename to ...
4598 (target_post_create_inferior): ... this, calling post_create_inferior.
4599 * server.c (start_inferior): Update target_arch_setup calls to
4600 target_post_create_inferior.
4601 * linux-low.c (linux_low_ptrace_options): Forward declare.
4602 (linux_arch_setup): Update its comment for general use.
4603 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4604 (struct linux_target_ops): Use linux_post_create_inferior.
4605 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4606 to post_create_inferior.
4607 * nto-low.c (struct nto_target_ops): Likewise.
4608 * spu-low.c (struct spu_target_ops): Likewise.
4609 * win32-low.c (struct win32_target_ops): Likewise.
4611 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4613 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4615 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4617 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4618 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4619 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4620 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4621 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4622 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4623 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4624 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4625 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4626 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4627 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4628 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4630 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4632 * linux-low.c (linux_look_up_symbols): Don't call
4633 linux_supports_traceclone.
4634 * linux-low.h (thread_db_init): Remove use_events argument.
4635 * thread-db.c (thread_db_use_event): Remove global variable.
4636 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4637 (struct thread_db) <td_create_bp>: Remove field.
4638 (thread_db_create_event): Remove function.
4639 (thread_db_enable_reporting): Likewise.
4640 (find_one_thread): Don't check for thread_db_use_events.
4641 (attach_thread): Likewise.
4642 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4643 (try_thread_db_load_1): Don't check for thread_db_use_events.
4644 (thread_db_init): Remove use_events argument and thread events
4646 (remove_thread_event_breakpoints): Remove function.
4647 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4649 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4651 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4653 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4654 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4655 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4656 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4657 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4659 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4661 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4662 * linux-low.c (can_hardware_single_step): Use
4663 supports_hardware_single_step.
4664 (can_software_single_step): New function.
4665 (start_step_over): Call can_software_single_step.
4666 (linux_supports_hardware_single_step): New function.
4667 (struct target_ops) <supports_software_single_step>: Initialize.
4668 * linux-low.h (struct linux_target_ops)
4669 <supports_hardware_single_step>: Initialize.
4670 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4671 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4672 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4673 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4674 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4675 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4676 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4677 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4678 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4679 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4681 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4682 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4684 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4685 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4686 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4688 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4689 * target.h (struct target_ops): <supports_software_single_step>:
4691 (target_supports_software_single_step): New macro.
4693 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4695 * linux-low.c (linux_wait_1): Fix pc advance condition.
4696 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4697 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4699 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4701 * linux-arm-low.c (arm_is_thumb_mode): New function.
4702 (arm_breakpoint_at): Use arm_is_thumb_mode.
4703 (arm_breakpoint_kind_from_current_state): New function.
4704 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4706 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4707 (linux_breakpoint_kind_from_current_state): New function.
4708 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4709 * linux-low.h (struct linux_target_ops)
4710 <breakpoint_kind_from_current_state>: New field.
4711 * target.h (struct target_ops): Likewise.
4712 (target_breakpoint_kind_from_current_state): New macro.
4714 2015-11-30 Pedro Alves <palves@redhat.com>
4716 * linux-low.c (linux_resume): Wake up the event loop before
4719 2015-11-30 Pedro Alves <palves@redhat.com>
4721 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4723 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4725 * target.c (struct thread_search): New structure.
4726 (thread_search_callback): New function.
4727 (prev_general_thread): New global.
4728 (prepare_to_access_memory, done_accessing_memory): New functions.
4729 * target.h (prepare_to_access_memory, done_accessing_memory):
4730 Replace macros with function declarations.
4732 2015-11-30 Pedro Alves <palves@redhat.com>
4735 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4736 report TARGET_WAITKIND_NO_RESUMED.
4737 * remote-utils.c (prepare_resume_reply): Handle
4738 TARGET_WAITKIND_NO_RESUMED.
4739 * server.c (report_no_resumed): New global.
4740 (handle_query) <qSupported>: Handle "no-resumed+". Report
4741 "no-resumed+" support.
4742 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4743 return error if the client doesn't support no-resumed events.
4744 (push_stop_notification): New function.
4745 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4746 events if the client supports them.
4748 2015-11-30 Pedro Alves <palves@redhat.com>
4750 * linux-low.c (thread_still_has_status_pending_p): Don't check
4752 (lwp_resumed): New function.
4753 (status_pending_p_callback): Return early if the LWP is not
4754 supposed to be resumed.
4756 2015-11-30 Pedro Alves <palves@redhat.com>
4758 * linux-low.c (handle_extended_wait): Assert that the LWP's
4759 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4760 thread create events, leave the new child's status pending.
4761 (linux_low_filter_event): If GDB wants to hear about thread exit
4762 events, leave the LWP marked dead and don't delete it.
4763 (linux_wait_for_event_filtered): Don't check for thread exit.
4764 (filter_exit_event): New function.
4765 (linux_wait_1): Use it, when returning an exit event.
4766 (linux_resume_one_lwp_throw): Assert that the LWP's
4767 waitstatus is TARGET_WAITKIND_IGNORE.
4768 * remote-utils.c (prepare_resume_reply): Handle
4769 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4770 * server.c (report_thread_events): New global.
4771 (handle_general_set): Handle QThreadEvents.
4772 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4773 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4774 TARGET_WAITKIND_THREAD_EXITED.
4775 * server.h (report_thread_events): Declare.
4777 2015-11-30 Pedro Alves <palves@redhat.com>
4779 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4780 the thread's last_resume_kind was resume_stop.
4782 2015-11-30 Pedro Alves <palves@redhat.com>
4784 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4787 2015-11-30 Pedro Alves <palves@redhat.com>
4789 * server.c (handle_v_requests): Handle vCtrlC.
4791 2015-11-30 Pedro Alves <palves@redhat.com>
4793 * gdbthread.h (find_any_thread_of_pid): Declare.
4794 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4796 * server.c (handle_query): If current_thread is NULL, look for
4797 another thread of the selected process.
4799 2015-11-26 Daniel Colascione <dancol@dancol.org>
4800 Simon Marchi <simon.marchi@ericsson.com>
4802 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4803 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4805 * target.h (struct target_ops) <thread_name>: New field.
4806 (target_thread_name): New macro.
4808 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4810 * regcache.h (regcache_invalidate_pid): Add declaration.
4811 * regcache.c (regcache_invalidate_pid): New function, extracted
4812 from regcache_invalidate.
4813 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4814 Add trivial documentation comment.
4815 * lynx-low.c: Use regcache_invalidate_pid instead of
4816 regcache_invalidate.
4818 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4820 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4821 and Elf64_auxv_t if the target is Android.
4823 2015-11-22 Doug Evans <xdje42@gmail.com>
4825 * target.h: #include <sys/types.h>.
4827 2015-11-19 Pedro Alves <palves@redhat.com>
4829 * linux-low.c (linux_process_qsupported): Change prototype.
4831 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4833 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4834 and adjust to loop over all features.
4835 * server.c (handle_query) <qSupported>: Adjust to call
4836 target_process_qsupported once, passing it a vector of unprocessed
4838 * target.h (struct target_ops) <process_qsupported>: Change
4840 (target_process_qsupported): Adjust.
4842 2015-11-19 Pedro Alves <palves@redhat.com>
4844 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4846 * configure: Regenerate.
4848 2015-11-19 Pedro Alves <palves@redhat.com>
4850 * configure: Regenerate.
4852 2015-11-19 Yao Qi <yao.qi@linaro.org>
4854 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4857 2015-11-19 Yao Qi <yao.qi@linaro.org>
4859 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4860 (struct aarch64_operand): Move enum out.
4862 2015-11-19 Yao Qi <yao.qi@linaro.org>
4864 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4865 struct user_fpsimd_state *.
4866 (aarch64_store_fpregset): Likewise.
4868 2015-11-19 Yao Qi <yao.qi@linaro.org>
4870 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4871 struct user_pt_regs *.
4872 (aarch64_store_gregset): Likewise.
4874 2015-11-18 Pedro Alves <palves@redhat.com>
4876 * Makefile.in (all_object_files): Add $IPA_OBJS.
4878 2015-11-17 Pedro Alves <palves@redhat.com>
4880 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4881 GDB_SIGNAL_0 and gdb_signal_to_string.
4883 2015-11-17 Pedro Alves <palves@redhat.com>
4885 * win32-low.c (handle_output_debug_string): Remove parameter.
4886 (win32_kill): Remove our_status local and adjust call to
4887 handle_output_debug_string.
4888 (get_child_debug_event): Adjust call to
4889 handle_output_debug_string.
4891 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4893 * linux-mips-low.c (mips_fill_gregset): Add cast.
4894 (mips_store_gregset): Likewise.
4895 (mips_fill_fpregset): Likewise.
4896 (mips_store_fpregset): Likewise.
4898 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4900 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4903 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4905 * linux-mips-low.c (mips_linux_new_thread): Change type of
4906 watch_type to enum target_hw_bp_type.
4908 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4910 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4911 Change return type to arm_hwbp_type.
4913 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4915 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4916 (arm_store_gregset): Likewise.
4917 * linux-arm-low.c (arm_get_hwcap): Likewise.
4918 (arm_read_description): Likewise.
4920 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4922 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4924 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4926 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4927 (ppc_fill_vsxregset): Likewise.
4928 (ppc_store_vsxregset): Likewise.
4929 (ppc_fill_vrregset): Likewise.
4930 (ppc_store_vrregset): Likewise.
4931 (ppc_fill_evrregset): Likewise.
4932 (ppc_store_evrregset): Likewise.
4934 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4936 * linux-ppc-low.c (ppc_usrregs_info): Remove
4937 forward-declaration.
4938 (ppc_arch_setup): Move lower in file.
4940 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4942 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4943 (ps_pdwrite): Likewise.
4945 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4947 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4948 to after assert checks.
4950 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4952 * proc-service.c (ps_pdread): Add/adjust casts.
4953 (ps_pdwrite): Add/adjust casts.
4955 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4957 * server.c (handle_search_memory_1): Cast return value of
4960 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4962 * server.c (write_qxfer_response): Change type of data to
4965 2015-10-29 Pedro Alves <palves@redhat.com>
4967 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4969 2015-10-29 Pedro Alves <palves@redhat.com>
4971 * tracepoint.c (clear_installed_tracepoints): Add casts.
4973 2015-10-29 Pedro Alves <palves@redhat.com>
4975 * server.c (handle_v_cont, process_serial_event): Add enum
4976 gdb_signal casts to signal parsing code.
4978 2015-10-29 Pedro Alves <palves@redhat.com>
4980 * linux-low.h (NULL_REGSET): Define.
4981 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4982 * linux-arm-low.c (arm_regsets): Likewise.
4983 * linux-crisv32-low.c (cris_regsets): Likewise.
4984 * linux-m68k-low.c (m68k_regsets): Likewise.
4985 * linux-mips-low.c (mips_regsets): Likewise.
4986 * linux-nios2-low.c (nios2_regsets): Likewise.
4987 * linux-ppc-low.c (ppc_regsets): Likewise.
4988 * linux-s390-low.c (s390_regsets): Likewise.
4989 * linux-sh-low.c (sh_regsets): Likewise.
4990 * linux-sparc-low.c (sparc_regsets): Likewise.
4991 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4992 * linux-tile-low.c (tile_regsets): Likewise.
4993 * linux-x86-low.c (x86_regsets): Likewise.
4994 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4996 2015-10-29 Pedro Alves <palves@redhat.com>
4998 * linux-low.h (NULL_REGSET): Define.
4999 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5000 * linux-arm-low.c (arm_regsets): Likewise.
5001 * linux-crisv32-low.c (cris_regsets): Likewise.
5002 * linux-m68k-low.c (m68k_regsets): Likewise.
5003 * linux-mips-low.c (mips_regsets): Likewise.
5004 * linux-nios2-low.c (nios2_regsets): Likewise.
5005 * linux-ppc-low.c (ppc_regsets): Likewise.
5006 * linux-s390-low.c (s390_regsets): Likewise.
5007 * linux-sh-low.c (sh_regsets): Likewise.
5008 * linux-sparc-low.c (sparc_regsets): Likewise.
5009 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5010 * linux-tile-low.c (tile_regsets): Likewise.
5011 * linux-x86-low.c (x86_regsets): Likewise.
5012 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5014 2015-10-26 Doug Evans <dje@google.com>
5016 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5018 2015-10-26 Doug Evans <dje@google.com>
5020 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5022 2015-10-26 Doug Evans <dje@google.com>
5024 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5026 (attach_thread, find_new_threads_callback): Ditto.
5028 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5030 * mem-break.h (set_breakpoint_data): Remove.
5032 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5034 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5035 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5036 (initialize_low): Remove set_breakpoint_data call.
5037 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5038 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5039 (initialize_low): Remove set_breakpoint_data call.
5040 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5041 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5042 (initialize_low): Remove set_breakpoint_data call.
5044 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5046 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5047 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5048 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5049 * target.h (target_breakpoint_kind_from_pc): New macro.
5051 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5053 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5054 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5055 the default breakpoint kind.
5057 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5059 * linux-arm-low.c (arm_supports_z_point_type): Add software
5062 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5064 * linux-arm-low.c: Refactor breakpoint definitions.
5065 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5066 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5068 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5070 * Makefile.in: Add arm.c/o.
5071 * configure.srv: Likewise.
5072 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5073 (arm_breakpoint_kind_from_pc): New function.
5074 (arm_sw_breakpoint_from_kind): Return proper kind.
5075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5077 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5079 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5081 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5082 (struct raw_breakpoint) <size>: Remove.
5083 (struct raw_breakpoint) <kind>: Add.
5084 (bp_size): New function.
5085 (bp_opcode): Likewise.
5086 (find_raw_breakpoint_at): Adjust for kind.
5087 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5088 (remove_memory_breakpoint): Adjust for kind call bp_size.
5089 (set_raw_breakpoint_at): Adjust for kind.
5090 (set_breakpoint): Likewise.
5091 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5092 (delete_raw_breakpoint): Adjust for kind.
5093 (delete_breakpoint): Likewise.
5094 (find_gdb_breakpoint): Likewise.
5095 (set_gdb_breakpoint_1): Likewise.
5096 (set_gdb_breakpoint): Likewise.
5097 (delete_gdb_breakpoint_1): Likewise.
5098 (delete_gdb_breakpoint): Likewise.
5099 (uninsert_raw_breakpoint): Likewise.
5100 (reinsert_raw_breakpoint): Likewise.
5101 (set_breakpoint_data): Remove.
5102 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5103 (check_mem_read): Adjust for kind call bp_size.
5104 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5105 (clone_one_breakpoint): Adjust for kind.
5106 * mem-break.h (set_gdb_breakpoint): Likewise.
5107 (delete_gdb_breakpoint): Likewise.
5108 * server.c (process_serial_event): Likewise.
5110 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5112 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5113 (struct linux_target_ops) <breakpoint>: Remove.
5114 (struct linux_target_ops) <breakpoint_len>: Remove.
5115 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5116 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5117 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5118 (arm_sw_breakpoint_from_kind): New function.
5119 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5120 (struct linux_target_ops) <breakpoint>: Remove.
5121 (struct linux_target_ops) <breakpoint_len>: Remove.
5122 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5123 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5124 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5125 (struct linux_target_ops) <breakpoint>: Remove.
5126 (struct linux_target_ops) <breakpoint_len>: Remove.
5127 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5128 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5129 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5130 (struct linux_target_ops) <breakpoint>: Remove.
5131 (struct linux_target_ops) <breakpoint_len>: Remove.
5132 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5133 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5134 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5135 and sw_breakpoint_from_kind to increment the pc.
5136 (linux_breakpoint_kind_from_pc): New function.
5137 (linux_sw_breakpoint_from_kind): New function.
5138 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5139 (initialize_low): Call breakpoint_kind_from_pc and
5140 sw_breakpoint_from_kind to replace breakpoint_data/len.
5141 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5144 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5145 (struct linux_target_ops) <breakpoint>: Remove.
5146 (struct linux_target_ops) <breakpoint_len>: Remove.
5147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5149 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5150 (struct linux_target_ops) <breakpoint>: Remove.
5151 (struct linux_target_ops) <breakpoint_len>: Remove.
5152 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5153 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5154 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5155 (struct linux_target_ops) <breakpoint>: Remove.
5156 (struct linux_target_ops) <breakpoint_len>: Remove.
5157 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5158 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5159 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5160 (struct linux_target_ops) <breakpoint>: Remove.
5161 (struct linux_target_ops) <breakpoint_len>: Remove.
5162 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5163 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5164 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5165 (struct linux_target_ops) <breakpoint>: Remove.
5166 (struct linux_target_ops) <breakpoint_len>: Remove.
5167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5169 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5170 (struct linux_target_ops) <breakpoint>: Remove.
5171 (struct linux_target_ops) <breakpoint_len>: Remove.
5172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5174 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5175 (struct linux_target_ops) <breakpoint>: Remove.
5176 (struct linux_target_ops) <breakpoint_len>: Remove.
5177 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5178 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5179 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5180 (struct linux_target_ops) <breakpoint>: Remove.
5181 (struct linux_target_ops) <breakpoint_len>: Remove.
5182 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5183 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5184 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5185 (struct linux_target_ops) <breakpoint>: Remove.
5186 (struct linux_target_ops) <breakpoint_len>: Remove.
5187 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5188 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5189 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5190 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5191 (struct linux_target_ops) <breakpoint>: Remove.
5192 (struct linux_target_ops) <breakpoint_len>: Remove.
5193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5195 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5196 (struct linux_target_ops) <breakpoint>: Remove.
5197 (struct linux_target_ops) <breakpoint_len>: Remove.
5198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5201 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5203 * linux-cris-low.c (cris_get_pc): Remove void arg.
5205 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5207 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5210 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5212 * inferiors.c (thread_pid_matches_callback): New function.
5213 (find_thread_process): New function.
5214 (remove_thread): Reset current_thread.
5215 (remove_process): Assert threads have been removed first.
5217 2015-10-15 Yao Qi <yao.qi@linaro.org>
5219 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5221 (aarch64_remove_point): Likewise.
5222 * regcache.c (regcache_register_size): New function.
5224 2015-10-12 Yao Qi <yao.qi@linaro.org>
5226 * linux-aarch64-low.c: Update all callers as emit_load_store
5227 is renamed to aarch64_emit_load_store.
5229 2015-10-12 Yao Qi <yao.qi@linaro.org>
5231 * linux-aarch64-low.c: Update all callers of function renaming
5232 from emit_insn to aarch64_emit_insn.
5234 2015-10-12 Yao Qi <yao.qi@linaro.org>
5236 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5237 arch/aarch64-insn.h.
5238 (struct aarch64_memory_operand): Likewise.
5240 (emit_insn): Move to arch/aarch64-insn.c.
5241 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5242 (emit_load_store): Move to arch/aarch64-insn.c.
5243 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5244 (can_encode_int32): Remove.
5246 2015-10-12 Yao Qi <yao.qi@linaro.org>
5248 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5249 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5250 (aarch64_relocate_instruction): Likewise.
5251 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5252 (struct aarch64_insn_visitor): Likewise.
5254 2015-10-12 Yao Qi <yao.qi@linaro.org>
5256 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5257 (struct aarch64_insn_visitor): New.
5258 (struct aarch64_insn_relocation_data): New.
5259 (aarch64_ftrace_insn_reloc_b): New function.
5260 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5261 (aarch64_ftrace_insn_reloc_cb): Likewise.
5262 (aarch64_ftrace_insn_reloc_tb): Likewise.
5263 (aarch64_ftrace_insn_reloc_adr): Likewise.
5264 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5265 (aarch64_ftrace_insn_reloc_others): Likewise.
5267 (aarch64_relocate_instruction): Use visitor.
5269 2015-10-12 Yao Qi <yao.qi@linaro.org>
5271 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5272 int. Add argument buf.
5273 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5274 aarch64_relocate_instruction.
5276 2015-10-12 Yao Qi <yao.qi@linaro.org>
5278 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5279 argument insn. Remove local variable insn. Don't call
5281 (aarch64_install_fast_tracepoint_jump_pad): Call
5284 2015-09-30 Yao Qi <yao.qi@linaro.org>
5286 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5287 (emit_load_store_pair): Likewise.
5289 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5291 * dll.c (match_dll): Add cast(s).
5292 (unloaded_dll): Likewise.
5293 * linux-low.c (second_thread_of_pid_p): Likewise.
5294 (delete_lwp_callback): Likewise.
5295 (count_events_callback): Likewise.
5296 (select_event_lwp_callback): Likewise.
5297 (linux_set_resume_request): Likewise.
5298 * server.c (accumulate_file_name_length): Likewise.
5299 (emit_dll_description): Likewise.
5300 (handle_qxfer_threads_worker): Likewise.
5301 (visit_actioned_threads): Likewise.
5302 * thread-db.c (any_thread_of): Likewise.
5303 * tracepoint.c (same_process_p): Likewise.
5304 (match_blocktype): Likewise.
5305 (build_traceframe_info_xml): Likewise.
5307 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5309 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5311 (gdb_unparse_agent_expr): Likewise.
5312 * hostio.c (require_data): Likewise.
5313 (handle_pread): Likewise.
5314 * linux-low.c (disable_regset): Likewise.
5315 (fetch_register): Likewise.
5316 (store_register): Likewise.
5317 (get_dynamic): Likewise.
5318 (linux_qxfer_libraries_svr4): Likewise.
5319 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5320 (set_fast_tracepoint_jump): Likewise.
5321 (uninsert_fast_tracepoint_jumps_at): Likewise.
5322 (reinsert_fast_tracepoint_jumps_at): Likewise.
5323 (validate_inserted_breakpoint): Likewise.
5324 (clone_agent_expr): Likewise.
5325 * regcache.c (init_register_cache): Likewise.
5326 * remote-utils.c (putpkt_binary_1): Likewise.
5327 (decode_M_packet): Likewise.
5328 (decode_X_packet): Likewise.
5329 (look_up_one_symbol): Likewise.
5330 (relocate_instruction): Likewise.
5331 (monitor_output): Likewise.
5332 * server.c (handle_search_memory): Likewise.
5333 (handle_qxfer_exec_file): Likewise.
5334 (handle_qxfer_libraries): Likewise.
5335 (handle_qxfer): Likewise.
5336 (handle_query): Likewise.
5337 (handle_v_cont): Likewise.
5338 (handle_v_run): Likewise.
5339 (captured_main): Likewise.
5340 * target.c (write_inferior_memory): Likewise.
5341 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5342 * tracepoint.c (init_trace_buffer): Likewise.
5343 (add_tracepoint_action): Likewise.
5344 (add_traceframe): Likewise.
5345 (add_traceframe_block): Likewise.
5346 (cmd_qtdpsrc): Likewise.
5347 (cmd_qtdv): Likewise.
5348 (cmd_qtstatus): Likewise.
5349 (response_source): Likewise.
5350 (response_tsv): Likewise.
5351 (cmd_qtnotes): Likewise.
5352 (gdb_collect): Likewise.
5353 (initialize_tracepoint): Likewise.
5355 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5357 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5358 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5359 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5361 (enum aarch64_condition_codes): New enum.
5362 (w0): New static global.
5365 (struct aarch64_memory_operand) <type>: New
5366 MEMORY_OPERAND_POSTINDEX type.
5367 (postindex_memory_operand): New helper function.
5368 (emit_ret): New function.
5369 (emit_load_store_pair): New function, factored out of emit_stp
5370 with support for MEMORY_OPERAND_POSTINDEX.
5371 (emit_stp): Rewrite using emit_load_store_pair.
5372 (emit_ldp): New function.
5373 (emit_load_store): Likewise.
5374 (emit_ldr): Mention post-index instruction in comment.
5375 (emit_ldrh): New function.
5376 (emit_ldrb): New function.
5377 (emit_ldrsw): Mention post-index instruction in comment.
5378 (emit_str): Likewise.
5379 (emit_subs): New function.
5380 (emit_cmp): Likewise.
5381 (emit_and): Likewise.
5382 (emit_orr): Likewise.
5383 (emit_orn): Likewise.
5384 (emit_eor): Likewise.
5385 (emit_mvn): Likewise.
5386 (emit_lslv): Likewise.
5387 (emit_lsrv): Likewise.
5388 (emit_asrv): Likewise.
5389 (emit_mul): Likewise.
5390 (emit_sbfm): Likewise.
5391 (emit_sbfx): Likewise.
5392 (emit_ubfm): Likewise.
5393 (emit_ubfx): Likewise.
5394 (emit_csinc): Likewise.
5395 (emit_cset): Likewise.
5396 (emit_nop): Likewise.
5397 (emit_ops_insns): New helper function.
5398 (emit_pop): Likewise.
5399 (emit_push): Likewise.
5400 (aarch64_emit_prologue): New function.
5401 (aarch64_emit_epilogue): Likewise.
5402 (aarch64_emit_add): Likewise.
5403 (aarch64_emit_sub): Likewise.
5404 (aarch64_emit_mul): Likewise.
5405 (aarch64_emit_lsh): Likewise.
5406 (aarch64_emit_rsh_signed): Likewise.
5407 (aarch64_emit_rsh_unsigned): Likewise.
5408 (aarch64_emit_ext): Likewise.
5409 (aarch64_emit_log_not): Likewise.
5410 (aarch64_emit_bit_and): Likewise.
5411 (aarch64_emit_bit_or): Likewise.
5412 (aarch64_emit_bit_xor): Likewise.
5413 (aarch64_emit_bit_not): Likewise.
5414 (aarch64_emit_equal): Likewise.
5415 (aarch64_emit_less_signed): Likewise.
5416 (aarch64_emit_less_unsigned): Likewise.
5417 (aarch64_emit_ref): Likewise.
5418 (aarch64_emit_if_goto): Likewise.
5419 (aarch64_emit_goto): Likewise.
5420 (aarch64_write_goto_address): Likewise.
5421 (aarch64_emit_const): Likewise.
5422 (aarch64_emit_call): Likewise.
5423 (aarch64_emit_reg): Likewise.
5424 (aarch64_emit_pop): Likewise.
5425 (aarch64_emit_stack_flush): Likewise.
5426 (aarch64_emit_zero_ext): Likewise.
5427 (aarch64_emit_swap): Likewise.
5428 (aarch64_emit_stack_adjust): Likewise.
5429 (aarch64_emit_int_call_1): Likewise.
5430 (aarch64_emit_void_call_2): Likewise.
5431 (aarch64_emit_eq_goto): Likewise.
5432 (aarch64_emit_ne_goto): Likewise.
5433 (aarch64_emit_lt_goto): Likewise.
5434 (aarch64_emit_le_goto): Likewise.
5435 (aarch64_emit_gt_goto): Likewise.
5436 (aarch64_emit_ge_got): Likewise.
5437 (aarch64_emit_ops_impl): New static global variable.
5438 (aarch64_emit_ops): New target function, return
5439 &aarch64_emit_ops_impl.
5440 (struct linux_target_ops): Install it.
5442 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5444 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5445 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5447 * linux-aarch64-ipa.c: New file.
5448 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5450 (aarch64_get_thread_area): New target method.
5451 (extract_signed_bitfield): New helper function.
5452 (aarch64_decode_ldr_literal): New function.
5453 (enum aarch64_opcodes): New enum.
5454 (struct aarch64_register): New struct.
5455 (struct aarch64_operand): New struct.
5456 (x0): New static global.
5465 (aarch64_register): New helper function.
5466 (register_operand): Likewise.
5467 (immediate_operand): Likewise.
5468 (struct aarch64_memory_operand): New struct.
5469 (offset_memory_operand): New helper function.
5470 (preindex_memory_operand): Likewise.
5471 (enum aarch64_system_control_registers): New enum.
5472 (ENCODE): New macro.
5473 (emit_insn): New helper function.
5474 (emit_b): New function.
5475 (emit_bcond): Likewise.
5476 (emit_cb): Likewise.
5477 (emit_tb): Likewise.
5478 (emit_blr): Likewise.
5479 (emit_stp): Likewise.
5480 (emit_ldp_q_offset): Likewise.
5481 (emit_stp_q_offset): Likewise.
5482 (emit_load_store): Likewise.
5483 (emit_ldr): Likewise.
5484 (emit_ldrsw): Likewise.
5485 (emit_str): Likewise.
5486 (emit_ldaxr): Likewise.
5487 (emit_stxr): Likewise.
5488 (emit_stlr): Likewise.
5489 (emit_data_processing_reg): Likewise.
5490 (emit_data_processing): Likewise.
5491 (emit_add): Likewise.
5492 (emit_sub): Likewise.
5493 (emit_mov): Likewise.
5494 (emit_movk): Likewise.
5495 (emit_mov_addr): Likewise.
5496 (emit_mrs): Likewise.
5497 (emit_msr): Likewise.
5498 (emit_sevl): Likewise.
5499 (emit_wfe): Likewise.
5500 (append_insns): Likewise.
5501 (can_encode_int32_in): New helper function.
5502 (aarch64_relocate_instruction): New function.
5503 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5504 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5505 (struct linux_target_ops): Install aarch64_get_thread_area,
5506 aarch64_install_fast_tracepoint_jump_pad and
5507 aarch64_get_min_fast_tracepoint_insn_len.
5509 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5511 * Makefile.in (aarch64-insn.o): New rule.
5512 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5514 2015-09-21 Yao Qi <yao.qi@linaro.org>
5516 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5518 2015-09-21 Yao Qi <yao.qi@linaro.org>
5520 * tracepoint.c (max_jump_pad_size): Remove.
5522 2015-09-18 Yao Qi <yao.qi@linaro.org>
5524 * linux-aarch64-low.c: Don't include sys/uio.h.
5525 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5527 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5529 * tracepoint.c (eval_result_type): Change prototype.
5530 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5532 2015-09-15 Pedro Alves <palves@redhat.com>
5534 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5535 Check whether to report exec events instead of checking whether
5536 multiprocess is enabled.
5538 2015-09-15 Pedro Alves <palves@redhat.com>
5541 * remote-utils.c (prepare_resume_reply): Merge
5542 TARGET_WAITKIND_VFORK_DONE switch case with the
5543 TARGET_WAITKIND_FORKED case.
5545 2015-09-15 Yao Qi <yao.qi@linaro.org>
5547 * server.c (handle_query): Check string comparison using
5548 "else if" instead of "if".
5550 2015-09-15 Yao Qi <yao.qi@linaro.org>
5552 * server.c (vCont_supported): New global variable.
5553 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5554 matches. Append ";vContSupported+" to own_buf.
5555 (handle_v_requests): Append ";s;S" to own_buf if target supports
5556 hardware single step or vCont_supported is false.
5557 (capture_main): Set vCont_supported to zero.
5559 2015-09-15 Yao Qi <yao.qi@linaro.org>
5561 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5563 (linux_supports_hardware_single_step): ... New function.
5564 (linux_target_ops): Update.
5565 * lynx-low.c (lynx_target_ops): Set field
5566 supports_hardware_single_step to target_can_do_hardware_single_step.
5567 * nto-low.c (nto_target_ops): Likewise.
5568 * spu-low.c (spu_target_ops): Likewise.
5569 * win32-low.c (win32_target_ops): Likewise.
5570 * target.c (target_can_do_hardware_single_step): New function.
5571 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5572 Remove. <supports_hardware_single_step>: New field.
5573 (target_supports_conditional_breakpoints): Remove.
5574 (target_supports_hardware_single_step): New macro.
5575 (target_can_do_hardware_single_step): Declare.
5576 * server.c (handle_query): Use target_supports_hardware_single_step
5577 instead of target_supports_conditional_breakpoints.
5579 2015-09-15 Yao Qi <yao.qi@linaro.org>
5581 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5583 (struct linux_target_ops the_low_target): Install
5584 aarch64_linux_siginfo_fixup.
5586 2015-09-11 Don Breazeal <donb@codesourcery.com>
5587 Luis Machado <lgustavo@codesourcery.com>
5589 * linux-low.c (linux_mourn): Static declaration.
5590 (linux_arch_setup): Move in front of
5591 handle_extended_wait.
5592 (linux_arch_setup_thread): New function.
5593 (handle_extended_wait): Handle exec events. Call
5594 linux_arch_setup_thread. Make event_lwp argument a
5595 pointer-to-a-pointer.
5596 (check_zombie_leaders): Do not check stopped threads.
5597 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5598 (linux_low_filter_event): Add lwp and thread for exec'ing
5599 non-leader thread if leader thread has been deleted.
5600 Refactor code into linux_arch_setup_thread and call it.
5601 Pass child lwp pointer by reference to handle_extended_wait.
5602 (linux_wait_for_event_filtered): Update comment.
5603 (linux_wait_1): Prevent clobbering exec event status.
5604 (linux_supports_exec_events): New function.
5605 (linux_target_ops) <supports_exec_events>: Initialize new member.
5606 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5608 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5609 * server.c (report_exec_events): New global variable.
5610 (handle_query): Handle qSupported query for exec-events feature.
5611 (captured_main): Initialize report_exec_events.
5612 * server.h (report_exec_events): Declare new global variable.
5613 * target.h (struct target_ops) <supports_exec_events>: New
5615 (target_supports_exec_events): New macro.
5616 * win32-low.c (win32_target_ops) <supports_exec_events>:
5617 Initialize new member.
5619 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5621 * linux-low.c (linux_low_enable_btrace): Remove.
5622 (linux_target_ops): Replace linux_low_enable_btrace with
5623 linux_enable_btrace.
5625 2015-09-03 Yao Qi <yao.qi@linaro.org>
5627 * linux-aarch64-low.c (aarch64_insert_point): Call
5628 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5631 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5633 * linux-low.c (check_stopped_by_breakpoint): Use
5634 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5636 2015-08-27 Pedro Alves <palves@redhat.com>
5638 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5640 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5642 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5643 the XNEW-family equivalent.
5644 (compile_bytecodes): Likewise.
5645 * dll.c (loaded_dll): Likewise.
5646 * event-loop.c (append_callback_event): Likewise.
5647 (create_file_handler): Likewise.
5648 (create_file_event): Likewise.
5649 * hostio.c (handle_open): Likewise.
5650 * inferiors.c (add_thread): Likewise.
5651 (add_process): Likewise.
5652 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5653 * linux-arm-low.c (arm_new_process): Likewise.
5654 (arm_new_thread): Likewise.
5655 * linux-low.c (add_to_pid_list): Likewise.
5656 (linux_add_process): Likewise.
5657 (handle_extended_wait): Likewise.
5658 (add_lwp): Likewise.
5659 (enqueue_one_deferred_signal): Likewise.
5660 (enqueue_pending_signal): Likewise.
5661 (linux_resume_one_lwp_throw): Likewise.
5662 (linux_resume_one_thread): Likewise.
5663 (linux_read_memory): Likewise.
5664 (linux_write_memory): Likewise.
5665 * linux-mips-low.c (mips_linux_new_process): Likewise.
5666 (mips_linux_new_thread): Likewise.
5667 (mips_add_watchpoint): Likewise.
5668 * linux-x86-low.c (initialize_low_arch): Likewise.
5669 * lynx-low.c (lynx_add_process): Likewise.
5670 * mem-break.c (set_raw_breakpoint_at): Likewise.
5671 (set_breakpoint): Likewise.
5672 (add_condition_to_breakpoint): Likewise.
5673 (add_commands_to_breakpoint): Likewise.
5674 (clone_agent_expr): Likewise.
5675 (clone_one_breakpoint): Likewise.
5676 * regcache.c (new_register_cache): Likewise.
5677 * remote-utils.c (look_up_one_symbol): Likewise.
5678 * server.c (queue_stop_reply): Likewise.
5679 (start_inferior): Likewise.
5680 (queue_stop_reply_callback): Likewise.
5681 (handle_target_event): Likewise.
5682 * spu-low.c (fetch_ppc_memory): Likewise.
5683 (store_ppc_memory): Likewise.
5684 * target.c (set_target_ops): Likewise.
5685 * thread-db.c (thread_db_load_search): Likewise.
5686 (try_thread_db_load_1): Likewise.
5687 * tracepoint.c (add_tracepoint): Likewise.
5688 (add_tracepoint_action): Likewise.
5689 (create_trace_state_variable): Likewise.
5690 (cmd_qtdpsrc): Likewise.
5691 (cmd_qtro): Likewise.
5692 (add_while_stepping_state): Likewise.
5693 * win32-low.c (child_add_thread): Likewise.
5694 (get_image_name): Likewise.
5696 2015-08-25 Yao Qi <yao.qi@linaro.org>
5698 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5700 2015-08-25 Yao Qi <yao.qi@linaro.org>
5702 * Makefile.in (aarch64-linux.o): New rule.
5703 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5705 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5706 (aarch64_init_debug_reg_state): Make it extern.
5707 (aarch64_linux_prepare_to_resume): Remove.
5709 2015-08-25 Yao Qi <yao.qi@linaro.org>
5711 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5712 lwp_arch_private_info and ptid_of_lwp.
5714 2015-08-25 Yao Qi <yao.qi@linaro.org>
5716 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5717 Find proc_info by find_process_pid. All callers updated.
5719 2015-08-25 Yao Qi <yao.qi@linaro.org>
5721 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5723 (debug_reg_change_callback): Remove.
5724 (aarch64_notify_debug_reg_change): Remove.
5726 2015-08-25 Yao Qi <yao.qi@linaro.org>
5728 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5729 Call current_lwp_ptid.
5731 2015-08-25 Yao Qi <yao.qi@linaro.org>
5733 * linux-aarch64-low.c (debug_reg_change_callback): Use
5736 2015-08-25 Yao Qi <yao.qi@linaro.org>
5738 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5740 2015-08-25 Yao Qi <yao.qi@linaro.org>
5742 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5744 2015-08-25 Yao Qi <yao.qi@linaro.org>
5746 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5749 2015-08-25 Yao Qi <yao.qi@linaro.org>
5751 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5753 (debug_reg_change_callback): Remove argument entry and add argument
5754 lwp. Remove local variable thread. Don't print thread id in the
5755 debugging output. Don't check whether pid of thread equals to pid.
5756 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5757 iterate_over_lwps instead find_inferior.
5759 2015-08-24 Pedro Alves <palves@redhat.com>
5761 * inferiors.c (get_first_process): New function.
5762 * inferiors.h (get_first_process): New declaration.
5763 * remote-utils.c (read_ptid): Default to the first process in the
5764 list, instead of to the current thread's process.
5766 2015-08-24 Pedro Alves <palves@redhat.com>
5768 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5769 * event-loop.c: Likewise.
5770 * remote-utils.c: Likewise.
5771 * tracepoint.c: Likewise.
5773 2015-08-24 Pedro Alves <palves@redhat.com>
5775 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5778 2015-08-21 Pedro Alves <palves@redhat.com>
5780 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5781 instead of literal 1.
5783 2015-08-21 Pedro Alves <palves@redhat.com>
5785 * tdesc.c (default_description): Explicitly zero-initialize.
5787 2015-08-21 Pedro Alves <palves@redhat.com>
5790 * inferiors.c (remove_thread): Discard any pending stop reply for
5792 * server.c (remove_all_on_match_pid): Rename to ...
5793 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5795 (discard_queued_stop_replies): Change parameter to a ptid. Now
5797 (handle_v_kill, kill_inferior_callback, captured_main)
5798 (process_serial_event): Adjust.
5799 * server.h (discard_queued_stop_replies): Declare.
5801 2015-08-21 Pedro Alves <palves@redhat.com>
5803 * linux-low.c (wait_for_sigstop): Always switch to no thread
5804 selected if the previously current thread dies.
5805 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5806 process instead of the current thread's.
5807 * remote-utils.c (input_interrupt): Don't check if there's no
5809 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5810 current thread to the general thread fails, error out.
5811 (handle_qxfer_auxv, handle_qxfer_libraries)
5812 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5813 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5814 (handle_query): Check if there's a thread selected instead of
5815 checking whether there's any thread in the thread list.
5816 (handle_qxfer_threads, handle_qxfer_btrace)
5817 (handle_qxfer_btrace_conf): Don't error out early if there's no
5818 thread in the thread list.
5819 (handle_v_cont, myresume): Don't set the current thread to the
5821 (process_serial_event) <Hg handling>: Also set thread_id if the
5822 previous general thread is still alive.
5823 (process_serial_event) <g/G handling>: If setting the current
5824 thread to the general thread fails, error out.
5825 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5826 thread's lwp instead of the current thread's.
5827 * target.c (set_desired_thread): If the desired thread was not
5828 found, leave the current thread pointing to NULL. Return an int
5829 (boolean) indicating success.
5830 * target.h (set_desired_thread): Change return type to int.
5832 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5834 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5835 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5837 (ps_get_thread_area): New function.
5839 2015-08-19 Gary Benson <gbenson@redhat.com>
5841 * hostio.c (handle_pread): Do not attempt to read more data
5842 than hostio_reply_with_data can fit in a packet.
5844 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5846 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5848 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5850 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5852 2015-08-06 Pedro Alves <palves@redhat.com>
5854 * tracepoint.c (expr_eval_result): Now an int.
5856 2015-08-06 Pedro Alves <palves@redhat.com>
5858 * gdbthread.h (struct regcache): Forward declare.
5859 (struct thread_info) <regcache_data>: Now a struct regcache
5861 * inferiors.c (inferior_regcache_data)
5862 (set_inferior_regcache_data): Now work with struct regcache
5864 * inferiors.h (struct regcache): Forward declare.
5865 (inferior_regcache_data, set_inferior_regcache_data): Now work
5866 with struct regcache pointers.
5867 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5868 (free_register_cache_thread): Remove struct regcache pointer
5871 2015-08-06 Pedro Alves <palves@redhat.com>
5873 * server.c (captured_main): On error, print the exception message
5874 to stderr, and if run_once is set, throw a quit.
5876 2015-08-06 Pedro Alves <palves@redhat.com>
5878 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5881 2015-08-06 Pedro Alves <palves@redhat.com>
5883 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5884 reading beyond the passed in buffer length.
5886 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5888 * tracepoint.c (symbol_list) <required>: Remove.
5890 2015-08-06 Pedro Alves <palves@redhat.com>
5892 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5893 count if stopping and suspending threads.
5894 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5895 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5896 (linux_detach): Complete an ongoing step-over.
5897 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5899 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5900 (linux_wait_1): If passing a signal to the inferior after
5901 finishing a step-over, unsuspend and re-resume all lwps. If we
5902 see a single-step event but the thread should be continuing, don't
5903 pass the trap to gdb.
5904 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5905 internal_error instead of gdb_assert.
5906 (enqueue_pending_signal): New function.
5907 (check_ptrace_stopped_lwp_gone): Add debug output.
5908 (start_step_over): Use internal_error instead of gdb_assert.
5909 (complete_ongoing_step_over): New function.
5910 (linux_resume_one_thread): Don't resume a suspended thread.
5911 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5914 2015-08-06 Pedro Alves <palves@redhat.com>
5916 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5917 (linux_thread_alive): Use lwp_is_marked_dead.
5918 (extended_event_reported): Delete.
5919 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5920 instead of extended_event_reported.
5921 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5923 (lwp_is_marked_dead): New function.
5924 (lwp_running): Use lwp_is_marked_dead.
5925 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5928 2015-08-06 Pedro Alves <palves@redhat.com>
5930 * linux-low.c (linux_wait_1): Move fork event output out of the
5931 !report_to_gdb check. Pass event_child->waitstatus to
5932 target_waitstatus_to_string instead of ourstatus.
5934 2015-08-04 Yao Qi <yao.qi@linaro.org>
5936 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5937 if current_thread is 32 bit.
5939 2015-08-04 Yao Qi <yao.qi@linaro.org>
5941 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5942 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5943 * server.c (extended_protocol): Remove "static".
5944 * server.h (extended_protocol): Declare it.
5946 2015-08-04 Yao Qi <yao.qi@linaro.org>
5948 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5949 both aarch64 and aarch32.
5950 (aarch64_set_pc): Likewise.
5952 2015-08-04 Yao Qi <yao.qi@linaro.org>
5954 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5955 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5956 arm-with-neon.xml to srv_xmlfiles.
5957 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5958 (is_64bit_tdesc): New function.
5959 (aarch64_linux_read_description): New function.
5960 (aarch64_arch_setup): Call aarch64_linux_read_description.
5961 (regs_info): Rename to regs_info_aarch64.
5962 (aarch64_regs_info): Return right regs_info.
5963 (initialize_low_arch): Call initialize_low_arch_aarch32.
5965 2015-08-04 Yao Qi <yao.qi@linaro.org>
5967 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5968 * linux-aarch32-low.c: New file.
5969 * linux-aarch32-low.h: New file.
5970 * linux-arm-low.c (arm_fill_gregset): Move it to
5971 linux-aarch32-low.c.
5972 (arm_store_gregset): Likewise.
5973 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5974 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5975 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5976 (regs_info): Rename to regs_info_arm.
5977 (arm_regs_info): Return regs_info_aarch32 if
5978 have_ptrace_getregset is 1 and target description is
5979 arm_with_neon or arm_with_vfpv3.
5980 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5981 Call initialize_low_arch_aarch32 instead.
5983 2015-08-04 Yao Qi <yao.qi@linaro.org>
5985 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5986 * linux-low.c: ... here.
5987 * linux-low.h (have_ptrace_getregset): Declare it.
5989 2015-08-04 Pedro Alves <palves@redhat.com>
5991 * thread-db.c (struct thread_db): Use new typedefs.
5992 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5994 (disable_thread_event_reporting): Cast result of dlsym to
5995 destination function pointer type.
5996 (thread_db_mourn): Use td_ta_delete_ftype.
5998 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6000 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6002 (CDX_BREAKPOINT): Define for R2.
6003 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6004 (the_low_target): Add comments.
6006 2015-07-30 Yao Qi <yao.qi@linaro.org>
6008 * linux-arm-low.c (arm_hwcap): Remove it.
6009 (arm_read_description): New local variable arm_hwcap. Don't
6010 set arm_hwcap to zero.
6012 2015-07-30 Yao Qi <yao.qi@linaro.org>
6014 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6015 Use regcache->tdesc instead.
6016 (arm_store_wmmxregset): Likewise.
6017 (arm_fill_vfpregset): Likewise.
6018 (arm_store_vfpregset): Likewise.
6020 2015-07-30 Yao Qi <yao.qi@linaro.org>
6022 * linux-arm-low.c: Include arch/arm.h.
6023 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6024 (arm_store_gregset): Likewise.
6026 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6028 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6029 ptrace's 4th parameter.
6031 2015-07-27 Yao Qi <yao.qi@linaro.org>
6033 * configure.srv (case aarch64*-*-linux*): Don't set
6036 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6038 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6040 * linux-arm-low.c: Likewise.
6041 * linux-cris-low.c: Likewise.
6042 * linux-crisv32-low.c: Likewise.
6043 * linux-low.c: Likewise.
6044 * linux-m68k-low.c: Likewise.
6045 * linux-mips-low.c: Likewise.
6046 * linux-nios2-low.c: Likewise.
6047 * linux-s390-low.c: Likewise.
6048 * linux-sparc-low.c: Likewise.
6049 * linux-tic6x-low.c: Likewise.
6050 * linux-tile-low.c: Likewise.
6051 * linux-x86-low.c: Likewise.
6053 2015-07-24 Pedro Alves <palves@redhat.com>
6055 * config.in: Regenerate.
6056 * configure: Regenerate.
6058 2015-07-24 Pedro Alves <palves@redhat.com>
6060 * acinclude.m4: Include ../ptrace.m4.
6061 * configure.ac: Call GDB_AC_PTRACE.
6062 * config.in, configure: Regenerate.
6064 2015-07-24 Yao Qi <yao.qi@linaro.org>
6066 * linux-low.c (linux_create_inferior): Remove setting to
6067 proc->priv->new_inferior.
6068 (linux_attach): Likewise.
6069 (linux_low_filter_event): Likewise.
6070 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6072 2015-07-24 Yao Qi <yao.qi@linaro.org>
6074 * linux-low.c (linux_arch_setup): New function.
6075 (linux_low_filter_event): If proc->tdesc is NULL and
6076 proc->attached is true, call the_low_target.arch_setup.
6077 Otherwise, keep status pending, and return.
6078 (linux_resume_one_lwp_throw): Don't call get_pc if
6079 thread->while_stepping isn't NULL. Don't call
6080 get_thread_regcache if proc->tdesc is NULL.
6081 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6082 (linux_target_ops): Install arch_setup.
6083 * server.c (start_inferior): Call the_target->arch_setup.
6084 * target.h (struct target_ops) <arch_setup>: New field.
6085 (target_arch_setup): New marco.
6086 * lynx-low.c (lynx_target_ops): Update.
6087 * nto-low.c (nto_target_ops): Update.
6088 * spu-low.c (spu_target_ops): Update.
6089 * win32-low.c (win32_target_ops): Update.
6091 2015-07-24 Yao Qi <yao.qi@linaro.org>
6093 * linux-low.c (linux_add_process): Don't set
6094 proc->priv->new_inferior.
6095 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6096 (linux_attach): Likewise.
6098 2015-07-24 Yao Qi <yao.qi@linaro.org>
6100 * server.c (start_inferior): Code refactor.
6102 2015-07-24 Yao Qi <yao.qi@linaro.org>
6104 * server.c (process_serial_event): Set general_thread.
6106 2015-07-21 Yao Qi <yao.qi@linaro.org>
6108 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6109 aarch64_linux_get_debug_reg_capacity.
6111 2015-07-17 Yao Qi <yao.qi@linaro.org>
6113 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6114 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6115 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6116 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6117 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6118 (AARCH64_HWP_ALIGNMENT): Likewise.
6119 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6120 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6121 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6122 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6123 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6124 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6125 (struct aarch64_debug_reg_state): Likewise.
6126 (struct arch_lwp_info): Likewise.
6127 (aarch64_align_watchpoint): Likewise.
6128 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6129 (aarch64_watchpoint_length): Likewise.
6130 (aarch64_point_encode_ctrl_reg): Likewise
6131 (aarch64_point_is_aligned): Likewise.
6132 (aarch64_align_watchpoint): Likewise.
6133 (aarch64_linux_set_debug_regs):
6134 (aarch64_dr_state_insert_one_point): Likewise.
6135 (aarch64_dr_state_remove_one_point): Likewise.
6136 (aarch64_handle_breakpoint): Likewise.
6137 (aarch64_handle_aligned_watchpoint): Likewise.
6138 (aarch64_handle_unaligned_watchpoint): Likewise.
6139 (aarch64_handle_watchpoint): Likewise.
6141 2015-07-17 Yao Qi <yao.qi@linaro.org>
6143 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6144 and don't aarch64_get_debug_reg_state. All callers update.
6145 (aarch64_handle_aligned_watchpoint): Likewise.
6146 (aarch64_handle_unaligned_watchpoint): Likewise.
6147 (aarch64_handle_watchpoint): Likewise.
6148 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6149 (aarch64_remove_point): Likewise.
6151 2015-07-17 Yao Qi <yao.qi@linaro.org>
6153 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6155 (aarch64_handle_unaligned_watchpoint): Likewise.
6157 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6159 Revert the previous 3 commits:
6160 Move gdb_regex* to common/
6161 Move linux_find_memory_regions_full & co.
6162 gdbserver build-id attribute generator
6164 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6165 Jan Kratochvil <jan.kratochvil@redhat.com>
6167 gdbserver build-id attribute generator.
6168 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6169 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6170 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6172 (get_dynamic): Use find_pdhr to traverse program headers.
6173 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6174 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6175 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6176 (get_hex_build_id): New.
6177 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6178 to reply XML document.
6180 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6181 Jan Kratochvil <jan.kratochvil@redhat.com>
6183 * target.c: Include target/target-utils.h and fcntl.h.
6184 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6185 (target_fileio_read_stralloc): New functions.
6187 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6189 * Makefile.in (OBS): Add gdb_regex.o.
6191 * config.in: Rebuilt.
6192 * configure: Rebuilt.
6194 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6195 Jan Kratochvil <jan.kratochvil@redhat.com>
6197 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6198 * Makefile.in (OBS): Add target-utils.o.
6199 (linux-maps.o, target-utils.o): New.
6200 * configure.srv (srv_linux_obj): Add linux-maps.o.
6202 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6204 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6206 (the_low_target): Install it.
6208 2015-07-14 Pedro Alves <palves@redhat.com>
6210 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6211 Instead, ignore ECHILD, and throw an error for other errnos.
6213 2015-07-10 Pedro Alves <palves@redhat.com>
6215 * event-loop.c (struct callback_event) <data>: Change type to
6216 gdb_client_data instance instead of gdb_client_data pointer.
6217 (append_callback_event): Adjust.
6219 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6221 * linux-aarch64-low.c: Add comments for each linux_target_ops
6222 method. Remove comments already covered in target_ops and
6223 linux_target_ops definitions.
6224 (the_low_target): Add comments for each unimplemented method.
6226 2015-07-09 Yao Qi <yao.qi@linaro.org>
6228 * linux-aarch64-low.c (aarch64_regmap): Remove.
6229 (aarch64_usrregs_info): Remove.
6230 (regs_info): Set field usrregs to NULL.
6232 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6234 * linux-low.c: Include "rsp-low.h"
6235 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6236 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6237 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6238 (handle_btrace_enable_pt): New.
6239 (handle_btrace_general_set): Support "pt".
6240 (handle_btrace_conf_general_set): Support "pt:size".
6242 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6244 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6247 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6249 * linux-aarch64-low.c: Remove comment about endianness.
6250 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6251 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6254 2015-06-24 Gary Benson <gbenson@redhat.com>
6256 * linux-i386-ipa.c (stdint.h): Do not include.
6257 * lynx-i386-low.c (stdint.h): Likewise.
6258 * lynx-ppc-low.c (stdint.h): Likewise.
6259 * mem-break.c (stdint.h): Likewise.
6260 * thread-db.c (stdint.h): Likewise.
6261 * tracepoint.c (stdint.h): Likewise.
6262 * win32-low.c (stdint.h): Likewise.
6264 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6266 * server.c (write_qxfer_response): Update call to
6267 remote_escape_output.
6269 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6270 Jan Kratochvil <jan.kratochvil@redhat.com>
6272 Merge multiple hex conversions.
6273 * gdbreplay.c (tohex): Rename to 'fromhex'.
6274 (logchar): Use fromhex.
6276 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6278 * server.c (handle_qxfer_libraries): Set `version' attribute for
6281 2015-06-10 Gary Benson <gbenson@redhat.com>
6283 * target.h (struct target_ops) <multifs_open>: New field.
6284 <multifs_unlink>: Likewise.
6285 <multifs_readlink>: Likewise.
6286 * linux-low.c (nat/linux-namespaces.h): New include.
6287 (linux_target_ops): Initialize the_target->multifs_open,
6288 the_target->multifs_unlink and the_target->multifs_readlink.
6289 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6290 * hostio.c (hostio_fs_pid): New static variable.
6291 (hostio_handle_new_gdb_connection): New function.
6292 (handle_setfs): Likewise.
6293 (handle_open): Use the_target->multifs_open as appropriate.
6294 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6295 (handle_readlink): Use the_target->multifs_readlink as
6297 (handle_vFile): Handle vFile:setfs packets.
6298 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6299 after target_handle_new_gdb_connection.
6301 2015-06-10 Gary Benson <gbenson@redhat.com>
6303 * configure.ac (AC_CHECK_FUNCS): Add setns.
6304 * config.in: Regenerate.
6305 * configure: Likewise.
6306 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6307 (linux-namespaces.o): New rule.
6308 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6310 2015-06-09 Gary Benson <gbenson@redhat.com>
6312 * hostio.c (handle_open): Process mode argument with
6313 fileio_to_host_mode.
6315 2015-06-01 Yao Qi <yao.qi@linaro.org>
6317 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6318 * linux-x86-low.c: Likewise.
6320 2015-05-28 Don Breazeal <donb@codesourcery.com>
6322 * linux-low.c (handle_extended_wait): Initialize
6323 thread_info.last_resume_kind for new fork children.
6325 2015-05-15 Pedro Alves <palves@redhat.com>
6327 * target.h (target_handle_new_gdb_connection): Rewrite using if
6328 wrapped in do/while.
6330 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6332 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6333 * configure, config.in: Regenerate.
6334 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6337 2015-05-12 Don Breazeal <donb@codesourcery.com>
6339 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6340 PTRACE_EVENT_VFORK_DONE.
6341 (linux_low_ptrace_options, extended_event_reported): Add vfork
6343 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6344 and "vforkdone" for RSP 'T' Stop Reply Packet.
6345 * server.h (report_vfork_events): Declare
6348 2015-05-12 Don Breazeal <donb@codesourcery.com>
6350 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6351 (the_low_target) <new_fork>: Initialize new member.
6352 * linux-arm-low.c (arm_new_fork): New function.
6353 (the_low_target) <new_fork>: Initialize new member.
6354 * linux-low.c (handle_extended_wait): Call new target function
6356 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6357 * linux-mips-low.c (mips_add_watchpoint): New function
6358 extracted from mips_insert_point.
6359 (the_low_target) <new_fork>: Initialize new member.
6360 (mips_linux_new_fork): New function.
6361 (mips_insert_point): Call mips_add_watchpoint.
6362 * linux-x86-low.c (x86_linux_new_fork): New function.
6363 (the_low_target) <new_fork>: Initialize new member.
6365 2015-05-12 Don Breazeal <donb@codesourcery.com>
6367 * linux-low.c (handle_extended_wait): Implement return value,
6368 rename argument 'event_child' to 'event_lwp', handle
6369 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6370 (linux_low_ptrace_options): New function.
6371 (linux_low_filter_event): Call linux_low_ptrace_options,
6372 use different argument fo linux_enable_event_reporting,
6373 use return value from handle_extended_wait.
6374 (extended_event_reported): New function.
6375 (linux_wait_1): Call extended_event_reported and set
6376 status to report fork events.
6377 (linux_write_memory): Add pid to debug message.
6378 (reset_lwp_ptrace_options_callback): New function.
6379 (linux_handle_new_gdb_connection): New function.
6380 (linux_target_ops): Initialize new structure member.
6381 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6382 * lynx-low.c: Initialize new structure member.
6383 * remote-utils.c (prepare_resume_reply): Implement stop reason
6384 "fork" for "T" stop message.
6385 * server.c (handle_query): Call handle_new_gdb_connection.
6386 * server.h (report_fork_events): Declare global flag.
6387 * target.h (struct target_ops) <handle_new_gdb_connection>:
6389 (target_handle_new_gdb_connection): New macro.
6390 * win32-low.c: Initialize new structure member.
6392 2015-05-12 Don Breazeal <donb@codesourcery.com>
6394 * mem-break.c (APPEND_TO_LIST): Define macro.
6395 (clone_agent_expr): New function.
6396 (clone_one_breakpoint): New function.
6397 (clone_all_breakpoints): New function.
6398 * mem-break.h: Declare new functions.
6400 2015-05-12 Don Breazeal <donb@codesourcery.com>
6402 * linux-low.c (linux_supports_fork_events): New function.
6403 (linux_supports_vfork_events): New function.
6404 (linux_target_ops): Initialize new structure members.
6405 (initialize_low): Call linux_check_ptrace_features.
6406 * lynx-low.c (lynx_target_ops): Initialize new structure
6408 * server.c (report_fork_events, report_vfork_events):
6410 (handle_query): Add new features to qSupported packet and
6412 (captured_main): Initialize new global variables.
6413 * target.h (struct target_ops) <supports_fork_events>:
6415 <supports_vfork_events>: New member.
6416 (target_supports_fork_events): New macro.
6417 (target_supports_vfork_events): New macro.
6418 * win32-low.c (win32_target_ops): Initialize new structure
6421 2015-05-12 Gary Benson <gbenson@redhat.com>
6423 * server.c (handle_qxfer_exec_file): Use current process
6426 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6428 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6429 Remove HAVE_PTRACE_GETREGS conditionals.
6430 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6431 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6433 2015-05-08 Yao Qi <yao.qi@linaro.org>
6435 * linux-low.c (linux_supports_conditional_breakpoints): New
6437 (linux_target_ops): Install new target method.
6438 * lynx-low.c (lynx_target_ops): Install NULL hook for
6439 supports_conditional_breakpoints.
6440 * nto-low.c (nto_target_ops): Likewise.
6441 * spu-low.c (spu_target_ops): Likewise.
6442 * win32-low.c (win32_target_ops): Likewise.
6443 * server.c (handle_query): Check
6444 target_supports_conditional_breakpoints.
6445 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6447 (target_supports_conditional_breakpoints): New macro.
6449 2015-05-06 Pedro Alves <palves@redhat.com>
6452 * server.c (start_inferior): If the process exits, mourn it.
6454 2015-04-21 Gary Benson <gbenson@redhat.com>
6456 * hostio.c (fileio_open_flags_to_host): Factored out to
6457 fileio_to_host_openflags in common/fileio.c. Single use
6460 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6462 * linux-xtensa-low.c (xtensa_fill_gregset)
6463 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6466 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6468 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6469 (regs_info): Replace usrregs pointer with NULL.
6471 2015-04-17 Gary Benson <gbenson@redhat.com>
6473 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6474 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6475 * server.c (handle_qxfer_exec_file): New function.
6476 (qxfer_packets): Add exec-file entry.
6477 (handle_query): Report qXfer:exec-file:read as supported packet.
6479 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6481 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6483 2015-04-09 Gary Benson <gbenson@redhat.com>
6485 * hostio-errno.c (errno_to_fileio_error): Remove function.
6486 Update caller to use remote_fileio_to_fio_error.
6488 2015-04-09 Yao Qi <yao.qi@linaro.org>
6490 * linux-low.c (linux_insert_point): Call
6491 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6492 (linux_remove_point): Call remove_memory_breakpoint if type is
6494 * linux-x86-low.c (x86_insert_point): Don't call
6495 insert_memory_breakpoint.
6496 (x86_remove_point): Don't call remove_memory_breakpoint.
6498 2015-04-01 Pedro Alves <palves@redhat.com>
6499 Cleber Rosa <crosa@redhat.com>
6501 * server.c (gdbserver_usage): Reorganize and extend the usage
6504 2015-03-24 Pedro Alves <palves@redhat.com>
6506 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6507 output. Also dump TRAP_TRACE.
6508 (linux_low_filter_event): In debug output, distinguish a
6509 resume_stop SIGSTOP from a delayed SIGSTOP.
6511 2015-03-24 Gary Benson <gbenson@redhat.com>
6513 * linux-x86-low.c (x86_linux_new_thread): Moved to
6515 (x86_linux_prepare_to_resume): Likewise.
6517 2015-03-24 Gary Benson <gbenson@redhat.com>
6519 * Makefile.in (x86-linux-dregs.o): New rule.
6520 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6521 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6522 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6523 (x86_linux_dr_get): Likewise.
6524 (x86_linux_dr_set): Likewise.
6525 (update_debug_registers_callback): Likewise.
6526 (x86_linux_dr_set_addr): Likewise.
6527 (x86_linux_dr_get_addr): Likewise.
6528 (x86_linux_dr_set_control): Likewise.
6529 (x86_linux_dr_get_control): Likewise.
6530 (x86_linux_dr_get_status): Likewise.
6531 (x86_linux_update_debug_registers): Likewise.
6533 2015-03-24 Gary Benson <gbenson@redhat.com>
6535 * linux-x86-low.c (x86_linux_update_debug_registers):
6536 New function, factored out from...
6537 (x86_linux_prepare_to_resume): ...this.
6539 2015-03-24 Gary Benson <gbenson@redhat.com>
6541 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6542 (x86_linux_dr_set): Likewise.
6543 (update_debug_registers_callback): Likewise.
6544 (x86_linux_dr_set_addr): Likewise.
6545 (x86_linux_dr_get_addr): Likewise.
6546 (x86_linux_dr_set_control): Likewise.
6547 (x86_linux_dr_get_control): Likewise.
6548 (x86_linux_dr_get_status): Likewise.
6549 (x86_linux_prepare_to_resume): Likewise.
6551 2015-03-24 Gary Benson <gbenson@redhat.com>
6553 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6554 Use perror_with_name. Pass string through gettext.
6555 (x86_linux_dr_set): Likewise.
6557 2015-03-24 Gary Benson <gbenson@redhat.com>
6559 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6560 (x86_linux_dr_set_addr): ...this.
6561 (x86_dr_low_get_addr): Rename to...
6562 (x86_linux_dr_get_addr): ...this.
6563 (x86_dr_low_set_control): Rename to...
6564 (x86_linux_dr_set_control): ...this.
6565 (x86_dr_low_get_control): Rename to...
6566 (x86_linux_dr_get_control): ...this.
6567 (x86_dr_low_get_status): Rename to...
6568 (x86_linux_dr_get_status): ...this.
6569 (x86_dr_low): Update with new function names.
6571 2015-03-24 Gary Benson <gbenson@redhat.com>
6573 * Makefile.in (x86-linux.o): New rule.
6574 * configure.srv: Add x86-linux.o to relevant targets.
6575 * linux-low.c (lwp_set_arch_private_info): New function.
6576 (lwp_arch_private_info): Likewise.
6577 * linux-x86-low.c: Include nat/x86-linux.h.
6578 (arch_lwp_info): Removed structure.
6579 (update_debug_registers_callback):
6580 Use lwp_set_debug_registers_changed.
6581 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6582 and lwp_set_debug_registers_changed.
6583 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6585 2015-03-24 Gary Benson <gbenson@redhat.com>
6587 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6588 * linux-arm-low.c (arm_new_thread): Likewise.
6589 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6590 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6591 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6592 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6594 2015-03-24 Gary Benson <gbenson@redhat.com>
6596 * linux-low.c (ptid_of_lwp): New function.
6597 (lwp_is_stopped): Likewise.
6598 (lwp_stop_reason): Likewise.
6599 * linux-x86-low.c (update_debug_registers_callback):
6601 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6604 2015-03-24 Gary Benson <gbenson@redhat.com>
6606 * linux-low.h (linux_stop_lwp): Remove declaration.
6608 2015-03-24 Gary Benson <gbenson@redhat.com>
6610 * linux-low.h: Include nat/linux-nat.h.
6611 * linux-low.c (iterate_over_lwps_args): New structure.
6612 (iterate_over_lwps_filter): New function.
6613 (iterate_over_lwps): Likewise.
6614 * linux-x86-low.c (update_debug_registers_callback):
6615 Update signature to what iterate_over_lwps expects.
6616 Remove PID check that iterate_over_lwps now performs.
6617 (x86_dr_low_set_addr): Use iterate_over_lwps.
6618 (x86_dr_low_set_control): Likewise.
6620 2015-03-24 Gary Benson <gbenson@redhat.com>
6622 * linux-x86-low.c (x86_debug_reg_state): New function.
6623 (x86_linux_prepare_to_resume): Use the above.
6625 2015-03-24 Gary Benson <gbenson@redhat.com>
6627 * linux-low.c (current_lwp_ptid): New function.
6628 * linux-x86-low.c: Include nat/linux-nat.h.
6629 (x86_dr_low_get_addr): Use current_lwp_ptid.
6630 (x86_dr_low_get_control): Likewise.
6631 (x86_dr_low_get_status): Likewise.
6633 2015-03-20 Pedro Alves <palves@redhat.com>
6635 * tracepoint.c (cmd_qtstatus): Make "str" const.
6637 2015-03-20 Pedro Alves <palves@redhat.com>
6639 * server.c (handle_general_set): Make "req_str" const.
6641 2015-03-19 Pedro Alves <palves@redhat.com>
6643 * linux-low.c (linux_resume_one_lwp): Rename to ...
6644 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6645 instead call perror_with_name.
6646 (check_ptrace_stopped_lwp_gone): New function.
6647 (linux_resume_one_lwp): Reimplement as wrapper around
6648 linux_resume_one_lwp_throw that swallows errors if the LWP is
6651 2015-03-19 Pedro Alves <palves@redhat.com>
6653 * linux-low.c (count_events_callback, select_event_lwp_callback):
6654 No longer check whether the thread has resume_stop as last resume
6657 2015-03-19 Pedro Alves <palves@redhat.com>
6659 * linux-low.c (count_events_callback, select_event_lwp_callback):
6660 Use the lwp's status_pending_p field, not the thread's.
6662 2015-03-19 Pedro Alves <palves@redhat.com>
6664 * linux-low.c (select_event_lwp_callback): Update comments to
6665 no longer mention SIGTRAP.
6667 2015-03-18 Gary Benson <gbenson@redhat.com>
6669 * server.c (handle_query): Do not report vFile:fstat as supported.
6671 2015-03-11 Gary Benson <gbenson@redhat.com>
6673 * hostio.c (sys/types.h): New include.
6674 (sys/stat.h): Likewise.
6675 (common-remote-fileio.h): Likewise.
6676 (handle_fstat): New function.
6677 (handle_vFile): Handle vFile:fstat packets.
6679 2015-03-11 Gary Benson <gbenson@redhat.com>
6681 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6682 struct stat.st_blocks and struct stat.st_blksize.
6683 * configure: Regenerate.
6684 * config.in: Likewise.
6685 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6686 (OBS): Add common-remote-fileio.o.
6687 (common-remote-fileio.o): New rule.
6689 2015-03-09 Pedro Alves <palves@redhat.com>
6691 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6692 'struct sockaddr' pointer in 'accept' call.
6694 2015-03-09 Pedro Alves <palves@redhat.com>
6697 2015-03-07 Pedro Alves <palves@redhat.com>
6698 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6699 or <winsock2.h> here. Instead include "gdb_socket.h".
6700 (remote_open): Use union gdb_sockaddr_u.
6701 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6702 or <winsock2.h> here. Instead include "gdb_socket.h".
6703 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6704 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6706 (init_named_socket, gdb_agent_helper_thread): Use union
6709 2015-03-07 Pedro Alves <palves@redhat.com>
6711 * configure.ac (build_warnings): Move
6712 -Wdeclaration-after-statement to the C-specific set.
6713 * configure: Regenerate.
6715 2015-03-07 Pedro Alves <palves@redhat.com>
6717 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6718 or <winsock2.h> here. Instead include "gdb_socket.h".
6719 (remote_open): Use union gdb_sockaddr_u.
6720 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6721 or <winsock2.h> here. Instead include "gdb_socket.h".
6722 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6723 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6725 (init_named_socket, gdb_agent_helper_thread): Use union
6728 2015-03-07 Pedro Alves <palves@redhat.com>
6730 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6733 2015-03-06 Yao Qi <yao.qi@linaro.org>
6735 * linux-aarch64-low.c (aarch64_insert_point): Use
6736 show_debug_regs as a boolean.
6737 (aarch64_remove_point): Likewise.
6739 2015-03-05 Pedro Alves <palves@redhat.com>
6741 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6742 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6743 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6744 * nto-low.c (nto_target_ops): Likewise.
6745 * spu-low.c (spu_target_ops): Likewise.
6746 * win32-low.c (win32_target_ops): Likewise.
6748 2015-03-04 Pedro Alves <palves@redhat.com>
6750 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6751 Decide whether a breakpoint triggered based on the SIGTRAP's
6753 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6754 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6755 (linux_low_filter_event): Check for breakpoints before checking
6757 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6759 (linux_stopped_by_sw_breakpoint)
6760 (linux_supports_stopped_by_sw_breakpoint)
6761 (linux_stopped_by_hw_breakpoint)
6762 (linux_supports_stopped_by_hw_breakpoint): New functions.
6763 (linux_target_ops): Install new target methods.
6765 2015-03-04 Pedro Alves <palves@redhat.com>
6767 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6768 * server.c (swbreak_feature, hwbreak_feature): New globals.
6769 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6770 (captured_main): Clear swbreak_feature and hwbreak_feature.
6771 * server.h (swbreak_feature, hwbreak_feature): Declare.
6772 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6773 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6774 supports_stopped_by_hw_breakpoint>: New fields.
6775 (target_supports_stopped_by_sw_breakpoint)
6776 (target_stopped_by_sw_breakpoint)
6777 (target_supports_stopped_by_hw_breakpoint)
6778 (target_stopped_by_hw_breakpoint): Declare.
6780 2015-03-04 Pedro Alves <palves@redhat.com>
6782 enum lwp_stop_reason -> enum target_stop_reason
6783 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6784 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6785 (linux_wait_1, stuck_in_jump_pad_callback)
6786 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6787 (linux_stopped_by_watchpoint):
6788 * linux-low.h (enum lwp_stop_reason): Delete.
6789 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6790 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6792 2015-03-04 Yao Qi <yao.qi@linaro.org>
6794 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6796 2015-03-03 Gary Benson <gbenson@redhat.com>
6798 * hostio.c (handle_vFile): Fix prefix lengths.
6800 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6802 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6805 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6807 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6808 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6809 (clean): Add "rm -f" for above C files.
6810 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6811 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6812 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6813 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6814 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6815 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6816 (init_registers_s390x_vx_linux64)
6817 (init_registers_s390x_tevx_linux64)
6818 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6819 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6821 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6822 (s390_store_vxrs_high): New functions.
6823 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6825 (s390_arch_setup): Add logic for selecting one of the new target
6826 descriptions. Activate the new vector regsets if applicable.
6827 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6828 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6829 and init_registers_s390x_tevx_linux64.
6831 2015-03-01 Pedro Alves <palves@redhat.com>
6833 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6836 2015-02-27 Pedro Alves <palves@redhat.com>
6838 * linux-x86-low.c (u_debugreg_offset): New function.
6839 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6841 2015-02-27 Pedro Alves <palves@redhat.com>
6843 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6844 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6845 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6846 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6847 (ps_lsetfpregs, ps_getpid)
6848 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6849 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6850 (ps_lsetxregs, ps_plog): Declare.
6852 2015-02-27 Pedro Alves <palves@redhat.com>
6854 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6855 IP_AGENT_EXPORT_FUNC.
6856 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6857 IP_AGENT_EXPORT_FUNC.
6858 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6859 (IP_AGENT_EXPORT): Delete.
6860 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6861 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6862 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6863 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6864 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6865 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6866 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6867 (traceframe_read_count, traceframe_write_count)
6868 (traceframes_created, trace_state_variables, get_raw_reg)
6869 (get_trace_state_variable_value, set_trace_state_variable_value)
6870 (ust_loaded, helper_thread_id, cmd_buf): Use
6871 IPA_SYM_EXPORTED_NAME.
6872 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6873 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6874 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6875 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6876 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6877 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6878 EXTERN_C_PUSH/EXTERN_C_POP.
6879 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6880 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6881 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6882 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6883 (traceframe_write_count, traceframe_read_count)
6884 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6885 (about_to_request_buffer_space, get_trace_state_variable_value)
6886 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6887 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6888 EXTERN_C_PUSH/EXTERN_C_POP.
6889 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6890 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6891 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6892 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6893 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6894 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6895 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6896 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6898 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6899 (IP_AGENT_EXPORT_VAR_DECL): Define.
6901 (gdb_agent_get_raw_reg): Declare.
6903 2015-02-27 Tom Tromey <tromey@redhat.com>
6904 Pedro Alves <palves@redhat.com>
6906 Rename symbols whose names are reserved C++ keywords throughout.
6908 2015-02-27 Pedro Alves <palves@redhat.com>
6910 * Makefile.in (COMPILER): New, get it from autoconf.
6911 (CXX): Get from autoconf instead.
6912 (COMPILE.pre): Use COMPILER.
6913 (CC-LD): Rename to ...
6914 (CC_LD): ... this. Use COMPILER.
6915 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6916 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6917 * acinclude.m4: Include build-with-cxx.m4.
6918 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6919 Disable -Werror by default if building in C++ mode.
6920 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6921 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6922 the C++ compiler. Save/restore CXXFLAGS too.
6923 * configure: Regenerate.
6925 2015-02-27 Pedro Alves <palves@redhat.com>
6927 * acinclude.m4: Include libiberty.m4.
6928 * configure.ac: Call libiberty_INIT.
6929 * config.in, configure: Regenerate.
6931 2015-02-26 Pedro Alves <palves@redhat.com>
6933 * linux-low.c (linux_wait_1): When incrementing the PC past a
6934 program breakpoint always use the_low_target.breakpoint_len as
6935 increment, rather than the maximum between that and
6936 the_low_target.decr_pc_after_break.
6938 2015-02-23 Pedro Alves <palves@redhat.com>
6940 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6941 thread was doing a step-over; always adjust the PC if
6942 we stepped over a permanent breakpoint.
6943 (linux_wait_1): If we stepped over breakpoint that was on top of a
6944 permanent breakpoint, manually advance the PC past it.
6946 2015-02-23 Pedro Alves <palves@redhat.com>
6948 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6950 (x86_fill_gregset, x86_store_gregset): Use it when handling
6953 2015-02-20 Pedro Alves <palves@redhat.com>
6955 * thread-db.c: Include "nat/linux-procfs.h".
6956 (thread_db_init): Skip listing new threads if the kernel supports
6957 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6959 2015-02-20 Pedro Alves <palves@redhat.com>
6961 * linux-low.c (status_pending_p_callback): Use ptid_match.
6963 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6965 PR breakpoints/16812
6966 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6967 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6968 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6970 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6972 PR breakpoints/15956
6973 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6975 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6977 * linux-low.c (linux_low_btrace_conf): Print size.
6978 * server.c (handle_btrace_conf_general_set): New.
6979 (hanle_general_set): Call handle_btrace_conf_general_set.
6980 (handle_query): Report Qbtrace-conf:bts:size as supported.
6982 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6984 * linux-low.c (linux_low_enable_btrace): Update parameters.
6985 (linux_low_btrace_conf): New.
6986 (linux_target_ops)<to_btrace_conf>: Initialize.
6987 * server.c (current_btrace_conf): New.
6988 (handle_btrace_enable): Rename to ...
6989 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6990 to target_enable_btrace. Update comment. Update users.
6991 (handle_qxfer_btrace_conf): New.
6992 (qxfer_packets): Add btrace-conf entry.
6993 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6994 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6995 (target_ops)<read_btrace_conf>: New.
6996 (target_enable_btrace): Update parameters.
6997 (target_read_btrace_conf): New.
6999 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7001 * server.c (handle_btrace_general_set): Remove call to
7002 target_supports_btrace.
7003 (supported_btrace_packets): New.
7004 (handle_query): Call supported_btrace_packets.
7005 * target.h: include btrace-common.h.
7006 (btrace_target_info): Removed.
7007 (supports_btrace, target_supports_btrace): Update parameters.
7009 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7011 * Makefile.in (SFILES): Add common/btrace-common.c.
7012 (OBS): Add common/btrace-common.o.
7013 (btrace-common.o): Add build rules.
7014 * linux-low: Include btrace-common.h.
7015 (linux_low_read_btrace): Use struct btrace_data. Call
7016 btrace_data_init and btrace_data_fini.
7018 2015-02-06 Pedro Alves <palves@redhat.com>
7020 * thread-db.c (find_new_threads_callback): Add debug output.
7022 2015-02-04 Pedro Alves <palves@redhat.com>
7024 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7025 (resume_stopped_resumed_lwps): New function.
7026 (linux_wait_for_event_filtered): Use it.
7028 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7030 * Makefile.in (SFILES): Add linux-personality.c.
7031 (linux-personality.o): New rule.
7032 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7033 list of objects to be built.
7034 * linux-low.c: Include nat/linux-personality.h.
7035 (linux_create_inferior): Remove code to disable address space
7036 randomization (moved to ../nat/linux-personality.c). Create
7037 cleanup to disable address space randomization.
7039 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7041 * Makefile.in (posix-strerror.o): New rule.
7042 (mingw-strerror.o): Likewise.
7043 * configure: Regenerated.
7044 * configure.ac: Source file ../common/common.host. Initialize new
7045 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7047 2015-01-14 Yao Qi <yao@codesourcery.com>
7049 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7050 (ppc-linux.o): New rule.
7051 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7052 * configure.ac: AC_CHECK_FUNCS(getauxval).
7053 * config.in: Re-generated.
7054 * configure: Re-generated.
7055 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7056 ppc64_64bit_inferior_p
7058 2015-01-14 Yao Qi <yao@codesourcery.com>
7060 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7061 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7062 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7063 (PT_ORIG_R3, PT_TRAP): Likewise.
7064 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7065 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7066 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7068 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7070 * i387-fp.c (i387_cache_to_xsave): In look over
7071 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7072 zmmh_low_space field by use of zmmh_high_space.
7074 2015-01-09 Pedro Alves <palves@redhat.com>
7076 * linux-low.c (step_over_bkpt): Move higher up in the file.
7077 (handle_extended_wait): Don't store the stop_pc here.
7078 (get_stop_pc): Adjust comments and rename to ...
7079 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7080 stopped for a software breakpoint or hardware breakpoint.
7081 (thread_still_has_status_pending_p): New function.
7082 (status_pending_p_callback): Use
7083 thread_still_has_status_pending_p. If the event is no longer
7084 interesting, resume the LWP.
7085 (handle_tracepoints): Add assert.
7086 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7087 (wstatus_maybe_breakpoint): New function.
7088 (cancel_breakpoint): Delete function.
7089 (check_stopped_by_watchpoint): New function, factored out from
7090 linux_low_filter_event.
7091 (lp_status_maybe_breakpoint): Delete function.
7092 (linux_low_filter_event): Remove filter_ptid argument.
7093 Leave thread group exits pending here. Store the LWP's stop PC.
7094 Always leave events pending.
7095 (linux_wait_for_event_filtered): Pull all events out of the
7096 kernel, and leave them all pending.
7097 (count_events_callback, select_event_lwp_callback): Consider all
7099 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7100 (select_event_lwp): Only give preference to the stepping LWP in
7101 all-stop mode. Adjust comments.
7102 (ignore_event): New function.
7103 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7104 references to cancel_breakpoints. Adjust to renames. Also give
7105 equal priority to all LWPs that have had events in non-stop mode.
7106 If reporting a software breakpoint event, unadjust the LWP's PC.
7107 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7108 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7110 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7111 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7112 (linux_stopped_by_watchpoint): Adjust.
7113 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7114 * linux-low.h (enum lwp_stop_reason): New.
7115 (struct lwp_info) <stop_pc>: Adjust comment.
7116 <stopped_by_watchpoint>: Delete field.
7117 <stop_reason>: New field.
7118 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7119 * mem-break.c (software_breakpoint_inserted_here)
7120 (hardware_breakpoint_inserted_here): New function.
7121 * mem-break.h (software_breakpoint_inserted_here)
7122 (hardware_breakpoint_inserted_here): Declare.
7123 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7124 (cancel_breakpoints): Delete.
7125 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7126 (upload_fast_traceframes): Remove references to
7129 2015-01-09 Pedro Alves <palves@redhat.com>
7131 * thread-db.c (find_new_threads_callback): Ignore thread if the
7132 kernel thread ID is -1.
7134 2015-01-09 Pedro Alves <palves@redhat.com>
7136 * linux-low.c (linux_attach_fail_reason_string): Move to
7137 nat/linux-ptrace.c, and rename.
7138 (linux_attach_lwp): Update comment.
7139 (attach_proc_task_lwp_callback): New function.
7140 (linux_attach): Adjust to rename and use
7141 linux_proc_attach_tgid_threads.
7142 (linux_attach_fail_reason_string): Delete declaration.
7144 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7146 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7147 * server.c (gdbserver_version): Likewise.
7149 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7151 * remote-utils.c: Include ctype.h.
7152 (input_interrupt): Explicitly handle the case when the char
7153 received is the NUL byte. Improve the printing of non-ASCII
7156 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7158 * linux-low.c (linux_low_filter_event): Update call to
7159 linux_enable_event_reporting following the addition of
7160 a new parameter to that function.
7162 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7165 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7166 (AARCH64_FPCR_REGNO): Likewise.
7167 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7168 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7169 (aarch64_store_fpregset): Likewise.
7171 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7173 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7174 Remove FIXME comment about assumption about N.
7176 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7178 * configure.ac: If large-file support is disabled in GDBserver,
7179 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7180 * configure: Regenerate.
7182 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7184 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7185 warning upon ENODATA from ptrace.
7186 * linux-s390-low.c (s390_store_tdb): New.
7187 (s390_regsets): Add regset for NT_S390_TDB.
7189 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7191 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7192 without a fill_function.
7193 * linux-s390-low.c (s390_fill_last_break): Remove.
7194 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7195 (s390_arch_setup): Use regset's size instead of fill_function for
7198 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7200 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7201 the regset's store function when ptrace returned an error.
7202 * regcache.c (get_thread_regcache): Invalidate register cache
7203 before fetching inferior's registers.
7205 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7207 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7208 while-loop as for-loop.
7209 (regsets_store_inferior_registers): Likewise.
7211 2014-11-28 Yao Qi <yao@codesourcery.com>
7213 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7214 * config.in, configure: Re-generate.
7215 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7218 2014-11-21 Yao Qi <yao@codesourcery.com>
7220 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7221 (AC_CHECK_HEADERS): Remove malloc.h.
7222 * configure: Re-generated.
7223 * config.in: Re-generated.
7224 * server.h: Don't include alloca.h and malloc.h.
7225 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7226 Don't include malloc.h.
7228 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7230 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7231 corresponding ERRNO check in same block.
7233 2014-11-12 Pedro Alves <palves@redhat.com>
7235 * server.c (cont_thread): Update comment.
7236 (start_inferior, attach_inferior): No longer clear cont_thread.
7237 (handle_v_cont): No longer set cont_thread.
7238 (captured_main): Clear cont_thread each time a GDB connects.
7240 2014-11-12 Pedro Alves <palves@redhat.com>
7242 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7243 thread, and don't resume all threads if the Hc thread has exited.
7245 2014-11-12 Pedro Alves <palves@redhat.com>
7247 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7248 the process group instead of to a specific LWP.
7250 2014-10-15 Pedro Alves <palves@redhat.com>
7253 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7255 (arm_set_thread_context): Delete.
7256 (the_low_target): Adjust.
7257 * win32-i386-low.c (debug_registers_changed)
7258 (debug_registers_used): Delete.
7259 (update_debug_registers_callback): New function.
7260 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7261 needing to update their debug registers.
7262 (win32_get_current_dr): New function.
7263 (x86_dr_low_get_addr, x86_dr_low_get_control)
7264 (x86_dr_low_get_status): Fetch the debug register from the thread
7266 (i386_initial_stuff): Adjust.
7267 (i386_get_thread_context): Remove current_event parameter. Don't
7268 clear debug_registers_changed nor copy DR values to
7270 (i386_set_thread_context): Delete.
7271 (i386_prepare_to_resume): New function.
7272 (i386_thread_added): Mark the thread as needing to update irs
7274 (the_low_target): Remove i386_set_thread_context and install
7275 i386_prepare_to_resume.
7276 * win32-low.c (win32_get_thread_context): Adjust.
7277 (win32_set_thread_context): Use SetThreadContext
7279 (win32_prepare_to_resume): New function.
7280 (win32_require_context): New function, factored out from ...
7281 (thread_rec): ... this.
7282 (continue_one_thread): Call win32_prepare_to_resume on each thread
7283 we're about to continue.
7284 (win32_resume): Call win32_prepare_to_resume on the event thread.
7285 * win32-low.h (struct win32_thread_info)
7286 <debug_registers_changed>: New field.
7287 (struct win32_target_ops): Change prototype of set_thread_context,
7288 delete set_thread_context and add prepare_to_resume.
7289 (win32_require_context): New declaration.
7291 2014-10-08 Gary Benson <gbenson@redhat.com>
7293 * server.h: Do not include common-exceptions.h.
7295 2014-10-08 Gary Benson <gbenson@redhat.com>
7297 * server.h: Do not include cleanups.h.
7299 2014-09-30 James Hogan <james.hogan@imgtec.com>
7301 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7304 2014-09-23 Yao Qi <yao@codesourcery.com>
7306 * linux-low.c (lp_status_maybe_breakpoint): New function.
7307 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7308 (count_events_callback): Likewise.
7309 (select_event_lwp_callback): Likewise.
7310 (cancel_breakpoints_callback): Likewise.
7312 2014-09-19 Don Breazeal <donb@codesourcery.com>
7314 * linux-low.c (handle_extended_wait): Call
7315 linux_ptrace_get_extended_event.
7316 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7317 linux_is_extended_waitstatus.
7319 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7321 * Makefile.in (CPPFLAGS): Define.
7322 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7323 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7325 2014-09-16 Gary Benson <gbenson@redhat.com>
7327 * inferiors.h (current_inferior): Renamed as...
7328 (current_thread): New variable. All uses updated.
7329 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7330 (maybe_move_out_of_jump_pad): Likewise.
7331 (cancel_breakpoint): Likewise.
7332 (linux_low_filter_event): Likewise.
7333 (wait_for_sigstop): Likewise.
7334 (linux_resume_one_lwp): Likewise.
7335 (need_step_over_p): Likewise.
7336 (start_step_over): Likewise.
7337 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7338 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7339 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7340 and save_inferior as saved_thread.
7341 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7343 (regcache_invalidate_thread): Likewise.
7344 * remote-utils.c (prepare_resume_reply): Likewise.
7345 * thread-db.c (thread_db_get_tls_address): Likewise.
7346 (disable_thread_event_reporting): Likewise.
7347 (remove_thread_event_breakpoints): Likewise.
7348 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7350 * target.h (set_desired_inferior): Renamed as...
7351 (set_desired_thread): New declaration. All uses updated.
7352 * server.c (myresume): Updated comment to reference thread instead
7354 (handle_serial_event): Likewise.
7355 (handle_target_event): Likewise.
7357 2014-09-12 Tom Tromey <tromey@redhat.com>
7358 Gary Benson <gbenson@redhat.com>
7360 * regcache.h: Include common-regcache.h.
7361 (regcache_read_pc): Don't declare.
7362 * regcache.c (get_thread_regcache_for_ptid): New function.
7364 2014-09-11 Tom Tromey <tromey@redhat.com>
7365 Gary Benson <gbenson@redhat.com>
7367 * symbol.c: New file.
7368 * Makefile.in (SFILES): Add symbol.c.
7369 (OBS): Add symbol.o.
7371 2014-09-11 Gary Benson <gbenson@redhat.com>
7373 * target.c (target_stop_ptid, target_continue_ptid): New
7376 2014-09-11 Tom Tromey <tromey@redhat.com>
7377 Gary Benson <gbenson@redhat.com>
7379 * target.h: Include target/target.h.
7380 * target.c (target_read_memory, target_read_uint32)
7381 (target_write_memory): New functions.
7383 2014-09-11 Gary Benson <gbenson@redhat.com>
7385 * server.h (debug_hw_points): Don't declare.
7386 * server.c (debug_hw_points): Don't define. Replace all uses
7387 with show_debug_regs.
7388 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7389 all uses with show_debug_regs.
7391 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7393 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7394 endianness into account.
7395 (ppc_supply_ptrace_register): Likewise.
7397 2014-09-03 James Hogan <james.hogan@imgtec.com>
7399 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7400 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7402 2014-09-03 Gary Benson <gbenson@redhat.com>
7404 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7405 ALL_DEBUG_ADDRESS_REGISTERS.
7407 2014-09-02 Gary Benson <gbenson@redhat.com>
7409 * i386-low.h: Renamed as...
7410 * x86-low.h: New file. All type, function and variable name
7411 prefixes changed from "i386_" to "x86_". All references updated.
7412 * i386-low.c: Renamed as...
7413 * x86-low.c: New file. All type, function and variable name
7414 prefixes changed from "i386_" to "x86_". All references updated.
7416 2014-09-02 Gary Benson <gbenson@redhat.com>
7418 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7419 (x86_linux_new_thread): Likewise.
7421 2014-08-29 Gary Benson <gbenson@redhat.com>
7423 * server.h (setjmp.h): Do not include.
7424 (toplevel): Do not declare.
7425 (common-exceptions.h): Include.
7426 (cleanups.h): Likewise.
7427 * server.c (toplevel): Do not define.
7428 (exit_code): New static global.
7429 (detach_or_kill_for_exit_cleanup): New function.
7430 (main): New function. Original main renamed to...
7431 (captured_main): New function.
7432 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7434 2014-08-29 Gary Benson <gbenson@redhat.com>
7436 * Makefile.in (SFILES): Add common/common-exceptions.c.
7437 (OBS): Add common-exceptions.o.
7438 (common-exceptions.o): New rule.
7439 * utils.c (prepare_to_throw_exception): New function.
7441 2014-08-29 Gary Benson <gbenson@redhat.com>
7443 * config.in: Regenerate.
7444 * configure: Likewise.
7446 2014-08-29 Gary Benson <gbenson@redhat.com>
7448 * Makefile.in (SFILES): Add common/cleanups.c.
7450 (cleanups.o): New rule.
7452 2014-08-29 Gary Benson <gbenson@redhat.com>
7454 * utils.c (internal_vwarning): New function.
7456 2014-08-28 Gary Benson <gbenson@redhat.com>
7458 * utils.h (fatal): Remove declaration.
7459 * utils.c (fatal): Remove function.
7461 2014-08-28 Gary Benson <gbenson@redhat.com>
7463 * tracepoint.c (gdb_agent_init): Replace fatal with
7465 (initialize_tracepoint): Likewise.
7467 2014-08-28 Gary Benson <gbenson@redhat.com>
7469 * remote-utils.c (remote_prepare): Replace fatal with error.
7471 2014-08-28 Gary Benson <gbenson@redhat.com>
7473 * linux-low.c (linux_async): Replace fatal with warning.
7475 (linux_start_non_stop): Return -1 if linux_async failed.
7477 2014-08-28 Gary Benson <gbenson@redhat.com>
7479 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7481 (i386_dr_low_get_addr): Remove vague comment.
7482 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7485 2014-08-28 Gary Benson <gbenson@redhat.com>
7487 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7488 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7490 (linux_resume_one_lwp): Likewise.
7491 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7493 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7494 with internal_error.
7495 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7496 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7497 (find_register_by_name): Replace fatal with internal_error.
7498 (find_regno): Likewise.
7499 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7500 * thread-db.c (thread_db_create_event): Likewise.
7501 (thread_db_load_search): Likewise.
7502 (try_thread_db_load_1): Likewise.
7503 * tracepoint.c (get_jump_space_head): Replace fatal with
7505 (claim_trampoline_space): Likewise.
7506 (have_fast_tracepoint_trampoline_buffer): Likewise.
7507 (cmd_qtstart): Likewise.
7508 (stop_tracing): Likewise.
7509 (fast_tracepoint_collecting): Likewise.
7510 (target_malloc): Likewise.
7511 (download_tracepoint): Likewise.
7512 (download_trace_state_variables): Replace check with gdb_assert.
7513 (upload_fast_traceframes): Replace fatal with internal_error.
7515 2014-08-19 Tom Tromey <tromey@redhat.com>
7516 Gary Benson <gbenson@redhat.com>
7518 * Makefile.in (SFILES): Add common/common-debug.c.
7519 (OBS): Add common-debug.o.
7520 (common-debug.o): New rule.
7521 * debug.h (debug_printf): Don't declare.
7522 * debug.c (debug_printf): Renamed and rewritten as...
7523 (debug_vprintf): New function.
7525 2014-08-19 Gary Benson <gbenson@redhat.com>
7527 * utils.h: Do not include print-utils.h.
7529 2014-08-19 Tom Tromey <tromey@redhat.com>
7530 Gary Benson <gbenson@redhat.com>
7532 * server.h: Add static assertion.
7533 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7535 2014-08-19 Tom Tromey <tromey@redhat.com>
7536 Gary Benson <gbenson@redhat.com>
7538 * Makefile.in (SFILES): Add common/errors.c.
7539 (OBS): Add errors.o.
7540 (IPA_OBS): Add errors-ipa.o.
7541 (errors.o): New rule.
7542 (errors-ipa.o): Likewise.
7543 * utils.h (perror_with_name, error, warning): Don't declare.
7544 * utils.c (warning): Renamed and rewritten as...
7545 (vwarning): New function.
7546 (error): Renamed and rewritten as...
7547 (verror): New function.
7548 (internal_error): Renamed and rewritten as...
7549 (internal_verror): New function.
7551 2014-08-07 Gary Benson <gbenson@redhat.com>
7553 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7554 * configure: Regenerate.
7555 * config.in: Likewise.
7556 * server.h: Do not include errno.h.
7557 * event-loop.c: Likewise.
7558 * hostio-errno.c: Likewise.
7559 * linux-low.c: Likewise.
7560 * remote-utils.c: Likewise.
7561 * spu-low.c: Likewise.
7562 * utils.c: Likewise.
7563 * gdbreplay.c: Unconditionally include errno.h.
7565 2014-08-07 Gary Benson <gbenson@redhat.com>
7567 * server.h: Do not include string.h.
7568 * event-loop.c: Likewise.
7569 * linux-low.c: Likewise.
7570 * regcache.c: Likewise.
7571 * remote-utils.c: Likewise.
7572 * spu-low.c: Likewise.
7573 * utils.c: Likewise.
7575 2014-08-07 Gary Benson <gbenson@redhat.com>
7577 * server.h: Do not include gdb_assert.h.
7579 2014-08-07 Gary Benson <gbenson@redhat.com>
7581 * server.h: Do not include common-utils.h.
7583 2014-08-07 Gary Benson <gbenson@redhat.com>
7585 * server.h: Do not include ptid.h.
7586 * notif.h: Likewise.
7588 2014-08-07 Gary Benson <gbenson@redhat.com>
7590 * server.h: Do not include gdb_locale.h.
7592 2014-08-07 Gary Benson <gbenson@redhat.com>
7594 * server.h: Do not include gdb/signals.h.
7595 * win32-low.c: Likewise.
7597 2014-08-07 Gary Benson <gbenson@redhat.com>
7599 * server.h: Do not include pathmax.h.
7601 2014-08-07 Gary Benson <gbenson@redhat.com>
7603 * server.h: Do not include libiberty.h.
7604 * linux-bfin-low.c: Likewise.
7606 2014-08-07 Gary Benson <gbenson@redhat.com>
7608 * server.h: Do not include ansidecl.h.
7610 2014-08-07 Gary Benson <gbenson@redhat.com>
7612 * linux-x86-low.c: Do not include stddef.h.
7613 * lynx-ppc-low.c: Likewise.
7614 * tracepoint.c: Likewise.
7616 2014-08-07 Gary Benson <gbenson@redhat.com>
7618 * server.h: Do not include stdarg.h.
7619 * nto-low.c: Likewise.
7621 2014-08-07 Gary Benson <gbenson@redhat.com>
7623 * server.h: Do not include stdlib.h.
7624 * inferiors.c: Likewise.
7625 * linux-low.c: Likewise.
7626 * regcache.c: Likewise.
7627 * spu-low.c: Likewise.
7628 * tracepoint.c: Likewise.
7629 * utils.c: Likewise.
7631 2014-08-07 Gary Benson <gbenson@redhat.com>
7633 * server.h: Do not include stdio.h.
7634 * linux-low.c: Likewise.
7635 * remote-utils.c: Likewise.
7636 * spu-low.c: Likewise.
7637 * utils.c: Likewise.
7638 * wincecompat.c: Likewise.
7640 2014-08-06 Gary Benson <gbenson@redhat.com>
7642 * regcache.c (init_register_cache): Move conditionals inside if.
7644 2014-08-06 Gary Benson <gbenson@redhat.com>
7646 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7648 2014-07-31 Gary Benson <gbenson@redhat.com>
7650 * ax.h: Do not include server.h.
7651 * gdbthread.h: Likewise.
7652 * lynx-low.h: Likewise.
7653 * notif.h: Likewise.
7655 2014-07-30 Gary Benson <gbenson@redhat.com>
7657 * server.h: Include common-defs.h.
7658 Do not include config.h or build-gnulib-gdbserver/config.h.
7660 2014-07-30 Gary Benson <gbenson@redhat.com>
7662 * hostio-errno.c: Move server.h to top of includes list.
7663 * inferiors.c: Likewise.
7664 * linux-x86-low.c: Likewise.
7665 * notif.c: Include server.h.
7667 2014-07-24 Tom Tromey <tromey@redhat.com>
7668 Gary Benson <gbenson@redhat.com>
7670 * server.h (CORE_ADDR): Now unsigned.
7672 2014-07-16 Pedro Alves <palves@redhat.com>
7674 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7676 2014-07-15 Pedro Alves <palves@redhat.com>
7678 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7681 2014-07-11 Pedro Alves <palves@redhat.com>
7683 * linux-low.c (kill_wait_lwp): New function, based on
7684 kill_one_lwp_callback, but use my_waitpid directly.
7685 (kill_one_lwp_callback, linux_kill): Use it.
7687 2014-06-23 Pedro Alves <palves@redhat.com>
7689 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7690 before setting DR0..DR3.
7692 2014-06-20 Gary Benson <gbenson@redhat.com>
7694 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7695 * configure: Regenerated.
7696 * config.in: Likewise.
7698 2014-06-20 Gary Benson <gbenson@redhat.com>
7700 * Makefile.in (SFILES): Update locations for files moved
7702 (object file files): Reordered.
7704 2014-06-20 Gary Benson <gbenson@redhat.com>
7706 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7707 (i386_dr_low_set_addr): Likewise.
7708 (i386_dr_low_get_addr): Likewise.
7709 (i386_dr_low_can_set_control): Likewise.
7710 (i386_dr_low_set_control): Likewise.
7711 (i386_dr_low_get_control): Likewise.
7712 (i386_dr_low_get_status): Likewise.
7713 (i386_get_debug_register_length): Likewise.
7714 * linux-x86-low.c (i386_dr_low_set_addr):
7715 Changed signature. Made static.
7716 (i386_dr_low_get_addr): Likewise.
7717 (i386_dr_low_set_control): Likewise.
7718 (i386_dr_low_get_control): Likewise.
7719 (i386_dr_low_get_status): Likewise.
7720 (i386_dr_low): New global variable.
7721 * win32-i386-low.c (i386_dr_low_set_addr):
7722 Changed signature. Made static.
7723 (i386_dr_low_get_addr): Likewise.
7724 (i386_dr_low_set_control): Likewise.
7725 (i386_dr_low_get_control): Likewise.
7726 (i386_dr_low_get_status): Likewise.
7727 (i386_dr_low): New global variable.
7729 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7731 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7732 * Makefile.in (AR, AR_FLAGS): Define.
7733 * configure: Regenerate.
7735 2014-06-19 Gary Benson <gbenson@redhat.com>
7737 * Makefile.in (i386-dregs.o): New rule.
7738 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7739 * i386-low.c (target.h): Remove include.
7740 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7741 (DR_CONTROL_SHIFT): Likewise.
7742 (DR_CONTROL_SIZE): Likewise.
7743 (DR_RW_EXECUTE): Likewise.
7744 (DR_RW_WRITE): Likewise.
7745 (DR_RW_READ): Likewise.
7746 (DR_RW_IORW): Likewise.
7747 (DR_LEN_1): Likewise.
7748 (DR_LEN_2): Likewise.
7749 (DR_LEN_4): Likewise.
7750 (DR_LEN_8): Likewise.
7751 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7752 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7753 (DR_ENABLE_SIZE): Likewise.
7754 (DR_LOCAL_SLOWDOWN): Likewise.
7755 (DR_GLOBAL_SLOWDOWN): Likewise.
7756 (DR_CONTROL_RESERVED): Likewise.
7757 (I386_DR_CONTROL_MASK): Likewise.
7758 (I386_DR_VACANT): Likewise.
7759 (I386_DR_LOCAL_ENABLE): Likewise.
7760 (I386_DR_GLOBAL_ENABLE): Likewise.
7761 (I386_DR_DISABLE): Likewise.
7762 (I386_DR_SET_RW_LEN): Likewise.
7763 (I386_DR_GET_RW_LEN): Likewise.
7764 (I386_DR_WATCH_HIT): Likewise.
7765 (i386_wp_op_t): Likewise.
7766 (i386_show_dr): Likewise.
7767 (i386_length_and_rw_bits): Likewise.
7768 (i386_insert_aligned_watchpoint): Likewise.
7769 (i386_remove_aligned_watchpoint): Likewise.
7770 (i386_handle_nonaligned_watchpoint): Likewise.
7771 i386_update_inferior_debug_regs(): Likewise.
7772 (i386_dr_insert_watchpoint): Likewise.
7773 (i386_dr_remove_watchpoint): Likewise.
7774 (i386_dr_region_ok_for_watchpoint): Likewise.
7775 (i386_dr_stopped_data_address): Likewise.
7776 (i386_dr_stopped_by_watchpoint): Likewise.
7778 2014-06-19 Gary Benson <gbenson@redhat.com>
7780 * i386-low.c (i386_dr_show): Renamed to
7781 i386_show_dr and made static. All uses updated.
7782 (i386_dr_length_and_rw_bits): Renamed to
7783 i386_length_and_rw_bits and made static.
7785 (i386_dr_insert_aligned_watchpoint): Renamed to
7786 i386_insert_aligned_watchpoint and made static.
7788 (i386_dr_remove_aligned_watchpoint): Renamed to
7789 i386_remove_aligned_watchpoint and made static.
7791 (i386_dr_update_inferior_debug_regs): Renamed to
7792 i386_update_inferior_debug_regs and made static.
7795 2014-06-18 Gary Benson <gbenson@redhat.com>
7797 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7798 (i386_dr_low_can_set_control): Likewise.
7799 (i386_get_debug_register_length): Likewise.
7800 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7801 (i386_dr_low_can_set_control): Likewise.
7802 (i386_get_debug_register_length): Likewise.
7804 2014-06-17 Gary Benson <gbenson@redhat.com>
7806 * i386-low.h (i386-dregs.h): New include.
7807 (DR_FIRSTADDR): Now in i386-dregs.h.
7808 (DR_LASTADDR): Likewise.
7809 (DR_NADDR): Likewise.
7810 (DR_STATUS): Likewise.
7811 (DR_CONTROL): Likewise.
7812 (i386_debug_reg_state): Likewise.
7813 (i386_dr_insert_watchpoint): Likewise.
7814 (i386_dr_remove_watchpoint): Likewise.
7815 (i386_dr_region_ok_for_watchpoint): Likewise.
7816 (i386_dr_stopped_data_address): Likewise.
7817 (i386_dr_stopped_by_watchpoint): Likewise.
7818 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7820 2014-06-18 Gary Benson <gbenson@redhat.com>
7822 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7823 i386_dr_insert_watchpoint.
7824 (i386_low_remove_watchpoint): Renamed to
7825 i386_dr_remove_watchpoint.
7826 (i386_low_region_ok_for_watchpoint): Renamed to
7827 i386_dr_region_ok_for_watchpoint.
7828 (i386_low_stopped_data_address): Renamed to
7829 i386_dr_stopped_data_address.
7830 (i386_low_stopped_by_watchpoint): Renamed to
7831 i386_dr_stopped_by_watchpoint.
7832 * i386-low.c (i386_show_dr): Renamed to
7833 i386_dr_show and made nonstatic. All uses updated.
7834 (i386_length_and_rw_bits): Renamed to
7835 i386_dr_length_and_rw_bits and made nonstatic.
7837 (i386_insert_aligned_watchpoint): Renamed to
7838 i386_dr_insert_aligned_watchpoint and made nonstatic.
7840 (i386_remove_aligned_watchpoint): Renamed to
7841 i386_dr_remove_aligned_watchpoint and made nonstatic.
7843 (i386_update_inferior_debug_regs): Renamed to
7844 i386_dr_update_inferior_debug_regs and made nonstatic.
7846 (i386_low_insert_watchpoint): Renamed to
7847 i386_dr_insert_watchpoint. All uses updated.
7848 (i386_low_remove_watchpoint): Renamed to
7849 i386_dr_remove_watchpoint. All uses updated.
7850 (i386_low_region_ok_for_watchpoint): Renamed to
7851 i386_dr_region_ok_for_watchpoint. All uses updated.
7852 (i386_low_stopped_data_address): Renamed to
7853 i386_dr_stopped_data_address. All uses updated.
7854 (i386_low_stopped_by_watchpoint): Renamed to
7855 i386_dr_stopped_by_watchpoint. All uses updated.
7857 2014-06-18 Gary Benson <gbenson@redhat.com>
7859 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7860 (i386_dr_low_can_set_control): Likewise.
7861 (i386_insert_aligned_watchpoint): New check.
7863 2014-06-18 Gary Benson <gbenson@redhat.com>
7865 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7868 2014-06-18 Gary Benson <gbenson@redhat.com>
7870 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7871 instead of fatal and error.
7872 (i386_handle_nonaligned_watchpoint): Likewise.
7874 2014-06-18 Gary Benson <gbenson@redhat.com>
7876 * i386-low.c (i386_get_debug_register_length): New macro.
7877 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7878 (i386_show_dr): Use debug_printf instead of fprintf. Use
7879 phex to format values.
7881 2014-06-18 Gary Benson <gbenson@redhat.com>
7883 * i386-low.h: Comment changes.
7884 * i386-low.c: Likewise.
7886 2014-06-18 Gary Benson <gbenson@redhat.com>
7888 * i386-low.c: Whitespace changes.
7890 2014-06-12 Tom Tromey <tromey@redhat.com>
7892 * utils.c (freeargv): Remove.
7894 2014-06-12 Tom Tromey <tromey@redhat.com>
7896 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7897 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7898 (parse_debug_format_options): Likewise.
7899 (gdbserver_usage): Likewise.
7900 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7901 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7902 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7904 ($(LIBGNU)): Depend on libiberty.
7905 (all-lib): Recurse into all subdirs.
7906 (install-only): Invoke "install" target in subdirs.
7907 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7909 * configure: Rebuild.
7910 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7911 for vasprintf, vsnprintf, or gettimeofday.
7912 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7915 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7917 * development.sh: Delete.
7918 * Makefile.in (config.status): Adjust dependency on development.sh.
7919 * configure.ac: Adjust development.sh source call.
7920 * configure: Regenerate.
7922 2014-06-02 Pedro Alves <palves@redhat.com>
7924 * ax.c (gdb_free_agent_expr): New function.
7925 * ax.h (gdb_free_agent_expr): New declaration.
7926 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7928 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7930 (clear_breakpoint_conditions_and_commands): New function.
7931 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7932 (clear_breakpoint_conditions_and_commands): New declaration.
7934 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7936 * linux-aarch64-low.c (asm/ptrace.h): Include.
7938 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7940 Fix TLS access for -static -pthread.
7941 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7942 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7943 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7945 2014-05-20 Pedro Alves <palves@redhat.com>
7947 * linux-aarch64-low.c (aarch64_insert_point)
7948 (aarch64_remove_point): No longer check whether the type is
7949 supported here. Adjust to new interface.
7950 (the_low_target): Install aarch64_supports_z_point_type as
7951 supports_z_point_type method.
7952 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7953 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7954 instead of a Z packet char. Adjust.
7955 (arm_supports_z_point_type): New function.
7956 (arm_insert_point, arm_remove_point): Adjust to new interface.
7957 (the_low_target): Install arm_supports_z_point_type.
7958 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7959 (cris_insert_point, cris_remove_point): Adjust to new interface.
7960 Don't check whether the type is supported here.
7961 (the_low_target): Install cris_supports_z_point_type.
7962 * linux-low.c (linux_supports_z_point_type): New function.
7963 (linux_insert_point, linux_remove_point): Adjust to new interface.
7964 * linux-low.h (struct linux_target_ops) <insert_point,
7965 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7966 raw_breakpoint pointer parameter.
7967 <supports_z_point_type>: New method.
7968 * linux-mips-low.c (mips_supports_z_point_type): New function.
7969 (mips_insert_point, mips_remove_point): Adjust to new interface.
7970 Use mips_supports_z_point_type.
7971 (the_low_target): Install mips_supports_z_point_type.
7972 * linux-ppc-low.c (the_low_target): Install NULL as
7973 supports_z_point_type method.
7974 * linux-s390-low.c (the_low_target): Install NULL as
7975 supports_z_point_type method.
7976 * linux-sparc-low.c (the_low_target): Install NULL as
7977 supports_z_point_type method.
7978 * linux-x86-low.c (x86_supports_z_point_type): New function.
7979 (x86_insert_point): Adjust to new insert_point interface. Use
7980 insert_memory_breakpoint. Adjust to new
7981 i386_low_insert_watchpoint interface.
7982 (x86_remove_point): Adjust to remove_point interface. Use
7983 remove_memory_breakpoint. Adjust to new
7984 i386_low_remove_watchpoint interface.
7985 (the_low_target): Install x86_supports_z_point_type.
7986 * lynx-low.c (lynx_target_ops): Install NULL as
7987 supports_z_point_type callback.
7988 * nto-low.c (nto_supports_z_point_type): New.
7989 (nto_insert_point, nto_remove_point): Adjust to new interface.
7990 (nto_target_ops): Install nto_supports_z_point_type.
7991 * mem-break.c: Adjust intro comment.
7992 (struct raw_breakpoint) <raw_type, size>: New fields.
7993 <inserted>: Update comment.
7994 <shlib_disabled>: Delete field.
7995 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7996 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7997 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7998 (raw_bkpt_type_to_target_hw_bp_type): New function.
7999 (find_enabled_raw_code_breakpoint_at): New function.
8000 (find_raw_breakpoint_at): New type and size parameters. Use them.
8001 (insert_memory_breakpoint): New function, based off
8002 set_raw_breakpoint_at.
8003 (remove_memory_breakpoint): New function.
8004 (set_raw_breakpoint_at): Reimplement.
8005 (set_breakpoint): New, based on set_breakpoint_at.
8006 (set_breakpoint_at): Reimplement.
8007 (delete_raw_breakpoint): Go through the_target->remove_point
8008 instead of assuming memory breakpoints.
8009 (find_gdb_breakpoint_at): Delete.
8010 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8011 (find_gdb_breakpoint): New function.
8012 (set_gdb_breakpoint_at): Delete.
8013 (z_type_supported): New function.
8014 (set_gdb_breakpoint_1): New function, loosely based off
8015 set_gdb_breakpoint_at.
8016 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8017 (delete_gdb_breakpoint_at): Delete.
8018 (delete_gdb_breakpoint_1): New function, loosely based off
8019 delete_gdb_breakpoint_at.
8020 (delete_gdb_breakpoint): New function.
8021 (clear_gdb_breakpoint_conditions): Rename to ...
8022 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8024 (add_condition_to_breakpoint): Make static.
8025 (add_breakpoint_condition): Take a struct breakpoint pointer
8026 instead of an address. Adjust.
8027 (gdb_condition_true_at_breakpoint): Rename to ...
8028 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8030 (gdb_condition_true_at_breakpoint): Reimplement.
8031 (add_breakpoint_commands): Take a struct breakpoint pointer
8032 instead of an address. Adjust.
8033 (gdb_no_commands_at_breakpoint): Rename to ...
8034 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8035 parameter. Return true if no breakpoint was found. Change debug
8037 (gdb_no_commands_at_breakpoint): Reimplement.
8038 (run_breakpoint_commands): Rename to ...
8039 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8040 and change return type to boolean.
8041 (run_breakpoint_commands): New function.
8042 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8043 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8044 breakpoint. Go through the_target->remove_point instead of
8045 assuming memory breakpoint.
8046 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8047 software and hardware breakpoints.
8048 (reinsert_raw_breakpoint): Go through the_target->insert_point
8049 instead of assuming memory breakpoint.
8050 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8051 software and hardware breakpoints.
8052 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8053 Check both software and hardware breakpoints.
8054 (validate_inserted_breakpoint): Assert the breakpoint is a
8055 software breakpoint. Set the inserted flag to -1 instead of
8056 setting shlib_disabled.
8057 (delete_disabled_breakpoints): Adjust.
8058 (validate_breakpoints): Only validate software breakpoints.
8059 Adjust to inserted flag change.
8060 (check_mem_read, check_mem_write): Skip breakpoint types other
8061 than software breakpoints. Adjust to inserted flag change.
8062 * mem-break.h (enum raw_bkpt_type): New enum.
8063 (raw_breakpoint, struct process_info): Forward declare.
8064 (Z_packet_to_target_hw_bp_type): Delete declaration.
8065 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8066 (set_gdb_breakpoint, delete_gdb_breakpoint)
8067 (clear_breakpoint_conditions): New declarations.
8068 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8069 (breakpoint_inserted_here): Update comment.
8070 (add_breakpoint_condition, add_breakpoint_commands): Replace
8071 address parameter with a breakpoint pointer parameter.
8072 (gdb_breakpoint_here): Update comment.
8073 (delete_gdb_breakpoint_at): Delete.
8074 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8075 * server.c (process_point_options): Take a struct breakpoint
8076 pointer instead of an address. Adjust.
8077 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8078 delete_gdb_breakpoint.
8079 * spu-low.c (spu_target_ops): Install NULL as
8080 supports_z_point_type method.
8081 * target.h: Include mem-break.h.
8082 (struct target_ops) <prepare_to_access_memory>: Update comment.
8083 <supports_z_point_type>: New field.
8084 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8085 instead of a char. Also take a raw breakpoint pointer.
8086 * win32-arm-low.c (the_low_target): Install NULL as
8087 supports_z_point_type.
8088 * win32-i386-low.c (i386_supports_z_point_type): New function.
8089 (i386_insert_point, i386_remove_point): Adjust to new interface.
8090 (the_low_target): Install i386_supports_z_point_type.
8091 * win32-low.c (win32_supports_z_point_type): New function.
8092 (win32_insert_point, win32_remove_point): Adjust to new interface.
8093 (win32_target_ops): Install win32_supports_z_point_type.
8094 * win32-low.h (struct win32_target_ops):
8095 <supports_z_point_type>: New method.
8096 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8097 instead of a char. Also take a raw breakpoint pointer.
8099 2014-05-20 Pedro Alves <palves@redhat.com>
8101 * mem-break.h: Include break-common.h.
8102 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8103 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8104 (Z_packet_to_target_hw_bp_type): New declaration.
8105 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8106 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8107 (Z_PACKET_ACCESS_WP): Delete macros.
8108 (Z_packet_to_hw_type): Delete function.
8109 * i386-low.h: Don't include break-common.h here.
8110 (Z_packet_to_hw_type): Delete declaration.
8111 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8112 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8113 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8114 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8115 * linux-aarch64-low.c: Don't include break-common.h here.
8116 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8117 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8118 (Z_packet_to_target_hw_bp_type): Delete function.
8119 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8121 (mips_insert_point, mips_remove_point): Use
8122 Z_packet_to_target_hw_bp_type.
8124 2014-05-20 Pedro Alves <palves@redhat.com>
8126 * linux-aarch64-low.c: Include break-common.h.
8127 (enum target_point_type): Delete.
8128 (Z_packet_to_point_type): Rename to ...
8129 (Z_packet_to_target_hw_bp_type): ... this, and return a
8130 target_hw_bp_type instead.
8131 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8132 instead of an enum target_point_type.
8133 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8135 (aarch64_dr_state_insert_one_point)
8136 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8137 (aarch64_handle_aligned_watchpoint)
8138 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8139 Take an enum target_hw_bp_type instead of an enum
8141 (aarch64_supports_z_point_type): New function.
8142 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8143 use Z_packet_to_target_hw_bp_type.
8145 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8147 * configure.ac: Only use -Werror by default when DEVELOPMENT
8149 * configure: Regenerate.
8151 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8153 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8154 * linux-x86-low.c (X86_64_USER_REGS): New.
8155 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8157 2014-04-28 Yao Qi <yao@codesourcery.com>
8159 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8162 2014-04-25 Pedro Alves <palves@redhat.com>
8165 * linux-low.c (linux_attach_fail_reason_string): New function.
8166 (linux_attach_lwp): Delete.
8167 (linux_attach_lwp_1): Rename to ...
8168 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8169 argument. Remove "initial" parameter. Return int instead of
8170 void. Don't error or warn here.
8171 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8172 failure to attach to the tgid. Call warning when failing to
8174 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8175 argument. Remove "initial" parameter. Return int instead of
8176 void. Don't error or warn here.
8177 (linux_attach_fail_reason_string): New declaration.
8178 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8179 interface change. Use linux_attach_fail_reason_string.
8181 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8182 Walfred Tedeschi <walfred.tedeschi@intel.com>
8184 * Makefile.in: Added rules to handle new files
8185 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8186 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8187 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8188 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8189 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8190 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8192 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8193 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8194 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8195 i386/x32-avx512.xml.
8196 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8197 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8198 i386/x32-avx512-linux.xml.
8199 * i387-fp.c (num_avx512_k_registers): New constant for number
8201 (num_avx512_zmmh_low_registers): New constant for number of
8202 lower ZMM registers (0-15).
8203 (num_avx512_zmmh_high_registers): New constant for number of
8204 higher ZMM registers (16-31).
8205 (num_avx512_ymmh_registers): New contant for number of higher
8206 YMM registers (ymm16-31 added by avx521 on x86_64).
8207 (num_avx512_xmm_registers): New constant for number of higher
8208 XMM registers (xmm16-31 added by AVX512 on x86_64).
8209 (struct i387_xsave): Add space for AVX512 registers.
8210 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8211 Add code to handle AVX512 registers.
8212 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8213 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8214 prototypei from generated file.
8215 (tdesc_amd64_avx512_linux): Likewise.
8216 (init_registers_x32_avx512_linux): Likewise.
8217 (tdesc_x32_avx512_linux): Likewise.
8218 (init_registers_i386_avx512_linux): Likewise.
8219 (tdesc_i386_avx512_linux): Likewise.
8220 (x86_64_regmap): Add AVX512 registers.
8221 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8223 (initialize_low_arch): Add code to initialize AVX512 registers.
8225 2014-04-23 Pedro Alves <palves@redhat.com>
8227 * mem-break.c (find_gdb_breakpoint_at): Make static.
8228 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8230 2014-04-23 Pedro Alves <palves@redhat.com>
8232 * i386-low.c: Don't include break-common.h here.
8233 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8234 prototype to take target_hw_bp_type as argument instead of a Z
8236 * i386-low.h: Include break-common.h here.
8237 (Z_packet_to_hw_type): Declare.
8238 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8240 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8241 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8242 (x86_remove_point): Convert the packet number to a
8243 target_hw_bp_type before calling i386_low_remove_watchpoint.
8244 * win32-i386-low.c (i386_insert_point): Convert the packet number
8245 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8246 (i386_remove_point): Convert the packet number to a
8247 target_hw_bp_type before calling i386_low_remove_watchpoint.
8249 2014-04-23 Pedro Alves <palves@redhat.com>
8251 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8253 2014-04-10 Pedro Alves <palves@redhat.com>
8255 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8256 Check if the condition or command is NULL before checking if the
8257 breakpoint is known. On success, return true.
8258 * mem-break.h (add_breakpoint_condition): Document return.
8259 (add_breakpoint_commands): Add describing comment.
8260 * server.c (skip_to_semicolon): New function.
8261 (process_point_options): Use it.
8263 2014-04-09 Pedro Alves <palves@redhat.com>
8265 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8268 2014-02-27 Pedro Alves <palves@redhat.com>
8271 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8273 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8275 (last_thread_of_process_p): Take a PID argument instead of a
8277 (linux_wait_for_lwp): Delete.
8278 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8280 (linux_low_filter_event): New function, party factored out from
8281 linux_wait_for_event.
8282 (linux_wait_for_event): Rename to ...
8283 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8284 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8285 sigsuspend. Check for zombie leaders.
8286 (linux_wait_for_event): Reimplement as wrapper around
8287 linux_wait_for_event_filtered.
8288 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8289 a normal or signal exit is seen, it's the whole process exiting.
8290 (wait_for_sigstop): No longer a for_each_inferior callback.
8291 Rewrite on top of linux_wait_for_event_filtered.
8292 (stop_all_lwps): Call wait_for_sigstop directly.
8293 * server.c (resume, handle_target_event): Handle
8294 TARGET_WAITKIND_NO_RESUMED.
8296 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8298 * win32-low.c (psapi_get_dll_name,
8299 * win32_CreateToolhelp32Snapshot): Delete.
8300 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8301 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8303 (handle_load_dll): Add function description.
8304 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8306 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8308 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8310 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8311 base address when calling win32_add_one_solib.
8312 (handle_load_dll): Delete local variable load_addr.
8313 Remove 0x1000 offset applied to DLL base address when calling
8314 win32_add_one_solib.
8315 (handle_unload_dll): Add comment.
8317 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8319 * win32-low.c (win32_add_all_dlls): Renames
8320 win32_ensure_ntdll_loaded. Rewrite function documentation.
8321 Adjust implementation to always load all DLLs.
8322 Add 0x1000 offset to DLL base address when calling
8323 win32_add_one_solib.
8324 (child_initialization_done): New static global.
8325 (do_initial_child_stuff): Set child_initialization_done to
8326 zero during child initialization, and 1 after. Replace call
8327 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8329 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8330 (handle_unload_dll): Add function documentation.
8331 (get_child_debug_event): Ignore load and unload DLL events
8332 during child initialization.
8334 2014-02-20 Doug Evans <dje@google.com>
8336 Remove global all_lwps.
8337 * inferiors.h (ptid_of): Move here from linux-low.h.
8338 (pid_of, lwpid_of): Ditto.
8339 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8340 parameter is a struct thread_info * now.
8341 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8342 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8343 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8345 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8346 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8347 * linux-arm-low.c (update_registers_callback): Update, "entry"
8348 parameter is a struct thread_info * now.
8349 Fetch lwpid from current_inferior directly.
8350 (arm_insert_point): Pass &all_threads to find_inferior instead of
8352 (arm_remove_point): Ditto.
8353 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8354 (arm_prepare_to_resume): Fetch pid from thread.
8355 (arm_read_description): Fetch lwpid from current_inferior directly.
8356 * linux-low.c (all_lwps): Delete.
8357 (delete_lwp): Delete call to remove_inferior.
8358 (handle_extended_wait): Fetch lwpid from thread.
8359 (add_lwp): Don't set lwp->entry.id. Remove call to
8360 add_inferior_to_list.
8361 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8362 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8363 (kill_one_lwp_callback): Ditto.
8364 (linux_kill): Don't dereference NULL pointer.
8365 Fetch ptid,lwpid from thread.
8366 (get_detach_signal): Fetch ptid from thread.
8367 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8368 Simplify call to regcache_invalidate_thread.
8369 (delete_lwp_callback): Update, "entry" parameter is a
8370 struct thread_info * now. Fetch pid from thread.
8371 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8372 (status_pending_p_callback): Update, "entry" parameter is a
8373 struct thread_info * now. Fetch ptid from thread.
8374 (find_lwp_pid): Update, "entry" parameter is a
8375 struct thread_info * now.
8376 (linux_wait_for_lwp): Fetch pid from thread.
8377 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8378 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8379 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8380 (dequeue_one_deferred_signal): Ditto.
8381 (cancel_breakpoint): Fetch ptid from current_inferior.
8382 (linux_wait_for_event): Pass &all_threads to find_inferior,
8383 not &all_lwps. Fetch ptid, lwpid from thread.
8384 (count_events_callback): Update, "entry" parameter is a
8385 struct thread_info * now.
8386 (select_singlestep_lwp_callback): Ditto.
8387 (select_event_lwp_callback): Ditto.
8388 (cancel_breakpoints_callback): Ditto.
8389 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8391 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8392 (unsuspend_one_lwp): Update, "entry" parameter is a
8393 struct thread_info * now.
8394 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8396 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8397 Fetch lwpid from thread, not lwp.
8398 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8399 Pass &all_threads to find_inferior, not &all_lwps.
8400 (send_sigstop): Fetch lwpid from thread, not lwp.
8401 (send_sigstop_callback): Update, "entry" parameter is a
8402 struct thread_info * now.
8403 (suspend_and_send_sigstop_callback): Ditto.
8404 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8405 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8406 struct thread_info * now.
8407 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8409 (lwp_running): Update, "entry" parameter is a
8410 struct thread_info * now.
8411 (stop_all_lwps): Fetch ptid from thread.
8412 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8413 (linux_resume_one_lwp): Fetch lwpid from thread.
8414 (linux_set_resume_request): Update, "entry" parameter is a
8415 struct thread_info * now. Fetch pid, lwpid from thread.
8416 (resume_status_pending_p): Update, "entry" parameter is a
8417 struct thread_info * now.
8418 (need_step_over_p): Ditto. Fetch lwpid from thread.
8419 (start_step_over): Fetch lwpid from thread.
8420 (linux_resume_one_thread): Update, "entry" parameter is a
8421 struct thread_info * now. Fetch lwpid from thread.
8422 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8423 (proceed_one_lwp): Update, "entry" parameter is a
8424 struct thread_info * now. Fetch lwpid from thread.
8425 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8426 struct thread_info * now.
8427 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8428 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8429 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8431 (regsets_store_inferior_registers): Ditto.
8432 (fetch_register, store_register): Ditto.
8433 (linux_read_memory, linux_write_memory): Ditto.
8434 (linux_request_interrupt): Ditto.
8435 (linux_read_auxv): Ditto.
8436 (linux_xfer_siginfo): Ditto.
8437 (linux_qxfer_spu): Ditto.
8438 (linux_qxfer_libraries_svr4): Ditto.
8439 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8440 moved to inferiors.h.
8442 (get_thread_lwp): Update.
8443 (struct lwp_info): Delete member "entry". Simplify comment for
8446 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8447 current_inferior directly.
8448 (update_watch_registers_callback): Update, "entry" parameter is a
8449 struct thread_info * now. Fetch pid from thread.
8450 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8451 (mips_insert_point): Fetch lwpid from current_inferior.
8452 Pass &all_threads to find_inferior, not &all_lwps.
8453 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8454 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8456 (mips_stopped_data_address): Ditto.
8457 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8459 * linux-tile-low.c (tile_arch_setup): Ditto.
8460 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8461 (update_debug_registers_callback): Update, "entry" parameter is a
8462 struct thread_info * now. Fetch pid from thread.
8463 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8464 Pass &all_threads to find_inferior, not &all_lwps.
8465 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8466 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8467 Pass &all_threads to find_inferior, not &all_lwps.
8468 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8469 (i386_dr_low_get_status): Ditto.
8470 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8471 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8472 (x86_linux_read_description): Ditto.
8473 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8475 2014-02-20 Doug Evans <dje@google.com>
8477 * inferiors.c (get_first_inferior): Fix buglet.
8479 2014-02-19 Doug Evans <dje@google.com>
8481 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8482 * inferiors.c (add_thread): Change result type to struct thread_info *.
8483 All callers updated.
8484 (add_lwp): Call add_thread here instead of in callers.
8485 All callers updated.
8486 * linux-low.h (get_lwp_thread): Rewrite.
8487 (struct lwp_info): New member "thread".
8489 2014-02-19 Doug Evans <dje@google.com>
8491 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8492 All callers updated.
8494 2014-02-19 Doug Evans <dje@google.com>
8496 * inferiors.c (add_thread): Fix whitespace.
8498 2014-02-19 Doug Evans <dje@google.com>
8500 * dll.c (clear_dlls): Replace accessing list implemention details
8502 * gdbthread.h (get_first_thread): Declare.
8503 * inferiors.c (for_each_inferior_with_data): New function.
8504 (get_first_thread): New function.
8505 (find_thread_ptid): Simplify.
8506 (get_first_inferior): New function.
8507 (clear_list): Delete.
8508 (one_inferior_p): New function.
8509 (clear_inferior_list): New function.
8510 (clear_inferiors): Update.
8511 * inferiors.h (for_each_inferior_with_data): Declare.
8512 (clear_inferior_list): Declare.
8513 (one_inferior_p): Declare.
8514 (get_first_inferior): Declare.
8515 * linux-low.c (linux_wait_for_event): Replace accessing list
8516 implemention details with API function.
8517 * server.c (target_running): Ditto.
8518 (accumulate_file_name_length): New function.
8519 (emit_dll_description): New function.
8520 (handle_qxfer_libraries): Replace accessing list implemention
8521 details with API function.
8522 (handle_qxfer_threads_worker): New function.
8523 (handle_qxfer_threads_proper): Replace accessing list implemention
8524 details with API function.
8525 (handle_query): Ditto.
8526 (visit_actioned_threads_callback_ftype): New typedef.
8527 (visit_actioned_threads_data): New struct.
8528 (visit_actioned_threads): Rewrite to be find_inferior callback.
8529 (resume): Call find_inferior.
8530 (handle_status): Replace accessing list implemention
8531 details with API function.
8532 (process_serial_event): Replace accessing list implemention details
8534 * target.c (set_desired_inferior): Replace accessing list implemention
8535 details with API function.
8536 * tracepoint.c (same_process_p): New function.
8537 (gdb_agent_about_to_close): Replace accessing list implemention
8538 details with API function.
8539 * win32-low.c (child_delete_thread): Replace accessing list
8540 implemention details with API function.
8541 (match_dll_by_basename): New function.
8542 (dll_is_loaded_by_basename): New function.
8543 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8544 details call to dll_is_loaded_by_basename.
8546 2014-02-19 Doug Evans <dje@google.com>
8548 * dll.h (struct dll_info): Add comment.
8549 * gdbthread.h (struct thread_info): Add comment.
8550 (current_ptid): Simplify.
8551 * inferiors.c (add_process): Update.
8552 (remove_process): Update.
8553 * inferiors.h (struct process_info): Rename member "head" to "entry".
8554 * linux-low.c (delete_lwp): Update.
8556 (last_thread_of_process_p): Update.
8557 (kill_one_lwp_callback, linux_kill): Update.
8558 (status_pending_p_callback): Update.
8559 (wait_for_sigstop): Update. Simplify read of ptid.
8560 (start_step_over): Update.
8561 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8562 (get_lwp_thread): Update.
8563 (struct lwp_info): Rename member "head" to "entry".
8564 * regcache.h (inferior_list_entry): Delete.
8565 * server.c (kill_inferior_callback): Update.
8566 (detach_or_kill_inferior_callback): Update.
8567 (print_started_pid): Update.
8568 (print_attached_pid): Update.
8569 (process_serial_event): Simplify read of ptid.
8570 * thread-db.c (thread_db_create_event): Update.
8571 (thread_db_get_tls_address): Update.
8572 * win32-low.c (current_inferior_ptid): Simplify.
8574 2014-02-19 Tom Tromey <tromey@redhat.com>
8576 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8578 (target_supports_btrace): Update.
8580 2014-02-14 Yao Qi <yao@codesourcery.com>
8582 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8583 (rsp-low-ipa.o): New target.
8585 2014-02-12 Tom Tromey <tromey@redhat.com>
8587 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8588 convert_ascii_to_int.
8589 * regcache.c (registers_to_string): Likewise.
8590 * remote-utils.c (decode_M_packet): Likewise.
8591 * server.c (process_serial_event): Likewise.
8593 2014-02-12 Tom Tromey <tromey@redhat.com>
8595 * server.c (handle_query, handle_v_run): Use hex2bin, not
8597 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8599 2014-02-12 Tom Tromey <tromey@redhat.com>
8601 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8602 convert_int_to_ascii.
8603 * regcache.c (registers_to_string, collect_register_as_string):
8605 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8607 * server.c (process_serial_event): Likewise.
8608 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8609 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8611 2014-02-12 Tom Tromey <tromey@redhat.com>
8613 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8614 bin2hex, not hexify.
8615 * tracepoint.c (cmd_qtstatus): Likewise.
8617 2014-02-12 Tom Tromey <tromey@redhat.com>
8619 * remote-utils.c (monitor_output): Pass explicit length to
8622 2014-02-12 Tom Tromey <tromey@redhat.com>
8624 * tracepoint.c: Include rsp-low.h.
8625 * server.c: Include rsp-low.h.
8626 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8627 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8629 * remote-utils.c: Include rsp-low.h.
8630 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8631 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8632 (convert_int_to_ascii, convert_ascii_to_int): Move to
8634 * regcache.c: Include rsp-low.h.
8635 * ax.c: Include rsp-low.h.
8636 * Makefile.in (SFILES): Add common/rsp-low.c.
8637 (OBS): Add rsp-low.o.
8638 (rsp-low.o): New target.
8640 2014-02-12 Tom Tromey <tromey@redhat.com>
8642 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8643 Include print-utils.h.
8644 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8645 (plongest, thirty_two, phex_nz): Remove.
8646 * Makefile.in (SFILES): Add common/print-utils.c.
8647 (OBS): Add print-utils.o.
8648 (print-utils-ipa.o): New target.
8649 (print-utils.o): New target.
8650 (IPA_OBJS): Add print-utils-ipa.o.
8652 2014-02-06 Tom Tromey <tromey@redhat.com>
8654 * Makefile.in (SFILES): Fix indentation.
8656 2014-02-05 Doug Evans <dje@google.com>
8658 * linux-low.c (linux_wait_for_event): Improve comment.
8659 (linux_wait_1): Keep current_inferior in sync with event_child.
8661 2014-01-22 Doug Evans <dje@google.com>
8663 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8665 2014-01-22 Doug Evans <dje@google.com>
8667 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8668 * configure: Regenerate.
8669 * config.in: Regenerate.
8670 * Makefile.in (SFILES): Add debug.c.
8672 * debug.c: New file.
8673 * debug.h: New file.
8674 * linux-aarch64-low.c (*): Update all debugging printfs to use
8675 debug_printf instead of fprintf.
8676 * linux-arm-low.c (*): Ditto.
8677 * linux-cris-low.c (*): Ditto.
8678 * linux-crisv32-low.c (*): Ditto.
8679 * linux-m32r-low.c (*): Ditto.
8680 * linux-sparc-low.c (*): Ditto.
8681 * linux-x86.c (*): Ditto.
8682 * linux-low.c (*): Ditto.
8683 (linux_wait_1): Add calls to debug_enter, debug_exit.
8684 (linux_wait): Remove redundant debugging printf.
8685 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8686 (linux_resume, unstop_all_lwps): Ditto.
8687 * mem-break.c (*): Update all debugging printfs to use
8688 debug_printf instead of fprintf.
8689 * remote-utils.c (*): Ditto.
8690 * thread-db.c (*): Ditto.
8691 * server.c #include <ctype.h>, "gdb_vecs.h".
8692 (debug_threads): Moved to debug.c.
8693 (*): Update all debugging printfs to use debug_printf instead of
8695 (start_inferior): Replace call to fflush with call to debug_flush.
8696 (monitor_show_help): Mention set debug-format.
8697 (parse_debug_format_options): New function.
8698 (handle_monitor_command): Handle "monitor set debug-format".
8699 (gdbserver_usage): Mention --debug-format.
8700 (main): Parse --debug-format.
8701 * server.h (debug_threads): Declaration moved to debug.h.
8703 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8704 trace_debug_1 that uses debug_printf.
8705 (tracepoint_look_up_symbols): Update all debugging printfs to use
8706 debug_printf instead of fprintf.
8708 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8710 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8713 2014-01-17 Pedro Alves <palves@redhat.com>
8716 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8717 defined after including gdb_proc_service.h.
8719 2014-01-16 Doug Evans <dje@google.com>
8721 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8722 (match_dll): Use it.
8724 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8726 * target.h (target_ops) <read_btrace>: Change parameters and
8727 return type to allow error reporting.
8728 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8729 trace reading errors on.
8730 * linux-low.c (linux_low_read_btrace): Pass trace reading
8732 (linux_low_disable_btrace): New.
8734 2014-01-15 Doug Evans <dje@google.com>
8736 * inferiors.c (thread_id_to_gdb_id): Delete.
8737 * inferiors.h (thread_id_to_gdb_id): Delete.
8739 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8741 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8742 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8745 2014-01-08 Pedro Alves <palves@redhat.com>
8747 * server.c (handle_status): Don't discard previous queued stop
8748 replies or thread's pending status here.
8749 (main) <disconnection>: Do it here instead.
8751 2014-01-08 Pedro Alves <palves@redhat.com>
8753 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8754 * server.c (visit_actioned_threads, handle_pending_status): New
8756 (handle_v_cont): Factor out parts to ...
8757 (resume): ... this new function. If in all-stop, and a thread
8758 being resumed has a pending status, report it without actually
8760 (myresume): Adjust to use the new 'resume' function.
8761 (clear_pending_status_callback, set_pending_status_callback)
8762 (find_status_pending_thread_callback): New functions.
8763 (handle_status): Handle the case of multiple threads having
8764 interesting statuses to report. Report threads' real last signal
8765 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8766 with an interesting thread to report the status for, instead of
8767 always reporting the status of the first thread.
8769 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8771 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8772 * gdbreplay.c (gdbreplay_version): Likewise.
8774 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8776 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8777 iov.iov_len with the real length in use.
8779 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8781 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8782 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8783 for all targets that use win32-low.c.
8784 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8785 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8787 2013-12-13 Pedro Alves <palves@redhat.com>
8789 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8790 if equal to TARGET_WAITKIND_LOADED.
8791 * win32-low.c (cached_status): New static global.
8792 (win32_wait): Add declaration.
8793 (do_initial_child_stuff): Flush all initial pending debug events
8794 up to the initial breakpoint.
8795 (win32_wait): If CACHED_STATUS was set, return that instead
8796 of doing a real wait. Remove the code resuming the execution
8797 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8798 during the initial phase. Also remove the code changing
8799 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8800 TARGET_WAITKIND_STOPPED.
8802 2013-12-11 Yao Qi <yao@codesourcery.com>
8804 * notif.c (handle_notif_ack): Return 0 if no notification
8807 2013-11-20 Doug Evans <dje@google.com>
8809 * linux-low.c (linux_set_resume_request): Fix comment.
8811 2013-11-20 Doug Evans <dje@google.com>
8813 * linux-low.c (resume_status_pending_p): Tweak comment.
8815 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8817 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8818 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8819 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8820 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8821 (srv_amd64_regobj): Add amd64-mpx.o.
8822 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8823 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8824 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8825 * i387-fp.c (num_pl_bnd_register) Added constant.
8826 (num_pl_bnd_cfg_registers) Added constant.
8827 (struct i387_xsave) Added reserved area and MPX fields.
8828 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8829 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8831 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8832 (init_registers_amd64_mpx_linux): Declare new function.
8833 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8834 (x86_64_regmap): Add MPX registers.
8835 (x86_linux_read_description): Add MPX case.
8836 (initialize_low_arch): Initialize MPX targets.
8838 2013-11-18 Tom Tromey <tromey@redhat.com>
8840 * configure: Rebuild.
8841 * configure.ac: Don't check for stdlib.h.
8842 * gdbreplay.c: Unconditionally include stdlib.h.
8844 2013-11-18 Tom Tromey <tromey@redhat.com>
8846 * config.in: Rebuild.
8847 * configure: Rebuild.
8848 * configure.ac: Don't use AC_HEADER_DIRENT.
8850 2013-11-18 Tom Tromey <tromey@redhat.com>
8852 * server.h: Don't check HAVE_STRING_H.
8853 * gdbreplay.c: Don't check HAVE_STRING_H.
8854 * configure: Rebuild.
8856 2013-11-18 Tom Tromey <tromey@redhat.com>
8858 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8861 2013-11-08 Tom Tromey <tromey@redhat.com>
8863 * configure, config.in: Rebuild.
8864 * configure.ac: Remove unused configury.
8866 2013-11-08 Tom Tromey <tromey@redhat.com>
8868 * acinclude.m4: Include common.m4, codeset.m4.
8869 * configure, config.in: Rebuild.
8870 * configure.ac: Use GDB_AC_COMMON.
8872 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8874 * linux-s390-low.c (HWCAP_S390_TE): New define.
8875 (s390_arch_setup): Consider the TE field in the HWCAP for
8876 determining 'have_regset_tdb'.
8878 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8881 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8884 2013-10-02 Pedro Alves <palves@redhat.com>
8886 * server.c (process_serial_event): Don't output "GDBserver
8887 exiting" if GDB is connected through stdio.
8888 * target.c (mywait): Likewise, be silent if GDB is connected
8891 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8893 * lynx-low.c (lynx_add_threads_after_attach): New function.
8894 (lynx_attach): Remove call to add_thread. Add call to
8895 lynx_add_threads_after_attach instead.
8897 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8899 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8900 * config.in, configure: Regenerated.
8902 2013-09-18 Yao Qi <yao@codesourcery.com>
8905 * server.c (start_inferior): Clear 'resume_info'.
8907 2013-09-16 Jiong Wang <jiwang@tilera.com>
8909 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8912 2013-09-16 Jiong Wang <jiwang@tilera.com>
8914 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8915 linux-tile-low.o to srv_tgtobj.
8917 2013-09-16 Will Newton <will.newton@linaro.org>
8919 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8922 2013-09-06 Pedro Alves <palves@redhat.com>
8924 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8925 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8926 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8927 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8928 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8929 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8931 2013-09-06 Pedro Alves <palves@redhat.com>
8933 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8934 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8936 2013-09-06 Pedro Alves <palves@redhat.com>
8938 * linux-amd64-ipa.c: Include tracepoint.h.
8939 * linux-i386-ipa.c: Include tracepoint.h.
8941 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8943 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8944 (ps_get_thread_area): New function.
8946 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8948 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8949 (initialize_low_arch): Call init_registers_crisv32 rather than
8950 init_register_crisv32.
8952 2013-09-05 Pedro Alves <palves@redhat.com>
8954 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8956 * hostio.h: ... this new file.
8957 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8958 win32-low.c: Include hostio.h.
8960 2013-09-05 Pedro Alves <palves@redhat.com>
8962 * server.h (gdb_client_data, handler_func, callback_handler_func)
8963 (delete_file_handler, add_file_handler, append_callback_event)
8964 (delete_callback_event, start_event_loop, initialize_event_loop):
8965 Move to event-loop.h and include it.
8966 * event-loop.h: New file.
8968 2013-09-05 Pedro Alves <palves@redhat.com>
8970 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8971 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8972 (loaded_dll, unloaded_dll): Move to ...
8973 * dll.h: ... this new file.
8974 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8976 2013-09-05 Pedro Alves <palves@redhat.com>
8978 * server.h (current_process, get_thread_process, all_processes)
8979 (add_inferior_to_list, for_each_inferior, current_inferior)
8980 (remove_inferior, add_process, remove_process, find_process_pid)
8981 (have_started_inferiors_p, have_attached_inferiors_p)
8982 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8983 (clear_inferiors, find_inferior, find_inferior_id)
8984 (inferior_target_data, set_inferior_target_data)
8985 (inferior_regcache_data, set_inferior_regcache_data): Move to
8986 inferiors.h, and include it.
8987 * inferiors.h: New file.
8989 2013-09-05 Pedro Alves <palves@redhat.com>
8991 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8995 2013-09-05 Pedro Alves <palves@redhat.com>
8997 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8999 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9000 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9001 (handle_tracepoint_general_set, handle_tracepoint_query)
9002 (tracepoint_finished_step, tracepoint_was_hit)
9003 (release_while_stepping_state_list, current_traceframe)
9004 (in_readonly_region, traceframe_read_mem)
9005 (fetch_traceframe_registers, traceframe_read_sdata)
9006 (traceframe_read_info, struct fast_tpoint_collect_status)
9007 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9008 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9009 (supply_fast_tracepoint_registers)
9010 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9011 (ipa_tdesc, claim_trampoline_space)
9012 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9013 (agent_mem_read, agent_get_trace_state_variable_value)
9014 (agent_set_trace_state_variable_value, agent_tsv_read)
9015 (agent_mem_read_string, get_raw_reg_func_addr)
9016 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9017 * tracepoint.h: ... this new file.
9019 2013-09-05 Pedro Alves <palves@redhat.com>
9021 * server.h (perror_with_name, error, fatal, warning, paddress)
9022 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9024 * utils.h: New file.
9026 2013-09-05 Pedro Alves <palves@redhat.com>
9028 * server.h (remote_debug, noack_mode, transport_is_reliable)
9029 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9030 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9031 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9032 (write_enn, initialize_async_io, enable_async_io)
9033 (disable_async_io, check_remote_input_interrupt_request)
9034 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9035 (dead_thread_notify, prepare_resume_reply)
9036 (decode_address_to_semicolon, decode_address, decode_m_packet)
9037 (decode_M_packet, decode_X_packet, decode_xfer_write)
9038 (decode_search_memory_packet, unhexify, hexify)
9039 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9040 (look_up_one_symbol, relocate_instruction)
9041 (monitor_output): Move to remote-utils.h, and include it.
9042 * remote-utils.h: New file.
9044 2013-09-05 Pedro Alves <palves@redhat.com>
9046 * server.h (_): Delete.
9048 2013-09-02 Pedro Alves <palves@redhat.com>
9050 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9051 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9053 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9055 2013-09-02 Pierre Muller <muller@sourceware.org>
9057 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9058 or WriteProcessMemory complete successfully and handle
9059 ERROR_PARTIAL_COPY error.
9061 2013-09-02 Pedro Alves <palves@redhat.com>
9063 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9064 error instead of EIO.
9066 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9069 * linux-low.c: Include filestuff.h.
9070 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9071 * lynx-low.c: Include filestuff.h.
9072 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9073 * server.c: Include filestuff.h.
9074 (main): Call notice_open_fds.
9075 * spu-low.c: Include filestuff.h.
9076 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9078 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9080 * Makefile.in: Explain why ../target and ../nat are not
9081 listed as include file search paths.
9082 (linux-waitpid.o): New object file rule.
9083 * configure.srv (srv_native_linux_obj): New variable.
9084 Replace all occurrences of linux native object files with
9085 $srv_native_linux_obj.
9086 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9087 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9088 (linux_enable_event_reporting): Remove declaration.
9089 (my_waitpid): Moved to common/linux-waitpid.c.
9090 (linux_wait_for_event): Pass ptid when calling
9091 linux_enable_event_reporting.
9092 (linux_supports_tracefork_flag): Remove.
9093 (linux_enable_event_reporting): Likewise.
9094 (linux_tracefork_grandchild): Remove.
9095 (STACK_SIZE): Moved to common/linux-ptrace.c.
9096 (linux_tracefork_child): Remove.
9097 (linux_test_for_tracefork): Remove.
9098 (linux_look_up_symbols): Call linux_supports_traceclone.
9099 (initialize_low): Remove call to linux_test_for_tracefork.
9100 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9101 common/linux-ptrace.h.
9102 (PTRACE_TYPE_ARG4): Likewise.
9103 Include linux-ptrace.h.
9105 2013-08-21 Pedro Alves <palves@redhat.com>
9107 * config.in: Renegerate.
9109 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9111 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9112 (SFILES): Remove $(srcdir)/common/target-common.c and
9113 add $(srcdir)/target/waitstatus.c.
9114 (OBS): Remove target-common.o and add waitstatus.o.
9115 (server_h): Remove $(srcdir)/../common/target-common.h and
9116 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9117 and $(srcdir)/../target/waitstatus.h.
9118 (target-common.o): Remove.
9119 (waitstatus.o): New target object file.
9120 * target.h: Do not include target-common.h and
9121 include target/resume.h, target/wait.h and
9122 target/waitstatus.h.
9124 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9126 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9127 to PTRACE_TYPE_ARG3.
9128 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9129 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9131 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9132 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9134 2013-07-27 Jie Zhang <jie@codesourcery.com>
9135 Daniel Jacobowitz <dan@codesourcery.com>
9136 Yao Qi <yao@codesourcery.com>
9138 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9139 (mips-linux-watch.o): New rule.
9140 (mips_linux_watch_h): New variable.
9141 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9143 * linux-mips-low.c: Include mips-linux-watch.h.
9144 (struct arch_process_info, struct arch_lwp_info): New.
9145 (update_watch_registers_callback): New function.
9146 (mips_linux_new_process, mips_linux_new_thread) New functions.
9147 (mips_linux_prepare_to_resume, mips_insert_point): New
9149 (mips_remove_point, mips_stopped_by_watchpoint): New
9151 (rsp_bp_type_to_target_hw_bp_type): New function.
9152 (mips_stopped_data_address): New function.
9153 (the_low_target): Add watchpoint support functions.
9155 2013-07-27 Yao Qi <yao@codesourcery.com>
9157 * i386-low.c: Include break-common.h.
9158 (enum target_hw_bp_type): Remove.
9160 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9162 * Makefile.in (SFILES): /common/target-common.c.
9163 (OBS): Add target-common.o.
9164 (server_h): Add $(srcdir)/../common/target-common.h.
9165 (target-common.o): New target.
9166 * server.c (queue_stop_reply_callback): Free
9167 status string after use.
9168 * target.c (target_waitstatus_to_string): Remove.
9169 * target.h: Include target-common.h.
9170 (resume_kind): Likewise.
9171 (target_waitkind): Likewise.
9172 (target_waitstatus): Likewise.
9173 (TARGET_WNOHANG): Likewise.
9175 2013-07-04 Yao Qi <yao@codesourcery.com>
9177 * Makefile.in (host_alias): Use @host_noncanonical@.
9178 (target_alias): Use @target_noncanonical@.
9179 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9180 ACX_NONCANONICAL_HOST.
9181 * configure: Regenerated.
9184 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9186 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9187 * configure: Rebuild.
9188 * Makefile.in (version_host, version_target): Get from configure.
9189 (version.c): Use $(version_host) and $(version_target).
9191 2013-07-03 Pedro Alves <palves@redhat.com>
9193 * Makefile.in (config.status): Depend on development.sh.
9194 * acinclude.m4: Include libmcheck.m4.
9195 * configure: Regenerate.
9197 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9199 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9200 attribute inside the parentheses.
9201 (winapi_DebugSetProcessKillOnExit): Ditto.
9202 (winapi_DebugBreakProcess): Ditto.
9203 (winapi_GenerateConsoleCtrlEvent): Ditto.
9205 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9207 * notif.h (notif_event): Add a dummy member to avoid compiler
9210 2013-07-01 Pedro Alves <palves@redhat.com>
9212 * hostio.c (HOSTIO_PATH_MAX): Define.
9213 (require_filename, handle_open, handle_unlink, handle_readlink):
9216 2013-07-01 Pedro Alves <palves@redhat.com>
9218 * server.h: Include "pathmax.h".
9219 * linux-low.c: Don't include sys/param.h.
9220 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9222 * win32-low.c: Don't include sys/param.h.
9223 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9225 2013-07-01 Pedro Alves <palves@redhat.com>
9227 * event-loop.c: Don't check HAVE_UNISTD_H before including
9229 * gdbreplay.c: Likewise.
9230 * remote-utils.c: Likewise.
9231 * server.c: Likewise.
9232 * configure.ac: Don't check for unistd.h.
9233 * configure: Regenerate.
9235 2013-06-28 Tom Tromey <tromey@redhat.com>
9237 * Makefile.in (version.c): Use version.in, not
9240 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9242 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9243 * configure: Rebuild.
9244 * Makefile.in (version_host, version_target): Get from configure.
9245 (version.c): Use $(version_host) and $(version_target).
9247 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9249 Fix trace-status to output user name without trailing colon.
9250 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9252 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9254 Fix trace-status to output proper start-time and stop-time.
9255 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9256 output start time and stop time in hex as gdb expects.
9258 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9260 * tracepoint.c (build_traceframe_info_xml): Output trace state
9261 variables present in the trace buffer.
9263 2013-06-24 Tom Tromey <tromey@redhat.com>
9265 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9267 (version.o): Remove.
9268 * gdbreplay.c: Include version.h.
9269 (version, host_name): Don't declare.
9270 * server.h: Include version.h.
9271 (version, host_name): Don't declare.
9273 2013-06-12 Pedro Alves <palves@redhat.com>
9275 * linux-x86-low.c (linux_is_elf64): Delete global.
9276 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9277 with local linux_pid_exe_is_elf_64_file use.
9279 2013-06-11 Pedro Alves <palves@redhat.com>
9281 * linux-low.c (regset_disabled, disable_regset): New functions.
9282 (regsets_fetch_inferior_registers)
9283 (regsets_store_inferior_registers): Use them.
9284 (initialize_regsets_info); Don't allocate the disabled_regsets
9286 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9289 2013-06-11 Pedro Alves <palves@redhat.com>
9291 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9294 2013-06-11 Pedro Alves <palves@redhat.com>
9296 * linux-x86-low.c (initialize_low_arch): Call
9297 init_registers_x32_avx_linux.
9299 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9301 Fix compatibility with Android Bionic.
9302 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9305 2013-06-07 Pedro Alves <palves@redhat.com>
9308 * Makefile.in (OBS): Add tdesc.o.
9309 (IPA_OBJS): Add tdesc-ipa.o.
9310 (tdesc-ipa.o): New rule.
9311 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9313 * linux-low.c (new_inferior): Delete.
9314 (disabled_regsets, num_regsets): Delete.
9315 (linux_add_process): Adjust to set the new per-process
9317 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9318 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9319 was a stop. When calling arch_setup, switch the current inferior
9320 to the thread that got an event.
9321 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9322 (regsets_fetch_inferior_registers)
9323 (regsets_store_inferior_registers): New regsets_info parameter.
9325 (linux_register_in_regsets): New regs_info parameter. Adjust to
9327 (register_addr, fetch_register, store_register): New usrregs_info
9328 parameter. Adjust to use it.
9329 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9330 parameter regs_info. Adjust to use it.
9331 (linux_fetch_registers): Get the current inferior's regs_info, and
9333 (linux_store_registers): Ditto.
9334 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9335 (initialize_low): Don't initialize the target_regsets here. Call
9336 initialize_low_arch.
9337 * linux-low.h (target_regsets): Delete declaration.
9338 (struct regsets_info): New.
9339 (struct usrregs_info): New.
9340 (struct regs_info): New.
9341 (struct process_info_private) <new_inferior>: New field.
9342 (struct linux_target_ops): Delete the num_regs, regmap, and
9343 regset_bitmap fields. New field regs_info.
9344 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9345 * i387-fp.c (num_xmm_registers): Delete.
9346 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9347 calls to new interface.
9348 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9349 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9350 Infer the number of xmm registers from the regcache's target
9352 * i387-fp.h (num_xmm_registers): Delete.
9353 * inferiors.c (add_thread): Don't install the thread's regcache
9355 * proc-service.c (gregset_info): Fetch the current inferior's
9356 regs_info. Adjust to use it.
9357 * regcache.c: Include tdesc.h.
9358 (register_bytes, reg_defs, num_registers)
9359 (gdbserver_expedite_regs): Delete.
9360 (get_thread_regcache): If the thread doesn't have a regcache yet,
9361 create one, instead of aborting gdbserver.
9362 (regcache_invalidate_one): Rename to ...
9363 (regcache_invalidate_thread): ... this.
9364 (regcache_invalidate_one): New.
9365 (regcache_invalidate): Only invalidate registers of the current
9367 (init_register_cache): Add target_desc parameter, and use it.
9368 (new_register_cache): Ditto. Assert the target description has a
9369 non zero registers_size.
9370 (regcache_cpy): Add assertions. Adjust.
9371 (realloc_register_cache, set_register_cache): Delete.
9372 (registers_to_string, registers_from_string): Adjust.
9373 (find_register_by_name, find_regno, find_register_by_number)
9374 (register_cache_size): Add target_desc parameter, and use it.
9375 (free_register_cache_thread, free_register_cache_thread_one)
9376 (regcache_release, register_cache_size): New.
9377 (register_size): Add target_desc parameter, and use it.
9378 (register_data, supply_register, supply_register_zeroed)
9379 (supply_regblock, supply_register_by_name, collect_register)
9380 (collect_register_as_string, collect_register_by_name): Adjust.
9381 * regcache.h (struct target_desc): Forward declare.
9382 (struct regcache) <tdesc>: New field.
9383 (init_register_cache, new_register_cache): Add target_desc
9385 (regcache_invalidate_thread): Declare.
9386 (regcache_invalidate_one): Delete declaration.
9387 (regcache_release): Declare.
9388 (find_register_by_number, register_cache_size, register_size)
9389 (find_regno): Add target_desc parameter.
9390 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9392 * remote-utils.c: Include tdesc.h.
9393 (outreg, prepare_resume_reply): Adjust.
9394 * server.c: Include tdesc.h.
9395 (gdbserver_xmltarget): Delete declaration.
9396 (get_features_xml, process_serial_event): Adjust.
9397 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9399 (struct process_info) <tdesc>: New field.
9400 (ipa_tdesc): Declare.
9401 * tdesc.c: New file.
9402 * tdesc.h: New file.
9403 * tracepoint.c: Include tdesc.h.
9404 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9405 (get_context_regcache): Adjust to pass ipa_tdesc down.
9406 (do_action_at_tracepoint): Adjust to get the register cache size
9407 from the context regcache's description.
9408 (traceframe_walk_blocks): Adjust to get the register cache size
9409 from the current trace frame's description.
9410 (traceframe_get_pc): Adjust to get current trace frame's
9411 description and pass it down.
9412 (gdb_collect): Adjust to get the register cache size from the
9414 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9415 (gdbserver_xmltarget): Delete.
9416 (initialize_low_tracepoint): Set the ipa's target description.
9417 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9418 (initialize_low_tracepoint): Set the ipa's target description.
9419 * linux-x86-low.c: Include tdesc.h.
9420 [__x86_64__] (is_64bit_tdesc): New.
9421 (ps_get_thread_area, x86_get_thread_area): Use it.
9422 (i386_cannot_store_register): Rename to ...
9423 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9424 (i386_cannot_fetch_register): Rename to ...
9425 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9426 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9428 (target_regsets): Rename to ...
9429 (x86_regsets): ... this.
9430 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9432 (x86_siginfo_fixup): Use is_64bit_tdesc.
9433 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9434 (tdesc_x32_avx_linux, tdesc_x32_linux)
9435 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9437 (x86_linux_update_xmltarget): Delete.
9438 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9439 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9440 (AMD64_LINUX_USER64_CS): New.
9441 (x86_linux_read_description): New, based on
9442 x86_linux_update_xmltarget.
9443 (same_process_callback): New.
9444 (x86_arch_setup_process_callback): New.
9445 (x86_linux_update_xmltarget): New.
9446 (x86_regsets_info): New.
9447 (amd64_linux_regs_info): New.
9448 (i386_linux_usrregs_info): New.
9449 (i386_linux_regs_info): New.
9450 (x86_linux_regs_info): New.
9451 (x86_arch_setup): Reimplement.
9452 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9453 (x86_emit_ops): Ditto.
9454 (the_low_target): Adjust. Install x86_linux_regs_info,
9455 x86_cannot_fetch_register, and x86_cannot_store_register.
9456 (initialize_low_arch): New.
9457 * linux-ia64-low.c (tdesc_ia64): Declare.
9458 (ia64_fetch_register): Adjust.
9459 (ia64_usrregs_info, regs_info): New globals.
9460 (ia64_regs_info): New function.
9461 (the_low_target): Adjust.
9462 (initialize_low_arch): New function.
9463 * linux-sparc-low.c (tdesc_sparc64): Declare.
9464 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9466 (sparc_arch_setup): New function.
9467 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9468 (the_low_target): Adjust.
9469 (initialize_low_arch): New function.
9470 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9471 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9472 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9473 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9474 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9475 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9476 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9477 (tdesc_powerpc_isa205_vsx64l): Declare.
9478 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9479 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9480 (ppc_set_pc, ppc_get_hwcap): Adjust.
9481 (ppc_usrregs_info): Forward declare.
9482 (!__powerpc64__) ppc_regmap_adjusted: New global.
9483 (ppc_arch_setup): Adjust to the current process'es target
9485 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9486 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9487 (ppc_store_evrregset): Adjust.
9488 (target_regsets): Rename to ...
9489 (ppc_regsets): ... this, and make static.
9490 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9491 (ppc_regs_info): New function.
9492 (the_low_target): Adjust.
9493 (initialize_low_arch): New function.
9494 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9495 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9496 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9497 (tdesc_s390x_linux64v2): Declare.
9498 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9499 (s390_fill_gregset, s390_store_last_break): Adjust.
9500 (target_regsets): Rename to ...
9501 (s390_regsets): ... this, and make static.
9502 (s390_get_pc, s390_set_pc): Adjust.
9503 (s390_get_hwcap): New target_desc parameter, and use it.
9504 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9505 (s390_arch_setup): Adjust to set the current process'es target
9506 description. Don't adjust the regmap.
9507 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9508 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9509 (regs_info_3264): New globals.
9510 (s390_regs_info): New function.
9511 (the_low_target): Adjust.
9512 (initialize_low_arch): New function.
9513 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9514 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9515 [__mips64] (init_registers_mips_linux)
9516 (init_registers_mips_dsp_linux): Delete defines.
9517 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9518 (have_dsp): New global.
9519 (mips_read_description): New, based on mips_arch_setup.
9520 (mips_arch_setup): Reimplement.
9521 (get_usrregs_info): New function.
9522 (mips_cannot_fetch_register, mips_cannot_store_register)
9523 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9524 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9525 (target_regsets): Rename to ...
9526 (mips_regsets): ... this, and make static.
9527 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9528 (dsp_regs_info, regs_info): New globals.
9529 (mips_regs_info): New function.
9530 (the_low_target): Adjust.
9531 (initialize_low_arch): New function.
9532 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9533 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9535 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9536 (arm_read_description): New, with bits factored from
9538 (arm_arch_setup): Reimplement.
9539 (target_regsets): Rename to ...
9540 (arm_regsets): ... this, and make static.
9541 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9542 (arm_regs_info): New function.
9543 (the_low_target): Adjust.
9544 (initialize_low_arch): New function.
9545 * linux-m68k-low.c (tdesc_m68k): Declare.
9546 (target_regsets): Rename to ...
9547 (m68k_regsets): ... this, and make static.
9548 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9549 (m68k_regs_info): New function.
9550 (m68k_arch_setup): New function.
9551 (the_low_target): Adjust.
9552 (initialize_low_arch): New function.
9553 * linux-sh-low.c (tdesc_sharch): Declare.
9554 (target_regsets): Rename to ...
9555 (sh_regsets): ... this, and make static.
9556 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9557 (sh_regs_info, sh_arch_setup): New functions.
9558 (the_low_target): Adjust.
9559 (initialize_low_arch): New function.
9560 * linux-bfin-low.c (tdesc_bfin): Declare.
9561 (bfin_arch_setup): New function.
9562 (bfin_usrregs_info, regs_info): New globals.
9563 (bfin_regs_info): New function.
9564 (the_low_target): Adjust.
9565 (initialize_low_arch): New function.
9566 * linux-cris-low.c (tdesc_cris): Declare.
9567 (cris_arch_setup): New function.
9568 (cris_usrregs_info, regs_info): New globals.
9569 (cris_regs_info): New function.
9570 (the_low_target): Adjust.
9571 (initialize_low_arch): New function.
9572 * linux-cris-low.c (tdesc_crisv32): Declare.
9573 (cris_arch_setup): New function.
9574 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9575 (cris_regs_info): New function.
9576 (the_low_target): Adjust.
9577 (initialize_low_arch): New function.
9578 * linux-m32r-low.c (tdesc_m32r): Declare.
9579 (m32r_arch_setup): New function.
9580 (m32r_usrregs_info, regs_info): New globals.
9581 (m32r_regs_info): Adjust.
9582 (initialize_low_arch): New function.
9583 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9584 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9585 (tic6x_usrregs_info): Forward declare.
9586 (tic6x_read_description): New function, based on ...
9587 (tic6x_arch_setup): ... this. Reimplement.
9588 (target_regsets): Rename to ...
9589 (tic6x_regsets): ... this, and make static.
9590 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9591 (tic6x_regs_info): New function.
9592 (the_low_target): Adjust.
9593 (initialize_low_arch): New function.
9594 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9595 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9596 (target_regsets): Rename to ...
9597 (xtensa_regsets): ... this, and make static.
9598 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9600 (xtensa_arch_setup, xtensa_regs_info): New functions.
9601 (the_low_target): Adjust.
9602 (initialize_low_arch): New function.
9603 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9604 (nios2_arch_setup): Set the current process'es tdesc.
9605 (target_regsets): Rename to ...
9606 (nios2_regsets): ... this.
9607 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9608 (nios2_regs_info): New function.
9609 (the_low_target): Adjust.
9610 (initialize_low_arch): New function.
9611 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9612 (aarch64_arch_setup): Set the current process'es tdesc.
9613 (target_regsets): Rename to ...
9614 (aarch64_regsets): ... this.
9615 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9616 (aarch64_regs_info): New function.
9617 (the_low_target): Adjust.
9618 (initialize_low_arch): New function.
9619 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9621 (target_regsets): Rename to ...
9622 (tile_regsets): ... this.
9623 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9624 (tile_regs_info): New function.
9625 (tile_arch_setup): Set the current process'es tdesc.
9626 (the_low_target): Adjust.
9627 (initialize_low_arch): New function.
9628 * spu-low.c (tdesc_spu): Declare.
9629 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9630 * win32-arm-low.c (tdesc_arm): Declare.
9631 (arm_arch_setup): New function.
9632 (the_low_target): Install arm_arch_setup instead of
9634 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9635 (init_windows_x86): Rename to ...
9636 (i386_arch_setup): ... this. Set `win32_tdesc'.
9637 (the_low_target): Adjust.
9638 * win32-low.c (win32_tdesc): New global.
9639 (child_add_thread): Don't create the thread cache here.
9640 (do_initial_child_stuff): Set the new process'es tdesc.
9641 * win32-low.h (struct target_desc): Forward declare.
9642 (win32_tdesc): Declare.
9643 * lynx-i386-low.c (tdesc_i386): Declare global.
9644 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9645 * lynx-low.c (lynx_tdesc): New global.
9646 (lynx_add_process): Set the new process'es tdesc.
9647 * lynx-low.h (struct target_desc): Forward declare.
9648 (lynx_tdesc): Declare global.
9649 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9650 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9651 * nto-low.c (nto_tdesc): New global.
9652 (do_attach): Set the new process'es tdesc.
9653 * nto-low.h (struct target_desc): Forward declare.
9654 (nto_tdesc): Declare.
9655 * nto-x86-low.c (tdesc_i386): Declare.
9656 (nto_x86_arch_setup): Set `nto_tdesc'.
9658 2013-06-04 Gary Benson <gbenson@redhat.com>
9660 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9661 to qSupported response when appropriate.
9662 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9663 with nonzero-length annex.
9664 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9665 arguments supplied in annex.
9667 2013-05-31 Doug Evans <dje@google.com>
9670 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9671 64 bits in 64-cross-32 environment.
9673 2013-05-28 Pedro Alves <palves@redhat.com>
9675 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9676 (aarch64-without-fpu.c): Delete rule.
9677 * configure.srv (aarch64*-*-linux*): Remove references to
9678 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9679 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9682 2013-05-24 Pedro Alves <palves@redhat.com>
9684 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9685 instead of strchr/decode_address. Error if the range isn't split
9686 with a ','. Don't assume there's be a ':' in the action.
9688 2013-05-23 Yao Qi <yao@codesourcery.com>
9689 Pedro Alves <palves@redhat.com>
9691 * linux-low.c (lwp_in_step_range): New function.
9692 (linux_wait_1): If the thread was range stepping and stopped
9693 outside the stepping range, report the stop to GDB. Otherwise,
9694 continue stepping. Add range stepping debug output.
9695 (linux_set_resume_request): Copy the step range from the resume
9697 (linux_supports_range_stepping): New.
9698 (linux_target_ops) <supports_range_stepping>: Set to
9699 linux_supports_range_stepping.
9700 * linux-low.h (struct linux_target_ops)
9701 <supports_range_stepping>: New field.
9702 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9703 * linux-x86-low.c (x86_supports_range_stepping): New.
9704 (the_low_target) <supports_range_stepping>: Set to
9705 x86_supports_range_stepping.
9706 * server.c (handle_v_cont): Handle 'r' action.
9707 (handle_v_requests): Append ";r" if the target supports range
9709 * target.h (struct thread_resume) <step_range_start,
9710 step_range_end>: New fields.
9711 (struct target_ops) <supports_range_stepping>:
9713 (target_supports_range_stepping): New macro.
9715 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9717 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9718 confusion in comment.
9720 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9722 * lynx-low.c (struct process_info_private): New type.
9723 (lynx_add_process): New function.
9724 (lynx_create_inferior, lynx_attach): Replace calls to
9725 add_process by calls to lynx_add_process.
9726 (lynx_resume): If PTID is null, then try using
9727 current_process()->private->last_wait_event_ptid.
9729 (lynx_clear_inferiors): Delete. The contents of that function
9730 has been inlined in lynx_mourn;
9731 (lynx_wait_1): Save the ptid in the process's private data.
9732 (lynx_mourn): Free the process' private data. Replace call
9733 to lynx_clear_inferiors by call to clear_inferiors.
9735 2013-05-17 Yao Qi <yao@codesourcery.com>
9737 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9740 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9742 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9743 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9744 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9745 PT_TEXT_END_ADDR guards. Update comments.
9746 (linux_target_op) <read_offsets>: Conditionally define to
9747 linux_read_offsets if the target is UCLIBC and if it defines
9748 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9750 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9751 Andrew Jenner <andrew@codesourcery.com>
9753 * Makefile.in (SFILES): Add linux-nios2-low.c.
9754 (clean): Add action to delete nios2-linux.c.
9755 (nios2-linux.c): New rule.
9756 * configure.srv: Add nios2*-*-linux*.
9757 * linux-nios2-low.c: New.
9759 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9761 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9763 2013-04-25 Hui Zhu <hui@codesourcery.com>
9766 * ax.c (ax_printf): Add fflush.
9768 2013-04-22 Tom Tromey <tromey@redhat.com>
9770 * Makefile.in (SFILES): Add filestuff.c.
9771 (OBS): Add filestuff.o.
9772 (filestuff.o): New target.
9773 * config.in, configure: Rebuild.
9774 * configure.ac: Check for fdwalk, pipe2.
9776 2013-04-17 Pedro Alves <palves@redhat.com>
9778 * configure.ac (USE_THREAD_DB): Delete variable.
9779 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9780 Don't AC_SUBST USE_THREAD_DB.
9781 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9782 * config.in, configure: Regenerate.
9784 2013-04-16 Pedro Alves <palves@redhat.com>
9786 * linux-low.h (struct lwp_info) <thread_known>: Move under
9787 the USE_THREAD_DB #ifdef.
9789 2013-04-16 Pedro Alves <palves@redhat.com>
9791 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9792 (linux-low.o): Delete rule.
9793 * linux-low.h: Always include "gdb_thread_db.h" instead of
9794 conditionally including thread_db.h.
9795 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9798 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9800 * Makefile.in (install-only): Fix make install regression.
9802 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9804 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9805 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9807 * gdbserver.1: Remove.
9809 2013-03-22 Pedro Alves <palves@redhat.com>
9811 * linux-low.c (handle_extended_wait): Don't call
9812 linux_enable_event_reporting.
9814 2013-03-15 Tony Theodore <tonyt@logyst.com>
9817 * Makefile.in (SHELL): Use @SHELL@.
9819 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9821 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9824 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9826 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9827 Remove extraneous NULL element.
9829 2013-03-13 Yao Qi <yao@codesourcery.com>
9831 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9832 'V' block in trace frame.
9834 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9836 * target.h (struct target_ops): Add btrace ops.
9837 (target_supports_btrace): New macro.
9838 (target_enable_btrace): New macro.
9839 (target_disable_btrace): New macro.
9840 (target_read_btrace): New macro.
9841 * gdbthread.h (struct thread_info): Add btrace field.
9842 * server.c: Include btrace-common.h.
9843 (handle_btrace_general_set): New function.
9844 (handle_btrace_enable): New function.
9845 (handle_btrace_disable): New function.
9846 (handle_general_set): Call handle_btrace_general_set.
9847 (handle_qxfer_btrace): New function.
9848 (struct qxfer qxfer_packets[]): Add btrace entry.
9849 * inferiors.c (remove_thread): Disable btrace.
9850 * linux-low: Include linux-btrace.h.
9851 (linux_low_enable_btrace): New function.
9852 (linux_low_read_btrace): New function.
9853 (linux_target_ops): Add btrace ops.
9854 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9855 Add srv_linux_btrace=yes.
9856 (x86_64-*-linux*): Add linux-btrace.o.
9857 Add srv_linux_btrace=yes.
9858 * configure.ac: Define HAVE_LINUX_BTRACE.
9859 * config.in: Regenerated.
9860 * configure: Regenerated.
9862 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9864 * server.c (handle_qxfer): Preserve error message if -3 is
9866 (qxfer): Document the -3 return value.
9868 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9870 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9871 (linux_btrace_h): New variable.
9872 (linux-btrace.o): New rule.
9874 2013-03-08 Stan Shebs <stan@codesourcery.com>
9875 Hafiz Abid Qadeer <abidh@codesourcery.com>
9877 * tracepoint.c (trace_buffer_size): New global.
9878 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9879 (init_trace_buffer): Change to one-argument function. Allocate
9880 trace buffer memory.
9881 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9882 handle QTBuffer:size packet.
9883 (cmd_bigqtbuffer_size): New function.
9884 (initialize_tracepoint): Call init_trace_buffer with
9885 DEFAULT_TRACE_BUFFER_SIZE.
9886 * server.c (handle_query): Add QTBuffer:size in the
9889 2013-03-07 Yao Qi <yao@codesourcery.com>
9891 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9892 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9894 (cmd_qtsp): Adjust condition. Do post increment.
9895 Set cur_action and cur_step_action back to 0.
9897 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9900 * linux-low.c (linux_write_memory): Return early success if LEN is
9903 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9905 * configure.srv: Add x86_64-*-cygwin* as target.
9907 2013-02-28 Tom Tromey <tromey@redhat.com>
9909 * configure.ac: Invoke AC_SYS_LARGEFILE.
9910 * configure, config.in: Rebuild.
9912 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9914 * win32-low.c: Throughout, fix format strings and casts of
9915 printf-like functions to avoid type related warnings on all
9917 (get_child_debug_event): Print dwDebugEventCode as hex since
9918 that's how it's usually documented.
9920 2013-02-28 Yao Qi <yao@codesourcery.com>
9922 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9925 2013-02-27 Jiong Wang <jiwang@tilera.com>
9927 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9928 (reg-tilegx32.c): New rule.
9929 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9930 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9931 different register info initializer according to elf class.
9932 (init_registers_tilgx32): New function. The tilegx32 register info
9934 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9935 (tile_store_gregset): Likewise.
9937 2013-02-27 Yao Qi <yao@codesourcery.com>
9939 * server.c (process_point_options): Print debug message when
9940 debug_threads is true.
9942 2013-02-26 Yao Qi <yao@codesourcery.com>
9944 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9946 2013-02-19 Pedro Alves <palves@redhat.com>
9947 Kai Tietz <ktietz@redhat.com>
9951 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9952 instead of strtoul to extract address from packet.
9953 (process_serial_event) <'z'>: Likewise.
9955 2013-02-18 Yao Qi <yao@codesourcery.com>
9957 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9959 2013-02-14 Pedro Alves <palves@redhat.com>
9963 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9964 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9966 2013-02-14 Pedro Alves <palves@redhat.com>
9968 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9970 2013-02-14 Pedro Alves <palves@redhat.com>
9972 * tracepoint.c (save_string): Delete.
9973 (add_tracepoint_action): Use savestring instead of save_string.
9975 2013-02-12 Pedro Alves <palves@redhat.com>
9977 * linux-xtensa-low.c: Ditto.
9978 * xtensa-xtregs.c: Ditto.
9980 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9982 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9985 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9987 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9988 aarch64_num_wp_regs and aarch64_num_bp_regs to
9989 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9991 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9993 * linux-aarch64-low.c (ps_get_thread_area): Replace
9994 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9996 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9997 Marcus Shawcroft <marcus.shawcroft@arm.com>
9998 Nigel Stephens <nigel.stephens@arm.com>
9999 Yufeng Zhang <yufeng.zhang@arm.com>
10001 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10002 (aarch64.c, aarch64-without-fpu.c): New targets.
10003 * configure.srv (aarch64*-*-linux*): New.
10004 * linux-aarch64-low.c: New file.
10006 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10008 * linux-low.c (handle_extended_wait, linux_create_inferior)
10009 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10010 (dequeue_one_deferred_signal, linux_resume_one_thread)
10011 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10012 (linux_tracefork_grandchild, linux_test_for_tracefork)
10013 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10014 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10015 where the argument is 0.
10017 2013-01-25 Yao Qi <yao@codesourcery.com>
10019 * event-loop.c: Include "queue.h".
10020 (gdb_event_p): New typedef.
10021 (struct gdb_event) <next_event>: Remove.
10022 (event_queue): Change to QUEUE(gdb_event_p).
10023 (async_queue_event): Remove.
10024 (gdb_event_xfree): New.
10025 (initialize_event_loop): New.
10026 (process_event): Use API from QUEUE.
10027 (wait_for_event): Likewise.
10028 * server.c (main): Call initialize_event_loop.
10029 * server.h (initialize_event_loop): Declare.
10031 2013-01-18 Yao Qi <yao@codesourcery.com>
10033 * ax.h (struct eval_agent_expr_context): New.
10034 (gdb_eval_agent_expr): Update declaration.
10035 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10036 TFRAME. Add new argument CTX.
10037 * server.h (struct eval_agent_expr_context): Declare.
10038 (agent_mem_read, agent_tsv_read): Update declaration.
10039 (agent_mem_read_string): Likewise.
10040 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10041 (add_traceframe_block): Add new argument TPOINT.
10042 Increase TPOINT->traceframe_usage.
10043 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10044 eval_tracepoint_agent_expr.
10045 (condition_true_at_tracepoint): Likewise.
10046 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10047 (agent_mem_read_string, agent_tsv_read): Likewise.
10049 2013-01-16 Yao Qi <yao@codesourcery.com>
10051 * linux-low.c (linux_resume_one_lwp): Don't check
10052 'lwp->bp_reinsert != 0'.
10054 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10055 Pedro Alves <palves@redhat.com>
10057 * lynx-low.c (ptrace_request_to_str): Define a temporary
10058 macro and use it to simplify this function's implementation.
10060 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10062 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10065 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10067 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10069 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10071 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10073 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10075 * lynx-low.c (lynx_resume): Use the resume_info parameter
10076 to determine the ptid for the lynx_ptrace call, unless
10077 it is equal to minus_one_ptid, in which case we use the
10078 ptid of the current_inferior.
10079 (lynx_wait_1): After having received a thread create/exit
10080 event, resume the inferior's execution using the signaling
10081 thread's ptid, rather than the old ptid.
10083 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10085 * lynx-low.c (lynx_resume): Delete variable ret.
10087 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10089 * gdbreplay.c (gdbreplay_version): Update copyright year.
10090 * server.c (gdbserver_version): Likewise.
10092 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10094 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10097 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10099 * lynx-low.c (ptrace_request_to_str): Add handling for
10100 PTRACE_GETTRACESIG.
10102 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10104 * lynx-low.c (lynx_attach): Delete variable new_process.
10106 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10108 * lynx-low.c (lynx_create_inferior): Delete variable
10111 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10113 * lynx-low.c (ptrace_request_to_str): Do not handle
10114 PTRACE_GETTHREADLIST if this macro does not exist.
10116 2012-12-15 Yao Qi <yao@codesourcery.com>
10118 * Makefile.in (OBS): Add notif.o.
10119 * notif.c, notif.h: New.
10120 * server.c: Include "notif.h".
10121 (struct vstop_notif) <next>: Remove.
10123 (queue_stop_reply): Update.
10124 (push_event, send_next_stop_reply): Remove.
10125 (discard_queued_stop_replies): Update.
10126 (notif_stop): New variable.
10127 (handle_v_stopped): Remove.
10128 (handle_v_requests): Don't call handle_v_stopped. Call
10129 handle_ack_notif instead.
10130 (queue_stop_reply_callback): Call notif_event_enque instead
10131 of queue_stop_reply.
10132 (handle_status): Don't call send_next_stop_reply, call
10133 notif_write_event instead.
10134 (kill_inferior_callback): Likewise.
10135 (detach_or_kill_inferior_callback): Likewise.
10136 (main): Call initialize_notif.
10137 (process_serial_event): Call QUEUE_is_empty.
10138 (handle_target_event): Call notif_push instead of push event.
10139 * server.h (push_event): Remove declaration.
10141 2012-12-10 Tom Tromey <tromey@redhat.com>
10143 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10144 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10147 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10148 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10149 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10150 (amd64-linux-ipa.o, ax.o): Rewrite.
10151 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10152 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10153 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10154 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10155 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10156 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10157 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10158 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10159 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10160 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10161 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10162 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10163 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10164 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10165 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10166 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10167 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10168 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10169 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10170 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10171 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10172 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10173 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10174 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10175 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10176 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10177 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10178 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10179 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10180 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10181 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10182 (reg-tilegx.o): Remove.
10183 (all_object_files): New macro.
10184 Include .deps files.
10185 * aclocal.m4, configure: Rebuild.
10186 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10187 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10188 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10190 2012-12-05 Tom Tromey <tromey@redhat.com>
10193 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10195 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10197 * configure.ac: Check for linux/perf_event.h.
10198 * config.in: Regenerated.
10199 * configure: Regenerated.
10201 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10203 * hostio.c (handle_readlink): Decrease buffer size
10204 parameter passed to readlink by one byte.
10206 2012-11-26 Yao Qi <yao@codesourcery.com>
10208 * configure.ac (build_warnings): Append '-Wempty-body'.
10209 * configure: Regenerated.
10210 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10213 2012-11-15 Pierre Muller <muller@sourceware.org>
10215 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10216 * config.in: Regenerate.
10217 * configure: Regenerate.
10218 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10219 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10220 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10221 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10223 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10224 instead of <sys/wait.h> header.
10225 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10227 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10229 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10230 (various make rules): Remove -DGDBSERVER
10232 2012-11-09 Yao Qi <yao@codesourcery.com>
10234 * spu-low.c (current_ptid): Move it to ..
10235 * gdbthread.h: ... here. New.
10236 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10237 * server.c (myresume, process_serial_event): Likewise.
10238 * thread-db.c (thread_db_find_new_threads): Likewise.
10239 * tracepoint.c (run_inferior_command): Likewise.
10241 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10243 * server.c (handle_search_memory_1): Include access length in
10246 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10248 * linux-crisv32-low.c: Fix compile errors.
10250 2012-09-04 Yao Qi <yao@codesourcery.com>
10252 * tracepoint.c (cmd_qtsv): Adjust debug message.
10253 Don't check CUR_TPOINT.
10255 2012-08-28 Yao Qi <yao@codesourcery.com>
10257 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10258 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10259 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10260 Remove declarations of xmalloc, xreallloc, xstrdup and
10262 * Makefile.in (libiberty_h): New.
10263 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10264 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10266 2012-08-23 Yao Qi <yao@codesourcery.com>
10268 * server.h: Remove declaration of 'xsnprintf'.
10270 2012-08-22 Keith Seitz <keiths@redhat.com>
10272 * server.h: Include build-gnulib-gbserver/config.h.
10273 * gdbreplay.c: Likewise.
10275 2012-08-08 Doug Evans <dje@google.com>
10277 * Makefile.in (SFILES): Add gdb_vecs.c.
10278 (OBS): Add gdb_vecs.o.
10279 (gdb_vecs_h, host_defs_h): New variables.
10280 (thread-db.o): Add $(gdb_vecs_h) dependency.
10281 (gdb_vecs.o): New rule.
10282 * thread-db.c: #include "gdb_vecs.h".
10283 (thread_db_load_search): Use a vector to iterate over path elements.
10284 Handle text appearing after "$pdir".
10286 * configure.ac: Add check for strstr.
10287 * config.in: Regenerate.
10288 * configure: Regenerate.
10290 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10292 * hostio.c (handle_pread): If pread fails, fall back to attempting
10294 (handle_pwrite): Likewise for pwrite.
10296 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10298 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10299 between unsupported TYPE and unimplementable ADDR/LEN combination.
10300 (arm_insert_point): Act on new return value.
10302 2012-07-31 Pedro Alves <palves@redhat.com>
10304 * server.c (process_point_options): Only skip tokens if we find
10305 one that is unrecognized. Don't treat 'X' specially while
10306 skipping unrecognized tokens.
10308 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10310 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10311 to 4-byte-align HW breakpoint addresses for Thumb.
10313 2012-07-27 Yao Qi <yao@codesourcery.com>
10317 * server.h: Declare gdb_agent_about_to_close.
10318 * target.c (kill_inferior): Include "agent.h".
10319 New. Send command 'kill'.
10320 * target.h (kill_inferior): Removed macro.
10321 * tracepoint.c (gdb_agent_about_to_close): New.
10322 (gdb_agent_helper_thread): Handle command 'close'.
10323 Wait endlessly until the inferior stops.
10324 Install gdb_agent_remove_socket to atexit hook.
10325 (agent_socket_name): New static variable.
10326 (gdb_agent_socket_init): Replace local variable 'name' with
10327 'agent_socket_name'.
10328 (gdb_agent_remove_socket): New.
10330 2012-07-27 Yao Qi <yao@codesourcery.com>
10332 * server.c (process_point_options): Stop at 'X' when parsing.
10334 2012-07-19 Michael Eager <eager@eagercon.com>
10336 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10338 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10339 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10340 hardware breakpoint.
10342 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10344 * gdbserver/linux-low.c (initialize_low): Call
10345 linux_ptrace_init_warnings.
10347 2012-07-02 Doug Evans <dje@google.com>
10349 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10352 2012-07-02 Stan Shebs <stan@codesourcery.com>
10354 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10355 (ax.o): Add it to build rule.
10357 (OBS): Add format.o.
10358 (IPA_OBS): Add format.o.
10359 * server.c (handle_query): Claim support for breakpoint commands.
10360 (process_point_options): Add command case.
10361 (process_serial_event): Leave running if there are printfs in
10363 * mem-break.h (any_persistent_commands): Declare.
10364 (add_breakpoint_commands): Declare.
10365 (gdb_no_commands_at_breakpoint): Declare.
10366 (run_breakpoint_commands): Declare.
10367 * mem-break.c (struct point_command_list): New struct.
10368 (struct breakpoint): New field command_list.
10369 (any_persistent_commands): New function.
10370 (add_commands_to_breakpoint): New function.
10371 (add_breakpoint_commands): New function.
10372 (gdb_no_commands_at_breakpoint): New function.
10373 (run_breakpoint_commands): New function.
10374 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10376 * ax.c: Include format.h.
10377 (ax_printf): New function.
10378 (gdb_eval_agent_expr): Add printf opcode.
10380 2012-06-13 Yao Qi <yao@codesourcery.com>
10382 * server.c (start_inferior): Remove duplicated writes to fields
10383 'last_resume_kind' and 'last_status' of 'current_inferior'.
10385 2012-06-12 Yao Qi <yao@codesourcery.com>
10386 Pedro Alves <palves@redhat.com>
10388 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10390 * server.c (handle_v_cont): Extend comment.
10392 2012-06-11 Yao Qi <yao@codesourcery.com>
10394 * linux-low.c (linux_attach): Add 'static'.
10396 2012-06-06 Yao Qi <yao@codesourcery.com>
10398 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10400 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10402 Fix gcc -flto compilation warning.
10403 * server.c (main): Make variable multi_mode and attach volatile.
10405 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10407 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10408 if the platform doesn't know about it.
10410 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10412 * Makefile.in (SFILES): Add linux-tile-low.c.
10413 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10414 * configure.srv: Handle tilegx-*-linux*.
10415 * linux-tile-low.c: New file.
10417 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10419 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10421 2012-05-24 Pedro Alves <palves@redhat.com>
10425 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10427 2012-05-24 Pedro Alves <palves@redhat.com>
10431 Replace target_signal with gdb_signal throughout.
10433 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10435 * linux-low.c (linux_store_registers): Avoid the copying sequence
10436 when no data has been retrieved by ptrace.
10438 2012-05-22 Will Deacon <will.deacon@arm.com>
10440 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10441 Include asm/ptrace.h.
10442 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10445 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10447 * linux-low.c (linux_store_registers): Don't re-retrieve data
10448 with ptrace that has already been obtained from /proc. Always
10449 copy any data retrieved with ptrace to the buffer supplied.
10451 2012-05-11 Yao Qi <yao@codesourcery.com>
10452 Pedro Alves <palves@redhat.com>
10454 * linux-low.c (enum stopping_threads_kind): New.
10455 (stopping_threads): Change type to `enum stopping_threads_kind'.
10456 (handle_extended_wait): If stopping and suspending threads, leave
10457 the new_lwp suspended too.
10458 (linux_wait_for_event): Adjust.
10459 (stop_all_lwps): Set `stopping_threads' to
10460 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10461 whether we're suspending threads or just stopping them. Assert no
10464 2012-04-29 Yao Qi <yao@codesourcery.com>
10466 * server.h: Move some code to ...
10467 * gdbthread.h: ... here. New.
10468 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10469 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10470 (nto-low.o, win32-low.o): Likewise.
10471 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10472 * regcache.c, remote-utils.c, server.c: Likewise.
10473 * target.c, tracepoint.c, win32-low.c: Likewise.
10475 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10477 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10478 (PTRACE_ARG4_TYPE): Likewise.
10479 (PTRACE_XFER_TYPE): Likewise.
10480 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10481 ptrace to PTRACE_ARG3_TYPE.
10482 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10483 (PTRACE_ARG4_TYPE): Likewise.
10484 (PTRACE_XFER_TYPE): Likewise.
10485 (linux_detach_one_lwp): Cast fourth argument of
10486 ptrace to long then PTRACE_ARG4_TYPE.
10487 (regsets_fetch_inferior_registers): Cast third argument of
10488 ptrace to long then PTRACE_ARG3_TYPE.
10489 (regsets_store_inferior_registers): Likewise.
10491 2012-04-20 Pedro Alves <palves@redhat.com>
10493 * configure: Regenerate.
10495 2012-04-19 Pedro Alves <palves@redhat.com>
10497 * Makefile.in (GNULIB_BUILDDIR): New.
10498 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10499 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10500 (all, install-only, uninstall, clean-info, all-lib, clean): No
10501 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10502 (maintainer-clean realclean distclean): Use subdir_do.
10504 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10505 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10506 * acinclude.m4: Include acx_configure_dir.m4.
10507 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10508 calls. Call AC_PROG_RANLIB. Configure gnulib using
10511 (GNULIB_STDINT_H): Adjust.
10512 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10513 * gdbreplay.c: Include build-gnulib/config.h.
10514 * server.h: Likewise.
10515 * aclocal.m4: Regenerate.
10516 * config.in: Regenerate.
10517 * configure: Regenerate.
10519 2012-04-19 Pedro Alves <palves@redhat.com>
10521 * Makefile.in (LIBGNU, INCGNU): Adjust.
10522 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10523 (all, install-only, uninstall, clean-info, all-lib, clean)
10524 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10525 * configure.ac: Adjust AC_OUTPUT output.
10526 * aclocal.m4: Regenerate.
10527 * configure: Regenerate.
10529 2012-04-19 Pedro Alves <palves@redhat.com>
10531 * Makefile.in (generated_files): New.
10532 (server_h): Remove the explicit dependency on config.h, and depend
10533 on $generated_files.
10535 2012-04-19 Pedro Alves <palves@redhat.com>
10537 * Makefile.in (INCGNU): Add -Ignulib.
10539 2012-04-19 Pedro Alves <palves@redhat.com>
10541 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10542 (INCGNU): ... this, and spell out -I here.
10543 (GNULIB_LIB): Rename to ...
10544 (LIBGNU): ... this.
10545 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10547 2012-04-19 Pedro Alves <palves@redhat.com>
10549 * config.in: Regenerate.
10551 2012-04-19 Pedro Alves <palves@redhat.com>
10553 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10554 * server.h (memmem): Remove declaration.
10555 * config.in: Regenerate.
10556 * configure: Regenerate.
10558 2012-04-19 Yao Qi <yao@codesourcery.com>
10560 * Makefile.in (SFILES): Add common/vec.c.
10564 2012-04-19 Yao Qi <yao@codesourcery.com>
10566 * remote-utils.c (prepare_resume_reply): Replace with macro
10567 target_core_of_thread.
10568 * server.c (handle_qxfer_threads_proper): Likewise.
10569 * target.h (traget_core_of_thread): New macro.
10571 2012-04-18 Pedro Alves <palves@redhat.com>
10573 * aclocal.m4: Regenerate.
10574 * configure: Regenerate.
10576 2012-04-16 Yao Qi <yao@codesourcery.com>
10578 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10579 duplicated on address.
10581 2012-04-16 Yao Qi <yao@codesourcery.com>
10583 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10584 (struct tracepoint_action_ops) <send>: New field.
10585 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10586 (agent_expr_send, x_tracepoint_action_send): New.
10587 (l_tracepoint_action_send): New.
10588 (cmd_qtdp): Download and install tracepoint
10589 according to `use_agent'.
10590 (run_inferior_command): Add one more parameter `len'.
10592 (tracepoint_send_agent): New.
10593 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10595 2012-04-16 Yao Qi <yao@codesourcery.com>
10597 * tracepoint.c (download_tracepoints): Moved to ...
10598 (cmd_qtstart): ... here.
10600 2012-04-14 Yao Qi <yao@codesourcery.com>
10602 * tracepoint.c: Include inttypes.h.
10603 (struct collect_memory_action): Use sized types.
10604 (struct tracepoint): Likewise.
10605 (cmd_qtdp, stop_tracing): Update print specifiers.
10606 (cmd_qtp, response_tracepoint): Likewise.
10607 (collect_data_at_tracepoint): Likewise.
10608 (collect_data_at_step): Likewise.
10610 2012-04-14 Yao Qi <yao@codesourcery.com>
10612 Import gnulib module inttypes.
10613 * aclocal.m4, config.in, configure: Regenerated.
10615 2012-04-14 Yao Qi <yao@codesourcery.com>
10617 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10618 Makefile and config.status at last.
10620 2012-04-13 Yao Qi <yao@codesourcery.com>
10622 * tracepoint.c: Include stdint.h unconditionally.
10624 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10626 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10627 on BFD_HAVE_SYS_PROCFS_TYPE.
10628 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10629 * configure: Regenerate.
10630 * config.in: Likewise.
10632 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10634 * Makefile.in (clean): Also remove x32.c x32-linux.c
10635 x32-avx.c x32-avx-linux.c.
10636 (x32.o): New target.
10638 (x32-linux.o): Likewise.
10639 (x32-linux.c): Likewise.
10640 (x32-avx.o): Likewise.
10641 (x32-avx.c): Likewise.
10642 (x32-avx-linux.o): Likewise.
10643 (x32-avx-linux.c): Likewise.
10645 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10646 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10647 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10648 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10649 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10650 i386/x32-avx-linux.xml.
10652 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10653 (init_registers_x32_avx_linux): Likwise.
10654 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10655 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10657 2012-04-13 Pedro Alves <palves@redhat.com>
10659 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10660 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10661 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10662 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10665 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10667 * linux-x86-low.c (compat_x32_clock_t): New.
10668 (compat_x32_siginfo_t): Likewise.
10669 (compat_x32_siginfo_from_siginfo): Likewise.
10670 (siginfo_from_compat_x32_siginfo): Likewise.
10671 (linux_is_elf64): Likewise.
10672 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10673 and siginfo_from_compat_x32_siginfo for x32.
10674 (x86_arch_setup): Set linux_is_elf64.
10676 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10679 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10681 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10682 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10683 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10684 compatible with process.
10686 2012-04-12 Yao Qi <yao@codesourcery.com>
10688 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10689 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10690 (install-only, install-info, clean): Handle sub dir gnulib.
10691 (all-lib, am--refresh): New targets.
10692 (memmem.o): Remove target.
10693 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10694 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10695 (AC_REPLACE_FUNCS): Remove memmem.
10696 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10697 (AC_OUTPUT): Generate Makefile in gnulib/.
10698 * aclocal.m4, config.in, configure: Regenerated.
10700 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10702 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10704 2012-04-05 Pedro Alves <palves@redhat.com>
10706 -Werror=strict-aliasing
10708 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10711 2012-04-04 Pedro Alves <palves@redhat.com>
10713 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10714 (sparc_store_gregset_from_stack, sparc_store_gregset)
10715 (sparc_breakpoint_at): Fix formatting.
10717 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10719 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10721 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10722 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10723 * config.in: Regenerate.
10724 * configure: Likewise.
10726 2012-03-29 Pedro Alves <palves@redhat.com>
10728 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10729 Correct ptrace arguments.
10731 2012-03-28 Pedro Alves <palves@redhat.com>
10733 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10734 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10735 (IA64_FR1_REGNUM): New defines.
10736 (ia64_fetch_register): New.
10737 (the_low_target): Install it.
10738 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10740 * linux-low.c (linux_fetch_registers): Try the
10741 the_low_target.fetch_register hook first.
10743 * linux-arm-low.c (the_low_target): Adjust.
10744 * linux-bfin-low.c (the_low_target): Adjust.
10745 * linux-cris-low.c (the_low_target): Adjust.
10746 * linux-crisv32-low.c (the_low_target): Adjust.
10747 * linux-m32r-low.c (the_low_target): Adjust.
10748 * linux-m68k-low.c (the_low_target): Adjust.
10749 * linux-mips-low.c (the_low_target): Adjust.
10750 * linux-ppc-low.c (the_low_target): Adjust.
10751 * linux-s390-low.c (the_low_target): Adjust.
10752 * linux-sh-low.c (the_low_target): Adjust.
10753 * linux-sparc-low.c (the_low_target): Adjust.
10754 * linux-tic6x-low.c (the_low_target): Adjust.
10755 * linux-x86-low.c (the_low_target): Adjust.
10756 * linux-xtensa-low.c (the_low_target): Adjust.
10758 2012-03-26 Pedro Alves <palves@redhat.com>
10760 * server.c (handle_qxfer_libraries): Don't bail early if
10761 the_target->qxfer_libraries_svr4 is not NULL.
10763 2012-03-26 Pedro Alves <palves@redhat.com>
10765 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10767 2012-03-23 Pedro Alves <palves@redhat.com>
10769 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10770 "library-list-svr4" element's start tag when the the DSO list is
10773 2012-03-23 Pedro Alves <palves@redhat.com>
10775 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10776 a variable whose type size is the same as the inferior's pointer
10779 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10781 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10783 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10784 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10785 * linux-low.h: Include <signal.h>.
10786 (struct siginfo): Remove forward declaration.
10787 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10790 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10792 * .gitignore: Ignore more files.
10794 2012-03-19 Pedro Alves <palves@redhat.com>
10795 Jan Kratochvil <jan.kratochvil@redhat.com>
10797 * server.c (cont_thread, general_thread): Add describing comments.
10798 (start_inferior): Clear `cont_thread'.
10799 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10802 2012-03-15 Yao Qi <yao@codesourcery.com>
10804 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10806 (cmd_qtdp): ... here.
10808 2012-03-15 Yao Qi <yao@codesourcery.com>
10810 * tracepoint.c (struct tracepoint_action_ops): New.
10811 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10812 (m_tracepoint_action_download): New.
10813 (r_tracepoint_action_download): New.
10814 (x_tracepoint_action_download): New.
10815 (l_tracepoint_action_download): New.
10816 (add_tracepoint_action): Install `action->ops' according type.
10817 (download_tracepoint_1): Move code `download' function pointer
10818 of various tracepoint_action_ops.
10820 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10822 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10823 linux_ptrace_attach_warnings.
10825 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10827 * Makefile.in (linux-ptrace.o): New.
10828 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10829 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10830 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10831 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10832 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10834 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10836 2012-03-08 Yao Qi <yao@codesourcery.com>
10837 Pedro Alves <palves@redhat.com>
10839 Fix PR server/13392.
10840 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10841 offset of JMP insn.
10842 * tracepoint.c (remove_tracepoint): New.
10843 (cmd_qtdp): Call remove_tracepoint when failed to install.
10845 2012-03-07 Pedro Alves <palves@redhat.com>
10847 * linux-low.c (get_detach_signal): New.
10848 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10849 Pass on pending signals to PTRACE_DETACH. Check the result of the
10851 * server.c (program_signals, program_signals_p): New.
10852 (handle_general_set): Handle QProgramSignals.
10853 * server.h (program_signals, program_signals_p): Declare.
10855 2012-03-05 Pedro Alves <palves@redhat.com>
10856 Jan Kratochvil <jan.kratochvil@redhat.com>
10858 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10861 2012-03-03 Yao Qi <yao@codesourcery.com>
10863 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10864 agent_look_up_symbols.
10866 2012-03-03 Yao Qi <yao@codesourcery.com>
10868 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10869 (linux-x86-low.o): Likewise.
10870 * server.h: Remove in_process_agent_loaded.
10871 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10875 2012-03-03 Yao Qi <yao@codesourcery.com>
10877 * tracepoint.c (gdb_agent_capability): New global.
10878 (in_process_agent_loaded_ust): Renamed to
10879 `in_process_agent_supports_ust'.
10881 (in_process_agent_supports_ust): Call agent_capability_check.
10882 (clear_installed_tracepoints): Assert that agent supports
10885 2012-03-03 Yao Qi <yao@codesourcery.com>
10887 * linux-low.c (linux_supports_agent): New.
10888 (linux_target_ops): Initialize field `supports_agent' with
10889 linux_supports_agent.
10890 * target.h (struct target_ops) <supports_agent>: New.
10891 (target_supports_agent): New macro.
10892 * server.c (handle_general_set): Handle packet 'QAgent'.
10893 (handle_query): Send `QAgent+'.
10894 * Makefile.in (server.o): Depends on agent.h.
10896 2012-03-03 Yao Qi <yao@codesourcery.com>
10898 * Makefile.in (OBS): Add agent.o.
10899 Add new rule for agent.o.
10900 Track dependence of tracepoint.c on agent.h.
10901 * tracepoint.c (run_inferior_command_1):
10902 (run_inferior_command): Call agent_run_command.
10903 (gdb_ust_connect_sync_socket): Deleted. Move it to
10905 (resume_thread, stop_thread): Likewise.
10906 (gdb_ust_socket_init): Renamed to ...
10907 (gdb_agent_socket_init): ... New.
10908 (gdb_ust_thread): Renamed to ...
10909 (gdb_agent_helper_thread): ... New.
10910 (gdb_ust_init): Move some code to ...
10911 (gdb_agent_init): ... here. New.
10912 [HAVE_UST]: Call gdb_ust_init.
10913 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10914 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10915 * config.in, configure: Regenerated.
10917 2012-03-02 Pedro Alves <palves@redhat.com>
10919 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10920 * linux-low.c (struct simple_pid_list): New.
10921 (stopped_pids): New a struct simple_pid_list pointer.
10922 (add_to_pid_list, pull_pid_from_list): New.
10923 (handle_extended_wait): Don't assume the first signal new children
10924 report is SIGSTOP. Adjust call to pull_pid_from_list.
10925 (linux_wait_for_lwp): Adjust.
10927 2012-03-02 Yao Qi <yao@codesourcery.com>
10929 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10932 2012-03-02 Yao Qi <yao@codesourcery.com>
10934 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10935 `stop_pc' and `tpoint'. Update caller.
10937 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10939 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10940 * linux-low.c (use_linux_regsets): New macro.
10941 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10942 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10943 (linux_register_in_regsets): New function.
10944 (usr_fetch_inferior_registers): Skip registers covered by
10946 (usr_store_inferior_registers): Likewise.
10947 (usr_fetch_inferior_registers): New macro.
10948 (usr_store_inferior_registers): Likewise.
10949 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10950 (linux_store_registers): Likewise.
10951 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10953 (init_registers_mips64_dsp_linux): Likewise.
10954 (init_registers_mips_linux): New macro.
10955 (init_registers_mips_dsp_linux): Likewise.
10956 (mips_dsp_num_regs): Likewise.
10957 (DSP_BASE, DSP_CONTROL): New fallback macros.
10958 (mips_base_regs): New macro.
10959 (mips_regmap): Use it. Fix the size.
10960 (mips_dsp_regmap): New variable.
10961 (mips_dsp_regset_bitmap): Likewise.
10962 (mips_arch_setup): New function.
10963 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10965 (mips_cannot_store_register): Likewise.
10966 (the_low_target): Update .arch_setup, .num_regs and .regmap
10967 initializers. Add .regset_bitmap initializer.
10968 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10970 * linux-bfin-low.c (the_low_target): Likewise.
10971 * linux-cris-low.c (the_low_target): Likewise.
10972 * linux-crisv32-low.c (the_low_target): Likewise.
10973 * linux-ia64-low.c (the_low_target): Likewise.
10974 * linux-m32r-low.c (the_low_target): Likewise.
10975 * linux-m68k-low.c (the_low_target): Likewise.
10976 * linux-ppc-low.c (the_low_target): Likewise.
10977 * linux-s390-low.c (the_low_target): Likewise.
10978 * linux-sh-low.c (the_low_target): Likewise.
10979 * linux-sparc-low.c (the_low_target): Likewise.
10980 * linux-tic6x-low.c (the_low_target): Likewise.
10981 * linux-x86-low.c (the_low_target): Likewise.
10982 * linux-xtensa-low.c (the_low_target): Likewise.
10983 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10984 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10985 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10987 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10988 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10990 2012-02-29 Yao Qi <yao@codesourcery.com>
10991 Pedro Alves <palves@redhat.com>
10993 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10994 `step_over_finished' is true.
10996 2012-02-27 Pedro Alves <palves@redhat.com>
10998 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10999 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11001 2012-02-27 Pedro Alves <palves@redhat.com>
11004 * linux-low.c (pid_is_stopped): New.
11005 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11007 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11009 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11012 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11014 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11016 2012-02-24 Luis Machado <lgustavo@codesourcery>
11018 * server.c (handle_query): Advertise support for target-side
11019 breakpoint condition evaluation.
11020 (process_point_options): New function.
11021 (process_serial_event): When inserting a breakpoint, check for
11022 a target-side condition that should be evaluated.
11024 * mem-break.c: Include regcache.h and ax.h.
11025 (point_cond_list_t): New data structure.
11026 (breakpoint) <cond_list>: New field.
11027 (find_gdb_breakpoint_at): Make non-static.
11028 (delete_gdb_breakpoint_at): Clear any target-side
11030 (clear_gdb_breakpoint_conditions): New function.
11031 (add_condition_to_breakpoint): Likewise.
11032 (add_breakpoint_condition): Likewise.
11033 (gdb_condition_true_at_breakpoint): Likewise.
11034 (gdb_breakpoint_here): Return result directly instead
11035 of going through a local variable.
11037 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11038 (clear_gdb_breakpoint_conditions): Likewise.
11039 (add_breakpoint_condition): Likewise.
11040 (gdb_condition_true_at_breakpoint): Likewise.
11042 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11043 (need_step_over_p): Take target-side breakpoint condition into
11046 2012-02-24 Luis Machado <lgustavo@codesourcery>
11048 * server.h: Include tracepoint.h.
11049 (agent_mem_read, agent_get_trace_state_variable_value,
11050 agent_set_trace_state_variable_value,
11051 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11052 get_set_tsv_func_addr): New prototypes.
11054 * ax.h: New include file.
11055 * ax.c: New source file.
11057 * tracepoint.c: Include ax.h.
11058 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11059 agent_expr, eval_result_type): Move to ax.h.
11060 (parse_agent_expr): Rename to ...
11061 (gdb_parse_agent_expr): ... this, make it non-static and move
11063 (unparse_agent_expr) Rename to ...
11064 (gdb_unparse_agent_expr): ... this, make it non-static and move
11066 (eval_agent_expr): Rename to ...
11067 (eval_tracepoint_agent_expr): ... this.
11068 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11069 forward declarations.
11070 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11071 (agent_get_trace_state_variable_value): New function.
11072 (agent_set_trace_state_variable_value): New function.
11073 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11074 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11075 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11076 (condition_true_at_tracepoint): Likewise.
11077 (parse_agent_expr): Rename to ...
11078 (gdb_parse_agent_expr): ... this and move to ax.c.
11079 (unparse_agent_expr): Rename to ...
11080 (gdb_unparse_agent_expr): ... this and move to ax.c.
11081 (gdb_agent_op_name): Move to ax.c.
11082 (eval_agent_expr): Rename to ...
11083 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11085 (eval_tracepoint_agent_expr): New function.
11086 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11088 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11090 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11091 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11092 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11093 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11094 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11095 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11096 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11097 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11098 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11099 (compile_bytecodes): Remove forward declaration.
11100 (is_goto_target): Move to ax.c.
11101 (compile_bytecodes): Move to ax.c and call
11102 agent_get_trace_state_variable_value (...) and
11103 agent_set_trace_state_variable_value (...).
11105 * Makefile.in: Update ax.c and IPA dependencies.
11107 2012-02-24 Pedro Alves <palves@redhat.com>
11109 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11110 (cmd_bigqtbuffer_circular): ... this. Only handle
11111 'QTBuffer:circular:'.
11112 (handle_tracepoint_general_set): Adjust.
11114 2012-02-16 Yao Qi <yao@codesourcery.com>
11116 * inferiors.c: Move code to ...
11117 * dll.c: .... here. New.
11118 * server.h: Declare clear_dlls.
11119 * Makefile.in (SFILES): Add dll.c.
11123 2012-02-11 Yao Qi <yao@codesourcery.com>
11125 * server.c: (handle_monitor_command): Add a new parameter
11127 (handle_query): Update caller.
11129 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11131 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11132 * configure, config.in: Regenerate.
11133 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11136 2012-02-02 Pedro Alves <palves@redhat.com>
11138 Try SIGKILL first, then PTRACE_KILL.
11139 * linux-low.c (linux_kill_one_lwp): New.
11140 (linux_kill_one_lwp): Rename to ...
11141 (kill_one_lwp_callback): ... this. Use the new
11142 linux_kill_one_lwp.
11144 2012-02-02 Pedro Alves <palves@redhat.com>
11146 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11149 2012-01-27 Pedro Alves <palves@redhat.com>
11151 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11152 (elf_64_file_p): Make static.
11153 (linux_pid_exe_is_elf_64_file): New.
11154 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11155 Delete declarations.
11156 (linux_pid_exe_is_elf_64_file): Declare.
11157 * linux-x86-low.c (x86_arch_setup): Use
11158 linux_pid_exe_is_elf_64_file.
11160 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11162 * linux-low.c (linux_wait_for_event_1): Rename to ...
11163 (linux_wait_for_event): ... here and merge it with former
11164 linux_wait_for_event - new variable wait_ptid, use it.
11165 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11167 2012-01-23 Pedro Alves <palves@redhat.com>
11169 * server.c (main): Avoid yet another case of infinite loop while
11170 detaching/killing after a longjmp.
11172 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11175 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11177 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11179 * hostio.c (handle_readlink): New function.
11180 (handle_vFile): Call it to handle "vFile:readlink" packets.
11182 2012-01-20 Pedro Alves <palves@redhat.com>
11183 Ulrich Weigand <ulrich.weigand@linaro.org>
11185 * server.c (handle_v_requests): Only support vAttach and vRun to
11186 start multiple processes when in extended protocol mode.
11188 2012-01-17 Pedro Alves <palves@redhat.com>
11190 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11191 memalign plus mprotect to allocate the scratch buffer.
11193 2012-01-13 Pedro Alves <palves@redhat.com>
11195 * server.c (attach_inferior): Clear `cont_thread'.
11197 2012-01-13 Pedro Alves <palves@redhat.com>
11199 * server.c (main): Avoid infinite loop while detaching/killing
11202 2012-01-09 Doug Evans <dje@google.com>
11204 * server.c (start_inferior): Set last_ptid in --wrapper case.
11206 2012-01-06 Yao Qi <yao@codesourcery.com>
11208 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11210 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11212 2012-01-04 Yao Qi <yao@codesourcery.com>
11214 * tracepoint.c (cmd_qtdp): Print debug message
11215 for static tracepoint.
11217 2012-01-04 Yao Qi <yao@codesourcery.com>
11219 * tracepoint.c (trace_vdebug): Differentiate debug message
11220 between gdbserver and IPA.
11222 2012-01-03 Yao Qi <yao@codesourcery.com>
11224 * tracepoint.c (tracepoint_was_hit): Don't collect for
11227 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11229 * terminal.h: Reformat copyright header.
11231 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11233 * server.c (gdbserver_version): Update copyright year.
11234 * gdbreplay.c (gdbreplay_version): Likewise.
11236 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11238 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11241 2011-12-18 Hui Zhu <teawater@gmail.com>
11242 * linux-low.c (linux_create_inferior): Save return value to ret.
11244 2011-12-18 Hui Zhu <teawater@gmail.com>
11246 * linux-low.c (linux_create_inferior): Save return value to ret.
11248 2011-12-16 Doug Evans <dje@google.com>
11250 * linux-low.c (linux_create_inferior): If stdio connection,
11251 redirect stdin from /dev/null, stdout to stderr.
11252 * remote-utils.c (remote_is_stdio): New static global.
11253 (remote_connection_is_stdio): New function.
11254 (remote_prepare): Handle stdio connection.
11255 (remote_open): Ditto.
11256 (remote_close): Don't close stdin for stdio connections.
11257 (read_prim,write_prim): New functions. Replace all calls to
11258 read/write to these.
11259 * server.c (main): Watch for "-" argument. Move call to
11260 remote_prepare before start_inferior.
11261 * server.h (STDIO_CONNECTION_NAME): New macro.
11262 (remote_connection_is_stdio): Declare.
11264 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11265 in debugging output.
11267 2011-12-15 Yao Qi <yao@codesourcery.com>
11269 * tracepoint.c: Include sys/syscall.h.
11270 (gdb_ust_thread): Remove preprocessor conditional.
11272 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11274 * linux-low.c (linux_detach_one_lwp): Call
11275 the_low_target.prepare_to_resume before detaching.
11277 2011-12-14 Yao Qi <yao@codesourcery.com>
11279 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11282 2011-12-14 Yao Qi <yao@codesourcery.com>
11284 * i386-low.c (i386_low_stopped_data_address): Initialize local
11285 variable `control'.
11287 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11291 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11292 DR_CONTROL unless necessary. Extend comments.
11293 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11294 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11296 2011-12-13 Yao Qi <yao@codesourcery.com>
11298 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11300 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11302 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11304 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11305 Print new debug message for such case.
11307 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11309 Fix overlapping memcpy.
11310 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11311 the read_inferior_memory transfer.
11312 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11313 write_inferior_memory transfer.
11314 (set_fast_tracepoint_jump): New variable buf. Use it for the
11315 read_inferior_memory and write_inferior_memory transfers.
11316 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11317 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11318 Use it for the write_inferior_memory transfer.
11319 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11322 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11324 * linux-low.c (fetch_register, store_register): Make code
11325 consistent, fix formatting.
11327 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11329 * linux-low.c (usr_store_inferior_registers): Factor out code
11330 to handle individual registers into...
11331 (store_register): ... this new function.
11333 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11335 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11336 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11337 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11338 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11339 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11340 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11341 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11342 (srv_xmlfiles): Add new XML files.
11344 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11346 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11347 (init_registers_s390_linux32v1): Add prototype.
11348 (init_registers_s390_linux32v2): Likewise.
11349 (init_registers_s390_linux64v1): Likewise.
11350 (init_registers_s390_linux64v2): Likewise.
11351 (init_registers_s390x_linux64v1): Likewise.
11352 (init_registers_s390x_linux64v2): Likewise.
11353 (s390_num_regs): Increment to 52.
11354 (s390_regmap): Add orig_r2 register.
11355 (s390_num_regs_3264): Increment to 68.
11356 (s390_regmap_3264): Add orig_r2 register.
11357 (s390_collect_ptrace_register): Handle orig_r2 register.
11358 (s390_supply_ptrace_register): Likewise.
11359 (s390_fill_last_break): New function.
11360 (s390_store_last_break): Likewise.
11361 (s390_fill_system_call): New function.
11362 (s390_store_system_call): Likewise.
11363 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11365 (s390_check_regset): New function.
11366 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11367 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11368 Update target_regsets for available register sets.
11370 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11371 Jan Kratochvil <jan.kratochvil@redhat.com>
11373 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11374 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11376 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11377 * linux-low.h (struct process_info_private): New member r_debug.
11378 * server.c (handle_qxfer_libraries): Call
11379 the_target->qxfer_libraries_svr4.
11380 (handle_qxfer_libraries_svr4): New function.
11381 (qxfer_packets): New entry "libraries-svr4".
11382 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11383 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11384 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11385 PACKET_qXfer_libraries_svr4.
11387 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11389 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11390 PSW address/mask between 8-byte and 16-byte formats.
11391 (s390_supply_ptrace_register): Likewise.
11392 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11393 basic addressing mode bit.
11395 2011-11-24 Stan Shebs <stan@codesourcery.com>
11397 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11399 2011-11-17 Stan Shebs <stan@codesourcery.com>
11401 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11402 (tracing_start_time): New global.
11403 (tracing_stop_time): New global.
11404 (tracing_user_name): New global.
11405 (tracing_notes): New global.
11406 (tracing_stop_note): New global.
11407 (cmd_qtstart): Set traceframe_usage, start_time.
11408 (stop_tracing): Set stop_time.
11409 (cmd_qtstatus): Report additional status.
11410 (cmd_qtp): New function.
11411 (handle_tracepoint_query): Call it.
11412 (cmd_qtnotes): New function.
11413 (handle_tracepoint_general_set): Call it.
11414 (get_timestamp): Rename from tsv_get_timestamp.
11416 2011-11-14 Stan Shebs <stan@codesourcery.com>
11417 Kwok Cheung Yeung <kcy@codesourcery.com>
11419 * linux-x86-low.c (small_jump_insn): New.
11420 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11421 trampoline and error message, build a trampoline and issue a small
11422 jump instruction to it.
11423 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11424 trampoline and error message.
11425 (x86_get_min_fast_tracepoint_insn_len): New.
11426 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11427 * linux-low.h (struct linux_target_ops): Add arguments to
11428 install_fast_tracepoint_jump_pad operation, add new operation.
11429 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11431 (linux_get_min_fast_tracepoint_insn_len): New function.
11432 (linux_target_op): Add new operation.
11433 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11434 (gdb_trampoline_buffer_end): Ditto.
11435 (gdb_trampoline_buffer_error): Ditto.
11436 (struct ipa_sym_addresses): Add fields for new IPA variables.
11437 (symbol_list): Add entries for new IPA variables.
11438 (struct tracepoint): Add fields to hold the address range of the
11439 trampoline used by the tracepoint.
11440 (trampoline_buffer_head): New static variable.
11441 (trampoline_buffer_tail): Ditto.
11442 (claim_trampoline_space): New function.
11443 (have_fast_tracepoint_trampoline_buffer): New function.
11444 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11446 (install_fast_tracepoint): Ditto, also add error buffer argument.
11447 (cmd_qtminftpilen): New function.
11448 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11449 (fast_tracepoint_from_trampoline_address): New function.
11450 (fast_tracepoint_collecting): Handle trampoline as part of jump
11452 (set_trampoline_buffer_space): New function.
11453 (initialize_tracepoint): Initialize new IPA variables.
11454 * target.h (struct target_ops): Add arguments to
11455 install_fast_tracepoint_jump_pad operation, add new
11456 get_min_fast_tracepoint_insn_len operation.
11457 (target_get_min_fast_tracepoint_insn_len): New.
11458 (install_fast_tracepoint_jump_pad): Add arguments.
11459 * server.h (IPA_BUFSIZ): Define.
11460 * linux-i386-ipa.c: Include extra header files.
11461 (initialize_fast_tracepoint_trampoline_buffer): New function.
11462 (initialize_low_tracepoint): Call it.
11463 * server.h (set_trampoline_buffer_space): Declare.
11464 (claim_trampoline_space): Ditto.
11465 (have_fast_tracepoint_trampoline_buffer): Ditto.
11467 2011-11-14 Yao Qi <yao@codesourcery.com>
11469 * server.c (handle_query): Handle InstallInTrace for qSupported.
11470 * tracepoint.c (add_tracepoint): Sort list.
11471 (install_tracepoint, download_tracepoint): New.
11472 (cmd_qtdp): Call them to install and download tracepoints.
11473 (sort_tracepoints): Removed.
11474 (cmd_qtstart): Update.
11476 2011-11-14 Yao Qi <yao@codesourcery.com>
11478 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11479 * mem-break.h: Declare.
11480 * tracepoint.c (cmd_qtstart): Move some code to ...
11481 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11483 (download_tracepoints): Move some code to ...
11484 (download_tracepoint_1): ... here. New.
11486 2011-11-08 Yao Qi <yao@codesourcery.com>
11488 * remote-utils.c (relocate_instruction): A comment fix.
11490 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11492 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11493 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11494 dr_status_mirror and dr_control_mirror from debug_reg_state.
11495 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11496 (i386_initial_stuff): Remove use of deleted globals.
11497 (i386_get_thread_context, i386_set_thread_context,
11498 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11499 from debug_reg_state.
11501 2011-11-05 Yao Qi <yao@codesourcery.com>
11503 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11504 address as TPOINT's.
11506 2011-11-02 Stan Shebs <stan@codesourcery.com>
11508 * tracepoint.c (agent_mem_read_string): New function.
11509 (eval_agent_expr): Call it for tracenz.
11510 * server.c (handle_query): Report support for tracenz.
11512 2011-11-02 Yao Qi <yao@codesourcery.com>
11514 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11516 2011-11-02 Yao Qi <yao@codesourcery.com>
11518 * target.h: Fix a typo in comment.
11520 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11522 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11523 clobber the breakpoints' shadows with fast tracepoint jumps.
11524 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11525 * target.c (write_inferior_memory): Also pass MYADDR down to
11528 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11530 * configure.ac: Check support for personality routine.
11531 * configure: Regenerate.
11532 * config.in: Likewise.
11533 * linux-low.c: Include <sys/personality.h>.
11534 Define ADDR_NO_RANDOMIZE if necessary.
11535 (linux_create_inferior): Disable address space randomization when
11536 forking inferior, if requested.
11537 (linux_supports_disable_randomization): New function.
11538 (linux_target_ops): Install it.
11539 * server.h (disable_randomization): Declare.
11540 * server.c (disable_randomization): New global variable.
11541 (handle_general_set): Handle QDisableRandomization.
11542 (handle_query): Likewise for qSupported.
11543 (main): Support --disable-randomization and --no-disable-randomization
11544 command line arguments.
11545 * target.h (struct target_ops): Add supports_disable_randomization.
11546 (target_supports_disable_randomization): New macro.
11548 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11550 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11552 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11553 [!PT_GETDSBT] (target_loadmap): New definition.
11554 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11555 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11556 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11557 and PT_GETDSBT to LINUX_LOADMAP.
11558 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11559 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11561 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11563 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11564 (arm_linux_hwbp_cap): New static variable.
11565 (arm_linux_get_hwbp_cap): Replace by ...
11566 (arm_linux_init_hwbp_cap): ... this new function.
11567 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11568 (arm_linux_get_hw_watchpoint_count): Likewise.
11569 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11570 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11571 (arm_prepare_to_resume): Use perror_with_name instead of error.
11573 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11575 * linux-arm-low.c: Include <signal.h>.
11576 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11577 (struct arm_linux_hwbp_cap): New data type.
11578 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11579 (struct arm_linux_hw_breakpoint): New data type.
11580 (MAX_BPTS, MAX_WPTS): Define.
11581 (struct arch_process_info, struct arch_lwp_info): New data types.
11582 (arm_linux_get_hwbp_cap): New function.
11583 (arm_linux_get_hw_breakpoint_count): Likewise.
11584 (arm_linux_get_hw_watchpoint_count): Likewise.
11585 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11586 (arm_hwbp_control_initialize): Likewise.
11587 (arm_hwbp_control_is_enabled): Likewise.
11588 (arm_hwbp_control_is_initialized): Likewise.
11589 (arm_hwbp_control_disable): Likewise.
11590 (arm_linux_hw_breakpoint_equal): Likewise.
11591 (arm_linux_hw_point_initialize): Likewise.
11592 (struct update_registers_data): New data structure.
11593 (update_registers_callback: New function.
11594 (arm_insert_point): Likewise.
11595 (arm_remove_point): Likewise.
11596 (arm_stopped_by_watchpoint): Likewise.
11597 (arm_stopped_data_address): Likewise.
11598 (arm_new_process): Likewise.
11599 (arm_new_thread): Likewise.
11600 (arm_prepare_to_resume): Likewise.
11601 (the_low_target): Register arm_insert_point, arm_remove_point,
11602 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11603 arm_new_thread, and arm_prepare_to_resume.
11605 2011-09-15 Stan Shebs <stan@codesourcery.com>
11607 * server.h (struct emit_ops): Add compare-goto fields.
11608 * tracepoint.c (gdb_agent_op_sizes): New table.
11609 (emit_eq_goto): New function.
11610 (emit_ne_goto): New function.
11611 (emit_lt_goto): New function.
11612 (emit_le_goto): New function.
11613 (emit_gt_goto): New function.
11614 (emit_ge_goto): New function.
11615 (is_goto_target): New function.
11616 (compile_bytecodes): Recognize special cases of compare-goto
11617 combinations and call specialized emitters for them.
11618 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11619 (amd64_emit_ne_goto): New function.
11620 (amd64_emit_lt_goto): New function.
11621 (amd64_emit_le_goto): New function.
11622 (amd64_emit_gt_goto): New function.
11623 (amd64_emit_ge_goto): New function.
11624 (amd64_emit_ops): Add the new functions.
11625 (i386_emit_eq_goto): New function.
11626 (i386_emit_ne_goto): New function.
11627 (i386_emit_lt_goto): New function.
11628 (i386_emit_le_goto): New function.
11629 (i386_emit_gt_goto): New function.
11630 (i386_emit_ge_goto): New function.
11631 (i386_emit_ops): Add the new functions.
11633 2011-09-08 Stan Shebs <stan@codesourcery.com>
11635 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11636 (i386_emit_epilogue): Restore %ebx.
11638 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11640 * server.c (step_thread): Remove definition.
11641 (process_serial_event): Don't handle Hs.
11642 * server.h (step_thread): Remove declaration.
11643 * target.c (set_desired_inferior): Remove use of step_thread.
11645 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11647 * linux-low.c: Include linux-procfs.h.
11648 (linux_attach_lwp_1): Update comments.
11649 (linux_attach): Scan for existing threads when attaching to a
11650 process that is the tgid.
11651 * Makefile.in: Update dependencies.
11653 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11655 * configure.srv: Add linux-procfs.o dependencies.
11657 2011-08-14 Yao Qi <yao@codesourcery.com>
11659 * target.h (struct target_ops): Fix indent.
11660 * win32-low.c (win32_target_ops): Fix comment.
11662 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11663 Yao Qi <yao@codesourcery.com>
11665 * Makefile.in (clean): Remove tic6x-*.c files.
11666 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11667 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11668 (tic6x-c64xp-linux.c): Likewise.
11669 * configure.srv: Add support for tic6x-*-uclinux.
11670 * linux-tic6x-low.c: New.
11671 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11673 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11674 Yao Qi <yao@codesourcery.com>
11676 * target.h (struct target_ops): Add read_loadmap.
11677 * linux-low.c (struct target_loadseg): New type.
11678 (struct target_loadmap): New type.
11679 (linux_read_loadmap): New function.
11680 (linux_target_ops): Add linux_read_loadmap.
11681 * server.c (handle_query): Support qXfer:fdpic:read packet.
11682 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11685 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11687 * win32-low.c: Include <stdint.h>.
11689 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11691 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11692 to the inferior here.
11693 (i386_remove_aligned_watchpoint): Ditto.
11694 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11695 fit part of the watchpoint in the debug registers.
11696 (i386_update_inferior_debug_regs): New.
11697 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11698 registers, and only update the inferior on success.
11699 (i386_low_remove_watchpoint): Ditto.
11701 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11703 * linux-low.c (compare_ints, unique, list_threads, show_process,
11704 linux_core_of_thread): Delete.
11705 (linux_target_ops): Change linux_core_of_thread to
11706 linux_common_core_of_thread.
11707 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11708 * utils.c (malloc_failure): Change type of argument.
11709 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11710 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11711 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11712 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11713 (IPA_OBJS): Add common-utils-ipa.o.
11714 (ptid_h, linux_osdata_h): New macros.
11715 (server_h): Add common/common-utils.h, common/xml-utils.h,
11716 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11718 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11719 ptid.o, buffer.o): New rules.
11720 (linux-low.o): Add common/linux-osdata.h as a dependency.
11721 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11722 * configure.ac: Add AC_HEADER_DIRENT check.
11723 * config.in: Regenerate.
11724 * configure: Regenerate.
11725 * remote-utils.c (xml_escape_text): Delete.
11726 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11727 buffer_xml_printf): Move to common/buffer.c.
11728 * server.c (main): Remove call to initialize_inferiors.
11729 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11730 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11731 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11732 internal_error, gdb_assert, gdb_assert_fail): Delete.
11733 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11734 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11736 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11737 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11738 initialize_inferiors): Delete.
11740 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11742 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11745 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11747 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11749 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11751 2011-05-26 Yao Qi <yao@codesourcery.com>
11753 * Makefile.in (thread-db.o): Track dependence to
11754 common/gdb_thread_db.h.
11755 * thread-db.c: include gdb_thread_db.h from right place.
11757 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11759 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11760 __FILE__ and __LINE__ to internal_error.
11762 2011-05-13 Doug Evans <dje@google.com>
11764 * thread-db.c (try_thread_db_load_from_sdir): New function.
11765 (try_thread_db_load_from_dir): New function.
11766 (thread_db_load_search): Handle $sdir, ignore $pdir.
11767 Remove trying of system directories if search of
11768 libthread-db-search-path fails, that is now done via $sdir.
11770 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11772 * server.c (handle_query): Add EnableDisableTracepoints to the list
11773 of supported features.
11774 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11776 (cmd_qtenable_disable): New.
11777 (cmd_qtstart): Install tracepoints even if disabled.
11778 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11779 receiving a QTEnable or QTDisable packet.
11780 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11781 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11783 (gdb_probe): Skip data collection if static tracepoint is disabled.
11785 2011-05-10 Doug Evans <dje@google.com>
11787 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11789 2011-05-04 Doug Evans <dje@google.com>
11791 * linux-low.c (linux_join): Skip process lookup.
11792 * spu-low.c (spu_join): Ditto.
11793 * server.c (join_inferiors_callback): Delete.
11794 (process_serial_event): For 'D' packet (detach) call join_inferior
11797 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11799 * README: Don't mention xscale*-*-linux*.
11800 * configure.srv (xscale*-*-linux*): Don't handle target.
11802 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11804 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11806 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11807 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11808 (i386_emit_void_call_2): Likewise.
11810 2011-04-26 Yao Qi <yao@codesourcery.com>
11812 * linux-low.c: Move common macros to linux-ptrace.h.
11813 Include linux-ptrace.h.
11814 * Makefile.in (linux_ptrace_h): New.
11815 (linux-low.o): Depends on linux-ptrace.h.
11817 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11819 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11820 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11821 (remote_prepare): New function with most of the TCP code from ...
11822 (remote_open): ... here. Detect PORT here unconditionally. Move also
11823 setting transport_is_reliable.
11824 * server.c (run_once): New variable.
11825 (gdbserver_usage): Document it.
11826 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11827 the first run if RUN_ONCE.
11828 * server.h (run_once, remote_prepare): New declarations.
11830 2011-04-19 Tom Tromey <tromey@redhat.com>
11832 * win32-low.c (handle_load_dll): Remove duplicate "the".
11834 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11836 Remove support for old Cygwin 1.5 versions.
11837 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11838 function to avoid warning.
11839 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11842 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11844 * gdbserver/server.h (Macro _): Define it if not available.
11846 2011-03-14 Michael Snyder <msnyder@vmware.com>
11848 * hostio.c (handle_close): Remove unnecessary null test.
11850 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11852 * Makefile.in (maintainer-clean realclean distclean): Remove
11853 "make ... subdir_do" command.
11855 2011-03-10 Michael Snyder <msnyder@vmware.com>
11857 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11859 * server.c (handle_v_run): Free alloced buffer on early return.
11861 2011-03-09 Yao Qi <yao@codesourcery.com>
11864 2011-03-04 Yao Qi <yao@codesourcery.com>
11866 * Makefile.in: Remove GNU make feature --directory.
11868 2011-03-05 Yao Qi <yao@codesourcery.com>
11870 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11871 (subdir_do): New make target. Copied from gdb/Makefile.
11872 (maintainer-clean, realclean, distclean, clean): Call corresponding
11873 make targets in common/Makefile.
11875 2011-02-11 Yao Qi <yao@codesourcery.com>
11877 * configure.ac: Call AC_PROG_RANLIB.
11878 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11879 * configure: Regenerate.
11881 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11883 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11885 2011-03-06 Yao Qi <yao@codesourcery.com>
11887 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11889 2011-03-05 Yao Qi <yao@codesourcery.com>
11891 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11892 (subdir_do): New make target. Copied from gdb/Makefile.
11893 (maintainer-clean, realclean, distclean, clean): Call corresponding
11894 make targets in common/Makefile.
11896 2011-03-04 Yao Qi <yao@codesourcery.com>
11898 * Makefile.in: Remove GNU make feature --directory.
11900 2011-03-04 Michael Snyder <msnyder@vmware.com>
11902 * server.c (queue_stop_reply): Call xmalloc not malloc.
11904 2011-03-02 Michael Snyder <msnyder@vmware.com>
11906 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11908 2011-02-28 Michael Snyder <msnyder@vmware.com>
11910 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11911 (cmd_qtframe): Ditto.
11912 (cmd_qtbuffer): Ditto.
11913 (cmd_bigqtbuffer): Ditto.
11915 * utils.c (decimal2str): Initialize 'width' to nine, then
11916 don't mess with it.
11918 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11920 * hostio.c (require_data): Free *data, not data.
11922 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11924 * hostio.c (require_data): Use free, not xfree.
11926 2011-02-27 Michael Snyder <msnyder@vmware.com>
11928 * server.c (handle_query): Discard unused value.
11930 * hostio.c (require_data): Free malloc memory before returning
11933 2011-02-26 Michael Snyder <msnyder@vmware.com>
11935 * linux-low.c (list_threads): Call closedir for dirent.
11937 2011-02-27 Michael Snyder <msnyder@vmware.com>
11939 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11940 a case statement falls through.
11942 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11944 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11947 2011-02-26 Michael Snyder <msnyder@vmware.com>
11949 * utils.c (decimal2str): Eliminate dead code and dead param.
11950 (pulongest): Drop dead param from call to decimal2str.
11953 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11955 Revert the following patch (not approved yet):
11956 2011-02-21 Hui Zhu <teawater@gmail.com>
11957 * tracepoint.c (tp_printf): New function.
11958 (eval_agent_expr): Handle gdb_agent_op_printf.
11960 2011-02-21 Hui Zhu <teawater@gmail.com>
11962 * tracepoint.c (tp_printf): New function.
11963 (eval_agent_expr): Handle gdb_agent_op_printf.
11965 2011-02-18 Tom Tromey <tromey@redhat.com>
11967 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11968 (tracepoint.o): Likewise.
11969 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11970 (gdb_agent_op_names): Likewise.
11972 2011-02-18 Tom Tromey <tromey@redhat.com>
11974 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11975 gdb_agent_op_rot>: New constants.
11976 (gdb_agent_op_names): Add pick and roll.
11977 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11980 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11982 * aclocal.m4: Regenerated with aclocal-1.11.1.
11984 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11986 * server.c (handle_qxfer_traceframe_info): New.
11987 (qxfer_packets): Register "traceframe-info".
11988 (handle_query): Report support for qXfer:traceframe-info:read+.
11989 * tracepoint.c (match_blocktype): New.
11990 (traceframe_find_block_type): Rename to ...
11991 (traceframe_walk_blocks): ... this. Add callback filter argument,
11993 (traceframe_find_block_type): New, reimplemented on top of
11994 traceframe_walk_blocks.
11995 (build_traceframe_info_xml): New.
11996 (traceframe_read_info): New.
11997 * server.h (traceframe_read_info): Declare.
11999 2011-02-11 Yao Qi <yao@codesourcery.com>
12001 * configure.ac: Call AC_PROG_RANLIB.
12002 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12003 * configure: Regenerate.
12005 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12007 * server.c (gdb_read_memory): Change return semantics to allow
12009 (handle_search_memory_1): Adjust.
12010 (process_serial_event) <'m' packet>: Handle partial transfers.
12011 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12013 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12015 * regcache.c (init_register_cache): Initialize
12016 regcache->register_status.
12017 (free_register_cache): Release regcache->register_status.
12018 (regcache_cpy): Copy register_status.
12019 (registers_to_string): Print 'x's for unavailable registers.
12020 (supply_register): Mark the register's status valid or
12021 unavailable, depending on whether a buffer was passed in or not.
12022 (supply_register_zeroed): New.
12023 (supply_regblock): Mark the registers' status valid or
12024 unavailable, depending on whether a buffer was passed in or not.
12025 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12026 (struct regcache): New `register_status' field.
12027 (supply_register_zeroed): Declare.
12028 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12029 supply_register_zeroed, rather than passing a NULL buffer to
12031 * tracepoint.c (fetch_traceframe_registers): Update comment.
12033 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12035 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12038 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12040 * server.h (decode_xfer_write): Change prototype.
12041 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12042 and don't extract the annex here.
12043 * server.c (decode_xfer_read): Remove `annex' parameter,
12044 and don't extract the annex here.
12045 (decode_xfer): New.
12046 (struct qxfer): New.
12047 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12048 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12049 (handle_qxfer_statictrace): New functions, abstracted out from
12050 handle_query, and made to use the struct qxfer interface.
12051 (handle_threads_qxfer_proper): Rename to ...
12052 (handle_qxfer_threads_proper): ... this.
12053 (handle_threads_qxfer): Rename to ...
12054 (handle_qxfer_threads): ... this. Adjust.
12055 (qxfer_packets): New array.
12056 (handle_qxfer): New function.
12057 (handle_query): Use handle_qxfer.
12059 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12061 * gdbreplay.c: Shorten lines of >= 80 columns.
12062 * linux-low.c: Ditto.
12063 * linux-ppc-low.c: Ditto.
12064 * linux-s390-low.c: Ditto.
12065 * linux-sparc-low.c: Ditto.
12066 * linux-x86-low.c: Ditto.
12067 * linux-xtensa-low.c: Ditto.
12068 * mem-break.c: Ditto.
12069 * nto-low.c: Ditto.
12070 * regcache.h: Ditto.
12071 * remote-utils.c: Ditto.
12074 * thread-db.c: Ditto.
12075 * tracepoint.c: Ditto.
12077 * win32-low.h: Ditto.
12079 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12081 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12084 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12086 * server.c (gdbserver_version): Update copyright year in version
12088 * gdbreplay.c (gdbreplay_version): Ditto.
12090 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12092 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12093 * linux-bfin-low.c: New file.
12094 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12095 PT_DATA_ADDR for BFIN targets.
12096 * Makefile.in (SFILES): Add linux-bfin-low.c.
12097 (clean): Remove reg-bfin.c.
12098 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12099 * README: Mention supported Blackfin targets.
12101 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12103 * .gitignore: New file.
12105 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12107 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12109 2010-10-22 Jie Zhang <jie@codesourcery.com>
12111 * Makefile.in: Add FLAGS_TO_PASS variable.
12112 (install): Remove dependency of install-only and recursively
12113 invoke make for install-only.
12115 2010-10-04 Doug Evans <dje@google.com>
12117 * Makefile.in (uninstall): Use $(DESTDIR).
12119 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12123 * linux-x86-low.c (compat_siginfo_from_siginfo)
12124 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12125 si_code is < 0. Check for si_code == SI_TIMER before checking for
12128 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12130 * lynx-i386-low.c: New file.
12131 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12133 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12135 * lynx-low.c (ptrace_request_to_str): Remove handling for
12136 request values that have been removed in LynxOS 5.x.
12138 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12140 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12143 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12145 * configure.ac: Add --enable-inprocess-agent option.
12146 * configure: Rebuilt.
12148 2010-09-06 Yao Qi <yao@codesourcery.com>
12150 * linux-low.c (linux_kill): Remove unused variable.
12151 (linux_stabilize_threads): Likewise.
12152 * server.c (start_inferior): Likewise.
12153 (queue_stop_reply_callback): Likewise.
12154 * tracepoint.c (do_action_at_tracepoint): Likewise.
12156 2010-09-06 Yao Qi <yao@codesourcery.com>
12158 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12161 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12163 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12165 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12167 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12170 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12172 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12173 gdbserver/lynx-ppc-low.c: New files.
12174 * Makefile.in (lynx_low_h): New variable.
12175 (lynx-low.o, lynx-ppc-low.o): New rules.
12176 * configure.ac: On LynxOS, link with -lnetinet.
12177 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12178 * configure: regenerate.
12180 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12182 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12183 * configure.ac: Add check for vasprintf and vsnprintf.
12184 * configure, config.in: Regenerate.
12185 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12187 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12189 * gdbreplay.c: Move include of alloca.h up, next to include of
12191 * server.h: Add include of malloc.h.
12192 * mem-break.c: Remove include of malloc.h.
12193 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12195 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12197 * Makefile.in (memmem.o): Build with -Wno-error.
12199 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12201 * utils.c (xsnprintf): Make non-static.
12202 * server.h: Add xsnprintf declaration.
12203 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12204 replace calls to snprintf by calls to xsnprintf throughout.
12206 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12208 * configure.ac: Add configure check for alloca.
12209 * configure, config.in: Regenerate.
12210 * server.h: Include alloca.h if it exists.
12211 * gdbreplay.c: Include alloca.h if it exists.
12213 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12215 * linux-low.c (__SIGRTMIN): Define if not already defined.
12216 (linux_create_inferior): Check for __ANDROID__ rather than
12218 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12219 are already deferred.
12220 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12221 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12222 stopped and already has a pending signal to report.
12223 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12224 a pending signal to report or is moving out of a jump pad.
12225 (linux_init_signals): Check for __ANDROID__ rather than
12228 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12230 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12231 debug_threads check. Avoid a linear search when not doing debug
12234 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12236 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12237 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12238 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12239 (process_event): Change local fd's type to gdb_fildes_t.
12240 (create_file_handler): Adjust prototype.
12241 (delete_file_handler): Adjust prototype.
12242 (handle_file_event): Adjust prototype. Use pfildes.
12243 (create_file_event): Adjsut prototype.
12244 * remote-utils.c (remote_desc, listen_desc): Change type to
12246 * server.h: New gdb_fildes_t typedef.
12247 [USE_WIN32API]: Include winsock2.h.
12248 (delete_file_handler, add_file_handler): Adjust prototypes.
12249 (pfildes): Declare.
12250 * utils.c (pfildes): New.
12252 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12254 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12255 * configure: Regenerate.
12257 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12259 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12260 (linux_done_accessing_memory): ... this.
12261 (linux_target_ops): Adjust.
12262 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12263 * nto-low.c (nto_target_ops): Adjust comment.
12264 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12265 * spu-low.c (spu_target_ops): Adjust comment.
12266 * target.h (target_ops): Rename unprepare_to_access_memory field
12267 to done_accessing_memory.
12268 (unprepare_to_access_memory): Rename to ...
12269 (done_accessing_memory): ... this.
12271 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12273 * linux-low.c (linux_prepare_to_access_memory): New.
12274 (linux_unprepare_to_access_memory): New.
12275 (linux_target_ops): Install them.
12276 * server.c (read_memory): Rename to ...
12277 (gdb_read_memory): ... this. Use
12278 prepare_to_access_memory/prepare_to_access_memory.
12279 (write_memory): Rename to ...
12280 (gdb_write_memory): ... this. Use
12281 prepare_to_access_memory/prepare_to_access_memory.
12282 (handle_search_memory_1): Adjust.
12283 (process_serial_event): Adjust.
12284 * target.h (struct target_ops): New fields
12285 prepare_to_access_memory and unprepare_to_access_memory.
12286 (prepare_to_access_memory, unprepare_to_access_memory): New.
12287 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12288 prepare_to_access_memory/prepare_to_access_memory.
12289 * nto-low.c (nto_target_ops): Adjust.
12290 * spu-low.c (spu_target_ops): Adjust.
12291 * win32-low.c (win32_target_ops): Adjust.
12293 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12295 * Makefile.in (WARN_CFLAGS): Get it from configure.
12296 (WERROR_CFLAGS): New.
12297 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12298 * configure.ac: Introduce --enable-werror, which adds -Werror to
12299 the compiler command line. Enabled by default. Disable with
12300 --disable-werror. Add -Wdeclaration-after-statement
12301 Wpointer-arith and -Wformat-nonliteral to warning flags.
12302 * configure: Regenerate.
12304 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12306 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12308 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12310 * gdbreplay.c (remote_error): New.
12312 (expect): Use gdbchar. Check for error reading from GDB.
12313 Clarify sync error output.
12314 (play): Check for errors writing to GDB.
12315 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12316 * remote-utils.c (getpkt): Check for errors writing to the remote
12319 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12321 * linux-low.c (linux_wait_1): Move non-debugging code out of
12322 `debug_threads' control.
12324 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12326 * linux-low.c (linux_wait_1): Don't set last_status here.
12327 * server.c (push_event, queue_stop_reply_callback): Assert we're
12328 not pushing a TARGET_WAITKIND_IGNORE event.
12329 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12330 (myresume, handle_target_event): Set the thread's last_resume_kind
12331 and last_status from the target returned status.
12333 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12337 * linux-x86-low.c (update_debug_registers_callback): New.
12338 (i386_dr_low_set_addr): Use it.
12339 (i386_dr_low_get_addr): New.
12340 (i386_dr_low_set_control): Use update_debug_registers_callback.
12341 (i386_dr_low_get_control): New.
12342 (i386_dr_low_get_status): Adjust.
12343 * linux-low.c (linux_stop_lwp): New.
12344 * linux-low.h (linux_stop_lwp): Declare.
12346 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12347 argument instead of a i386_debug_reg_state.
12348 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12349 a i386_debug_reg_state.
12350 (i386_insert_aligned_watchpoint): Adjust.
12351 (i386_remove_aligned_watchpoint): Adjust.
12352 (i386_low_stopped_data_address): Read the debug registers from the
12353 inferior instead of from the mirrors.
12354 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12355 (i386_dr_low_get_addr): Declare.
12356 (i386_dr_low_get_control): Declare.
12357 (i386_dr_low_get_status): Change prototype.
12359 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12360 (i386_dr_low_get_addr): New.
12361 (i386_dr_low_get_control): New.
12362 (i386_dr_low_get_status): Adjust prototype. Return
12364 (i386_initial_stuff): Clear dr_status_mirror and
12366 (i386_get_thread_context): Adjust.
12367 (i386_set_thread_context): Adjust.
12368 (i386_thread_added): Adjust.
12370 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12372 * linux-low.h (linux_thread_area): Delete declaration.
12374 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12376 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12377 after its termination.
12379 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12381 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12382 (gdb_wants_all_stopped): Delete.
12383 (linux_wait_1): Don't call them.
12384 * server.c (handle_v_cont): Tag all threads as want-stopped.
12385 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12386 stopped as "client-wants-stopped".
12388 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12390 * Makefile.in (signals_h): New.
12391 (server_h): Depend on it.
12392 (server.o): Don't depend on $(signals_def).
12393 (signals.o): Depend on $(signals_def).
12395 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12397 * Makefile.in (signals_def): New.
12398 (server_h): Append include/gdb/signals.h and signals_def.
12399 (server.o): Append signals_def.
12401 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12403 * server.c (handle_target_event): Use target_signal_to_host for
12404 resume_info.sig initialization.
12405 * target.h (struct thread_resume) <sig>: New comment.
12407 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12409 * server.c (handle_query): strcpy() the returned string from paddress()
12410 instead of sprintf().
12411 * utils.c (paddress): Return phex_nz().
12413 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12415 * server.c (handle_v_cont): Call mourn_inferior if process
12417 (myresume): Likewise.
12419 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12421 Static tracepoints, and integration with UST.
12423 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12424 * mem-break.c (uninsert_all_breakpoints)
12425 (reinsert_all_breakpoints): New.
12426 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12427 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12428 (gdb_agent_ust_loaded, helper_thread_id)
12429 (gdb_agent_helper_thread_id): New macros.
12430 (struct ipa_sym_addresses): Add addr_ust_loaded,
12431 addr_helper_thread_id, addr_cmd_buf.
12432 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12433 (in_process_agent_loaded_ust): New.
12434 (write_e_ust_not_loaded): New.
12435 (maybe_write_ipa_ust_not_loaded): New.
12436 (struct collect_static_trace_data_action): New.
12437 (enum tracepoint_type) <static_tracepoint>: New.
12438 (struct tracepoint) <handle>: Mention static tracepoints.
12439 (struct static_tracepoint_ctx): New.
12440 (CMD_BUF_SIZE): New.
12441 (add_tracepoint_action): Handle static tracepoint actions.
12442 (unprobe_marker_at): New.
12443 (clear_installed_tracepoints): Handle static tracepoints.
12444 (cmd_qtdp): Handle static tracepoints.
12445 (probe_marker_at): New.
12446 (cmd_qtstart): Handle static tracepoints.
12447 (response_tracepoint): Handle static tracepoints.
12448 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12449 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12450 (get_context_regcache): Handle static tracepoints.
12451 (do_action_at_tracepoint): Handle static tracepoint actions.
12452 (traceframe_find_block_type): Handle static trace data blocks.
12453 (traceframe_read_sdata): New.
12454 (download_tracepoints): Download static tracepoint actions.
12455 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12456 (GDB_PROBE_NAME): New.
12458 (GET_UST_SYM): New.
12461 (ust_marker_to_static_tracepoint): New.
12463 (collect_ust_data_at_tracepoint): New.
12464 (gdb_ust_probe): New.
12465 (UNIX_PATH_MAX, SOCK_DIR): New.
12466 (gdb_ust_connect_sync_socket): New.
12467 (resume_thread, stop_thread): New.
12468 (run_inferior_command): New.
12469 (init_named_socket): New.
12470 (gdb_ust_socket_init): New.
12471 (cstr_to_hexstr): New.
12473 (first_marker, next_marker): New.
12474 (response_ust_marker): New.
12475 (cmd_qtfstm, cmd_qtsstm): New.
12476 (unprobe_marker_at, probe_marker_at): New.
12477 (cmd_qtstmat, gdb_ust_thread): New.
12478 (gdb_ust_init): New.
12479 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12480 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12481 (ST_REGENTRY): New.
12482 (x86_64_st_collect_regmap): New.
12483 (X86_64_NUM_ST_COLLECT_GREGS): New.
12484 (AMD64_RIP_REGNUM): New.
12485 (supply_static_tracepoint_registers): New.
12486 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12487 (ST_REGENTRY): New.
12488 (i386_st_collect_regmap): New.
12489 (i386_NUM_ST_COLLECT_GREGS): New.
12490 (supply_static_tracepoint_registers): New.
12491 * server.c (handle_query): Handle qXfer:statictrace:read.
12492 <qSupported>: Report support for StaticTracepoints, and
12493 qXfer:statictrace:read features.
12494 * server.h (traceframe_read_sdata)
12495 (supply_static_tracepoint_registers): Declare.
12496 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12497 (unpack_varlen_hex): Include in IPA build.
12498 * Makefile.in (ustlibs, ustinc): New.
12499 (IPA_OBJS): Add remote-utils-ipa.o.
12500 ($(IPA_LIB)): Link -ldl and -lpthread.
12502 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12503 * config.in, configure: Regenerate.
12505 2010-06-20 Ian Lance Taylor <iant@google.com>
12506 Pedro Alves <pedro@codesourcery.com>
12508 * linux-x86-low.c (always_true): Delete.
12509 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12510 trying to fool the compiler with always_true.
12512 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12514 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12515 conditions in gdbserver.
12517 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12519 * spu-low.c (spu_read_memory): Wrap around local store limit.
12520 (spu_write_memory): Likewise.
12522 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12524 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12525 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12527 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12529 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12530 uses with LONGEST uses.
12532 2010-06-14 Stan Shebs <stan@codesourcery.com>
12533 Pedro Alves <pedro@codesourcery.com>
12537 * linux-x86-low.c: Include limits.h.
12539 (always_true): New.
12542 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12543 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12544 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12545 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12546 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12547 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12548 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12549 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12550 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12551 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12552 (amd64_emit_void_call_2): New.
12553 (amd64_emit_ops): New.
12554 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12555 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12556 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12557 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12558 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12559 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12560 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12561 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12562 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12563 (i386_emit_stack_adjust, i386_emit_int_call_1)
12564 (i386_emit_void_call_2): New.
12565 (i386_emit_ops): New.
12566 (x86_emit_ops): New.
12567 (the_low_target): Install x86_emit_ops.
12568 * server.h (struct emit_ops): New.
12569 (get_raw_reg_func_addr): Declare.
12570 (current_insn_ptr, emit_error): Declare.
12571 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12572 (set_trace_state_variable_value): New defines.
12573 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12574 addr_get_trace_state_variable_value and
12575 addr_set_trace_state_variable_value.
12576 (symbol_list): New fields for get_raw_reg,
12577 get_trace_state_variable_value and set_trace_state_variable_value.
12578 (condfn): New typedef.
12579 (struct tracepoint): New field `compiled_cond'.
12580 (do_action_at_tracepoint): Clear compiled_cond.
12581 (get_trace_state_variable_value, set_trace_state_variable_value):
12583 (condition_true_at_tracepoint): If there's a compiled condition,
12585 (current_insn_ptr, emit_error): New globals.
12586 (struct bytecode_address): New.
12587 (get_raw_reg_func_addr): New.
12588 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12589 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12590 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12591 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12592 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12593 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12594 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12595 (compile_tracepoint_condition, compile_bytecodes): New.
12596 * target.h (emit_ops): Forward declare.
12597 (struct target_ops): New field emit_ops.
12598 (target_emit_ops): New.
12599 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12600 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12601 * linux-low.c (linux_emit_ops): New.
12602 (linux_target_ops): Install it.
12603 * linux-low.h (struct linux_target_ops): New field emit_ops.
12605 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12607 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12608 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12610 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12611 Stan Shebs <stan@codesourcery.com>
12613 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12614 (all): Depend on $(extra_libraries).
12615 (install-only): Install the IPA.
12616 (IPA_OBJS, IPA_LIB): New.
12617 (clean): Remove the IPA lib.
12618 (IPAGENT_CFLAGS): New.
12619 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12620 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12621 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12622 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12623 * configure.ac: Check for atomic builtins support in the compiler.
12624 (IPA_DEPFILES, extra_libraries): Define.
12625 * configure.srv (ipa_obj): Add description.
12626 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12627 (i[34567]86-*-linux*): Set ipa_obj.
12628 (x86_64-*-linux*): Set ipa_obj.
12629 * linux-low.c (stabilizing_threads): New.
12630 (supports_fast_tracepoints): New.
12631 (linux_detach): Stabilize threads before detaching.
12632 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12633 the lwp is either not stabilizing, or is moving out of a jump pad.
12634 (linux_fast_tracepoint_collecting): New.
12635 (maybe_move_out_of_jump_pad): New.
12636 (enqueue_one_deferred_signal): New.
12637 (dequeue_one_deferred_signal): New.
12638 (linux_wait_for_event_1): If moving out of a jump pad, defer
12639 pending signals to later.
12640 (linux_stabilize_threads): New.
12641 (linux_wait_1): Check if threads need moving out of jump pads, and
12643 (stuck_in_jump_pad_callback): New.
12644 (move_out_of_jump_pad_callback): New.
12645 (lwp_running): New.
12646 (linux_resume_one_lwp): Handle moving out of jump pads.
12647 (linux_set_resume_request): Dequeue deferred signals.
12648 (need_step_over_p): Also step over fast tracepoint jumps.
12649 (start_step_over): Also uninsert fast tracepoint jumps.
12650 (finish_step_over): Also reinsert fast tracepoint jumps.
12651 (linux_install_fast_tracepoint_jump): New.
12652 (linux_target_ops): Install linux_stabilize_threads and
12653 linux_install_fast_tracepoint_jump_pad.
12654 * linux-low.h (linux_target_ops) <get_thread_area,
12655 install_fast_tracepoint_jump_pad>: New fields.
12656 (struct lwp_info) <collecting_fast_tracepoint,
12657 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12658 (linux_get_thread_area): Declare.
12659 * linux-x86-low.c (jump_insn): New.
12660 (x86_get_thread_area): New.
12661 (append_insns): New.
12662 (push_opcode): New.
12663 (amd64_install_fast_tracepoint_jump_pad): New.
12664 (i386_install_fast_tracepoint_jump_pad): New.
12665 (x86_install_fast_tracepoint_jump_pad): New.
12666 (the_low_target): Install x86_get_thread_area and
12667 x86_install_fast_tracepoint_jump_pad.
12668 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12669 (struct fast_tracepoint_jump): New.
12670 (fast_tracepoint_jump_insn): New.
12671 (fast_tracepoint_jump_shadow): New.
12672 (find_fast_tracepoint_jump_at): New.
12673 (fast_tracepoint_jump_here): New.
12674 (delete_fast_tracepoint_jump): New.
12675 (set_fast_tracepoint_jump): New.
12676 (uninsert_fast_tracepoint_jumps_at): New.
12677 (reinsert_fast_tracepoint_jumps_at): New.
12678 (set_breakpoint_at): Use write_inferior_memory.
12679 (uninsert_raw_breakpoint): Use write_inferior_memory.
12680 (check_mem_read): Mask out fast tracepoint jumps.
12681 (check_mem_write): Mask out fast tracepoint jumps.
12682 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12683 (set_fast_tracepoint_jump): Declare.
12684 (delete_fast_tracepoint_jump)
12685 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12686 (reinsert_fast_tracepoint_jumps_at): Declare.
12687 * regcache.c: Don't compile many functions when building the
12688 in-process agent library.
12689 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12690 the register buffer in the heap.
12691 (free_register_cache): If the register buffer isn't owned by the
12692 regcache, don't free it.
12693 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12694 pre-existing register caches.
12695 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12697 (convert_ascii_to_int): : Constify `from' parameter type.
12698 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12699 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12700 the needed buffer in-place.
12701 (relocate_instruction): New.
12702 * server.c (handle_query) <qSymbols>: If the target supports
12703 tracepoints, give it a chance of looking up symbols. Report
12704 support for fast tracepoints.
12705 (handle_status): Stabilize threads.
12706 (process_serial_event): Adjust.
12707 * server.h (struct fast_tracepoint_jump): Forward declare.
12708 (struct process_info) <fast_tracepoint_jumps>: New field.
12709 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12710 (decode_X_packet, decode_M_packet): Adjust.
12711 (relocate_instruction): Declare.
12712 (in_process_agent_loaded): Declare.
12713 (tracepoint_look_up_symbols): Declare.
12714 (struct fast_tpoint_collect_status): Declare.
12715 (fast_tracepoint_collecting): Declare.
12716 (force_unlock_trace_buffer): Declare.
12717 (handle_tracepoint_bkpts): Declare.
12718 (initialize_low_tracepoint)
12719 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12720 * target.h (struct target_ops) <stabilize_threads,
12721 install_fast_tracepoint_jump_pad>: New fields.
12722 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12723 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12724 [HAVE_STDINT_H]: Include stdint.h.
12725 (trace_debug_1): Rename to ...
12726 (trace_vdebug): ... this.
12727 (trace_debug): Rename to ...
12728 (trace_debug_1): ... this. Add `level' parameter.
12729 (trace_debug): New.
12730 (ATTR_USED, ATTR_NOINLINE): New.
12731 (IP_AGENT_EXPORT): New.
12732 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12733 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12734 (about_to_request_buffer_space, trace_buffer_is_full)
12735 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12736 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12737 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12738 (traceframe_write_count, traceframes_created)
12739 (trace_state_variables)
12740 New renaming defines.
12741 (struct ipa_sym_addresses): New.
12742 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12743 (symbol_list): New.
12744 (ipa_sym_addrs): New.
12745 (all_tracepoint_symbols_looked_up): New.
12746 (in_process_agent_loaded): New.
12747 (write_e_ipa_not_loaded): New.
12748 (maybe_write_ipa_not_loaded): New.
12749 (tracepoint_look_up_symbols): New.
12750 (debug_threads) [IN_PROCESS_AGENT]: New.
12751 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12752 (UNKNOWN_SIDE_EFFECTS): New.
12753 (stop_tracing): New.
12754 (flush_trace_buffer): New.
12755 (stop_tracing_bkpt): New.
12756 (flush_trace_buffer_bkpt): New.
12757 (read_inferior_integer): New.
12758 (read_inferior_uinteger): New.
12759 (read_inferior_data_pointer): New.
12760 (write_inferior_data_pointer): New.
12761 (write_inferior_integer): New.
12762 (write_inferior_uinteger): New.
12763 (struct collect_static_trace_data_action): Delete.
12764 (enum tracepoint_type): New.
12765 (struct tracepoint) <type>: New field `type'.
12766 <actions_str, step_actions, step_actions_str>: Only include in
12768 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12769 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12770 (tracepoints): Use IP_AGENT_EXPORT.
12771 (last_tracepoint): Don't include in the IPA.
12772 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12773 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12774 (alloced_trace_state_variables): New.
12775 (trace_state_variables): Use IP_AGENT_EXPORT.
12776 (traceframe_t): Delete unused variable.
12777 (circular_trace_buffer): Don't include in the IPA.
12778 (trace_buffer_start): Delete.
12779 (struct trace_buffer_control): New.
12780 (trace_buffer_free): Delete.
12781 (struct ipa_trace_buffer_control): New.
12782 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12783 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12785 (trace_buffer_ctrl): New.
12786 (TRACE_BUFFER_CTRL_CURR): New.
12787 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12788 Reimplement as macros.
12789 (trace_buffer_wrap): Delete.
12790 (traceframe_write_count, traceframe_read_count)
12791 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12792 (struct tracepoint_hit_ctx) <type>: New field.
12793 (struct fast_tracepoint_ctx): New.
12794 (memory_barrier): New.
12796 (record_tracepoint_error): Update atomically in the IPA.
12797 (clear_inferior_trace_buffer): New.
12798 (about_to_request_buffer_space): New.
12799 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12800 updating the same buffer.
12801 (add_tracepoint): Default the tracepoint's type to trap
12802 tracepoint, and orig_size to -1.
12803 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12804 internal variables.
12805 (create_trace_state_variable): New parameter `gdb'. Handle it.
12806 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12807 (cmd_qtdp): Handle fast tracepoints.
12808 (cmd_qtdv): Adjust.
12809 (max_jump_pad_size): New.
12810 (gdb_jump_pad_head): New.
12811 (get_jump_space_head): New.
12812 (claim_jump_space): New.
12813 (sort_tracepoints): New.
12814 (MAX_JUMP_SIZE): New.
12815 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12817 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12818 support. Upload fast traceframes, and delete internal IPA
12820 (stop_tracing_handler): New.
12821 (flush_trace_buffer_handler): New.
12822 (cmd_qtstop): Upload fast tracepoints.
12823 (response_tracepoint): Handle fast tracepoints.
12824 (tracepoint_finished_step): Upload fast traceframes. Set the
12825 tracepoint hit context's tracepoint type.
12826 (handle_tracepoint_bkpts): New.
12827 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12828 type. Add comment about fast tracepoints.
12829 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12830 non-existing action_str field.
12831 (get_context_regcache): Handle fast tracepoints.
12832 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12834 (fast_tracepoint_from_jump_pad_address): New.
12835 (fast_tracepoint_from_ipa_tpoint_address): New.
12836 (collecting_t): New.
12837 (force_unlock_trace_buffer): New.
12838 (fast_tracepoint_collecting): New.
12840 (gdb_collect): New.
12841 (write_inferior_data_ptr): New.
12842 (target_tp_heap): New.
12843 (target_malloc): New.
12844 (download_agent_expr): New.
12846 (download_tracepoints): New.
12847 (download_trace_state_variables): New.
12848 (upload_fast_traceframes): New.
12849 (IPA_FIRST_TRACEFRAME): New.
12850 (IPA_NEXT_TRACEFRAME_1): New.
12851 (IPA_NEXT_TRACEFRAME): New.
12852 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12853 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12854 (gdb_jump_pad_buffer_end): New.
12855 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12856 (initialize_tracepoint): Adjust.
12857 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12858 buffer. Initialize the low module.
12859 * utils.c (PREFIX, TOOLNAME): New.
12860 (malloc_failure): Use PREFIX.
12861 (error): In the IPA, an error causes an exit.
12862 (fatal, warning): Use PREFIX.
12863 (internal_error): Use TOOLNAME.
12864 (NUMCELLS): Increase to 10.
12865 * configure, config.in: Regenerate.
12867 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12869 * server.c (handle_query) <qSupported>: Do two passes over the
12870 qSupported string to avoid nesting strtok.
12872 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12874 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12876 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12877 -Wl,--dynamic-list.
12878 * configure: Regenerate.
12879 * proc-service.list: New.
12881 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12883 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12886 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12888 * gdbreplay.c (remote_open): Check error return from socket() call by
12889 its equality to -1 not by it being negative.
12890 * remote-utils.c (remote_open): Likewise.
12892 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12894 * config.h: Regenerate.
12896 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12898 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12899 doesn't provide PTRACE_GET_THREAD_AREA.
12901 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12903 * linux-m68k-low.c: Include <asm/ptrace.h>
12904 (ps_get_thread_area): Implement.
12906 2010-05-03 Doug Evans <dje@google.com>
12908 * event-loop.c (struct callback_event): New struct.
12909 (callback_list): New global.
12910 (append_callback_event, delete_callback_event): New functions.
12911 (process_callback): New function.
12912 (start_event_loop): Call it.
12913 * remote-utils.c (NOT_SCHEDULED): Define.
12914 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12915 moved out of readchar.
12916 (readchar): Rewrite. Call reschedule before returning.
12917 (reset_readchar): New function.
12918 (remote_close): Call it.
12919 (process_remaining, reschedule): New functions.
12920 * server.h (callback_handler_func): New typedef.
12921 (append_callback_event, delete_callback_event): Declare.
12923 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12925 * proc-service.c (ps_pglobal_lookup): Use
12926 thread_db_look_up_one_symbol.
12927 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12928 parameter. Use it instead of all_symbols_looked_up.
12929 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12931 (all_symbols_looked_up): Don't declare.
12932 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12933 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12935 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12936 Set all_symbols_looked_up here.
12937 (thread_db_look_up_one_symbol): New.
12938 (thread_db_get_tls_address): Adjust.
12939 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12940 thread_db object on the heap, and tentatively set it in the
12942 (thread_db_init): Don't set all_symbols_looked_up here.
12943 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12945 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12947 * linux-low.c (linux_kill, linux_detach): Adjust.
12948 (status_pending_p_callback): Remove redundant statement. Check
12949 for !TARGET_WAITIKIND_IGNORE, instead of
12950 TARGET_WAITKIND_STOPPED.
12951 (handle_tracepoints): Make sure LWP is locked. Adjust.
12952 (linux_wait_for_event_1): Adjust.
12953 (linux_cancel_breakpoints): New.
12954 (unsuspend_one_lwp): New.
12955 (unsuspend_all_lwps): New.
12956 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12957 (send_sigstop_callback): Change return type to int, add new
12958 `except' parameter and handle it.
12959 (suspend_and_send_sigstop_callback): New.
12960 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12961 pass them down. If SUSPEND, also increment the lwp's suspend
12963 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12964 (need_step_over_p): Don't consider suspended LWPs.
12965 (start_step_over): Adjust.
12966 (proceed_one_lwp): Change return type to int, add new `except'
12967 parameter and handle it.
12968 (unsuspend_and_proceed_one_lwp): New.
12969 (proceed_all_lwps): Use find_inferior instead of
12971 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12972 also decrement the suspend count of LWPs. Pass `except' down,
12973 instead of hacking its suspend count.
12974 (linux_pause_all): Add `freeze' parameter. Adjust.
12975 (linux_unpause_all): New.
12976 (linux_target_ops): Install linux_unpause_all.
12977 * server.c (handle_status): Adjust.
12978 * target.h (struct target_ops): New fields `unpause_all' and
12979 `cancel_breakpoints'. Add new parameter to `pause_all'.
12980 (pause_all): Add new `freeze' parameter.
12981 (unpause_all): New.
12982 (cancel_breakpoints): New.
12983 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12984 cancel breakpoints.
12985 (cmd_qtstart): Pause threads.
12986 (stop_tracing): Pause threads, and cancel breakpoints.
12987 * win32-low.c (win32_target_ops): Adjust.
12989 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12991 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12992 the inferior right away from here...
12993 (linux_wait_1): ... to here, and adjust to check the thread's
12994 last_resume_kind instead of the lwp's step or stop_expected flags.
12996 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12998 * README: Use consistent `GDB' and `GDBserver' spellings.
13000 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13002 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13003 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13004 (linux_detach_one_lwp): Assume the lwp is stopped.
13005 (any_thread_of): Delete.
13006 (linux_detach): Stop all lwps here. Don't blindly delete all
13008 (delete_lwp_callback): New.
13009 (linux_mourn): Delete all lwps of the process that is gone.
13010 (linux_wait_1): Don't delete the last lwp of the process here.
13011 * mem-break.h (mark_breakpoints_out): Declare.
13012 * mem-break.c (mark_breakpoints_out): New.
13013 (free_all_breakpoints): Use it.
13014 * server.c (handle_target_event): If the process is gone, mark
13016 * thread-db.c (struct thread_db) <create_bp>: New field.
13017 (thread_db_enable_reporting): Fix prototype. Store a thread event
13018 breakpoint reference in the thread_db struct.
13019 (thread_db_load_search): Clear the thread_db object.
13020 (try_thread_db_load_1): Ditto.
13021 (switch_to_process): New.
13022 (disable_thread_event_reporting): Use it.
13023 (remove_thread_event_breakpoints): New.
13024 (thread_db_detach, thread_db_mourn): Use it.
13026 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13028 * linux-low.c (linux_enable_event_reporting): New.
13029 (linux_wait_for_event_1, handle_extended_wait): Use it.
13031 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13033 * linux-low.c (linux_kill_one_lwp, linux_kill)
13034 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13035 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13036 SIGSTOP even if the LWP is stopped.
13037 (send_sigstop_callback): New.
13038 (stop_all_lwps): Use send_sigstop_callback instead.
13039 (linux_resume_one_thread): Adjust.
13040 (proceed_one_lwp): Still proceed an LWP that the client has
13041 requested to stop, if we haven't reported it as stopped yet. Make
13042 sure that LWPs the client want stopped, have a pending SIGSTOP.
13044 2010-04-26 Doug Evans <dje@google.com>
13046 * server.c (handle_general_set): Make static.
13048 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13049 Print received char after testing for error/eof instead of before.
13050 (input_interrupt): Tweak comment.
13052 2010-04-23 Doug Evans <dje@google.com>
13054 * server.c (start_inferior): Print inferior argv if --debug.
13056 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13058 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13059 * nto-x86-low.c: Include server.h
13061 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13063 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13064 be consistent with other sources of this directory.
13065 (init_registers_amd64): Correct name of source file of this function
13068 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13070 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13071 64-bit executables.
13073 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13075 * win32-i386-low.c: Add 64-bit support.
13076 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13077 (init_registers_amd64): Declare.
13078 (mappings): Add 64-bit version of array.
13079 (init_windows_x86): New function.
13080 (the_low_target): Change init_arch field to init_windows_x86.
13082 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13084 * win32-low.c: Adapt to support also 64-bit architecture.
13085 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13086 (get_image_name): Use SIZE_T type for local variable `done'.
13087 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13088 (toolhelp_get_dll_name): Idem.
13089 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13090 Use uintptr_t typecast to avoid warning.
13091 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13092 (handle_exception): Use phex_nz to avoid warning.
13093 (win32_wait): Remove unused local variable `process'.
13095 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13097 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13100 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13102 * configure.ac: Use `ws2_32' library for srv_mingw.
13103 * configure: Regenerate.
13104 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13105 * remote-utils.c: Likewise.
13107 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13109 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13110 if __x86_64__ is defined.
13112 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13114 * configure: Regenerate.
13116 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13118 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13119 * target.h (target_ops): New get_tib_address field.
13120 * win32-low.h (win32_thread_info): Add thread_local_base field.
13121 * win32-low.c (child_add_thread): Add tlb argument.
13122 Set thread_local_base field to TLB.
13123 (get_child_debug_event): Adapt to child_add_thread change.
13124 (win32_get_tib_address): New function.
13125 (win32_target_ops): Set get_tib_address field to
13126 win32_get_tib_address.
13127 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13129 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13131 * linux-low.c (linux_mourn): Also remove the process.
13132 * server.c (handle_target_event): Don't remove the process here.
13133 * nto-low.c (nto_mourn): New.
13134 (nto_target_ops): Install it.
13135 * spu-low.c (spu_mourn): New.
13136 (spu_target_ops): Install it.
13137 * win32-low.c (win32_mourn): New.
13138 (win32_target_ops): Install it.
13140 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13142 * server.h (buffer_xml_printf): Remove redundant `;'.
13144 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13146 * regcache.c (set_register_cache): Invalidate regcaches before
13147 changing the register cache layout.
13148 (regcache_invalidate_one): Allow a NULL regcache.
13149 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13150 regcaches before changing the register cache layout or the target
13153 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13155 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13156 variable warning on Linux/x86-64.
13158 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13160 GDBserver disconnected tracing support.
13162 * linux-low.c (linux_remove_process): Delete.
13163 (add_lwp): Don't set last_resume_kind here.
13164 (linux_kill): Use `mourn'.
13165 (linux_detach): Use `thread_db_detach', and `mourn'.
13166 (linux_mourn): New.
13167 (linux_attach_lwp_1): Adjust comment.
13168 (linux_attach): last_resume_kind moved the thread_info; adjust.
13169 (status_pending_p_callback): Adjust.
13170 (linux_wait_for_event_1): Adjust.
13171 (count_events_callback, select_singlestep_lwp_callback)
13172 (select_event_lwp_callback, cancel_breakpoints_callback)
13173 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13174 (proceed_one_lwp): Adjust.
13175 (linux_async): Add debug output.
13176 (linux_thread_stopped): New.
13177 (linux_pause_all): New.
13178 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13180 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13181 (thread_db_free): Delete declaration.
13182 (thread_db_detach, thread_db_mourn): Declare.
13183 * thread-db.c (thread_db_init): Use thread_db_mourn.
13184 (thread_db_free): Delete, split in two.
13185 (disable_thread_event_reporting): New.
13186 (thread_db_detach): New.
13187 (thread_db_mourn): New.
13189 * server.h (struct thread_info) <last_resume_kind>: New field.
13190 <attached>: Add comment.
13191 <gdb_detached>: New field.
13192 (handler_func): Change return type to int.
13193 (handle_serial_event, handle_target_event): Ditto.
13194 (gdb_connected): Declare.
13196 (disconnected_tracing): Declare.
13197 (stop_tracing): Declare.
13199 * server.c (handle_query) <qSupported>: Report support for
13200 disconnected tracing.
13201 (queue_stop_reply_callback): Account for running threads.
13202 (gdb_wants_thread_stopped): New.
13203 (gdb_wants_all_threads_stopped): New.
13204 (gdb_reattached_process): New.
13205 (handle_status): Clear the `gdb_detached' flag of all processes.
13206 In all-stop, stop all threads.
13207 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13208 (process_serial_event): If the remote connection breaks, or if an
13209 exit was forced with "monitor exit", force an event loop exit.
13210 Handle disconnected tracing on detach.
13211 (handle_serial_event): Adjust.
13212 (handle_target_event): If GDB isn't connected, forward events back
13213 to the inferior, unless the last process exited, in which case,
13214 exit gdbserver. Adjust interface.
13216 * remote-utils.c (remote_open): Don't block in accept. Instead
13217 register an event loop source on the listen socket file
13218 descriptor. Refactor bits into ...
13219 (listen_desc): ... this new global.
13220 (gdb_connected): ... this new function.
13221 (enable_async_notification): ... this new function.
13222 (handle_accept_event): ... this new function.
13223 (remote_close): Clear remote_desc.
13225 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13227 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13229 (mourn_inferior): Define.
13230 (target_process_qsupported): Avoid the dangling else problem.
13231 (thread_stopped): Define.
13232 (pause_all): Define.
13233 (target_waitstatus_to_string): Declare.
13234 * target.c (target_waitstatus_to_string): New.
13236 * tracepoint.c (tracing): Make extern.
13237 (disconnected_tracing): New.
13238 (stop_tracing): Make extern. Handle tracing stops due to GDB
13240 (cmd_qtdisconnected): New.
13241 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13242 (handle_tracepoint_general_set): Handle QTDisconnected.
13244 * event-loop.c (event_handler_func): Change return type to int.
13245 (process_event): Bail out if the event handler wants the event
13247 (handle_file_event): Ditto.
13248 (start_event_loop): Bail out if the event handler wants the event
13251 * nto-low.c (nto_target_ops): Adjust.
13252 * spu-low.c (spu_wait): Don't remove the process here.
13253 (spu_target_ops): Adjust.
13254 * win32-low.c (win32_wait): Don't remove the process here.
13255 (win32_target_ops): Adjust.
13257 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13259 * regcache.c (realloc_register_cache): Invalidate inferior's
13260 regcache before recreating it.
13262 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13264 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13266 2010-04-09 Stan Shebs <stan@codesourcery.com>
13267 Pedro Alves <pedro@codesourcery.com>
13269 * server.h (LONGEST): New.
13270 (struct thread_info) <while_stepping>: New field.
13271 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13273 (initialize_tracepoint, handle_tracepoint_general_set)
13274 (handle_tracepoint_query, tracepoint_finished_step)
13275 (tracepoint_was_hit, release_while_stepping_state_list):
13276 (current_traceframe): Declare.
13277 * server.c (handle_general_set): Handle tracepoint packets.
13278 (read_memory): New.
13279 (write_memory): New.
13280 (handle_search_memory_1): Use read_memory.
13281 (handle_query): Report support for conditional tracepoints, trace
13282 state variables, and tracepoint sources. Handle tracepoint
13284 (main): Initialize the tracepoints module.
13285 (process_serial_event): Handle traceframe reads/writes.
13287 * linux-low.c (handle_tracepoints): New.
13288 (linux_wait_1): Call it.
13289 (linux_resume_one_lwp): Handle while-stepping.
13290 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13291 (linux_target_ops): Install them.
13292 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13294 * linux-x86-low.c (x86_supports_tracepoints): New.
13295 (the_low_target). Install it.
13297 * mem-break.h (delete_breakpoint): Declare.
13298 * mem-break.c (delete_breakpoint): Make external.
13300 * target.h (struct target_ops): Add `supports_tracepoints',
13301 `read_pc', and `write_pc' fields.
13302 (target_supports_tracepoints): Define.
13303 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13306 * regcache.h (struct regcache) <registers_owned>: New field.
13307 (init_register_cache, regcache_cpy): Declare.
13308 (regcache_read_pc, regcache_write_pc): Declare.
13309 (register_cache_size): Declare.
13310 (supply_regblock): Declare.
13311 * regcache.c (init_register_cache): New.
13312 (new_register_cache): Use it.
13313 (regcache_cpy): New.
13314 (register_cache_size): New.
13315 (supply_regblock): New.
13316 (regcache_read_pc, regcache_write_pc): New.
13318 * tracepoint.c: New.
13320 * Makefile.in (OBS): Add tracepoint.o.
13321 (tracepoint.o): New rule.
13323 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13325 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13327 (i386-mmx.c): Likewise.
13328 (i386-mmx-linux.o): Likewise.
13329 (i386-mmx-linux.c): Likewise.
13331 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13332 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13333 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13334 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13336 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13337 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13338 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13340 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13342 * Makefile.in (clean): Updated.
13344 (i386-avx.c): Likewise.
13345 (i386-avx-linux.o): Likewise.
13346 (i386-avx-linux.c): Likewise.
13347 (amd64-avx.o): Likewise.
13348 (amd64-avx.c): Likewise.
13349 (amd64-avx-linux.o): Likewise.
13350 (amd64-avx-linux.c): Likewise.
13352 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13353 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13354 (srv_amd64_regobj): Add amd64-avx.o.
13355 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13356 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13357 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13358 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13359 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13360 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13361 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13363 * i387-fp.c: Include "i386-xstate.h".
13365 (i387_cache_to_xsave): Likewise.
13366 (i387_xsave_to_cache): Likewise.
13367 (x86_xcr0): Likewise.
13369 * i387-fp.h (i387_cache_to_xsave): Likewise.
13370 (i387_xsave_to_cache): Likewise.
13371 (x86_xcr0): Likewise.
13373 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13374 * linux-crisv32-low.c (target_regsets): Likewise.
13375 * linux-m68k-low.c (target_regsets): Likewise.
13376 * linux-mips-low.c (target_regsets): Likewise.
13377 * linux-ppc-low.c (target_regsets): Likewise.
13378 * linux-s390-low.c (target_regsets): Likewise.
13379 * linux-sh-low.c (target_regsets): Likewise.
13380 * linux-sparc-low.c (target_regsets): Likewise.
13381 * linux-xtensa-low.c (target_regsets): Likewise.
13383 * linux-low.c: Include <sys/uio.h>.
13384 (regsets_fetch_inferior_registers): Support nt_type.
13385 (regsets_store_inferior_registers): Likewise.
13386 (linux_process_qsupported): New.
13387 (linux_target_ops): Add linux_process_qsupported.
13389 * linux-low.h (regset_info): Add nt_type.
13390 (linux_target_ops): Add process_qsupported.
13392 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13394 (init_registers_i386_avx_linux): New.
13395 (init_registers_amd64_avx_linux): Likewise.
13396 (xmltarget_i386_linux_no_xml): Likewise.
13397 (xmltarget_amd64_linux_no_xml): Likewise.
13398 (PTRACE_GETREGSET): Likewise.
13399 (PTRACE_SETREGSET): Likewise.
13400 (x86_fill_xstateregset): Likewise.
13401 (x86_store_xstateregset): Likewise.
13402 (use_xml): Likewise.
13403 (x86_linux_update_xmltarget): Likewise.
13404 (x86_linux_process_qsupported): Likewise.
13405 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13406 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13407 init_registers_i386_linux here. Call
13408 x86_linux_update_xmltarget.
13409 (the_low_target): Add x86_linux_process_qsupported.
13411 * server.c (handle_query): Call target_process_qsupported.
13413 * target.h (target_ops): Add process_qsupported.
13414 (target_process_qsupported): New.
13416 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13418 * inferiors.c (add_thread): Set last_status kind to
13419 TARGET_WAITKIND_IGNORE.
13420 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13421 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13422 (linux_wait_1): Move `thread' local definition to block that uses
13423 it. Don't NULL initialize `event_child'.
13424 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13425 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13426 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13428 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13430 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13431 an extended waitstatus, or by a watchpoint.
13432 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13433 thread was stepping or has been stopped by a watchpoint.
13435 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13437 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13438 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13439 of another, then delete the previous, and validate all
13441 (validate_inserted_breakpoint): New.
13442 (delete_disabled_breakpoints): New.
13443 (validate_breakpoints): New.
13444 (check_mem_read): Validate breakpoints before trusting their
13445 shadow. Delete disabled breakpoints.
13446 (check_mem_write): Validate breakpoints before trusting they
13447 should be inserted. Delete disabled breakpoints.
13448 * mem-break.h (validate_breakpoints):
13449 * server.c (handle_query): Validate breakpoints when we see a
13452 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13454 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13455 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13456 if we could tell there's a GDB breakpoint at stop_pc.
13457 (need_step_over_p): Don't do a step over if we find a GDB
13458 breakpoint at the resume PC.
13460 * mem-break.c (struct raw_breakpoint): New.
13461 (enum bkpt_type): New type `gdb_breakpoint'.
13462 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13463 fields. New field `raw'.
13464 (find_raw_breakpoint_at): New.
13465 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13466 breakpoint instead.
13467 (set_breakpoint_at): Adjust.
13468 (delete_raw_breakpoint): New.
13469 (release_breakpoint): New.
13470 (delete_breakpoint): Rename to...
13471 (delete_breakpoint_1): ... this. Add proc parameter. Use
13472 release_breakpoint. Return ENOENT.
13473 (delete_breakpoint): Reimplement.
13474 (find_breakpoint_at): Delete.
13475 (find_gdb_breakpoint_at): New.
13476 (delete_breakpoint_at): Delete.
13477 (set_gdb_breakpoint_at): New.
13478 (delete_gdb_breakpoint_at): New.
13479 (gdb_breakpoint_here): New.
13480 (set_reinsert_breakpoint): Use release_breakpoint.
13481 (uninsert_breakpoint): Rename to ...
13482 (uninsert_raw_breakpoint): ... this.
13483 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13484 (reinsert_raw_breakpoint): Change parameter type to
13486 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13488 (check_breakpoints): Adjust. Use release_breakpoint.
13489 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13490 (breakpoint_inserted_here): Ditto.
13491 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13492 Don't trust the breakpoint's shadow if it is not inserted.
13493 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13494 (delete_all_breakpoints): Adjust.
13495 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13496 use delete_breakpoint_1.
13498 * mem-break.h (breakpoints_supported): Delete declaration.
13499 (set_gdb_breakpoint_at): Declare.
13500 (gdb_breakpoint_here): Declare.
13501 (delete_breakpoint_at): Delete.
13502 (delete_gdb_breakpoint_at): Declare.
13504 * server.h (struct raw_breakpoint): Forward declare.
13505 (struct process_info): New field `raw_breakpoints'.
13507 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13510 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13512 * linux-low.c (status_pending_p_callback): Fix comment.
13513 (linux_wait_for_event_1): Move most of the internal breakpoint
13514 handling from here...
13515 (linux_wait_1): ... to here.
13516 (count_events_callback): New.
13517 (select_singlestep_lwp_callback): New.
13518 (select_event_lwp_callback): New.
13519 (cancel_breakpoints_callback): New.
13520 (select_event_lwp): New.
13521 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13522 priority to all LWPs that have had events that should be reported
13523 to the client. Cancel breakpoints when about to reporting the
13524 event to the client, not while stopping lwps. No longer cancel
13525 finished single-steps here.
13526 (cancel_finished_single_step): Delete.
13527 (cancel_finished_single_steps): Delete.
13529 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13531 * mem-break.c (enum bkpt_type): New.
13532 (struct breakpoint): New field `type'.
13533 (set_breakpoint_at): Change return type to struct breakpoint
13534 pointer. Set type to `other_breakpoint' by default.
13535 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13536 in the breakpoint list.
13537 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13538 (reinsert_breakpoint): Rename to ...
13539 (reinsert_raw_breakpoint): ... this.
13540 (reinsert_breakpoints_at): Adjust.
13541 * mem-break.h (struct breakpoint): Declare.
13542 (set_breakpoint_at): Change return type to struct breakpoint
13545 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13547 * server.c (handle_query): Assign, not compare.
13549 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13551 Teach linux gdbserver to step-over-breakpoints.
13553 * linux-low.c (can_hardware_single_step): New.
13554 (supports_breakpoints): New.
13555 (handle_extended_wait): If stopping threads, read the stop pc of
13556 the new cloned LWP.
13558 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13559 low target doesn't support retrieving the PC.
13560 (add_lwp): Set last_resume_kind to resume_continue.
13561 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13562 (linux_attach): Don't clear stop_expected. Set the lwp's
13563 last_resume_kind to resume_stop.
13564 (linux_detach_one_lwp): Don't check for removed breakpoints.
13565 (check_removed_breakpoint): Delete.
13566 (status_pending_p): Rename to ...
13567 (status_pending_p_callback): ... this. Don't check for removed
13568 breakpoints. Don't consider threads that are stopped from GDB's
13570 (linux_wait_for_lwp): Always read the stop_pc here.
13571 (cancel_breakpoint): New.
13572 (step_over_bkpt): New global.
13573 (linux_wait_for_event_1): Implement stepping over breakpoints.
13574 (gdb_wants_lwp_stopped): New.
13575 (gdb_wants_all_stopped): New.
13576 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13577 single-step traps here. Store the thread's last reported target
13579 (send_sigstop): Don't clear stop_expected. Always set it,
13581 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13582 (cancel_finished_single_step): New.
13583 (cancel_finished_single_steps): New.
13584 (wait_for_sigstop): Don't cancel finished single-step traps here.
13585 (linux_resume_one_lwp): Don't check for removed breakpoints.
13586 Don't set `step' on non-hardware step archs.
13587 (linux_set_resume_request): Ignore resume_stop requests if already
13588 stopping or stopped. Set the lwp's last_resume_kind.
13589 (resume_status_pending_p): Don't check for removed breakpoints.
13590 (need_step_over_p): New.
13591 (start_step_over): New.
13592 (finish_step_over): New.
13593 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13594 requests. Clear the thread's last reported target waitstatus.
13595 Don't use the `suspended' flag. Don't consider pending breakpoints.
13596 (linux_resume): Start a step-over if necessary.
13597 (proceed_one_lwp): New.
13598 (proceed_all_lwps): New.
13599 (unstop_all_lwps): New.
13600 * linux-low.h (struct lwp_info): Rewrite comment for the
13601 `suspended' flag. Add the `stop_pc' field. Delete the
13602 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13603 Add `'last_resume_kind' and `need_step_over' fields.
13604 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13605 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13606 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13607 (set_raw_breakpoint_at): New.
13608 (set_breakpoint_at): Rewrite to use it.
13609 (reinsert_breakpoint_handler): Delete.
13610 (set_reinsert_breakpoint): New.
13611 (reinsert_breakpoint_by_bp): Delete.
13612 (delete_reinsert_breakpoints): New.
13613 (uninsert_breakpoint): Rewrite.
13614 (uninsert_breakpoints_at): New.
13615 (reinsert_breakpoint): Rewrite.
13616 (reinsert_breakpoints_at): New.
13617 (check_breakpoints): Rewrite.
13618 (breakpoint_here): New.
13619 (breakpoint_inserted_here): New.
13620 (check_mem_read): Adjust.
13621 * mem-break.h (breakpoints_supported, breakpoint_here)
13622 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13623 (reinsert_breakpoint_by_bp): Delete declaration.
13624 (delete_reinsert_breakpoints): Declare.
13625 (reinsert_breakpoint): Delete declaration.
13626 (reinsert_breakpoints_at): Declare.
13627 (uninsert_breakpoint): Delete declaration.
13628 (uninsert_breakpoints_at): Declare.
13629 (check_breakpoints): Adjust prototype.
13630 * server.h: Adjust include order.
13631 (struct thread_info): Declare here. Add a `last_status' field.
13633 2010-03-23 Michael Snyder <msnyder@vmware.com>
13635 * server.c (crc32): New function.
13636 (handle_query): Add handling for 'qCRC:' request.
13638 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13640 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13641 lwp had been stopped by a watchpoint.
13643 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13645 * server.h (internal_error): Declare.
13646 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13647 * utils.c (internal_error): New function.
13649 2010-03-15 Andreas Schwab <schwab@redhat.com>
13651 * configure.srv: Fix typo setting srv_regobj.
13653 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13655 * linux-low.c (fetch_register): Avoid passing a non string literal
13657 (usr_store_inferior_registers): Ditto.
13659 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13661 * linux-low.c (linux_write_memory): Bail out early if peeking
13664 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13666 * linux-low.h (struct lwp_info): New fields
13667 `stopped_by_watchpoint' and `stopped_data_address'.
13668 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13669 here, and cache them in the lwp object.
13670 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13672 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13674 (linux_stopped_by_watchpoint): Rewrite.
13675 (linux_stopped_data_address): Rewrite.
13677 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13679 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13680 switching the current inferior, not before.
13682 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13684 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13685 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13686 i386-linux.c and amd64-linux.c.
13687 (reg-i386.o): Removed.
13688 (reg-i386.c): Likewise.
13689 (reg-i386-linux.o): Likewise.
13690 (reg-i386-linux.c): Likewise.
13691 (reg-x86-64.o): Likewise.
13692 (reg-x86-64.c): Likewise.
13693 (reg-x86-64-linux.o): Likewise.
13694 (reg-x86-64-linux.c): Likewise.
13696 (i386.c): Likewise.
13697 (i386-linux.o): Likewise.
13698 (i386-linux.c): Likewise.
13699 (amd64.o): Likewise.
13700 (amd64.c): Likewise.
13701 (amd64-linux.o): Likewise.
13702 (amd64-linux.c): Likewise.
13704 * configure.srv (srv_i386_regobj): New.
13705 (srv_i386_linux_regobj): Likewise.
13706 (srv_amd64_regobj): Likewise.
13707 (srv_amd64_linux_regobj): Likewise.
13708 (srv_i386_32bit_xmlfiles): Likewise.
13709 (srv_i386_64bit_xmlfiles): Likewise.
13710 (srv_i386_xmlfiles): Likewise.
13711 (srv_amd64_xmlfiles): Likewise.
13712 (srv_i386_linux_xmlfiles): Likewise.
13713 (srv_amd64_linux_xmlfiles): Likewise.
13714 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13715 srv_xmlfiles to $srv_i386_xmlfiles.
13716 (i[34567]86-*-mingw32ce*): Likewise.
13717 (i[34567]86-*-mingw*): Likewise.
13718 (i[34567]86-*-nto*): Likewise.
13719 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13720 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13721 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13722 (x86_64-*-linux*): Likewise.
13724 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13725 (init_registers_amd64_linux): New.
13726 (x86_arch_setup): Replace init_registers_x86_64_linux with
13727 init_registers_amd64_linux.
13729 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13731 * configure.ac: Check for libdl. If it is not available link against
13732 static libthread_db.
13733 * configure: Regenerate.
13735 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13739 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13740 handing a read watchpoint.
13741 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13743 2010-02-12 Doug Evans <dje@google.com>
13745 * linux-low.c (linux_supports_tracefork_flag): Document.
13746 (linux_look_up_symbols): Add comment.
13748 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13750 * regcache.c (supply_register): Clear regcache if buf is NULL.
13752 2010-02-02 Nicolas Roche <roche@sourceware.org>
13753 Joel Brobecker <brobecker@adacore.com>
13755 * inferiors.c (find_inferior): Add function documentation.
13756 (unloaded_dll): Handle the case where the unloaded dll has not
13757 been previously registered in the dll list.
13759 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13761 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13762 (thumb2_breakpoint): New.
13763 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13765 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13767 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13768 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13771 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13773 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13775 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13777 * linux-s390-low.c (s390_collect_ptrace_register)
13778 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13780 2010-01-21 Doug Evans <dje@google.com>
13782 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13783 (PTRACE_ARG4_TYPE): New macro.
13784 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13785 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13786 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13787 (usr_store_inferior_registers): Ditto.
13788 (linux_read_memory, linux_write_memory): Ditto.
13789 (linux_test_for_tracefork): Ditto.
13791 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13792 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13794 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13796 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13799 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13801 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13802 prototype to take a regcache. Adjust.
13804 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13806 * regcache.h (struct thread_info): Forward declare.
13807 (struct regcache): New.
13808 (new_register_cache): Adjust prototype.
13809 (get_thread_regcache): Declare.
13810 (free_register_cache): Adjust prototype.
13811 (registers_to_string, registers_from_string): Ditto.
13812 (supply_register, supply_register_by_name, collect_register)
13813 (collect_register_as_string, collect_register_by_name): Ditto.
13814 * regcache.c (struct inferior_regcache_data): Delete.
13815 (get_regcache): Rename to ...
13816 (get_thread_regcache): ... this. Adjust. Switch inferior before
13817 fetching registers.
13818 (regcache_invalidate_one): Adjust.
13819 (regcache_invalidate): Fix prototype.
13820 (new_register_cache): Return the new register cache.
13821 (free_register_cache): Change prototype.
13822 (realloc_register_cache): Adjust.
13823 (registers_to_string): Change prototype to take a regcache. Adjust.
13824 (registers_from_string): Ditto.
13825 (register_data): Ditto.
13826 (supply_register): Ditto.
13827 (supply_register_by_name): Ditto.
13828 (collect_register): Ditto.
13829 (collect_register_as_string): Ditto.
13830 (collect_register_by_name): Ditto.
13831 * server.c (process_serial_event): Adjust.
13832 * linux-low.h (regset_fill_func, regset_store_func): Change
13834 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13836 * linux-low.c (get_stop_pc): Adjust.
13837 (check_removed_breakpoint): Adjust.
13838 (linux_wait_for_event): Adjust.
13839 (linux_resume_one_lwp): Adjust.
13840 (fetch_register): Add regcache parameter. Adjust.
13841 (usr_store_inferior_registers): Ditto.
13842 (regsets_fetch_inferior_registers): Ditto.
13843 (regsets_store_inferior_registers): Ditto.
13844 (linux_fetch_registers, linux_store_registers): Ditto.
13845 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13847 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13849 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13850 prototype to take a regcache.
13851 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13852 * remote-utils.c (convert_ascii_to_int, outreg)
13853 (prepare_resume_reply): Change prototype to take a regcache.
13855 * target.h (struct target_ops) <fetch_registers, store_registers>:
13856 Change prototype to take a regcache.
13857 (fetch_inferior_registers, store_inferior_registers): Change
13858 prototype to take a regcache. Adjust.
13859 * proc-service.c (ps_lgetregs): Adjust.
13860 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13861 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13862 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13863 take a regcache. Adjust.
13864 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13865 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13866 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13867 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13868 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13869 (cris_cannot_fetch_register):
13870 (cris_breakpoint_at): Change prototype to take a regcache.
13872 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13873 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13874 to take a regcache. Adjust.
13875 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13877 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13878 take a regcache. Adjust.
13879 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13880 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13881 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13882 * linux-mips-low.c (mips_get_pc):
13883 (mips_set_pc): Change prototype to take a regcache. Adjust.
13884 (mips_reinsert_addr): Adjust.
13885 (mips_collect_register): Change prototype to take a regcache.
13887 (mips_supply_register):
13888 (mips_collect_register_32bit, mips_supply_register_32bit)
13889 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13890 (mips_store_fpregset): Ditto.
13891 * linux-ppc-low.c (ppc_supply_ptrace_register)
13892 (ppc_supply_ptrace_register): Ditto.
13893 (parse_spufs_run): Adjust.
13894 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13895 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13896 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13897 take a regcache. Adjust.
13898 * linux-s390-low.c (s390_collect_ptrace_register)
13899 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13900 (s390_set_pc): Change prototype to take a regcache. Adjust.
13901 (s390_arch_setup): Adjust.
13902 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13903 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13904 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13905 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13906 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13908 (sparc_breakpoint_at): Adjust.
13909 * linux-xtensa-low.c (xtensa_fill_gregset):
13910 (xtensa_store_gregset):
13911 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13912 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13913 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13914 prototype to take a regcache. Adjust.
13915 * win32-arm-low.c (arm_fetch_inferior_register)
13916 (arm_store_inferior_register): Change prototype to take a
13918 * win32-i386-low.c (i386_fetch_inferior_register)
13919 (i386_store_inferior_register): Change prototype to take a
13921 * win32-low.c (child_fetch_inferior_registers)
13922 (child_store_inferior_registers): Change prototype to take a
13924 (win32_wait): Adjust.
13925 (win32_fetch_inferior_registers): Change prototype to take a
13927 (win32_store_inferior_registers): Adjust.
13928 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13929 store_inferior_register>: Change prototype to take a regcache.
13931 2010-01-20 Doug Evans <dje@google.com>
13933 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13935 (linux_wait_for_event1, linux_init_signals): Ditto.
13936 (W_STOPCODE): Provide definition if missing.
13938 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13940 * linux-low.c (linux_core_of_thread): New.
13941 (compare_ints, show_process, list_threads): New.
13942 (linux_qxfer_osdata): Report threads and cores.
13943 (linux_target_op): Register linux_core_of_thread.
13944 * remote-utils.c (prepare_resume_reply): Report the core.
13945 (buffer_xml_printf): Support %d specifier.
13946 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13948 (handle_query): Handle qXfer:threads. Announce availability
13950 * target.h (struct target_ops): New field core_of_thread.
13952 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13954 * Makefile.in (clean): Remove new generated files.
13955 (reg-s390.o, reg-s390.c): Remove rules.
13956 (reg-s390x.o, reg-s390x.c): Likewise.
13957 (s390-linux32.o, s390-linux32.c): Add rules.
13958 (s390-linux64.o, s390-linux64.c): Likewise.
13959 (s390x-linux64.o, s390x-linux64.c): Likewise.
13960 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13961 * linux-s390-low.c: Include <elf.h>.
13962 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13963 (init_registers_s390): Remove prototype.
13964 (init_registers_s390x): Likewise.
13965 (init_registers_s390_linux32): Add prototype.
13966 (init_registers_s390_linux64): Likewise.
13967 (init_registers_s390x_linux64): Likewise.
13968 (s390_num_regs_3264): New define.
13969 (s390_regmap_3264): New global variable.
13970 (s390_cannot_fetch_register): Remove obsolete check.
13971 (s390_cannot_store_register): Likewise.
13972 (s390_collect_ptrace_register): Handle upper/lower register halves.
13973 (s390_supply_ptrace_register): Likewise.
13974 (s390_fill_gregset): Update to register number changes.
13975 (s390_get_hwcap): New routine.
13976 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13977 Install appropriate regmap and register set.
13979 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13981 * server.c (gdbserver_version): Update copyright year to 2010.
13982 * gdbreplay.c (gdbreplay_version): Likewise.
13984 2009-12-28 Doug Evans <dje@google.com>
13986 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13987 elf/external.h. Include <elf.h> instead but only if necessary.
13989 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13991 * linux-low.c (linux_remove_process): Remove `detaching'
13992 parameter. Don't release/detach from thread_db here.
13993 (linux_kill): Release/detach from thread_db here, ...
13994 (linux_detach): ... and here, before actually detaching.
13995 (linux_wait_1): ... and here, when a process exits.
13996 * thread-db.c (any_thread_of): New.
13997 (thread_db_free): Switch the current inferior to a thread of the
14000 2009-12-21 Doug Evans <dje@google.com>
14002 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14004 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14005 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14006 warning ifndef __NR_tkill. Move setting of errno there too.
14007 Delete unnecessary resetting of errno after syscall.
14008 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14010 * configure.ac: Check for dladdr.
14011 * config.in: Regenerate.
14012 * configure: Regenerate.
14013 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14014 (try_thread_db_load): Update.
14016 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14018 2009-12-18 Doug Evans <dje@google.com>
14020 * event-loop.c: Include unistd.h if it exists.
14022 * linux-low.c (my_waitpid): Move definition away from being in
14023 between linux_tracefork_child/linux_test_for_tracefork.
14025 * gdb_proc_service.h (psaddr_t): Fix type.
14026 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14027 signature to match glibc.
14029 2009-12-16 Doug Evans <dje@google.com>
14031 * linux-low.c (linux_read_memory): Fix argument to read.
14033 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14035 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14036 events, don't leave current_inferior pointing at null.
14038 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14040 * win32-low.c (LOG): Delete.
14041 (OUTMSG): Output to stderr.
14042 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14043 on compile time LOG macro.
14044 (win32_wait): Fix debug output.
14046 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14048 * win32-low.c (win32_add_one_solib): If the dll name is
14049 "ntdll.dll", prepend the system directory to the dll path.
14051 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14053 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14055 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14056 Vladimir Prus <vladimir@codesourcery.com>
14058 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14059 * configure.ac: Check for __mcoldfire__ and set
14060 gdb_cv_m68k_is_coldfire.
14061 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14062 reg-cf.o and reg-m68k.o.
14063 * configure: Regenerated.
14065 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14067 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14068 Pass it to thread_db_free.
14069 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14070 proper `detaching' argument to linux_remove_process.
14071 * linux-low.h (thread_db_free): Add `detaching' parameter.
14072 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14074 (thread_db_free): Add `detaching' parameter. Only
14075 call td_ta_clear_event if detaching from process.
14077 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14079 * thread-db.c (thread_db_free): Fix typo.
14081 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14084 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14086 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14088 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14089 with an i686 compiler.
14090 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14092 * configure: Rebuilt.
14094 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14098 * server.c (handle_search_memory_1): Correct read_addr initialization
14099 in loop for searching subsequent chunks.
14101 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14103 * configure.ac: New --with-libthread-db option.
14104 * thread-db.c: Allow direct dependence on libthread_db.
14105 (thread_db_free): Adjust.
14106 * config.in: Regenerate.
14107 * configure: Likewise.
14109 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14112 * thread-db.c (attach_thread): New function.
14113 (maybe_attach_thread): Return success/failure.
14114 (find_new_threads_callback): Adjust.
14115 (thread_db_find_new_threads): Loop until no new threads.
14117 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14119 * proc-service.c (ps_lgetregs): Formatting.
14121 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14123 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14124 * configure.ac: Adjust.
14125 * linux-low.h (struct process_info_private): Move members to struct
14127 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14128 * linux-low.c (linux_remove_process): Adjust.
14129 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14130 * server.c (handle_query): Move code ...
14131 (handle_monitor_command): ... here. New function.
14132 * target.h (struct target_ops): New member.
14133 * thread-db.c (struct thread_db): New.
14134 (libthread_db_search_path): New variable.
14135 (thread_db_create_event, thread_db_enable_reporting)
14136 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14137 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14138 (try_thread_db_load_1, dladdr_to_soname): New functions.
14139 (try_thread_db_load, thread_db_load_search): New functions.
14140 (thread_db_init): Search for libthread_db.
14141 (thread_db_free): New function.
14142 (thread_db_handle_monitor_command): Likewise.
14143 * config.in: Regenerate.
14144 * configure: Regenerate.
14146 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14148 * spu-low.c (spu_kill): Wait for inferior to terminate.
14149 Call clear_inferiors.
14150 (spu_detach): Call clear_inferiors.
14152 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14154 * aclocal.m4: Regenerate.
14155 * config.in: Likewise.
14156 * configure: Likewise.
14158 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14160 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14161 (parse_spufs_run): New function.
14162 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14163 (ppc_breakpoint_at): Handle SPU breakpoints.
14165 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14167 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14168 (SPUFS_MAGIC): Define.
14169 (spu_enumerate_spu_ids): New function.
14170 (linux_qxfer_spu): New function.
14171 (linux_target_ops): Install linux_qxfer_spu.
14173 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14175 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14176 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14177 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14178 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14179 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14180 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14181 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14182 (init_registers_powerpc_cell32l): Add prototype.
14183 (init_registers_powerpc_cell64l): Likewise.
14184 (ppc_arch_setup): Detect Cell/B.E. architecture.
14186 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14188 * Makefile.in (datarootdir): New variable.
14190 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14192 * linux-low.c (linux_write_memory): Update debugging output.
14193 * Makefile.in (clean): Add new descriptions.
14194 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14195 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14196 * configure.srv: Add new files for arm*-*-linux*.
14197 * linux-arm-low.c: Add new declarations.
14198 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14199 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14200 (HWCAP_VFPv3D16): New.
14201 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14202 instead of __IWMMXT__.
14203 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14204 (arm_arch_setup): New.
14205 (target_regsets): Remove #ifdef. Add VFP regset.
14206 (the_low_target): Use arm_arch_setup.
14208 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14210 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14211 the main thread again.
14213 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14215 Adding Neutrino gdbserver.
14216 * configure: Regenerated.
14217 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14218 * configure.srv (i[34567]86-*-nto*): New target.
14219 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14220 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14221 (nto_comctrl) [__QNX__]: New function.
14222 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14224 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14226 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14229 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14230 Pedro Alves <pedro@codesourcery.com>
14232 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14233 don't support CONTEXT_EXTENDED_REGISTERS.
14234 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14235 (the_low_target): Install them.
14236 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14237 failing with ERROR_PIPE_NOT_CONNECTED.
14239 2009-06-30 Doug Evans <dje@google.com>
14240 Pierre Muller <muller@ics.u-strasbg.fr>
14242 Add h/w watchpoint support to x86-linux, win32-i386.
14243 * Makefile.in (SFILES): Add i386-low.c
14244 (i386_low_h): Define.
14245 (i386-low.o): Add dependencies.
14246 (linux-x86-low.o): Add i386-low.h dependency.
14247 (win32-i386-low.o): Ditto.
14248 * i386-low.c: New file.
14249 * i386-low.h: New file.
14250 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14251 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14252 * linux-low.c (linux_add_process): Initialize arch_private.
14253 (linux_remove_process): Free arch_private.
14254 (add_lwp): Initialize arch_private.
14255 (delete_lwp): Free arch_private.
14256 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14258 * linux-low.h (process_info_private): New member arch_private.
14259 (lwp_info): New member arch_private.
14260 (linux_target_ops): New members new_process, new_thread,
14262 (ptid_of): New macro.
14263 * linux-x86-low.c: Include stddef.h, i386-low.h.
14264 (arch_process_info): New struct.
14265 (arch_lwp_info): New struct.
14266 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14267 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14268 (i386_dr_low_get_status): New function.
14269 (x86_insert_point, x86_remove_point): New functions.
14270 (x86_stopped_by_watchpoint): New function.
14271 (x86_stopped_data_address): New function.
14272 (x86_linux_new_process, x86_linux_new_thread): New functions.
14273 (x86_linux_prepare_to_resume): New function.
14274 (the_low_target): Add entries for insert_point, remove_point,
14275 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14277 * server.c (debug_hw_points): New global.
14278 (monitor_show_help): Document set debug-hw-points.
14279 (handle_query): Process "set debug-hw-points".
14280 * server.h (debug_hw_points): Declare.
14281 (paddress): Declare.
14282 * utils.c (NUMCELLS, CELLSIZE): New macros.
14283 (get_sell, xsnprintf, paddress): New functions.
14284 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14285 remove_point, stopped_by_watchpoint, stopped_data_address.
14286 * win32-i386-low.c: Include i386-low.h.
14287 (debug_reg_state): Replaces dr.
14288 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14289 (i386_dr_low_get_status): New function.
14290 (i386_insert_point, i386_remove_point): New functions.
14291 (i386_stopped_by_watchpoint): New function.
14292 (i386_stopped_data_address): New function.
14293 (i386_initial_stuff): Update.
14294 (get_thread_context,set_thread_context,i386_thread_added): Update.
14295 (the_low_target): Add entries for insert_point,
14296 remove_point, stopped_by_watchpoint, stopped_data_address.
14297 * win32-low.c (win32_insert_watchpoint): New function.
14298 (win32_remove_watchpoint): New function.
14299 (win32_stopped_by_watchpoint): New function.
14300 (win32_stopped_data_address): New function.
14301 (win32_target_ops): Add entries for insert_watchpoint,
14302 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14303 * win32-low.h (win32_target_ops): New members insert_point,
14304 remove_point, stopped_by_watchpoint, stopped_data_address.
14306 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14308 * server.c (process_serial_event): Re-return unsupported, not
14309 error, if the type isn't recognized. Re-allow supporting only
14310 insert or remove packets. Also call require_running for
14311 breakpoints. Add missing break statement to default case. Tidy.
14312 * target.h (struct target_ops): Rename insert_watchpoint to
14313 insert_point, and remove_watchpoint to remove_point.
14315 * linux-low.h (struct linux_target_ops): Likewise.
14316 * linux-low.c (linux_insert_watchpoint): Rename to ...
14317 (linux_insert_point): ... this. Adjust.
14318 (linux_remove_watchpoint): Rename to ...
14319 (linux_remove_point): ... this. Adjust.
14320 (linux_target_ops): Adjust.
14321 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14322 (cris_insert_point): ... this.
14323 (cris_remove_watchpoint): Rename to ...
14324 (cris_remove_point): ... this.
14325 (the_low_target): Adjust.
14327 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14329 * server.c (handle_v_kill): Pass signal_pid to
14330 kill_inferior if multi_process is zero.
14332 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14334 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14335 * target.h (target_ops): Comment for *_watchpoint to make it clear
14336 the functions can get types '0' and '1'.
14338 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14340 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14341 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14342 * regcache.c (get_regcache): Likewise.
14343 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14344 * win32-low.c (child_fetch_inferior_registers): Remove check for
14347 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14348 Pedro Alves <pedro@codesourcery.com>
14350 * target.h (struct target_ops) <supports_multi_process>: New
14352 (target_supports_multi_process): New.
14353 * server.c (handle_query): Even if GDB reports support, only
14354 enable multi-process if the target also supports it. Report
14355 multi-process support only if the target backend supports it.
14356 * linux-low.c (linux_supports_multi_process): New function.
14357 (linux_target_ops): Install it as target_supports_multi_process
14360 2009-05-24 Doug Evans <dje@google.com>
14362 Global renaming of find_thread_pid to find_thread_ptid.
14363 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14364 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14365 All callers updated.
14367 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14368 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14371 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14372 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14373 (linux_resume_one_lwp): Ditto.
14375 2009-05-23 Doug Evans <dje@google.com>
14377 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14378 from struct inferior_list_entry * to struct lwp_info *.
14379 All callers updated.
14381 2009-05-13 Doug Evans <dje@google.com>
14383 * linux-x86-low.c: Don't include assert.h.
14384 (x86_siginfo_fixup): Use fatal, not assert.
14385 (x86_arch_setup): Fix comment.
14387 2009-05-12 Doug Evans <dje@google.com>
14389 Biarch support for i386/amd64 gdbserver.
14390 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14391 Add linux-x86-low.c.
14392 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14393 (linux-x86-low.o): Add.
14394 * linux-x86-64-low.c: Delete.
14395 * linux-i386-low.c: Delete.
14396 * linux-x86-low.c: New file.
14397 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14399 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14401 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14402 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14403 (linux_child_pid_to_exec_file): New function.
14404 (elf_64_header_p, elf_64_file_p): New functions.
14405 (siginfo_fixup): New function.
14406 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14407 give target a chance to convert layout.
14408 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14409 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14411 2009-05-07 Doug Evans <dje@google.com>
14413 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14414 (regsets_store_inferior_registers): Ditto.
14416 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14420 * linux-low.c (must_set_ptrace_flags): Delete.
14421 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14423 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14424 `lwp->must_set_ptrace_flags' instead.
14425 (linux_wait_for_event_1): Set ptrace options here.
14426 (linux_wait_1): ... not here.
14428 2009-04-30 Doug Evans <dje@google.com>
14430 * inferiors.c (started_inferior_callback): New function.
14431 (attached_inferior_callback): New function.
14432 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14433 * server.c (print_started_pid, print_attached_pid): New functions.
14434 (detach_or_kill_for_exit): New function.
14435 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14436 * server.h (have_started_inferiors_p): Declare.
14437 (have_attached_inferiors_p): Declare.
14439 * inferiors.c (remove_process): Fix memory leak, free process.
14440 * linux-low.c (linux_remove_process): New function.
14441 (linux_kill): Call it instead of remove_process.
14442 (linux_detach, linux_wait_1): Ditto.
14444 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14446 * configure.srv: Add x86 Windows CE target.
14448 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14450 * inferiors.c (get_thread_process): Make global.
14451 * server.h (get_thread_process): Add prototype.
14452 * thread-db.c (find_one_thread): Use get_thread_process
14453 instead of current_process.
14454 (thread_db_get_tls_address): Do not crash if called when
14455 thread layer is not yet initialized.
14457 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14459 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14460 * spu-low.c (current_tid): Rename to ...
14461 (current_ptid): ... this.
14462 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14463 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14464 ptid_get_lwp (current_ptid) instead of current_tid.
14465 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14466 instead of current_tid. Use find_process_pid to verify pid
14467 argument is valid. Pass proper argument to remove_process.
14468 (spu_thread_alive): Compare current_ptid instead of current_tid.
14469 (spu_resume): Likewise.
14471 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14473 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14476 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14478 Implement the multiprocess extensions, and add linux multiprocess
14481 * server.h (ULONGEST): Declare.
14482 (struct ptid, ptid_t): New.
14483 (minus_one_ptid, null_ptid): Declare.
14484 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14485 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14486 (struct inferior_list_entry): Change `id' type from unsigned from
14488 (struct sym_cache, struct breakpoint, struct
14489 process_info_private): Forward declare.
14490 (struct process_info): Declare.
14491 (current_process): Declare.
14492 (all_processes): Declare.
14493 (initialize_inferiors): Declare.
14494 (add_thread): Adjust to use ptid_t.
14495 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14496 (add_process, remove_process, find_thread_pid): Declare.
14497 (find_inferior_id): Adjust to use ptid_t.
14498 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14499 (multi_process): Declare.
14500 (push_event): Adjust to use ptid_t.
14501 (read_ptid, write_ptid): Declare.
14502 (prepare_resume_reply): Adjust to use ptid_t.
14503 (clear_symbol_cache): Declare.
14504 * inferiors.c (all_processes): New.
14505 (null_ptid, minus_one_ptid): New.
14506 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14507 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14508 (add_thread): Change unsigned long to ptid. Remove gdb_id
14510 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14511 (gdb_id_to_thread): Rename to ...
14512 (find_thread_pid): ... this. Change unsigned long to ptid.
14513 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14514 (loaded_dll, pull_pid_from_list): Adjust.
14515 (add_process, remove_process, find_process_pid)
14516 (get_thread_process, current_process, initialize_inferiors): New.
14517 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14518 (struct target_waitstatus) <related_pid>: Ditto.
14519 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14520 return type to int.
14521 (struct target_ops) <join>: Add `pid' argument.
14522 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14523 (struct target_ops) <wait>: Add `ptid' field. Change return type
14525 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14526 (mywait): Add `ptid' argument. Change return type to ptid_t.
14527 (target_pid_to_str): Declare.
14528 * target.c (set_desired_inferior): Adjust to use ptids.
14529 (mywait): Add new `ptid' argument. Adjust.
14530 (target_pid_to_str): New.
14531 * mem-break.h (free_all_breakpoints): Declare.
14532 * mem-break.c (breakpoints): Delelete.
14533 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14534 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14535 to use per-process breakpoint list.
14536 (free_all_breakpoints): New.
14537 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14538 (symbol_cache, all_symbols_looked_up): Delete.
14540 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14542 (prepare_resume_reply): Change ptid argument's type from unsigned
14543 long to ptid_t. Adjust. Implement W;process and X;process.
14544 (free_sym_cache, clear_symbol_cache): New.
14545 (look_up_one_symbol): Adjust to per-process symbol cache. *
14546 * server.c (cont_thread, general_thread, step_thread): Change type
14548 (attached): Delete.
14549 (multi_process): New.
14550 (last_ptid): Change type to ptid_t.
14551 (struct vstop_notif) <ptid>: Change type to ptid_t.
14552 (queue_stop_reply, push_event): Change `ptid' argument's type to
14554 (discard_queued_stop_replies): Add `pid' argument.
14555 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14556 changes. Don't reference the `attached' global.
14557 (attach_inferior): Adjust to mywait interface changes.
14558 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14559 features. Handle and report "multiprocess+". Handle
14561 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14563 (handle_v_kill): New.
14564 (handle_v_stopped): Adjust to use target_pid_to_str.
14565 (handle_v_requests): Allow multiple attaches and runs when
14566 multiprocess extensions are in effect. Handle "vKill".
14567 (myresume): Adjust to use ptids.
14568 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14569 (handle_status): Adjust to discard_queued_stop_replies interface
14571 (first_thread_of, kill_inferior_callback)
14572 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14573 (main): Call initialize_inferiors. Adjust to use ptids, killing
14574 and detaching from all inferiors. Handle multiprocess packet
14576 * linux-low.h: Include gdb_proc_service.h.
14577 (struct process_info_private): New.
14578 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14579 <lwpid_of>: Use ptid_get_lwp.
14580 (get_lwp_thread): Adjust.
14581 (struct lwp_info): Add `dead' member.
14582 (find_lwp_pid): Declare.
14583 * linux-low.c (thread_db_active): Delete.
14584 (new_inferior): Adjust comment.
14585 (inferior_pid): Delete.
14586 (linux_add_process): New.
14587 (handle_extended_wait): Adjust.
14588 (add_lwp): Change unsigned long to ptid.
14589 (linux_create_inferior): Add process to processes table. Adjust
14590 to use ptids. Don't set new_inferior here.
14591 (linux_attach_lwp): Rename to ...
14592 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14593 it. Adjust to use ptids.
14594 (linux_attach_lwp): New.
14595 (linux_attach): Add process to processes table. Don't set
14597 (struct counter): New.
14598 (second_thread_of_pid_p, last_thread_of_process_p): New.
14599 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14600 multiple processes.
14601 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14602 processes. Remove process from process table.
14603 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14604 to multiple processes.
14605 (any_thread_of): New.
14606 (linux_detach): Add `pid' argument, and handle it. Remove process
14607 from processes table.
14608 (linux_join): Add `pid' argument. Handle it.
14609 (linux_thread_alive): Change unsighed long argument to ptid_t.
14610 Consider dead lwps as not being alive.
14611 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14612 threads we're not interested in.
14613 (same_lwp, find_lwp_pid): New.
14614 (linux_wait_for_lwp): Change `pid' argument's type from int to
14616 (linux_wait_for_event): Rename to ...
14617 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14618 from int to ptid_t. Adjust.
14619 (linux_wait_for_event): New.
14620 (linux_wait_1): Add `ptid' argument. Change return type to
14621 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14622 that exit from the process table.
14623 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14625 (mark_lwp_dead): New.
14626 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14627 stopping all threads, mark its main lwp as dead.
14628 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14630 (fetch_register, usr_store_inferior_registers)
14631 (regsets_fetch_inferior_registers)
14632 (regsets_store_inferior_registers, linux_read_memory)
14633 (linux_write_memory): Inline `inferior_pid'.
14634 (linux_look_up_symbols): Adjust to use per-process
14635 `thread_db_active'.
14636 (linux_request_interrupt): Adjust to use ptids.
14637 (linux_read_auxv): Inline `inferior_pid'.
14638 (initialize_low): Don't reference thread_db_active.
14639 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14640 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14641 (ps_getpid): Return the pid of the current inferior.
14642 * thread-db.c (proc_handle, thread_agent): Delete.
14643 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14645 (find_one_thread): Change argument type to ptid_t. Adjust to
14647 (maybe_attach_thread): Adjust to per-process data and ptids.
14648 (thread_db_find_new_threads): Ditto.
14649 (thread_db_init): Ditto.
14650 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14651 processes table. Adjust to use ptids.
14652 (spu_kill, spu_detach): Adjust interface. Remove process from
14654 (spu_join, spu_thread_alive): Adjust interface.
14655 (spu_wait): Adjust interface. Remove process from processes
14656 table. Adjust to use ptids.
14657 * win32-low.c (current_inferior_tid): Delete.
14658 (current_inferior_ptid): New.
14659 (debug_event_ptid): New.
14660 (thread_rec): Take a ptid. Adjust.
14661 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14662 (child_delete_thread): Ditto.
14663 (do_initial_child_stuff): Add `attached' argument. Add process to
14665 (child_fetch_inferior_registers, child_store_inferior_registers):
14667 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14668 (win32_attach): Pass 1 to do_initial_child_stuff.
14669 (win32_kill): Adjust interface. Remove process from processes
14671 (win32_detach): Ditto.
14672 (win32_join): Adjust interface.
14673 (win32_thread_alive): Take a ptid.
14674 (win32_resume): Adjust to use ptids.
14675 (get_child_debug_event): Ditto.
14676 (win32_wait): Adjust interface. Remove exiting process from
14679 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14681 Non-stop mode support.
14683 * server.h (non_stop): Declare.
14684 (gdb_client_data, handler_func): Declare.
14685 (delete_file_handler, add_file_handler, start_event_loop):
14687 (handle_serial_event, handle_target_event, push_event)
14688 (putpkt_notif): Declare.
14689 * target.h (enum resume_kind): New.
14690 (struct thread_resume): Replace `step' field by `kind' field.
14691 (TARGET_WNOHANG): Define.
14692 (struct target_ops) <wait>: Add `options' argument.
14693 <supports_non_stop, async, start_non_stop>: New fields.
14694 (target_supports_non_stop, target_async): New.
14695 (start_non_stop): Declare.
14696 (mywait): Add `options' argument.
14697 * target.c (mywait): Add `options' argument. Print child exit
14698 notifications here.
14699 (start_non_stop): New.
14700 * server.c (non_stop, own_buf, mem_buf): New globals.
14701 (struct vstop_notif): New.
14702 (notif_queue): New global.
14703 (queue_stop_reply, push_event, discard_queued_stop_replies)
14704 (send_next_stop_reply): New.
14705 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14707 (attach_inferior): In non-stop mode, don't wait for the target
14709 (handle_general_set): Handle QNonStop.
14710 (handle_query): When handling qC, return the current general
14711 thread, instead of the first thread of the list.
14712 (handle_query): If the backend supports non-stop mode, include
14713 QNonStop+ in the qSupported query response.
14714 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14716 (handle_v_attach, handle_v_run): Handle non-stop mode.
14717 (handle_v_stopped): New.
14718 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14719 (myresume): Adjust to use resume_kind. Handle non-stop.
14720 (queue_stop_reply_callback): New.
14721 (handle_status): Handle non-stop mode.
14722 (main): Clear non_stop flag on reconnection. Use the event-loop.
14723 Refactor serial protocol handling from here ...
14724 (process_serial_event): ... to this new function. When GDB
14725 selects any thread, select one here. In non-stop mode, wait until
14726 GDB acks all pending events before exiting.
14727 (handle_serial_event, handle_target_event): New.
14728 * remote-utils.c (remote_open): Install remote_desc in the event
14730 (remote_close): Remove remote_desc from the event loop.
14731 (putpkt_binary): Rename to...
14732 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14733 (putpkt_binary): New as wrapper around putpkt_binary_1.
14734 (putpkt_notif): New.
14735 (prepare_resume_reply): In non-stop mode, don't change the
14737 * event-loop.c: New.
14738 * Makefile.in (OBJ): Add event-loop.o.
14739 (event-loop.o): New rule.
14741 * linux-low.h (pid_of): Moved here.
14743 (get_lwp_thread): Use lwpid_of.
14744 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14745 * linux-low.c (pid_of): Delete.
14746 (inferior_pid): Use lwpid_of.
14747 (linux_event_pipe): New.
14748 (target_is_async_p): New.
14750 (handle_extended_wait): Use lwpid_of.
14751 (add_lwp): Don't set lwpid field.
14752 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14753 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14754 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14755 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14756 first. Adjust to linux_wait_for_event interface changes. Use
14758 (linux_detach): Don't delete the main lwp here.
14759 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14760 (status_pending_p): Don't consider explicitly suspended lwps.
14761 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14762 pointer. Add OPTIONS argument. Change return type to int. Use
14763 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14764 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14765 pointer. Add status pointer argument. Return a pid instead of a
14766 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14767 changes. In non-stop mode, don't switch to a random thread.
14768 (linux_wait): Rename to...
14769 (linux_wait_1): ... this. Add target_options argument, and handle
14770 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14771 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14772 clean exit and signal exit code. Don't stop all threads in
14773 non-stop mode. In all-stop mode, only stop all threads when
14774 reporting a stop to GDB. Handle explicit thread stop requests.
14775 (async_file_flush, async_file_mark): New.
14777 (send_sigstop): Use lwpid_of.
14778 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14779 interface changes. In non-stop mode, don't switch to a random
14781 (linux_resume_one_lwp): Use lwpid_of.
14782 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14783 (linux_resume_one_thread): ... this. Handle resume_stop. In
14784 non-stop mode, don't look for pending flag in all threads.
14785 (resume_status_pending_p): Don't consider explicitly suspended
14787 (my_waitpid): Reimplement. Emulate __WALL.
14788 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14790 (sigchld_handler, linux_supports_non_stop, linux_async)
14791 (linux_start_non_stop): New.
14792 (linux_target_ops): Register linux_supports_non_stop, linux_async
14793 and linux_start_non_stop.
14794 (initialize_low): Install SIGCHLD handler.
14795 * thread-db.c (thread_db_create_event, find_one_thread)
14796 (thread_db_get_tls_address): Use lwpid_of.
14797 * win32-low.c (win32_detach): Adjust to use resume_kind.
14798 (win32_wait): Add `options' argument.
14799 * spu-low.c (spu_resume): Adjust to use resume_kind.
14800 (spu_wait): Add `options' argument.
14802 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14804 Decouple target code from remote protocol.
14806 * target.h (enum target_waitkind): New.
14807 (struct target_waitstatus): New.
14808 (struct target_ops) <wait>: Return an unsigned long. Take a
14809 target_waitstatus pointer instead of a char pointer.
14810 (mywait): Likewise.
14811 * target.c (mywait): Change prototype to return an unsigned long.
14812 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14813 * server.h (thread_from_wait, old_thread_from_wait): Delete
14815 (prepare_resume_reply): Change prototype to take a
14817 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14818 (last_status, last_ptid): New.
14819 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14820 pid instead of a signal.
14821 (attach_inferior): Remove "status" and "signal" parameters.
14823 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14825 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14826 (handle_v_requests, myresume): Remove "status" and "signal"
14827 parameters. Adjust.
14828 (handle_status): New.
14829 (main): Delete local `status'. Adjust.
14830 * remote-utils.c: Include target.h.
14831 (prepare_resume_reply): Change prototype to take a
14832 target_waitstatus. Adjust.
14834 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14836 * spu-low.c (spu_wait): Adjust.
14837 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14839 (win32_wait): Adjust.
14841 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14843 * target.h (struct thread_resume): Delete leave_stopped member.
14844 (struct target_ops): Add a `n' argument to the `resume' callback.
14845 * server.c (start_inferior): Adjust.
14846 (handle_v_cont, myresume): Adjust.
14847 * linux-low.c (check_removed_breakpoint): Adjust to resume
14848 interface change, and to removed leave_stopped field.
14849 (resume_ptr): Delete.
14850 (struct thread_resume_array): New.
14851 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14852 resume interface change.
14853 (linux_continue_one_thread, linux_queue_one_thread)
14854 (resume_status_pending_p): Check if the resume field is NULL
14855 instead of checking the leave_stopped member.
14856 (linux_resume): Adjust to the target resume interface change.
14857 * spu-low.c (spu_resume): Adjust to the target resume interface
14859 * win32-low.c (win32_detach, win32_resume): Ditto.
14861 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14863 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14865 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14867 (linux_continue_one_thread): Only preserve the stepping flag if
14868 there's a pending breakpoint.
14870 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14872 * server.c (main): After the inferior having exited, call
14873 remote_close before exiting gdbserver.
14875 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14877 Fix size of FPSCR in Power 7 processors.
14878 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14879 (PPC_FEATURE_HAS_DFP): New #define.
14880 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14883 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14885 * server.c (handle_query) Whitespace and formatting.
14887 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14889 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14890 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14891 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14892 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14893 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14894 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14895 Makefile.in, configure.ac: Fix whitespace throughout.
14896 * configure: Regenerate.
14898 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14900 * inferiors.c (find_inferior): Make it safe for the callback
14901 function to delete the currently iterated inferior.
14903 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14905 * Makefile.in (linuw_low_h): Move higher.
14906 (thread-db.o): Depend on $(linux_low_h).
14908 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14910 Rename "process" to "lwp" throughout.
14912 * linux-low.c (all_processes): Rename to...
14913 (all_lwps): ... this.
14914 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14915 (add_process): Rename to ...
14916 (add_lwp): ... this. Adjust.
14917 (linux_create_inferior): Adjust.
14918 (linux_attach_lwp): Adjust.
14919 (linux_attach): Adjust.
14920 (linux_kill_one_process): Rename to ...
14921 (linux_kill_one_lwp): ... this. Adjust.
14922 (linux_kill): Adjust.
14923 (linux_detach_one_process): Rename to ...
14924 (linux_detach_one_lwp): ... this. Adjust.
14925 (linux_detach): Adjust.
14926 (check_removed_breakpoint): Adjust.
14927 (status_pending_p): Adjust.
14928 (linux_wait_for_process): Rename to ...
14929 (linux_wait_for_lwp): ... this. Adjust.
14930 (linux_wait_for_event): Adjust.
14931 (send_sigstop): Adjust.
14932 (wait_for_sigstop): Adjust.
14933 (stop_all_processes): Rename to ...
14934 (stop_all_lwps): ... this.
14935 (linux_resume_one_process): Rename to ...
14936 (linux_resume_one_lwp): ... this. Adjust.
14937 (linux_set_resume_request, linux_continue_one_thread)
14938 (linux_queue_one_thread, resume_status_pending_p)
14939 (usr_store_inferior_registers, regsets_store_inferior_registers)
14940 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14942 * linux-low.h (get_process): Rename to ...
14943 (get_lwp): ... this. Adjust.
14944 (get_thread_process): Rename to ...
14945 (get_thread_lwp): ... this. Adjust.
14946 (get_process_thread): Rename to ...
14947 (get_lwp_thread): ... this. Adjust.
14948 (struct process_info): Rename to ...
14949 (struct lwp_info): ... this.
14950 (all_processes): Rename to ...
14951 (all_lwps): ... this.
14952 * proc-service.c (ps_lgetregs): Adjust.
14953 * thread-db.c (thread_db_create_event, find_one_thread)
14954 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14956 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14958 * server.c (handle_query): Handle "qAttached".
14960 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14962 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14963 GPLv3, update license URL.
14965 2009-03-01 Doug Evans <dje@google.com>
14967 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14968 (server_h): Add gdb_signals.h.
14969 (signals.o): Update.
14970 * server.h (target_signal_from_host,target_signal_to_host_p)
14971 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14973 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14975 * remote-utils.c (getpkt): Also generate remote-debug
14976 information if noack_mode is set.
14978 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14980 * server.c (handle_query): Report qXfer:siginfo:read and
14981 qXfer:siginfo:write as supported and handle them.
14982 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14983 * linux-low.c (linux_xfer_siginfo): New.
14984 (linux_target_ops): Set it.
14986 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14988 * server.c (gdbserver_usage): Mention --remote-debug.
14989 (main): Accept '--remote-debug' switch.
14991 2009-01-18 Doug Evans <dje@google.com>
14993 * regcache.c (new_register_cache): No need to check result of xcalloc.
14994 * server.c (handle_search_memory): Back out calls to xmalloc,
14995 result is checked and error is returned to user upon failure.
14996 (handle_query): Ditto. Add more checks for result of malloc.
14997 (handle_v_cont): Check result of malloc, report error back to
14999 (handle_v_run): Ditto. Call freeargv.
15000 * server.h (freeargv): Declare.
15001 * utils.c (freeargv): New fn.
15003 2009-01-15 Doug Evans <dje@google.com>
15005 * gdbreplay.c (perror_with_name): Make arg const char *.
15006 * server.h (target_signal_to_name): Make return type const char *.
15007 * thread-db.c (thread_db_err_str): Make return type const char *.
15008 * utils.c (perror_with_name): Make arg const char *.
15010 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15012 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15013 when handling a EXIT_PROCESS_DEBUG_EVENT.
15015 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15017 * gdbreplay.c (gdbreplay_version): Update copyright year.
15018 * server.c (gdbserver_version): Likewise.
15020 2009-01-05 Doug Evans <dje@google.com>
15022 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15023 (handle_extended_wait): Improve comment.
15025 2008-12-13 Doug Evans <dje@google.com>
15027 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15028 * server.h (ATTR_MALLOC): New macro.
15029 (xmalloc,xcalloc,xstrdup): Declare.
15030 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15031 * inferiors.c: Ditto.
15032 * linux-low.c: Ditto.
15033 * mem-break.c: Ditto.
15034 * regcache.c: Ditto.
15035 * remote-utils.c: Ditto.
15038 * win32-low.c: Ditto.
15040 2008-12-12 Doug Evans <dje@google.com>
15042 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15043 in debugging printf.
15045 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15047 2008-12-09 Doug Evans <dje@google.com>
15049 * linux-low.h (struct process_info): Delete member tid, unused.
15050 * thread-db.c (find_one_thread): Update.
15051 (maybe_attach_thread): Update.
15053 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15055 * target.h (struct target_ops): Add qxfer_osdata member.
15056 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15058 (linux_qxfer_osdata): New functions.
15059 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15061 * server.c (handle_query): Handle "qXfer:osdata:read:".
15062 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15063 (buffer_xml_printf): New functions.
15064 * server.h (struct buffer): New.
15065 (buffer_grow_str, buffer_grow_str0): New macros.
15066 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15067 (buffer_xml_printf): Declare.
15069 2008-11-24 Doug Evans <dje@google.com>
15071 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15073 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15075 * server.c (handle_v_run): Always use the supplied argument list.
15077 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15079 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15080 (xtensa_regmap_table): Add entry for scompare1.
15082 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15084 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15085 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15086 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15087 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15088 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15089 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15090 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15091 XML target descriptions.
15092 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15093 when inferior is running on an ISA 2.05 or later processor. Add
15094 special case to return offset for full 64-bit slot of FPSCR when
15097 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15099 * Makefile.in (SFILES, clean): Added sparc64 files.
15100 (reg-sparc64.o, reg-sparc64.c): New.
15101 * configure.srv (sparc*-*-linux*): New configuration.
15102 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15103 syscall arguments for SPARC.
15104 (regsets_store_inferior_registers): Likewise.
15105 * linux-sparc-low.c: New file.
15107 2008-10-21 Doug Evans <dje@google.com>
15109 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15110 (READLINE_DIR,READLINE_DEP): Delete.
15111 (INTERNAL_CFLAGS): Update.
15112 (LINTFLAGS): Update.
15114 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15116 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15117 whole argv from the last run, not just argv[0].
15119 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15121 * regcache.c (new_register_cache): Return NULL if the register
15122 cache size isn't known yet.
15123 (free_register_cache): Avoid dereferencing a NULL regcache.
15125 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15127 * configure.srv: Merge MIPS and MIPS64.
15129 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15131 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15133 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15135 * Makefile.in: Add required vsx dependencies.
15137 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15138 Declare init_registers_powerpc_vsx32l.
15139 Declare init_registers_powerpc_vsx64l.
15140 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15141 (ppc_arch_setup): Check for VSX in hwcap.
15142 (ppc_fill_vsxregset): New function.
15143 (ppc_store_vsxregset): New function.
15144 Add new VSX entry in regset_info target_regsets.
15146 * configure.srv: Add new VSX dependencies.
15148 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15150 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15151 (remote_open): Set or clear transport_is_reliable.
15152 (putpkt_binary): Don't expect acks in noack mode.
15153 (getpkt): Don't send ack/nac in noack mode.
15154 * server.c (handle_general_set): Handle QStartNoAckMode.
15155 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15157 (main): Reset noack_mode on every connection.
15158 * server.h (noack_mode): Declare.
15160 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15162 * Makefile.in (GDBREPLAY_OBS): New variable.
15163 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15165 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15166 Daniel Jacobowitz <dan@codesourcery.com>
15168 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15169 (usr_store_inferior_registers): Likewise.
15170 (regsets_store_inferior_registers): Likewise.
15172 2008-07-31 Rolf Jansen <rj@surtec.com>
15173 Pedro Alves <pedro@codesourcery.com>
15175 * configure.ac: Check for memmem declaration.
15176 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15177 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15178 (disable_packet_qfThreadInfo): Unconditionally compile.
15179 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15180 * configure, config.in: Regenerate.
15182 2008-07-28 Doug Kwan <dougkwan@google.com>
15184 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15185 (linux_write_memory): Remove declaration of errno.
15187 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15189 * linux-low.c (handle_extended_wait): Do not use "status"
15190 variable uninitialized.
15192 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15194 * server.c (handle_v_attach): Inhibit reporting dll changes.
15196 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15198 * remote-utils.c (prepare_resume_reply): If requested, don't
15199 output "thread:TID" in the T stop reply.
15201 * server.c (disable_packet_vCont, disable_packet_Tthread)
15202 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15203 (handle_query): If requested, disable support for qC, qfThreadInfo
15205 (handle_v_requests): If requested, disable support for vCont.
15206 (gdbserver_show_disableable): New.
15207 (main): Handle --disable-packet and --disable-packet=LIST.
15209 * server.h (disable_packet_vCont, disable_packet_Tthread)
15210 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15212 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15214 * server.c (gdbserver_usage): Mention --version.
15216 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15218 * Makefile.in (gdbreplay.o): New rule.
15220 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15222 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15223 message, not gdbserver.
15225 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15226 Nathan Sidwell <nathan@codesourcery.com>
15227 Joseph Myers <joseph@codesourcery.com>
15229 * acinclude.m4: Include ../../config/acx.m4.
15230 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15231 * configure, config.in: Regenerate.
15232 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15233 * server.c (gdbserver_version): Print PKGVERSION.
15234 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15235 (main): Adjust gdbserver_usage calls.
15236 * gdbreplay.c (version, host_name): Add declarations.
15237 (gdbreplay_version, gdbreplay_usage): New.
15238 (main): Accept --version and --help options.
15240 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15242 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15243 (arm_breakpoint_at): Handle Thumb.
15244 (the_low_target): Add comment.
15246 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15248 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15250 2008-05-09 Doug Evans <dje@google.com>
15252 * server.h (decode_search_memory_packet): Declare.
15253 * remote-utils.c (decode_search_memory_packet): New fn.
15254 * server.c (handle_search_memory_1): New fn.
15255 (handle_search_memory): New fn.
15256 (handle_query): Process qSearch:memory packets.
15258 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15260 * regcache.c (registers_length): Remove.
15261 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15262 full register packet.
15263 * regcache.h (registers_length): Remove prototype.
15264 * server.h (PBUFSIZ): Define to 16384.
15266 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15268 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15269 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15270 powerpc-64l.o, and powerpc-altivec64l.o.
15271 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15272 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15273 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15274 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15275 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15278 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15279 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15280 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15281 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15282 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15283 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15284 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15285 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15286 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15287 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15290 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15291 (init_registers_powerpc_32l): ... this new prototype.
15292 (init_registers_powerpc_32): Remove, replace by ...
15293 (init_registers_powerpc_altivec32l): ... this new prototype.
15294 (init_registers_powerpc_e500): Remove, replace by ...
15295 (init_registers_powerpc_e500l): ... this new prototype.
15296 (init_registers_ppc64): Remove, replace by ...
15297 (init_registers_powerpc_64l): ... this new prototype.
15298 (init_registers_powerpc_64): Remove, replace by ...
15299 (init_registers_powerpc_altivec64l): ... this new prototype.
15300 (ppc_num_regs): Set to 73.
15301 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15302 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15303 (ppc_cannot_store_register): Handle orig_r3 and trap.
15304 (ppc_arch_setup): Update init_registers_... calls.
15305 (ppc_fill_gregset): Handle orig_r3 and trap.
15307 * inferiors.c (clear_inferiors): Reset current_inferior.
15309 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15311 * acinclude.m4: Add override.m4.
15312 * configure: Regenerate.
15314 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15316 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15317 initial call to init_register_ppc64.
15319 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15321 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15322 single powerpc*-*-linux* case.
15323 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15325 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15327 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15328 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15330 * linux-ppc-low.c: Include <elf.h>.
15331 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15332 (ppc_hwcap): New global variable.
15333 (ppc_regmap): Remove __SPE__ #ifdef sections.
15334 (ppc_regmap_e500): New global variable.
15335 (ppc_cannot_store_register): Update __SPE__ special case.
15336 (ppc_get_hwcap): New function.
15337 (ppc_arch_setup): Use it to determine whether inferior supports
15338 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15339 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15340 Do not access registers if target does not support AltiVec.
15341 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15342 Do not access registers if target does not support SPE.
15343 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15345 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15347 * linux-low.c (disabled_regsets, num_regsets): New.
15348 (use_regsets_p): Delete.
15349 (linux_wait_for_process): Clear disabled_regsets.
15350 (regsets_fetch_inferior_registers): Check and set it.
15351 (regsets_store_inferior_registers): Likewise.
15352 (linux_fetch_registers, linux_store_registers): Do not use
15354 (initialize_low): Allocate disabled_regsets.
15356 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15358 * Makefile.in (LIBOBJS): New.
15359 (OBS): Use LIBOBJS.
15360 (memmem.o): New rule.
15361 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15362 * configure: Regenerated.
15364 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15366 * server.c (handle_query): Never return "unsupported" for
15367 qXfer:features:read queries.
15369 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15371 * server.c (get_features_xml): Fix inverted condition.
15372 (handle_query): Always support qXfer:feature:read.
15374 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15376 * server.c (wrapper_argv): New.
15377 (start_inferior): Handle wrapper_argv. If set, expect an extra
15379 (gdbserver_usage): Document --wrapper.
15380 (main): Parse --wrapper.
15382 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15384 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15385 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15386 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15387 (ppc_set_pc): Likewise.
15388 (ppc_arch_setup): New function.
15389 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15390 of collect_register.
15391 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15393 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15395 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15396 instead of linux-ppc64-low.o.
15397 * linux-ppc64-low.c: Remove file.
15398 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15399 (linux-ppc64-low.o): Remove rule.
15401 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15402 (init_registers_powerpc_64): Likewise.
15403 (ppc_regmap): Conditionally define depending on __powerpc64__.
15404 (ppc_cannot_store_register): Do not special-case "fpscr" when
15405 compiled on __powerpc64__.
15406 (ppc_collect_ptrace_register): New function.
15407 (ppc_supply_ptrace_register): New function.
15408 (ppc_breakpoint): Change type to "unsigned int".
15409 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15410 (the_low_target): Conditionally provide initializers for the
15411 arch_setup member depending on __powerpc64__. Install
15412 collect_ptrace_register and supply_ptrace_register members.
15414 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15416 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15417 * server.c (gdbserver_xmltarget): Define.
15418 (get_features_xml): Use it to replace "target.xml" and arch_string.
15420 * configure.srv: Remove srv_xmltarget. Add XML files that were
15421 mentioned there to srv_xmlfiles instead. Remove conditional tests
15422 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15423 srv_xmlfiles and srv_regobj to include all possible choices.
15424 * configure.ac (srv_xmltarget): Remove.
15425 (srv_xmlfiles): Do not add "target.xml".
15426 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15427 checks for supplementary target information.
15428 * configure: Regenerate.
15429 * Makefile.in (XML_TARGET): Remove.
15430 (target.xml): Remove rule.
15431 (clean): Do not clean up target.xml.
15432 (.PRECIOUS): Do not mention target.xml.
15434 * target.h (struct target_ops): Remove arch_string member.
15435 * linux-low.c (linux_arch_string): Remove.
15436 (linux_target_ops): Remove arch_string initializer.
15437 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15438 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15439 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15440 * spu-low.c (spu_arch_string): Remove.
15441 (spu_target_ops): Remove arch_string initializer.
15442 * win32-low.c (win32_arch_string): Remove.
15443 (win32_target_ops): Remove arch_string initializer.
15444 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15445 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15446 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15448 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15450 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15451 by collect_ptrace_register and supply_ptrace_register hooks.
15452 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15453 instead of checking for the_low_target.left_pad_xfer.
15454 (usr_store_inferior_registers): Use collect_ptrace_register callback
15455 instead of checking for the_low_target.left_pad_xfer.
15457 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15458 (s390_supply_ptrace_register): Likewise.
15459 (s390_fill_gregset): Call s390_collect_ptrace_register.
15460 (the_low_target): Update.
15462 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15463 (ppc_supply_ptrace_register): Likewise.
15464 (the_low_target): Update.
15466 * linux-i386-low.c (the_low_target): Update.
15467 * linux-x86-64-low.c (the_low_target): Update.
15469 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15471 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15472 reg-s390.o and reg-s390x.o.
15474 * linux-low.c (new_inferior): New global variable.
15475 (linux_create_inferior, linux_attach): Set it.
15476 (linux_wait_for_process): Call the_low_target.arch_setup after the
15477 target has stopped for the first time.
15478 (initialize_low): Do not call the_low_target.arch_setup.
15480 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15481 (s390_set_pc): Likewise.
15482 (s390_arch_setup): New function.
15483 (the_low_target): Use s390_arch_setup as arch_setup routine.
15485 * regcache.c (realloc_register_cache): New function.
15486 (set_register_cache): Call it for each existing regcache.
15488 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15490 * server.h (init_registers): Remove prototype.
15492 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15493 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15494 instead of init_registers ().
15495 * linux-arm-low.c (init_registers_arm): Add prototype.
15496 (init_registers_arm_with_iwmmxt): Likewise.
15497 (the_low_target): Add initializer for arch_setup field.
15498 * linux-cris-low.c (init_registers_cris): Add prototype.
15499 (the_low_target): Add initializer for arch_setup field.
15500 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15501 (the_low_target): Add initializer for arch_setup field.
15502 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15503 (the_low_target): Add initializer for arch_setup field.
15504 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15505 (the_low_target): Add initializer for arch_setup field.
15506 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15507 (the_low_target): Add initializer for arch_setup field.
15508 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15509 (the_low_target): Add initializer for arch_setup field.
15510 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15511 (init_registers_mips64_linux): Likewise.
15512 (the_low_target): Add initializer for arch_setup field.
15513 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15514 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15515 (the_low_target): Add initializer for arch_setup field.
15516 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15517 (init_registers_powerpc_64): Likewise.
15518 (the_low_target): Add initializer for arch_setup field.
15519 * linux-s390-low.c (init_registers_s390): Add prototype.
15520 (init_registers_s390x): Likewise.
15521 (the_low_target): Add initializer for arch_setup field.
15522 * linux-sh-low.c (init_registers_sh): Add prototype.
15523 (the_low_target): Add initializer for arch_setup field.
15524 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15525 (the_low_target): Add initializer for arch_setup field.
15526 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15527 (the_low_target): Add initializer for arch_setup field.
15529 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15530 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15531 instead of init_registers ().
15532 * win32-arm-low.c (init_registers_arm): Add prototype.
15533 (the_low_target): Add initializer for arch_setup field.
15534 * win32-i386-low.c (init_registers_i386): Add prototype.
15535 (the_low_target): Add initializer for arch_setup field.
15537 * spu-low.c (init_registers_spu): Add prototype.
15538 (initialize_low): Call initialie_registers_spu () instead of
15539 initialize_registers ().
15541 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15543 * server.c (handle_v_requests): When handling the vRun and vAttach
15544 packets, if already debugging a process, don't kill it. Return an
15547 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15549 * server.c (handle_query): Correct length check.
15551 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15553 * win32-low.c (do_initial_child_stuff): Add process handle
15554 parameter. Set current_process_handle and current_process_id from the
15555 parameters. Clear globals.
15556 (win32_create_inferior): Don't set current_process_handle and
15557 current_process_id here. Instead pass them on the call to
15558 do_initial_child_stuff.
15559 (win32_attach): Likewise.
15560 (win32_clear_inferiors): New.
15561 (win32_kill): Don't close the current process handle or the
15562 current thread handle here. Instead call win32_clear_inferiors.
15563 (win32_detach): Don't open a new handle to the process. Call
15564 win32_clear_inferiors.
15565 (win32_join): Don't rely on current_process_handle; open a new
15566 handle using the process id.
15567 (win32_wait): Call win32_clear_inferiors when the inferior process
15570 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15572 * server.c (monitor_show_help): Add "exit".
15574 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15576 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15577 (clean): Add reg-xtensa.c.
15578 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15579 * configure.srv (xtensa*-*-linux*) New target.
15580 * linux-xtensa-low.c: New.
15581 * xtensa-xtregs.c: New.
15583 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15585 * hostio.c: Don't include errno.h.
15586 (errno_to_fileio_errno): Move to hostio-errno.
15587 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15588 error number outputting to the target->hostio_last_error callback.
15589 (hostio_packet_error): Use FILEIO_EINVAL directly.
15590 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15591 calls to hostio_error.
15592 * hostio-errno.c: New.
15593 * server.h (hostio_last_error_from_errno): Declare.
15594 * target.h (target_ops): Add hostio_last_error member.
15595 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15596 as hostio_last_error handler.
15597 * spu-low.c (spu_target_ops): Likewise.
15598 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15599 (wince_hostio_last_error): New functions.
15600 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15601 as hostio_last_error handler.
15602 (win32_target_ops) [!_WIN32_WCE]: Register
15603 hostio_last_error_from_errno as hostio_last_error handler.
15604 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15605 (hostio-errno.o): New rule.
15606 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15607 * configure.srv (srv_hostio_err_objs): New variable. Default to
15609 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15610 * configure: Regenerate.
15612 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15614 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15615 (linux_kill, linux_detach): Clean up the process list.
15616 * remote-utils.c (remote_open): Improve port number parsing.
15617 (putpkt_binary, input_interrupt): Only send interrupts if the target
15619 * server.c (extended_protocol): Make static.
15620 (attached): Define earlier.
15621 (exit_requested, response_needed, program_argv): New variables.
15622 (target_running): New.
15623 (start_inferior): Clear attached here.
15624 (attach_inferior): Set attached here.
15625 (require_running): Define.
15626 (handle_query): Use require_running and target_running. Implement
15628 (handle_v_attach, handle_v_run): New.
15629 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15630 (gdbserver_usage): Update.
15631 (main): Redo argument parsing. Handle --debug and --multi. Handle
15632 --attach along with other options or after the port. Save
15633 program_argv. Support no initial program. Resynchronize
15634 communication with GDB after an error. Handle "monitor exit".
15635 Use require_running and target_running. Always allow the extended
15636 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15637 restart in extended mode.
15638 * README: Refer to the GDB manual. Update --attach usage.
15640 2007-12-20 Andreas Schwab <schwab@suse.de>
15642 * linux-low.c (STACK_SIZE): Define.
15643 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15644 (linux_test_for_tracefork): Likewise.
15646 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15648 * linux-low.c (linux_wait_for_event): Update messages. Do not
15649 reinsert auto-delete breakpoints.
15650 * mem-break.c (struct breakpoint): Change return type of handler to
15652 (set_breakpoint_at): Update handler type.
15653 (reinsert_breakpoint_handler): Return 1 instead of calling
15655 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15657 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15658 * mem-break.h (set_breakpoint_at): Update handler type.
15659 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15660 * win32-low.c (auto_delete_breakpoint): New.
15661 (get_child_debug_event): Use it.
15663 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15665 * configure.ac: Check for pread and pwrite.
15666 * hostio.c (handle_pread): Fall back to lseek and read.
15667 (handle_pwrite): Fall back to lseek and write.
15668 * config.in, configure: Regenerated.
15670 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15672 * server.c (myresume): Add own_buf argument.
15673 (main): Update calls.
15675 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15677 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15678 * remote-utils.c (remote_open): Do not call disable_async_io.
15679 (block_async_io): Delete.
15680 (unblock_async_io): Make static.
15681 (initialize_async_io): New.
15682 * server.c (handle_v_cont): Handle async I/O here.
15683 (myresume): Likewise. Move other common resume tasks here...
15684 (main): ... from here. Call initialize_async_io. Disable async
15685 I/O before the main loop.
15686 * server.h (initialize_async_io): Declare.
15687 (block_async_io, unblock_async_io): Delete prototypes.
15688 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15690 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15692 * remote-utils.c (readchar): Allow binary data in received messages.
15694 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15696 * win32-low.c (attaching): New global.
15697 (win32_create_inferior): Clear the `attaching' global.
15698 (win32_attach): Set the `attaching' global.
15699 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15700 attaching. Only set a breakpoint at the entry point if not
15703 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15705 * server.c (main): Don't report dll events on the initial
15706 connection on attaches.
15708 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15710 * server.c (main): Relax numerical bases supported for the pid of
15711 the --attach command line argument.
15713 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15715 * win32-low.c (win32_attach): Call OpenProcess before
15716 DebugActiveProcess, not after. Add last error output to error
15719 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15721 * win32-low.c (win32_get_thread_context)
15722 (win32_set_thread_context): New functions.
15723 (thread_rec): Use win32_get_thread_context.
15724 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15725 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15728 2007-12-03 Leo Zayas
15729 Pedro Alves <pedro_alves@portugalmail.pt>
15731 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15733 (child_add_thread): Minor cleanup.
15734 (child_continue): Resume artificially suspended threads before
15735 calling ContinueDebugEvent.
15736 (suspend_one_thread): New.
15737 (fake_breakpoint_event): New.
15738 (get_child_debug_event): Change return type to int. Check here if
15739 gdb sent an interrupt request. If a soft interrupt was requested,
15740 fake a breakpoint event. Return 0 if there is no event to handle,
15742 (win32_wait): Don't check here if gdb sent an interrupt request.
15743 Ensure there is a valid event to handle.
15744 (win32_request_interrupt): Add soft interruption method as last
15747 2007-12-03 Leo Zayas
15748 Pedro Alves <pedro_alves@portugalmail.pt>
15750 * win32-low.h (win32_thread_info): Add descriptions to the
15751 structure members. Replace `suspend_count' counter by a
15753 * win32-low.c (thread_rec): Update condition of when to get the
15754 context from the inferior. Rely on ContextFlags being set if it
15755 has already been retrieved. Only suspend the inferior thread if
15756 we haven't already. Warn if that fails.
15757 (continue_one_thread): s/suspend_count/suspended/. Only call
15758 ResumeThread once. Warn if that fails.
15760 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15762 * win32-low.c (win32_wait): Don't read from the inferior when it
15763 has already exited.
15765 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15767 * Makefile.in (win32_low_h): New variable.
15768 (win32-low.o): Add dependency on $(win32_low_h).
15769 (win32-arm-low.o, win32-i386-low.o): New rules.
15771 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15773 * hostio.c: Correct copyright year.
15775 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15777 * Makefile.in (OBS): Add hostio.o.
15778 (hostio.o): New rule.
15779 * server.h (handle_vFile): Declare.
15780 * hostio.c: New file.
15781 * server.c (handle_v_requests): Take packet_len and new_packet_len
15782 for binary packets. Call handle_vFile.
15783 (main): Update call to handle_v_requests.
15785 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15787 * linux-low.c: Include <sched.h>.
15789 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15791 * linux-low.c (linux_tracefork_grandchild): New.
15792 (linux_tracefork_child): Use clone.
15793 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15795 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15797 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15799 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15801 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15803 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15805 * inferiors.c (change_inferior_id): Delete.
15806 (add_pid_to_list, pull_pid_from_list): New.
15807 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15808 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15809 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15810 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15811 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15812 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15813 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15814 (using_threads): Always set to 1.
15815 (handle_extended_wait): New.
15816 (add_process): Do not set TID.
15817 (linux_create_inferior): Set must_set_ptrace_flags.
15818 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15819 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15820 (linux_thread_alive): Rename TID argument to LWPID.
15821 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15822 (linux_wait_for_event): Do not use TID or check using_threads. Update
15823 call to dead_thread_notify. Call handle_extended_wait.
15824 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15825 (send_sigstop): Delete sigstop_sent.
15826 (wait_for_sigstop): Avoid TID.
15827 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15828 (linux_test_for_tracefork): New.
15829 (linux_lookup_signals): Use thread_db_active and
15830 linux_supports_tracefork_flag.
15831 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15832 * linux-low.h (get_process_thread): Avoid TID.
15833 (struct process_ifo): Move thread_known and tid to the end. Remove
15835 (linux_attach_lwp, thread_db_init): Update prototypes.
15836 * server.h (change_inferior_id): Delete prototype.
15837 (add_pid_to_list, pull_pid_from_list): New prototypes.
15838 * thread-db.c (thread_db_use_events): New.
15839 (find_first_thread): Rename to...
15840 (find_one_thread): ...this. Update callers and messages. Do not
15841 call fatal. Check thread_db_use_events. Do not call
15842 change_inferior_id or new_thread_notify.
15843 (maybe_attach_thread): Update. Do not call new_thread_notify.
15844 (thread_db_init): Set thread_db_use_events. Check use_events.
15845 * utils.c (fatal, warning): Correct message prefix.
15847 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15849 * Makefile.in (clean): Remove new files.
15850 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15851 (powerpc-64.o, powerpc-64.c): New rules.
15852 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15853 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15855 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15857 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15858 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15859 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15860 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15861 (target_regsets): Add AltiVec and SPE register sets.
15862 * configure.ac: Check for AltiVec and SPE.
15863 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15864 (ppc_fill_vrregset, ppc_store_vrregset): New.
15865 (target_regsets): Add AltiVec register set.
15866 * configure: Regenerated.
15868 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15870 * linux-low.c (O_LARGEFILE): Define.
15871 (linux_read_memory): Use /proc/PID/mem.
15872 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15873 * configure, config.in: Regenerated.
15875 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15877 * linux-low.c (linux_wait_for_event): Do not pass signals while
15880 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15882 * win32-low.c (create_process): New.
15883 (win32_create_inferior): Use create_process instead of
15884 CreateProcess. If create_process failed retry appending an ".exe"
15885 suffix. Store the GetLastError result immediatelly after
15886 create_process calls and use it on the call to error.
15888 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15890 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15892 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15894 * configure.ac: Switch license to GPLv3.
15896 2007-08-01 Michael Snyder <msnyder@access-company.com>
15898 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15900 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15902 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15904 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15905 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15906 CloseToolhelp32Snapshot.
15907 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15908 CloseToolhelp32Snapshot.
15910 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15912 * server.c (main): Check for inferior exit before main loop.
15914 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15916 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15917 instead of on tmp_desc.
15919 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15920 Daniel Jacobowitz <dan@codesourcery.com>
15922 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15923 (add_thread): Minor cleanups.
15924 (clear_inferiors): Move lower in the file. Clear the DLL
15926 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15927 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15928 (xml_escape_text): New.
15929 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15931 (handle_v_cont): Report errors.
15932 (gdbserver_version): Update.
15933 (main): Correct size of own_buf. Do not report initial DLL events.
15934 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15935 (unloaded_dll, xml_escape_text): New.
15936 * win32-low.c (enum target_waitkind): Update comments.
15937 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15938 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15939 (win32_EnumProcessModules, win32_GetModuleInformation)
15940 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15941 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15942 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15943 (win32_Module32First, win32_Module32Next, load_toolhelp)
15944 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15945 (get_child_debug_event): Handle DLL events.
15946 (win32_wait): Likewise.
15948 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15950 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15951 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15953 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15955 * win32-low.c (handle_output_debug_string): Ignore event if not
15958 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15960 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15962 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15964 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15966 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15968 * inferiors.c (change_inferior_id): Add comment.
15969 * linux-low.c (check_removed_breakpoint): Add an early
15970 prototype. Improve debug output.
15971 (linux_attach): Doc update.
15972 (linux_detach_one_process, linux_detach): Clean up before releasing
15974 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15975 * linux-low.h (struct process_info): Doc improvement.
15976 * mem-break.c (delete_all_breakpoints): New.
15977 * mem-break.h (delete_all_breakpoints): New prototype.
15978 * thread-db.c (find_first_thread): New.
15979 (thread_db_create_event): Call it instead of
15980 thread_db_find_new_threads. Clean up unused variables.
15981 (maybe_attach_thread): Remove first thread handling.
15982 (thread_db_find_new_threads): Use find_first_thread.
15983 (thread_db_get_tls_address): Likewise.
15985 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15987 * thread-db.c (thread_db_find_new_threads): Add prototype.
15988 (thread_db_create_event): Check for the main thread before adding
15990 (maybe_attach_thread): Only enable event reporting if TID == 0.
15991 (thread_db_get_tls_address): Check for new threads.
15993 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15995 * linux-low.c (linux_create_inferior): Try execv before execvp.
15996 * spu-low.c (spu_create_inferior): Likewise.
15998 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16000 * linux-low.c (linux_create_inferior): Change execv to execvp.
16001 * spu-low.c (spu_create_inferior): Likewies.
16003 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16005 * Makefile.in (clean): Clean new files instead of deleted ones.
16006 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16007 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16009 * configure.srv: Specify XML files and new regformats for MIPS and
16011 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16012 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16013 an entry for the restart register.
16014 (mips_cannot_fetch_register, mips_cannot_store_register)
16015 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16016 register names to match the XML descriptions.
16017 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16018 restart register instead of $0.
16020 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16021 Markus Deuling <deuling@de.ibm.com>
16023 * remote-utils.c (decode_xfer_write): New function.
16024 * server.h (decode_xfer_write): Add prototype.
16025 * server.c (handle_query): Add PACKET_LEN argument. Support
16026 qXfer:spu:read and qXfer:spu:write packets.
16027 (main): Pass packet_len to handle_query.
16028 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16029 * target.h (target_ops): Add qxfer_spu.
16031 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16033 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16034 accessing non-seekable spufs files.
16036 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16038 * server.c (handle_query): Add reply for qC packet.
16040 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16041 Leo Zayas <lerele@champenstudios@com>
16043 * server.h (check_remote_input_interrupt_request): New function.
16044 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16045 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16046 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16047 (check_remote_input_interrupt_request): New function.
16048 * server.h (check_remote_input_interrupt_request): Declare.
16049 * win32-low.c (winapi_DebugBreakProcess,
16050 winapi_GenerateConsoleCtrlEvent): New typedefs.
16051 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16053 (win32_wait): Check for remote interrupt request
16054 with check_remote_input_interrupt_request.
16055 (win32_request_interrupt): New function.
16056 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16058 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16060 * win32-low.c (debug_registers_changed,
16061 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16062 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16063 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16064 (thread_rec): Get context using the low target.
16065 (child_add_thread): Call thread_added on the low target,
16066 which does the same thing.
16068 (do_initial_child_stuff): Remove debug registers references.
16069 Set context using the low target. Resume threads after
16070 setting the contexts.
16071 (child_continue): Remove dead variable. Remove debug
16072 registers references.
16073 (child_fetch_inferior_registers): Go through the low target.
16074 (do_child_store_inferior_registers): Remove.
16075 (child_store_inferior_registers): Go through the low target.
16076 (win32_resume): Remove debug registers references.
16077 Set context using the low target.
16078 (handle_exception): Change return type to void. Don't record
16079 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16080 first chance exception.
16081 (get_child_debug_event): Change return type to void. Remove
16082 goto loop. Always return after waiting for debug event.
16083 (win32_wait): Convert to switch statement. Handle spurious
16086 * win32-i386-low.c (debug_registers_changed,
16087 debug_registers_used): New.
16088 (initial_stuff): Rename to ...
16089 (i386_initial_stuff): ... this. Clear debug registers
16091 (store_debug_registers): Delete.
16092 (i386_get_thread_context): New.
16093 (load_debug_registers): Delete.
16094 (i386_set_thread_context): New.
16095 (i386_thread_added): New.
16096 (single_step): Rename to ...
16097 (i386_single_step): ... this.
16098 (do_fetch_inferior_registers): Rename to ...
16099 (i386_fetch_inferior_register): ... this.
16100 (i386_store_inferior_register): New.
16101 (the_low_target): Adapt to new interface.
16103 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16104 (arm_get_thread_context): New.
16105 (arm_set_thread_context): New.
16107 (do_fetch_inferior_registers): Rename to ...
16108 (arm_fetch_inferior_register): ... this.
16109 (arm_store_inferior_register): New.
16110 (arm_wince_breakpoint): Reimplement as unsigned long.
16111 (arm_wince_breakpoint_len): Define.
16112 (the_low_target): Adapt to new interface.
16114 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16115 load_debug_registers. Add get_thread_context, set_thread_context,
16116 thread_added and store_inferior_register. Rename
16117 fetch_inferior_registers to fetch_inferior_register.
16118 (regptr): Remove declaration.
16120 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16122 * linux-low.c (linux_detach): Change return type to int. Return 0.
16123 * spu-low.c (spu_detach): Likewise.
16125 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16127 * target.h (target_ops): Change return type of detach to int.
16129 (join_inferior): New.
16130 * server.c (main): Don't skip detach support on mingw32.
16131 If the inferior doesn't support detaching return error.
16132 Call join_inferior instead of using waitpid.
16133 * linux-low.c (linux_join): New.
16134 (linux_target_op): Add linux_join.
16135 * spu-low.c (spu_join): New.
16136 (spu_target_ops): Add spu_join.
16137 * win32-low.c (win32_detach): Adapt to new interface.
16138 Reopen current_process_handle before detaching. Issue a child
16139 resume before detaching.
16141 (win32_target_op): Add win32_join.
16143 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16145 * win32-low.c (win32-attach): Fix return value.
16146 * target.h (target_ops): Describe ATTACH return values.
16148 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16150 * win32-low.c (GETPROCADDRESS): Define.
16151 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16152 (winapi_DebugSetProcessKillOnExit): Likewise.
16153 (win32_create_inferior): Force usage of ansi CreateProcessA.
16154 (win32_attach): Use GETPROCADDRESS.
16155 (win32_detach): Likewise.
16157 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16159 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16161 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16163 * win32-low.c: Commit leftover changes from 2007-03-29.
16165 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16167 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16168 fields short instead of int. Add explicit padding.
16169 (i387_cache_to_fsave): Remove unnecessary casts.
16170 (i387_fsave_to_cache): Doc fix.
16171 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16173 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16175 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16176 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16178 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16180 * configure.srv (arm*-*-mingw32ce*): Move near the other
16183 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16185 * configure.ac: Add errno checking.
16186 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16187 sys/file.h and malloc.h.
16188 (AC_CHECK_DECLS): Add perror.
16189 (srv_mingwce): Handle.
16190 * configure.srv (i[34567]86-*-cygwin*): Add
16191 win32-i386-low.o to srv_tgtobj.
16192 (i[34567]86-*-mingw*): Likewise.
16193 (arm*-*-mingw32ce*): Add case.
16194 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16195 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16196 [__MINGW32CE__] (strerror): New function.
16197 [__MINGW32CE__] (errno): Define to GetLastError.
16198 [__MINGW32CE__] (COUNTOF): New macro.
16199 (remote_open): Remove extra close call.
16200 * mem-break.c (delete_breakpoint_at): New function.
16201 * mem-break.h (delete_breakpoint_at): Declare.
16202 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16203 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16204 [USE_WIN32API] (read, write): Add char* casts.
16205 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16206 * server.h: Include wincecompat.h on Windows CE.
16207 [HAVE_ERRNO_H]: Check.
16208 (perror): Declare if not declared.
16209 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16210 (perror_with_name): Remove errno declaration.
16211 * wincecompat.h: New.
16212 * wincecompat.c: New.
16213 * win32-low.h: New.
16214 * win32-arm-low.c: New.
16215 * win32-i386-low.c: New.
16216 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16217 (OUTMSG2): Make it safe.
16219 (COUNTOF): New macro.
16220 (NUM_REGS): Get it from the low target.
16221 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16222 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16223 (thread_rec): Let low target handle debug registers.
16224 (child_add_thread): Likewise.
16225 (child_init_thread_list): Likewise.
16226 (continue_one_thread): Likewise.
16228 (do_child_fetch_inferior_registers): Move to ...
16229 * win32-i386-low.c: ... here, and rename to ...
16230 (do_fetch_inferior_registers): ... this.
16231 * win32-low.c (child_fetch_inferior_registers):
16232 Go through the low target.
16233 (do_child_store_inferior_registers): Use regptr.
16234 (strwinerror): New function.
16235 (win32_create_inferior): Handle Windows CE.
16236 Use strwinerror instead of strerror on Windows error
16237 codes. Add program to the error output.
16238 Don't close the main thread handle on Windows CE.
16239 (win32_attach): Use coredll.dll on Windows CE.
16240 (win32_kill): Close current process and current
16242 (win32_detach): Use coredll.dll on Windows CE.
16243 (win32_resume): Let low target handle debug registers, and
16245 (handle_exception): Add/Remove initial breakpoint. Avoid
16246 non-existant WSTOPSIG on Windows CE.
16247 (win32_read_inferior_memory): Cast to remove warning.
16248 (win32_arch_string): Go through the low target.
16249 (initialize_low): Call set_breakpoint_data with the low
16250 target's breakpoint.
16251 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16252 FOP_REGNUM, mappings): Move to ...
16253 * win32-i386-low.c: ... here.
16254 * win32-low.c (win32_thread_info): Move to ...
16255 * win32-low.h: ... here.
16256 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16257 win32-arm-low.c and wincecompat.c.
16258 (all:): Add $EXEEXT.
16259 (install-only:): Likewise.
16260 (gdbserver:): Likewise.
16261 (gdbreplay:): Likewise.
16262 * config.in: Regenerate.
16263 * configure: Regenerate.
16265 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16267 * win32-low.c: Rename typedef thread_info to
16268 win32_thread_info throughout.
16270 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16272 * win32-i386-low.c: Rename to ...
16273 * win32-low.c: ... this.
16274 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16275 * Makefile.in: Likewise.
16277 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16279 * remote-utils.c (monitor_output): Constify msg parameter.
16280 * server.h (monitor_output): Likewise.
16281 * win32-i386-low.c (handle_output_debug_string): New.
16282 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16283 handle_output_debug_string.
16284 (get_child_debug_event): Likewise.
16286 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16288 * server.c (main): Correct strtoul check.
16290 2007-03-27 Jon Ringle <jon@ringle.org>
16292 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16294 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16296 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16298 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16300 * terminal.h: Check HAVE_SGTTY_H.
16302 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16304 * remote-utils.c (remote_open): Print out the assigned port number.
16306 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16308 * remote-utils.c (monitor_output): New function.
16309 * server.c (debug_threads): Define here.
16310 (monitor_show_help): New function.
16311 (handle_query): Handle qRcmd.
16312 (main): Do not handle 'd' packet.
16313 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16314 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16317 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16319 * Makefile.in (EXEEXT): New.
16320 (clean): Use $(EXEEXT).
16322 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16324 * target.h (target_ops): Rename send_signal to request_interrupt,
16325 and remove enum target_signal parameter.
16326 * linux-low.c (linux_request_interrupt): Rename from
16327 linux_send_signal, and always send SIGINT.
16328 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16329 and always send SIGINT.
16330 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16332 (input_interrupt): Likewise.
16334 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16336 * server.c (get_features_xml): Check if target implemented
16338 * win32-i386-low.c (win32_arch_string): New.
16339 (win32_target_ops): Add win32_arch_string as arch_string member.
16341 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16343 * spu-low.c (spu_arch_string): New.
16344 (spu_target_ops): Add spu_arch_string.
16346 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16348 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16349 * configure.ac: Do not check for terminal.h.
16350 * configure, config.in: Regenerated.
16352 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16354 * Makefile.in (OBS): Add $(XML_BUILTIN).
16355 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16357 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16358 (arm-with-iwmmxt.c): New.
16359 * config.in, configure: Regenerate.
16360 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16361 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16362 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16363 (arm*-*-linux*): Add iWMMXt and regset support.
16364 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16365 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16366 (arm_store_wmmxregset, target_regsets): New.
16367 * server.c (get_features_xml): Take annex argument. Check builtin
16369 (handle_query): Handle multiple annexes.
16371 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16373 * remote-utils.c [USE_WIN32API] (read, write): Define.
16374 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16377 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16379 * linux-i386-low.c (the_low_target): Set arch_string.
16380 * linux-x86-64-low.c (the_low_target): Likewise.
16381 * linux-low.c (linux_arch_string): New.
16382 (linux_target_ops): Add it.
16383 * linux-low.h (struct linux_target_ops): Add arch_string.
16384 * server.c (write_qxfer_response): Use const void * for DATA.
16385 (get_features_xml): New.
16386 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16387 * target.h (struct target_ops): Add arch_string method.
16389 2007-01-03 Denis Pilat <denis.pilat@st.com>
16390 Daniel Jacobowitz <dan@codesourcery.com>
16392 * linux-low.c (linux_kill): Handle being called with no threads.
16393 * win32-i386-low.c (win32_kill): Likewise.
16394 (get_child_debug_event): Clear current_process_handle.
16396 2006-12-30 Denis PILAT <denis.pilat@st.com>
16397 Daniel Jacobowitz <dan@codesourcery.com>
16399 * remote-utils.c (remote_open): Check the type of specified
16400 serial port devices before opening them.
16401 * server.c (main): Kill the inferior if an error occurs during
16402 the first remote_open.
16404 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16406 * README: Update supported targets.
16408 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16410 * Makefile.in (clean): Remove reg-mips64.c.
16411 (reg-mips64.c, reg-mips64.o): New rules.
16412 * configure.srv: Handle mips64. Include regset support for mips.
16413 * linux-mips-low.c (union mips_register): New.
16414 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16415 (mips_breakpoint, mips_breakpoint_at): Use int.
16416 (mips_collect_register, mips_supply_register)
16417 (mips_collect_register_32bit, mips_supply_register_32bit)
16418 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16419 (mips_store_fpregset, target_regsets): New.
16420 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16422 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16424 * configure.srv: Add target "spu*-*-*".
16425 * Makefile.in (clean): Remove reg-spu.c.
16426 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16427 * spu-low.c: New file.
16429 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16431 * configure.ac: Correct td_thr_tls_get_addr test.
16432 * configure: Regenerated.
16434 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16436 * linux-low.c (linux_wait_for_event): Reformat. Use the
16437 pass_signals array.
16438 * remote-utils.c (decode_address_to_semicolon): New.
16439 * server.c (pass_signals, handle_general_set): New.
16440 (handle_query): Mention QPassSignals for qSupported.
16441 (main): Call handle_general_set.
16442 * server.h (pass_signals, decode_address_to_semicolon): New.
16444 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16446 * server.c (handle_query): Correct error handling for read_auxv.
16448 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16450 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16451 and srv_linux_thread_db to yes.
16452 * linux-s390-low.c (s390_fill_gregset): New function.
16453 (target_regsets): Define data structure.
16455 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16457 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16458 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16459 * config.in, configure: Regenerated.
16460 * inferiors.c (gdb_id_to_thread): New function.
16461 (gdb_id_to_thread_id): Use it.
16462 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16463 * linux-low.h (struct process_info): Add th member.
16464 (thread_db_get_tls_address): New prototype.
16465 * remote-utils.c (decode_address): Make non-static.
16466 * server.c (handle_query): Handle qGetTLSAddr.
16467 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16468 * target.h (struct target_ops): Add get_tls_address.
16469 * thread-db.c (maybe_attach_thread): Save the thread handle.
16470 (thread_db_get_tls_address): New.
16472 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16474 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16475 (linux_resume_one_process): Take a siginfo_t *. Update all
16476 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16477 (struct pending_signals): Add a siginfo_t.
16478 (linux_wait_for_process): Always set last_status.
16479 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16480 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16481 * linux-low.h (struct process_info): Add last_status.
16483 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16485 * remote-utils.c (try_rle): New function.
16486 (putpkt_binary): Use it.
16488 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16490 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16491 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16492 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16493 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16494 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16497 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16499 * server.c (terminal_fd): New variable.
16500 (old_foreground_pgrp): Likewise.
16501 (restore_old_foreground_pgrp): New function.
16502 (start_inferior): Record the terminal file descriptor in terminal_fd
16503 and its original foreground group in old_foreground_pgrp. Register
16504 restore_old_foreground_pgrp with atexit().
16506 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16508 * server.c (handle_query): Correct qPart to qXfer.
16510 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16512 * configure.ac: Check for more headers which are missing on
16513 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16514 * configure.srv: Add Cygwin and mingw32.
16515 * remote-utils.c: Don't include headers unconditionally which
16516 are missing on mingw32. Include <winsock.h> for mingw32.
16517 (remote_open): Adjust for mingw32 support. Flush
16518 standard error after writing to it.
16519 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16520 (unblock_async_io, enable_async_io, disable_async_io)
16521 (readchar, getpkt): Update for Winsock support.
16522 (prepare_resume_reply): Expect a protocol signal number.
16523 * server.c: Disable <sys/wait.h> on mingw32.
16524 (start_inferior): Adjust for mingw32 support. Flush
16525 standard error after writing to it.
16526 (attach_inferior): Likewise. Use protocol signal
16528 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16530 * win32-i386-low.c: New file.
16531 * Makefile.in (XM_CLIBS): Set.
16532 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16533 (win32-i386-low.o): New dependency rule.
16534 * linux-low.c (linux_wait): Use target signal numbers.
16535 * target.h (struct target_ops): Doc fix.
16536 * server.h (target_signal_to_name): New prototype.
16537 * gdbreplay.c: Don't include headers unconditionally which
16538 are missing on mingw32. Include <winsock.h> for mingw32.
16539 (remote_close, remote_open): Adjust for Winsock support.
16540 * configure, config.in: Regenerated.
16542 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16544 * server.c (decode_xfer_read, write_qxfer_response): New.
16545 (handle_query): Take a packet length argument. Handle
16546 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16547 the qSupported response.
16548 (main): Update call to handle_query.
16550 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16552 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16553 (putpkt_binary): Renamed from putpkt and adjusted for binary
16555 (putpkt): New wrapper for putpkt_binary.
16556 (readchar): Don't mask off the high bit.
16557 (decode_X_packet): New function.
16558 * server.c (main): Call putpkt_binary if a handler sets the packet
16559 length. Save the length of the incoming packet. Handle 'X'.
16560 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16562 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16564 * server.c (handle_query): Handle qSupported.
16566 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16568 * remote-utils.c (all_symbols_looked_up): New variable.
16569 (look_up_one_symbol): Check it.
16570 * server.h (look_up_one_symbol): New declaration.
16571 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16573 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16575 * Makefile.in (linux-arm-low.o): Update dependencies.
16576 * linux-arm-low.c: Include "gdb_proc_service.h".
16577 (PTRACE_GET_THREAD_AREA): Define.
16578 (ps_get_thread_area): New function.
16580 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16582 * configure.srv (m68k*-*-uclinux*): New target.
16583 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16584 (linux_resume_one_process): Remove extraneous cast.
16585 (linux_read_offsets): New.
16586 (linux_target_op): Add linux_read_offsets on mmuless systems.
16587 * server.c (handle_query): Add qOffsets logic.
16588 * target.h (struct target_ops): Add read_offsets.
16590 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16592 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16593 (PTRACE_GET_THREAD_AREA): Define.
16594 (ps_get_thread_area): New function.
16595 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16596 (linux-x86-64-low.o): Update.
16598 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16600 * configure.ac: Remove checks for prfpregset_t.
16601 * gdb_proc_service.h: New file.
16602 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16603 new "gdb_proc_service.h".
16604 * proc-service.c: Likewise.
16605 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16606 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16607 * Makefile.in (gdb_proc_service_h): Updated.
16608 * configure, config.in: Regenerated.
16610 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16612 * remote-utils.c (prepare_resume_reply): Move declaration
16613 of gdb_id_from_wait to the top of the block.
16615 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16617 * linux-low.c (regsets_store_inferior_registers): Read the regset
16618 from the target before filling it.
16620 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16622 * server.c (attach_inferior): Return SIGTRAP for a successful
16625 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16627 * Makefile.in (OBS): Add version.o.
16628 (STAGESTUFF): Delete.
16629 (version.o): Add dependencies.
16630 (version.c): Replace rule.
16631 (clean): Remove version.c.
16632 * server.c (gdbserver_version): New.
16633 (gdbserver_usage): Use printf.
16634 (main): Handle --version and --help.
16635 * server.h (version, host_name): Add declarations.
16637 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16649 * linux-x86-64-low.c:
16651 * linux-s390-low.c:
16652 * linux-ppc64-low.c:
16654 * linux-mips-low.c:
16655 * linux-m68k-low.c:
16656 * linux-m32r-low.c:
16659 * linux-ia64-low.c:
16660 * linux-i386-low.c:
16661 * linux-crisv32-low.c:
16673 * gdbserver.1: Add (C) after Copyright. Update the FSF
16676 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16678 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16679 (arm_breakpoint_at): Recognize both breakpoints.
16680 (the_low_target): Use the correct breakpoint instruction.
16682 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16684 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16685 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16686 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16687 (the_low_target): Update.
16689 2005-10-25 Andreas Schwab <schwab@suse.de>
16691 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16693 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16694 (ia64_num_regs): Reduce to 462.
16696 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16698 * acinclude.m4: Correct quoting.
16699 * aclocal.m4: Regenerated.
16701 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16702 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16703 (thread_db_init): Call thread_db_err_str.
16704 * configure.ac: Check for TD_VERSION.
16705 * config.in, configure: Regenerated.
16707 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16709 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16711 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16713 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16714 is not available. Define HAVE_PTRACE_GETREGS if it is.
16715 * config.in, configure: Regenerated.
16716 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16717 * linux-i386-low.c, linux-m68k-low.c: Update to use
16718 HAVE_PTRACE_GETREGS.
16719 * linux-low.c (regsets_fetch_inferior_registers)
16720 (regsets_store_inferior_registers): Only return 0 if we processed
16722 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16723 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16725 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16727 * inferiors.c (struct thread_info): Add gdb_id.
16728 (add_thread): Add gdb_id argument.
16729 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16730 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16731 calls to add_thread.
16732 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16733 * server.c (handle_query): Use thread_to_gdb_id.
16734 (handle_v_cont, main): Use gdb_id_to_thread_id.
16735 * server.h (add_thread): Update prototype.
16736 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16739 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16741 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16742 left-padded registers.
16743 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16744 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16746 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16748 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16749 * configure: Regenerate.
16750 * config.in: Regenerate.
16751 * server.h (NEED_DECLARATION_STRERROR):
16752 Replace with !HAVE_DECL_STRERROR.
16754 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16756 * linux-low.c (linux_wait, linux_send_signal): Don't test
16757 an unsigned long variable for > 0 if it could be MAX_ULONG.
16758 * server.c (myresume): Likewise.
16759 * target.c (set_desired_inferior): Likewise.
16761 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16763 * configure.ac: Simplify and improve check for socklen_t.
16764 * configure, config.in: Regenerate.
16766 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16768 * acconfig.h: Remove.
16769 * configure.ac: Add a test for socklen_t. Use three-argument
16770 AC_DEFINE throughout.
16771 * config.in: Regenerated using autoheader 2.59.
16772 * configure: Regenerated.
16774 * gdbreplay.c (socklen_t): Provide a default.
16775 (remote_open): Use socklen_t.
16776 * remote-utils.c (socklen_t): Provide a default.
16777 (remote_open): Use socklen_t.
16778 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16781 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16783 * linux-low.c (linux_read_memory, linux_write_memory)
16784 (linux_read_auxv): Likewise.
16785 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16786 (check_mem_write): Likewise.
16787 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16789 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16790 (registers_from_string, register_data): Likewise.
16791 * server.c (handle_query, main): Likewise.
16792 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16793 (decode_M_packet): Likewise.
16794 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16795 * target.h (struct target_ops): Update read_memory, write_memory,
16797 (read_inferior_memory, write_inferior_memory): Update.
16798 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16799 to unsigned char *.
16800 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16801 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16802 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16803 linux-s390-low.c, linux-sh-low.c: Update for changes in
16804 read_inferior_memory and the_low_target->breakpoint.
16806 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16808 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16809 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16810 * configure.srv: Add powerpc64-*-linux*.
16811 * linux-ppc64-low.c: New file.
16813 2005-05-23 Orjan Friberg <orjanf@axis.com>
16815 * linux-cris-low.c: New file with support for CRIS.
16816 * linux-crisv32-low.c: Ditto for CRISv32.
16817 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16818 (clean): Add reg-cris.c and reg-crisv32.c.
16819 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16820 reg-crisv32.o, and reg-crisv32.c to make rules.
16821 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16822 recognized targets.
16824 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16826 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16827 of sizeof (PTRACE_XFER_TYPE).
16828 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16830 2005-05-12 Orjan Friberg <orjanf@axis.com>
16832 * target.h (struct target_ops): Add insert_watchpoint,
16833 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16834 pointers for hardware watchpoint support.
16835 * linux-low.h (struct linux_target_ops): Ditto.
16836 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16837 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16838 to linux_target_ops.
16839 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16841 * server.c (main): Recognize 'Z' and 'z' packets.
16843 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16845 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16846 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16847 (the_low_target): Add new members.
16849 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16851 * proc-service.c (ps_lgetregs): Search all_processes instead of
16854 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16856 * server.c (start_inferior): Change return type to int.
16857 (attach_inferior): Change sigptr to int *.
16858 (handle_v_cont, handle_v_requests): Change signal to int *.
16859 (main): Change signal to int.
16861 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16863 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16864 * configure.srv: Add m32r*-*-linux*.
16865 * linux-m32r-low.c: New file.
16867 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16869 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16871 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16873 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16874 Take unsigned long arguments for PIDs.
16875 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16876 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16877 (wait_for_sigstop, linux_resume_one_process)
16878 (regsets_fetch_inferior_registers, linux_send_signal)
16879 (linux_read_auxv): Likewise. Update the types of variables holding
16880 PIDs. Update format string specifiers.
16881 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16882 * remote-utils.c (prepare_resume_reply): Likewise.
16883 * server.c (cont_thread, general_thread, step_thread)
16884 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16886 (handle_query): Update format specifiers.
16887 (handle_v_cont, main): Use strtoul for thread IDs.
16888 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16889 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16890 (general_thread, step_thread, thread_from_wait)
16891 (old_thread_from_wait): Update.
16892 * target.h (struct thread_resume): Use unsigned long for THREAD.
16893 (struct target_ops): Use unsigned long for arguments to attach and
16896 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16898 * acinclude.m4: Include bfd/bfd.m4 directly.
16899 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16900 <agriffis@toolchain.org>.
16901 * aclocal.m4, configure: Regenerated.
16903 2005-01-07 Andrew Cagney <cagney@gnu.org>
16905 * configure.ac: Rename configure.in, require autoconf 2.59.
16906 * configure: Re-generate.
16908 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16910 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16911 LIBS when finished.
16912 * aclocal.m4: Regenerated.
16913 * configure: Regenerated.
16915 2004-11-21 Andreas Schwab <schwab@suse.de>
16917 * linux-m68k-low.c (m68k_num_gregs): Define.
16918 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16919 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16920 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16921 (m68k_breakpoint_at): New. Add to the_low_target.
16923 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16924 srv_linux_thread_db to yes.
16926 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16928 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16929 (ARCH_SET_FS): Likewise.
16930 (ARCH_GET_FS): Likewise.
16931 (ARCH_GET_GS): Likewise.
16933 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16935 * linux-i386-low.c (ps_get_thread_area): New.
16936 * linux-x86-64-low.c (ps_get_thread_area): New.
16937 * linux-low.c: Include <sys/syscall.h>.
16938 (linux_kill_one_process): Don't kill the first thread here.
16939 (linux_kill): Kill the first thread here.
16940 (kill_lwp): New function.
16941 (send_sigstop, linux_send_signal): Use it.
16942 * proc-service.c: Clean up #ifdefs.
16943 (fpregset_info): Delete.
16944 (ps_lgetregs): Update and enable implementation.
16945 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16947 * remote-utils.c (struct sym_cache, symbol_cache): New.
16948 (input_interrupt): Print a clearer message.
16949 (async_io_enabled): New variable.
16950 (enable_async_io, disable_async_io): Use it. Update comments.
16951 (look_up_one_symbol): Use the symbol cache.
16952 * thread-db.c (thread_db_look_up_symbols): New function.
16953 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16955 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16957 * configure.in: Test for -rdynamic.
16958 * configure: Regenerated.
16959 * Makefile (INTERNAL_LDFLAGS): New.
16960 (gdbserver, gdbreplay): Use it.
16962 2004-09-02 Andrew Cagney <cagney@gnu.org>
16964 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16966 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16968 * linux-low.c (linux_wait): Clear all_processes list also.
16970 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16972 * linux-low.c: Include <errno.h>. Remove extern declaration of
16975 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16977 * gdbreplay.c, server.h, utils.c: Update copyright years.
16979 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16981 * server.c (main): Print child status or termination signal from
16982 variable 'signal', not 'sig'.
16984 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16986 * linux-low.c (linux_read_memory): Change return type to
16987 int. Check for and return error from ptrace().
16988 * target.c (read_inferior_memory): Change return type to int. Pass
16989 back return status from the_target->read_memory().
16990 * target.h (struct target_ops): Adapt *read_memory() prototype.
16992 (read_inferior_memory): Adapt prototype.
16993 * server.c (main): Return an error packet if
16994 read_inferior_memory() returns an error.
16996 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16998 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16999 Unify with other clean targets.
17001 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17003 * server.c (handle_v_cont): Call set_desired_inferior.
17005 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17007 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17009 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17011 * linux-low.c (linux_wait): Unblock async I/O.
17012 (linux_resume): Block and enable async I/O.
17013 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17014 * server.h (block_async_io, unblock_async_io): Add prototypes.
17016 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17018 * remote-utils.c (remote_open): Print a status notice after
17019 opening a TCP port.
17020 * server.c (attach_inferior): Print a status notice after
17023 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17025 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17027 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17029 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17031 * server.c, target.h: Update copyright years.
17033 2004-02-25 Roland McGrath <roland@redhat.com>
17035 * target.h (struct target_ops): New member `read_auxv'.
17036 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17037 * linux-low.c (linux_read_auxv): New function.
17038 (linux_target_ops): Initialize `read_auxv' member to that.
17040 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17042 Committed by Jim Blandy <jimb@redhat.com>.
17044 * linux-s390-low.c (s390_num_regs): Update.
17045 (s390_regmap): Remove control registers. Use __s390x__ predefine
17046 instead of GPR_SIZE to distiguish s390 and s390x targets.
17048 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17050 * linux-low.c: Update copyright year.
17051 (check_removed_breakpoint): Clear pending_is_breakpoint.
17052 (linux_set_resume_request, linux_queue_one_thread)
17053 (resume_status_pending_p): New functions.
17054 (linux_continue_one_thread): Use process->resume.
17055 (linux_resume): Only resume threads if there are no pending events.
17056 * linux-low.h (struct process_info): Add resume request
17059 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17061 * regcache.c (new_register_cache): Clear the allocated register
17062 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17064 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17066 * linux-low.c (linux_resume): Take a struct thread_resume *
17068 (linux_wait): Update call.
17069 (resume_ptr): New static variable.
17070 (linux_continue_one_thread): Renamed from
17071 linux_continue_one_process. Use resume_ptr.
17072 (linux_resume): Use linux_continue_one_thread.
17073 * server.c (handle_v_cont, handle_v_requests): New functions.
17074 (myresume): New function.
17075 (main): Handle 'v' case.
17076 * target.h (struct thread_resume): New type.
17077 (struct target_ops): Change argument of "resume" to struct
17079 (myresume): Delete macro.
17081 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17083 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17084 (uninstall): Support DESTDIR.
17086 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17088 * configure.srv: Add xscale*linux copy of arm*linux entry.
17090 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17092 * linux-arm-low.c (arm_reinsert_addr): New function.
17093 (the_low_target): Add arm_reinsert_addr.
17095 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17097 * mem-break.c: Remove whitespace at end of file.
17099 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17101 * configure.in: Check whether we need to prototype strerror.
17102 * server.h: Optionally prototype strerror.
17103 * gdbreplay.c (perror_with_name): Use strerror.
17104 * linux-low.c (linux_attach_lwp): Use strerror.
17105 * utils.c (perror_with_name): Use strerror.
17106 * config.in, configure: Regenerated.
17108 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17110 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17111 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17113 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17115 * Makefile.in (SFILES): Update.
17116 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17117 low-sun3.c: Remove files.
17119 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17121 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17122 (linux_detach_one_process, linux_detach): New functions.
17123 (linux_target_ops): Add linux_detach.
17124 * server.c (main): Handle 'D' packet.
17125 * target.h (struct target_ops): Add "detach" member.
17126 (detach_inferior): Define.
17128 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17130 From Kelley Cook <kelleycook@wideopenwest.com>:
17131 * configure.srv: Accept i[34567]86 variants.
17133 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17135 * linux-low.c (linux_wait_for_event): Correct comment typos.
17136 (linux_resume_one_process): Call check_removed_breakpoint.
17137 (linux_send_signal): New function.
17138 (linux_target_ops): Add linux_send_signal.
17139 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17141 * target.h (struct target_ops): Add send_signal.
17143 2003-05-29 Jim Blandy <jimb@redhat.com>
17145 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17146 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17147 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17148 away part of the register's value.
17150 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17152 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17153 (linux_wait_for_event, linux_init_signals): Likewise.
17155 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17157 * configure.in: Check for stdlib.h.
17158 * configure: Regenerated.
17159 * config.in: Regenerated.
17161 2003-01-04 Andreas Schwab <schwab@suse.de>
17163 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17165 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17167 * Makefile.in: Remove obsolete code.
17169 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17171 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17172 defined(PT_FPR0_HI).
17174 2002-11-17 Stuart Hughes <seh@zee2.com>
17176 * linux-arm-low.c (arm_num_regs): Increase.
17177 (arm_regmap): Include status register.
17179 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17181 * linux-low.c (register_addr): Remove incorrect -1 check.
17183 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17185 * linux-low.c (linux_create_inferior): Call setpgid. Return
17187 (unstopped_p, linux_signal_pid): Remove.
17188 (linux_target_ops): Remove linux_signal_pid.
17189 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17190 global instead of target method.
17191 * target.h (struct target_ops): Remove signal_pid. Update comment
17192 for create_inferior.
17193 * server.c (signal_pid): New variable.
17194 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17195 gdbserver. Set the child to be the foreground process group.
17196 (attach_inferior): Set signal_pid.
17198 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17200 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17202 2002-08-20 Jim Blandy <jimb@redhat.com>
17204 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17207 2002-08-01 Andrew Cagney <cagney@redhat.com>
17209 * Makefile.in: Make chill references obsolete.
17211 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17213 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17214 * configure: Regenerate.
17215 * config.in: Regenerate.
17217 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17219 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17220 (perror_with_name, remote_close, remote_open, expect, play): Static.
17222 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17224 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17225 byte offsets instead of an array of indexes.
17226 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17228 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17230 * regcache.c: Add comment.
17232 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17234 * thread-db.c: New file.
17235 * proc-service.c: New file.
17236 * acinclude.m4: New file.
17237 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17238 proc-service.o, and thread-db.o.
17239 (linux-low.o): Add USE_THREAD_DB.
17240 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17241 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17242 * aclocal.m4: Regenerated.
17243 * config.in: Regenerated.
17244 * configure: Regenerated.
17245 * configure.in: Check for proc_service.h, sys/procfs.h,
17246 thread_db.h, and linux/elf.h headrs.
17247 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17248 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17249 Check for -lthread_db and thread support.
17250 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17251 PowerPC, and SuperH.
17252 * i387-fp.c: Constify arguments.
17253 * i387-fp.h: Likewise.
17254 * inferiors.c: (struct thread_info): Renamed from
17255 `struct inferior_info'. Remove PID member. Use generic inferior
17256 list header. All uses updated.
17257 (inferiors, signal_pid): Removed.
17258 (all_threads): New variable.
17259 (get_thread): Define.
17260 (add_inferior_to_list): New function.
17261 (for_each_inferior): New function.
17262 (change_inferior_id): New function.
17263 (add_inferior): Removed.
17264 (remove_inferior): New function.
17265 (add_thread): New function.
17266 (free_one_thread): New function.
17267 (remove_thread): New function.
17268 (clear_inferiors): Use for_each_inferior and free_one_thread.
17269 (find_inferior): New function.
17270 (find_inferior_id): New function.
17271 (inferior_target_data): Update argument type.
17272 (set_inferior_target_data): Likewise.
17273 (inferior_regcache_data): Likewise.
17274 (set_inferior_regcache_data): Likewise.
17275 * linux-low.c (linux_bp_reinsert): Remove.
17276 (all_processes, stopping_threads, using_thrads)
17277 (struct pending_signals, debug_threads, pid_of): New.
17278 (inferior_pid): Replace with macro.
17279 (struct inferior_linux_data): Remove.
17280 (get_stop_pc, add_process): New functions.
17281 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17282 Use add_process and add_thread.
17283 (linux_attach_lwp): New function, based on old linux_attach. Use
17284 add_process and add_thread. Set stop_expected for new threads.
17285 (linux_attach): New function.
17286 (linux_kill_one_process): New function.
17287 (linux_kill): Kill all LWPs.
17288 (linux_thread_alive): Use find_inferior_id.
17289 (check_removed_breakpoints, status_pending_p): New functions.
17290 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17291 Update. Use WNOHANG. Wait for cloned processes also. Update process
17292 struct for the found process.
17293 (linux_wait_for_event): New function.
17294 (linux_wait): Use it. Support LWPs.
17295 (send_sigstop, wait_for_sigstop, stop_all_processes)
17296 (linux_resume_one_process, linux_continue_one_process): New functions.
17297 (linux_resume): Support LWPs.
17298 (REGISTER_RAW_SIZE): Remove.
17299 (fetch_register): Use register_size instead. Call supply_register.
17300 (usr_store_inferior_registers): Likewise. Call collect_register.
17301 Fix recursive case.
17302 (regsets_fetch_inferior_registers): Improve error message.
17303 (regsets_store_inferior_registers): Add debugging.
17304 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17305 (unstopped_p, linux_signal_pid): New functions.
17306 (linux_target_ops): Add linux_signal_pid.
17307 (linux_init_signals): New function.
17308 (initialize_low): Call it. Initialize using_threads.
17309 * regcache.c (inferior_regcache_data): Add valid
17311 (get_regcache): Fetch registers lazily. Add fetch argument
17312 and update all callers.
17313 (regcache_invalidate_one, regcache_invalidate): New
17315 (new_register_cache): Renamed from create_register_cache.
17316 Return the new regcache.
17317 (free_register_cache): Change argument to a void *.
17318 (registers_to_string, registers_from_string): Call get_regcache
17319 with fetch flag set.
17320 (register_data): Make static. Pass fetch flag to get_regcache.
17321 (supply_register): Call get_regcache with fetch flag clear.
17322 (collect_register): Call get_regcache with fetch flag set.
17323 (collect_register_as_string): New function.
17324 * regcache.h: Update.
17325 * remote-utils.c (putpkt): Flush after debug output and use
17327 Handle input interrupts while waiting for an ACK.
17328 (input_interrupt): Use signal_pid method.
17329 (getpkt): Flush after debug output and use stderr.
17330 (outreg): Use collect_register_as_string.
17331 (new_thread_notify, dead_thread_notify): New functions.
17332 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17333 and general_thread.
17334 (look_up_one_symbol): Flush after debug output.
17335 * server.c (step_thread, server_waiting): New variables.
17336 (start_inferior): Don't use signal_pid. Update call to mywait.
17337 (attach_inferior): Update call to mywait.
17338 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17339 (main): Don't fetch/store registers explicitly. Use
17340 set_desired_inferior. Support proposed ``Hs'' packet. Update
17342 * server.h: Update.
17343 (struct inferior_list, struct_inferior_list_entry): New.
17344 * target.c (set_desired_inferior): New.
17345 (write_inferior_memory): Constify.
17346 (mywait): New function.
17347 * target.h: Update.
17348 (struct target_ops): New signal_pid method.
17349 (mywait): Removed macro, added prototype.
17351 * linux-low.h (regset_func): Removed.
17352 (regset_fill_func, regset_store_func): New.
17353 (enum regset_type): New.
17354 (struct regset_info): Add type field. Use new operation types.
17355 (struct linux_target_ops): stop_pc renamed to get_pc.
17356 Add decr_pc_after_break and breakpoint_at.
17357 (get_process, get_thread_proess, get_process_thread)
17358 (strut process_info, all_processes, linux_attach_lwp)
17359 (thread_db_init): New.
17361 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17362 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17363 (the_low_target): Add new members.
17364 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17365 (i386_store_fpxregset): Constify.
17366 (target_regsets): Add new kind identifier.
17367 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17368 (i386_set_pc): Add debugging.
17369 (i386_breakpoint_at): New function.
17370 (the_low_target): Add new members.
17371 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17372 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17373 (mips_breakpoint_at): New.
17374 (the_low_target): Add new members.
17375 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17376 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17377 (the_low_target): Add new members.
17378 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17379 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17380 (the_low_target): Add new members.
17381 * linux-x86-64-low.c (target_regsets): Add new kind
17384 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17386 From Martin Pool <mbp@samba.org>:
17387 * server.c (gdbserver_usage): New function.
17390 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17392 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17393 stop_at -> stop_pc.
17395 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17397 * Makefile.in: Remove obsolete code.
17399 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17401 * linux-low.c (regsets_fetch_inferior_registers),
17402 (regsets_store_inferior_registers): Removed cast to int from
17404 * regcache.h: Added declaration of struct inferior_info.
17406 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17408 * inferiors.c (struct inferior_info): Add regcache_data.
17409 (add_inferior): Call create_register_cache.
17410 (clear_inferiors): Call free_register_cache.
17411 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17412 * regcache.c (struct inferior_regcache_data): New.
17413 (registers): Remove.
17414 (get_regcache): New function.
17415 (create_register_cache, free_register_cache): New functions.
17416 (set_register_cache): Don't initialize the register cache here.
17417 (registers_to_string, registers_from_string, register_data): Call
17419 * regcache.h: Add prototypes.
17420 * server.h: Likewise.
17422 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17424 * mem-break.c: New file.
17425 * mem-break.h: New file.
17426 * Makefile.in: Add mem-break.o rule; update server.h
17428 * inferiors.c (struct inferior_info): Add target_data
17430 (clear_inferiors): Free target_data member if set.
17431 (inferior_target_data, set_inferior_target_data): New functions.
17432 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17433 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17434 * linux-low.c (linux_bp_reinsert): New variable.
17435 (struct inferior_linux_data): New.
17436 (linux_create_inferior): Use set_inferior_target_data.
17437 (linux_attach): Likewise. Call add_inferior.
17438 (linux_wait_for_one_inferior): New function.
17439 (linux_wait): Call it.
17440 (linux_write_memory): Add const.
17441 (initialize_low): Call set_breakpoint_data.
17442 * linux-low.h (struct linux_target_ops): Add breakpoint
17444 * server.c (attach_inferior): Remove extra add_inferior
17446 * server.h: Include mem-break.h. Update inferior.c
17448 * target.c (read_inferior_memory)
17449 (write_inferior_memory): New functions.
17450 * target.h (read_inferior_memory)
17451 (write_inferior_memory): Change macros to prototypes.
17452 (struct target_ops): Update comments. Add const to write_memory
17455 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17457 * linux-low.c (usr_store_inferior_registers): Support
17458 registers which are allowed to fail to store.
17459 * linux-low.h (linux_target_ops): Likewise.
17460 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17461 (ppc_cannot_store_register): FPSCR may not be storable.
17463 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17465 * server.h: Include <string.h> if HAVE_STRING_H.
17466 * ChangeLog: Correct paths in last ChangeLog entry.
17468 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17470 * linux-low.h: Remove obsolete prototypes.
17471 (struct linux_target_ops): New.
17472 (extern the_low_target): New.
17473 * linux-low.c (num_regs, regmap): Remove declarations.
17474 (register_addr): Use the_low_target explicitly.
17475 (fetch_register): Likewise.
17476 (usr_fetch_inferior_registers): Likewise.
17477 (usr_store_inferior_registers): Likewise.
17478 * linux-arm-low.c (num_regs): Remove.
17479 (arm_num_regs): Define.
17480 (arm_regmap): Renamed from regmap, made static.
17481 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17483 (arm_cannot_store_register): Renamed from cannot_store_register,
17485 (the_low_target): New.
17486 * linux-i386-low.c (num_regs): Remove.
17487 (i386_num_regs): Define.
17488 (i386_regmap): Renamed from regmap, made static.
17489 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17491 (i386_cannot_store_register): Renamed from cannot_store_register,
17493 (the_low_target): New.
17494 * linux-ia64-low.c (num_regs): Remove.
17495 (ia64_num_regs): Define.
17496 (ia64_regmap): Renamed from regmap, made static.
17497 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17499 (ia64_cannot_store_register): Renamed from cannot_store_register,
17501 (the_low_target): New.
17502 * linux-m68k-low.c (num_regs): Remove.
17503 (m68k_num_regs): Define.
17504 (m68k_regmap): Renamed from regmap, made static.
17505 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17507 (m68k_cannot_store_register): Renamed from cannot_store_register,
17509 (the_low_target): New.
17510 * linux-mips-low.c (num_regs): Remove.
17511 (mips_num_regs): Define.
17512 (mips_regmap): Renamed from regmap, made static.
17513 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17515 (mips_cannot_store_register): Renamed from cannot_store_register,
17517 (the_low_target): New.
17518 * linux-ppc-low.c (num_regs): Remove.
17519 (ppc_num_regs): Define.
17520 (ppc_regmap): Renamed from regmap, made static.
17521 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17523 (ppc_cannot_store_register): Renamed from cannot_store_register,
17525 (the_low_target): New.
17526 * linux-s390-low.c (num_regs): Remove.
17527 (s390_num_regs): Define.
17528 (s390_regmap): Renamed from regmap, made static.
17529 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17531 (s390_cannot_store_register): Renamed from cannot_store_register,
17533 (the_low_target): New.
17534 * linux-sh-low.c (num_regs): Remove.
17535 (sh_num_regs): Define.
17536 (sh_regmap): Renamed from regmap, made static.
17537 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17539 (sh_cannot_store_register): Renamed from cannot_store_register,
17541 (the_low_target): New.
17542 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17543 (the_low_target): New.
17545 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17547 * Makefile.in: Add stamp-h target.
17548 * configure.in: Create stamp-h.
17549 * configure: Regenerated.
17551 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17553 * inferiors.c: New file.
17554 * target.c: New file.
17555 * target.h: New file.
17556 * Makefile.in: Add target.o and inferiors.o. Update
17558 * linux-low.c (inferior_pid): New static variable,
17559 moved from server.c.
17560 (linux_create_inferior): Renamed from create_inferior.
17561 Call add_inferior. Return 0 on success instead of a PID.
17562 (linux_attach): Renamed from myattach.
17563 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17564 (linux_thread_alive): Renamed from mythread_alive.
17565 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17567 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17568 (regsets_store_inferior_registers): Correct error message.
17569 Add missing ``return 0''.
17570 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17571 (linux_store_registers): Renamed from store_inferior_registers.
17572 (linux_read_memory): Renamed from read_inferior_memory.
17573 (linux_write_memory): Renamed from write_inferior_memory.
17574 (linux_target_ops): New structure.
17575 (initialize_low): Call set_target_ops ().
17576 * remote-utils.c (unhexify): New function.
17577 (hexify): New function.
17578 (input_interrupt): Send signals to ``signal_pid''.
17579 * server.c (inferior_pid): Remove.
17580 (start_inferior): Update create_inferior call.
17581 (attach_inferior): Call add_inferior.
17582 (handle_query): New function.
17583 (main): Call handle_query for `q' packets.
17584 * server.h: Include "target.h". Remove obsolete prototypes.
17585 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17587 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17589 * Makefile.in: Add WARN_CFLAGS. Update configury
17591 * configure.in: Check for <string.h>
17592 * configure: Regenerate.
17593 * config.in: Regenerate.
17594 * gdbreplay.c: Include needed system headers.
17595 (remote_open): Remove strchr prototype.
17596 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17597 * regcache.c (supply_register): Change buf argument to const void *.
17598 (supply_register_by_name): Likewise.
17599 (collect_register): Change buf argument to void *.
17600 (collect_register_by_name): Likewise.
17601 * regcache.h: Add missing prototypes.
17602 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17603 * server.c (handle_query): New function.
17604 (attached): New static variable, moved out of main.
17605 (main): Quiet longjmp clobber warnings.
17606 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17607 * utils.c (error): Remove NORETURN.