1 2019-11-01 Christian Biesinger <cbiesinger@google.com>
3 * configure: Regenerate.
4 * configure.ac: Remove check for strerror_r.
6 2019-10-31 Christian Biesinger <cbiesinger@google.com>
8 * config.in: Regenerate.
9 * configure: Regenerate.
10 * configure.ac: Also check for strerror_r.
12 2019-10-31 Christian Biesinger <cbiesinger@google.com>
14 * ax.h (debug_agent): Remove duplicate declaration.
16 2019-10-26 Tom de Vries <tdevries@suse.de>
18 * linux-aarch64-low.c: Fix typos in comments.
19 * linux-arm-low.c: Same.
21 * linux-ppc-low.c: Same.
22 * proc-service.c: Same.
28 2019-10-25 Tom Tromey <tromey@adacore.com>
30 * utils.c (xstrdup): Remove.
32 2019-10-23 Tom Tromey <tom@tromey.com>
34 * configure, config.in: Rebuild.
36 2019-10-23 Tom Tromey <tom@tromey.com>
39 * acinclude.m4: Use m4_include, not sinclude.
41 2019-10-17 Tom Tromey <tromey@adacore.com>
44 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
45 in AC_CONFIG_FILES invocation.
46 * Makefile.in (stamp-h, Makefile): Use new-style config.status
49 2019-10-16 Christian Biesinger <cbiesinger@google.com>
51 * server.c: Include xml-builtin.h.
52 (get_xml_features): Don't declare xml_builtins here.
54 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
56 * Makefile.in: Remove references to vec-ipa.o.
58 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
60 * Makefile.in: Remove references to vec.c.
62 2019-10-02 Christian Biesinger <cbiesinger@google.com>
64 * server.c (server_waiting): Change to bool.
65 (extended_protocol): Likewise.
66 (response_needed): Likewise.
67 (exit_requested): Likewise.
69 (report_no_resumed): Likewise.
71 (disable_packet_vCont): Likewise.
72 (disable_packet_Tthread): Likewise.
73 (disable_packet_qC): Likewise.
74 (disable_packet_qfThreadInfo): Likewise.
75 (handle_general_set): Update.
76 (handle_detach): Update.
77 (handle_monitor_command): Update.
78 (handle_query): Update.
79 (captured_main): Update.
80 (process_serial_event): Update.
81 * server.h (server_waiting): Change to bool.
82 (disable_packet_vCont): Likewise.
83 (disable_packet_Tthread): Likewise.
84 (disable_packet_qC): Likewise.
85 (disable_packet_qfThreadInfo): Likewise.
88 * target.c (target_stop_and_wait): Update.
90 2019-10-02 Tom Tromey <tromey@adacore.com>
92 * Makefile.in (SFILES): Add common-inferior.c.
93 (OBS): Add common-inferior.o.
94 * server.c (startup_with_shell): Don't define.
96 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
98 * linux-low.c (linux_low_read_btrace): Update for change to
101 2019-09-20 Christian Biesinger <cbiesinger@google.com>
103 * debug.c (debug_threads): Remove comment in favor of the header.
104 * debug.h (using_threads): Add declaration.
105 (debug_threads): Add comment.
106 * linux-aarch64-low.c: Include debug.h and remove declaration of
108 * nto-low.c: Likewise.
109 * remote-utils.c: Likewise.
110 * thread-db.c: Likewise.
112 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
114 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
115 and powerpc-cell64l-ipa.o.
116 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
117 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
118 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
121 * spu-low.c: Remove file.
123 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
124 (parse_spufs_run): Remove.
125 (ppc_get_pc): Remove Cell/B.E. support.
126 (ppc_set_pc): Likewise.
127 (ppc_breakpoint_at): Likewise.
128 (ppc_arch_setup): Likewise.
129 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
130 tdesc_powerpc_cell32l.
131 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
132 or init_registers_powerpc_cell32l.
133 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
134 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
135 or init_registers_powerpc_cell32l.
136 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
137 (init_registers_powerpc_cell32l): Remove prototype.
138 (init_registers_powerpc_cell64l): Likewise.
140 * target.h (struct target_ops): Remove qxfer_spu member.
141 * server.c (handle_qxfer_spu): Remove.
142 (qxfer_packets): Remove entry for "spu".
143 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
144 * linux-low.c (SPUFS_MAGIC): Remove.
145 (spu_enumerate_spu_ids): Remove.
146 (linux_qxfer_spu): Remove.
147 (linux_target_ops): Remove qxfer_spu member.
148 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
149 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
150 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
152 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
154 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
155 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
156 * config.in: Regenerate.
157 * configure: Regenerate.
159 2019-08-15 Tom Tromey <tromey@adacore.com>
161 * target.c (target_write_memory): Use gdb::byte_vector.
163 2019-08-15 Tom Tromey <tromey@adacore.com>
165 * tracepoint.c (write_inferior_data_pointer)
166 (write_inferior_integer, write_inferior_int8)
167 (write_inferior_uinteger, m_tracepoint_action_download)
168 (r_tracepoint_action_download, x_tracepoint_action_download)
169 (l_tracepoint_action_download, clear_inferior_trace_buffer)
170 (download_agent_expr, download_tracepoint_1)
171 (download_trace_state_variables, upload_fast_traceframes): Update.
172 * server.c (gdb_write_memory): Update.
173 * remote-utils.c (relocate_instruction): Update.
174 * proc-service.c (ps_pdwrite): Update.
175 * mem-break.c (remove_memory_breakpoint)
176 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
177 (uninsert_fast_tracepoint_jumps_at)
178 (reinsert_fast_tracepoint_jumps_at): Update.
179 * linux-x86-low.c (append_insns)
180 (i386_install_fast_tracepoint_jump_pad)
181 (amd64_write_goto_address, i386_write_goto_address): Update.
182 * linux-s390-low.c (append_insns, s390_write_goto_address):
184 * linux-ppc-low.c (ppc_relocate_instruction)
185 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
186 (ppc_write_goto_address): Update.
187 * linux-aarch64-low.c (append_insns): Update.
188 * target.h (struct target_ops): Update.
189 (write_inferior_memory): Don't declare.
190 * target.c (target_write_memory): Rename from
191 write_inferior_memory. Remove old target_write_memory.
193 2019-08-15 Tom Tromey <tromey@adacore.com>
195 * target.c (write_inferior_memory): Use std::vector.
197 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
200 * configure.ac: Drop enable-libmcheck support.
201 * configure, config.in: Rebuild.
202 * acinclude.m4: Don't include it.
204 2019-07-19 Alan Hayward <alan.hayward@arm.com>
206 * configure.srv: Remove Arm xml files.
208 2019-07-19 Alan Hayward <alan.hayward@arm.com>
210 * configure.srv: Add new files. Remove xml generated files.
211 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
213 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
214 * linux-aarch32-tdesc.c: New file.
215 * linux-aarch32-tdesc.h: New file.
216 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
217 * linux-arm-low.c (init_registers_arm, tdesc_arm)
218 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
219 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
220 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
221 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
222 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
223 (arm_read_description): Call arm_linux_read_description.
224 (initialize_low_arch): Don't init registers.
225 * linux-arm-tdesc.c: New file.
226 * linux-arm-tdesc.h: New file.
228 2019-07-10 Alan Hayward <alan.hayward@arm.com>
230 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
231 Move counter inside for.
232 (arm_read_description): Check ptrace earlier.
233 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
235 2019-07-09 Tom Tromey <tom@tromey.com>
237 * configure: Rebuild.
238 * configure.ac: Change common to gdbsupport.
239 * acinclude.m4: Change common to gdbsupport.
240 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
241 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
242 common to gdbsupport.
243 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
244 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
245 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
246 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
247 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
248 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
249 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
250 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
251 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
252 common to gdbsupport.
254 2019-07-04 Alan Hayward <alan.hayward@arm.com>
256 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
258 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
260 2019-07-04 Alan Hayward <alan.hayward@arm.com>
262 * configure.srv: Remove legacy xml.
263 * linux-aarch64-low.c (initialize_low_arch): Remove
264 initialize_low_tdesc call.
265 * linux-aarch64-tdesc-selftest.c: Remove file.
266 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
267 * linux-x86-low.c (initialize_low_arch): Remove
268 initialize_low_tdesc call.
269 * linux-x86-tdesc-selftest.c: Remove file.
270 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
272 2019-06-20 Tom de Vries <tdevries@suse.de>
274 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
275 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
277 2019-06-19 Tom de Vries <tdevries@suse.de>
279 * debug.h (debug_write): Change return type to ssize_t.
280 * debug.c (debug_write): Same.
282 2019-06-14 Tom Tromey <tom@tromey.com>
284 * configure.ac: Use new path to gnulib.
285 * configure: Rebuild.
286 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
289 2019-06-11 Tom Tromey <tom@tromey.com>
291 * Makefile.in (SFILES): Add alloc.c.
293 (IPA_OBJS): Add alloc-ipa.o.
294 (alloc-ipa.o): New target.
295 (%.o: ../%.c): New pattern rule.
297 2019-06-10 Tom Tromey <tromey@adacore.com>
299 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
300 end warning with a newline.
301 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
303 * thread-db.c (attach_thread): Don't end warning with a newline.
304 (thread_db_notice_clone): Likewise.
305 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
307 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
308 end warning with a newline.
310 2019-06-04 Pedro Alves <palves@redhat.com>
312 * server.c (captured_main): Use make_unique_xstrdup.
314 2019-06-02 Tom Tromey <tom@tromey.com>
316 * gdbreplay.c (fromhex): Remove.
317 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
319 2019-05-29 Tom Tromey <tromey@adacore.com>
321 * configure: Rebuild.
323 2019-05-06 Kevin Buettner <kevinb@redhat.com>
325 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
326 sign extension code on 32-bit builds.
328 2019-05-03 Eli Zaretskii <eliz@gnu.org>
331 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
333 2019-04-19 Tom Tromey <tom@tromey.com>
335 * server.c (struct vstop_notif): Derive from notif_event.
337 (queue_stop_reply): Update.
338 (remove_all_on_match_ptid): Change type. Rewrite.
339 (discard_queued_stop_replies): Rewrite.
340 (in_queued_stop_replies_ptid): Change type.
341 (in_queued_stop_replies): Rewrite.
342 (notif_stop): Update.
343 (queue_stop_reply_callback): Update.
344 (captured_main): Don't call initialize_notif.
345 (push_stop_notification): Update.
346 * notif.c (notif_write_event, handle_notif_ack)
347 (notif_event_enque, notif_push): Update.
348 (notif_event_xfree, initialize_notif): Remove.
349 * notif.h (struct notif_event): Include <list>, not
351 (struct notif_server) <queue>: Now a std::list.
352 (notif_event_p): Remove typedef.
353 (initialize_notif): Don't declare.
354 (struct notif_event): Add virtual destructor.
356 2019-04-17 Alan Hayward <alan.hayward@arm.com>
358 * ax.c (ax_vdebug): Call debug_printf.
359 * debug.c (debug_write): New function.
360 * debug.h (debug_write): New declaration.
361 * linux-low.c (sigchld_handler): Call debug_write.
363 2019-04-17 Alan Hayward <alan.hayward@arm.com>
365 * debug.c (debug_set_output): New function.
366 (debug_vprintf): Send output to debug_file.
367 (debug_flush): Likewise.
368 * debug.h (debug_set_output): New declaration.
369 * server.c (handle_monitor_command): Add debug-file option.
370 (captured_main): Likewise.
372 2019-04-17 Alan Hayward <alan.hayward@arm.com>
374 * debug.c (remote_debug): Add definition.
375 * debug.h (remote_debug): Add declaration.
376 * hostio.c (remote_debug): Remove declaration.
377 * remote-utils.c (struct ui_file): Likewise.
378 (remote_debug): Likewise.
379 * remote-utils.h (remote_debug): Likewise,
380 * server.c (remote_debug): Remove definition.
382 2019-04-10 Kevin Buettner <kevinb@redhat.com>
384 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
385 when using a 64-bit gdbserver.
387 2019-04-09 Tom Tromey <tromey@adacore.com>
389 * linux-low.c (select_event_lwp): Use find_thread_in_random.
391 2019-04-08 Tom Tromey <tom@tromey.com>
393 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
395 (linux_resume_one_lwp): Likewise.
397 2019-04-08 Tom Tromey <tom@tromey.com>
399 * gdbreplay.c: Update.
400 * linux-low.c: Update.
403 2019-04-08 Tom Tromey <tom@tromey.com>
405 * server.c: Use C++ exception handling.
406 * linux-low.c: Use C++ exception handling.
407 * gdbreplay.c: Use C++ exception handling.
409 2019-04-08 Tom Tromey <tom@tromey.com>
411 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
412 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
413 (captured_main, main): Update.
414 * gdbreplay.c (main): Update.
416 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
418 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
419 value in argument pointer, return 1 if the entry is found and 0
420 otherwise. Move comment.
421 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
422 * linux-low.h (linux_get_auxv): Declare.
423 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
425 2019-04-05 Tom Tromey <tromey@adacore.com>
427 * server.c (gdbserver_usage): Use upper-case for metasyntactic
430 2019-03-28 Alan Hayward <alan.hayward@arm.com>
432 * linux-low.c (AT_HWCAP2): Add define if not already included.
434 2019-03-26 Alan Hayward <alan.hayward@arm.com>
436 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
437 (aarch64_arch_setup): Call linux_get_hwcap.
438 * linux-arm-low.c (arm_get_hwcap): Remove function.
439 (arm_read_description): Call linux_get_hwcap.
440 * linux-low.c (linux_get_auxv): New function.
441 (linux_get_hwcap): Likewise.
442 (linux_get_hwcap2): Likewise.
443 * linux-low.h (linux_get_hwcap): New declaration.
444 (linux_get_hwcap2): Likewise.
445 * linux-ppc-low.c (ppc_get_auxv): Remove function.
446 (ppc_arch_setup): Call linux_get_hwcap.
447 * linux-s390-low.c (s390_get_hwcap): Remove function.
448 (s390_arch_setup): Call linux_get_hwcap.
450 2019-03-22 Alan Hayward <alan.hayward@arm.com>
451 Jiong Wang <jiong.wang@arm.com>
453 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
454 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
456 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
458 2019-03-22 Alan Hayward <alan.hayward@arm.com>
459 Jiong Wang <jiong.wang@arm.com>
461 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
462 (aarch64_get_hwcap): New function.
463 (aarch64_arch_setup): Read APIA hwcap.
465 2019-03-22 Alan Hayward <alan.hayward@arm.com>
466 Jiong Wang <jiong.wang@arm.com>
468 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
469 (initialize_low_tracepoint): Likewise.
470 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
471 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
472 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
473 (aarch64_linux_read_description): Likewise.
474 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
476 2019-03-12 John Baldwin <jhb@FreeBSD.org>
478 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
479 i386_create_target_description for 'segments' parameter.
480 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
481 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
482 * win32-i386-low.c (i386_arch_setup): Likewise.
484 2019-03-12 Tom Tromey <tromey@adacore.com>
486 * linux-low.c (iterate_over_lwps): Update.
488 2019-03-06 Tom Tromey <tom@tromey.com>
490 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
491 (captured_main): Use SCOPE_EXIT.
493 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
495 * configure.srv: Use '$enable_unittest' instead of '$development'
496 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
499 2019-02-27 Tom Tromey <tromey@adacore.com>
501 * gdbreplay.c (logchar): Handle \r\n.
503 2019-02-07 Alan Hayward <alan.hayward@arm.com>
505 * linux-low.c (linux_attach): Add process before lwp.
506 * server.c (attach_inferior): Check if already attached.
508 2019-02-07 Tom Tromey <tom@tromey.com>
510 * x86-tdesc.h: Rename include guard.
511 * x86-low.h: Add include guard.
512 * wincecompat.h: Rename include guard.
513 * win32-low.h: Add include guard.
514 * utils.h: Rename include guard.
515 * tracepoint.h: Rename include guard.
516 * tdesc.h: Rename include guard.
517 * target.h: Rename include guard.
518 * server.h: Rename include guard.
519 * remote-utils.h: Rename include guard.
520 * regcache.h: Rename include guard.
521 * nto-low.h: Rename include guard.
522 * notif.h: Add include guard.
523 * mem-break.h: Rename include guard.
524 * lynx-low.h: Add include guard.
525 * linux-x86-tdesc.h: Add include guard.
526 * linux-s390-tdesc.h: Add include guard.
527 * linux-ppc-tdesc-init.h: Add include guard.
528 * linux-low.h: Add include guard.
529 * linux-aarch64-tdesc.h: Add include guard.
530 * linux-aarch32-low.h: Add include guard.
531 * inferiors.h: Rename include guard.
532 * i387-fp.h: Rename include guard.
533 * hostio.h: Rename include guard.
534 * gdbthread.h: Rename include guard.
535 * gdb_proc_service.h: Rename include guard.
536 * event-loop.h: Rename include guard.
537 * dll.h: Rename include guard.
538 * debug.h: Rename include guard.
539 * ax.h: Rename include guard.
541 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
544 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
545 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
547 2019-01-25 Tom Tromey <tom@tromey.com>
549 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
551 2019-01-25 Tom Tromey <tom@tromey.com>
553 * win32-low.c: Fix common/ includes.
554 * win32-i386-low.c: Fix common/ includes.
555 * tracepoint.c: Fix common/ includes.
556 * thread-db.c: Fix common/ includes.
557 * target.h: Fix common/ includes.
558 * symbol.c: Fix common/ includes.
559 * spu-low.c: Fix common/ includes.
560 * server.h: Fix common/ includes.
561 * server.c: Fix common/ includes.
562 * remote-utils.c: Fix common/ includes.
563 * regcache.h: Fix common/ includes.
564 * regcache.c: Fix common/ includes.
565 * nto-x86-low.c: Fix common/ includes.
566 * notif.h: Fix common/ includes.
567 * mem-break.h: Fix common/ includes.
568 * lynx-low.c: Fix common/ includes.
569 * lynx-i386-low.c: Fix common/ includes.
570 * linux-x86-tdesc-selftest.c: Fix common/ includes.
571 * linux-x86-low.c: Fix common/ includes.
572 * linux-low.c: Fix common/ includes.
573 * inferiors.h: Fix common/ includes.
574 * i387-fp.c: Fix common/ includes.
575 * hostio.c: Fix common/ includes.
576 * hostio-errno.c: Fix common/ includes.
577 * gdbthread.h: Fix common/ includes.
578 * gdbreplay.c: Fix common/ includes.
579 * fork-child.c: Fix common/ includes.
580 * event-loop.c: Fix common/ includes.
582 (enum gdb_agent_op): Fix common/ includes.
584 2019-01-21 Tom Tromey <tom@tromey.com>
586 * tracepoint.c: Fix includes.
587 * remote-utils.c: Fix includes.
588 * linux-x86-low.c: Fix includes.
590 2019-01-01 Joel Brobecker <brobecker@adacore.com>
592 * gdbreplay.c (gdbreplay_version): Update copyright year in
594 * server.c (gdbserver_version): Likewise.
596 2018-12-05 Alan Hayward <alan.hayward@arm.com>
598 * linux-low.c (add_lwp): Switch ordering.
600 2018-11-29 Tom Tromey <tom@tromey.com>
602 * win32-low.c (win32_join): Take pid, not process.
603 * target.h (struct target_ops) <join>: Change argument type.
604 (join_inferior): Change argument name.
605 * spu-low.c (spu_join): Take pid, not process.
606 * server.c (handle_detach): Preserve pid before destroying
608 * lynx-low.c (lynx_join): Take pid, not process.
609 * linux-low.c (linux_join): Take pid, not process.
611 2018-11-23 Alan Hayward <alan.hayward@arm.com>
613 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
614 (aarch64_cannot_fetch_register): Likewise.
615 (struct linux_target_ops): Update references.
617 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
619 * linux-ppc-low.c: Include nat/linux-ptrace.h.
621 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
623 * configure.srv (ipa_ppc_linux_regobj): Add
624 powerpc-isa207-htm-vsx32l-ipa.o and
625 powerpc-isa207-htm-vsx64l-ipa.o.
626 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
627 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
628 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
629 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
630 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
631 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
632 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
633 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
634 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
635 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
636 (init_registers_powerpc_isa207_htm_vsx32l)
637 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
638 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
639 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
640 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
641 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
642 (ppc_store_tm_ctarregset): New functions.
643 (ppc_regsets): Add entries for HTM regsets.
644 (ppc_arch_setup): Set htm in features struct when needed. Set
645 sizes for the HTM regsets.
646 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
647 (initialize_low_arch): Call
648 init_registers_powerpc_isa207_htm_vsx32l and
649 init_registers_powerpc_isa207_htm_vsx64l.
650 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
651 PPC_TDESC_ISA207_HTM_VSX.
652 (initialize_low_tracepoint): Call
653 init_registers_powerpc_isa207_htm_vsx32l and
654 init_registers_powerpc_isa207_htm_vsx64l.
656 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
658 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
659 rs6000/power-linux-pmu.xml to srv_xmlfiles.
660 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
661 (ppc_store_pmuregset): New functions.
662 (ppc_regsets): Add entries for ebb and pmu regsets.
663 (ppc_arch_setup): Set isa207 in features struct if the ebb and
664 pmu regsets are available. Set sizes for these regsets.
666 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
668 * configure.srv (ipa_ppc_linux_regobj): Add
669 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
670 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
671 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
672 rs6000/powerpc-isa207-vsx32l.xml, and
673 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
674 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
675 <PPC_TDESC_ISA207_VSX>: New enum value.
676 (init_registers_powerpc_isa207_vsx32l): Declare.
677 (init_registers_powerpc_isa207_vsx64l): Declare.
678 * linux-ppc-low.c (ppc_fill_tarregset): New function.
679 (ppc_store_tarregset): New function.
680 (ppc_regsets): Add entry for the TAR regset.
681 (ppc_arch_setup): Set isa207 in features struct when needed. Set
682 size for the TAR regsets.
683 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
684 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
685 and init_registers_powerpc_isa207_vsx64l.
686 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
687 (initialize_low_tracepoint): Call
688 init_registers_powerpc_isa207_vsx32l and
689 init_registers_powerpc_isa207_vsx64l.
691 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
692 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
694 * configure.srv (ipa_ppc_linux_regobj): Add
695 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
696 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
697 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
698 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
699 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
700 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
701 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
702 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
703 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
704 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
705 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
706 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
707 (ppc_hwcap): Add comment.
708 (ppc_hwcap2): New global.
709 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
710 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
711 (ppc_regsets): Add entries for the DSCR and PPR regsets.
712 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
713 when needed. Set sizes for the the DSCR and PPR regsets.
714 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
715 (initialize_low_arch): Call
716 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
717 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
718 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
719 PPC_TDESC_ISA205_PPR_DSCR_VSX.
720 (initialize_low_tracepoint): Call
721 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
722 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
724 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
726 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
728 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
729 Simon Marchi <simark@simark.ca>
731 * acinclude.m4: Include "../selftest.m4".
732 * configure: Regenerate.
733 * configure.ac: Use "GDB_AC_SELFTEST".
734 * configure.srv: Use "$enable_unittests" instead of
735 "$development" when checking whether unit tests have been
737 * server.c (captured_main): Update message informing that
738 selftests have been disabled.
740 2018-10-04 Tom Tromey <tom@tromey.com>
742 * configure: Rebuild.
744 2018-10-04 Tom Tromey <tom@tromey.com>
746 * server.c (handle_status): Rename inner "thread".
747 (process_serial_event): Declare "res" in 'm' case.
748 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
749 (iterate_over_lwps): Rename inner "thread".
750 (linux_qxfer_libraries_svr4): Rename inner "len".
751 * gdbthread.h (find_thread_in_random): Rename inner "thread".
753 2018-10-01 Gary Benson <gbenson@redhat.com>
755 * gdb_proc_service.h: Moved common code to
756 common/gdb_proc_service.h.
758 2018-10-01 Gary Benson <gbenson@redhat.com>
760 * gdb_proc_service.h: Synchronize comments and whitespace with
761 GDB's version of this file.
763 2018-09-25 Tom Tromey <tom@tromey.com>
765 * configure: Rebuild.
766 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
768 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
770 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
771 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
772 ($(IPA_LIB)): Sort IPA_OBJS.
774 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
776 * Makefile.in: Remove references to $(ADD_DEPS).
778 2018-09-16 Tom Tromey <tom@tromey.com>
780 * remote-utils.c (remote_open): Use GNU style for metasyntactic
782 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
785 2018-09-05 Tom Tromey <tom@tromey.com>
787 * configure: Rebuild.
789 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
792 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
794 2018-08-27 Tom Tromey <tom@tromey.com>
797 * configure: Rebuild.
799 2018-08-27 Tom Tromey <tom@tromey.com>
801 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
802 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
803 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
804 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
805 (s390x_emit_stack_adjust): Add casts to unsigned char.
807 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
811 * server.h (struct client_state) <disable_randomization>:
814 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
816 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
818 (mips_supply_ptrace_register): Likewise.
820 2018-07-22 Tom Tromey <tom@tromey.com>
822 * configure: Rebuild.
824 2018-07-22 Tom Tromey <tom@tromey.com>
826 * win32-low.c (win32_create_inferior): Remove unused variables.
827 * gdbreplay.c (remote_open): Remove unused variable.
828 * remote-utils.c (remote_prepare): Remove unused variable.
829 * x86-tdesc.h (X86_TDESC_H): Define.
830 (amd64_expedite_regs): Define conditionally.
831 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
832 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
833 * remote-utils.c (readchar): Remove unused variable.
835 2018-07-13 Pedro Alves <palves@redhat.com>
837 * linux-low.c (linux_kill): Change parameter to process_info
838 pointer instead of pid. Adjust.
839 * lynx-low.c (lynx_kill): Likewise.
840 * nto-low.c (nto_kill): Likewise.
841 * spu-low.c (spu_kill): Likewise.
842 * win32-low.c (win32_kill): Likewise.
843 * server.c (handle_v_kill, kill_inferior_callback)
844 (detach_or_kill_for_exit): Adjust.
845 * target.c (kill_inferior): Change parameter to process_info
846 pointer instead of pid. Adjust.
847 * target.h (struct target_ops) <kill>: Change parameter to
848 process_info pointer instead of pid. Adjust all implementations
850 (kill_inferior): Likewise.
852 2018-07-13 Pedro Alves <palves@redhat.com>
854 * linux-low.c (linux_detach, linux_join): Change parameter to
855 process_info pointer instead of pid. Adjust.
856 * lynx-low.c (lynx_detach, lynx_join): Likewise.
857 * nto-low.c (nto_detach): Likewise.
858 * spu-low.c (spu_detach, spu_join): Likewise.
859 * win32-low.c (win32_detach, win32_join): Likewise.
860 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
861 * target.h (struct target_ops) <detach, join>: Change parameter to
862 process_info pointer instead of pid. Adjust all implementations
864 (detach_inferior, join_inferior): Rename 'pid' parameter to
867 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
868 Jan Kratochvil <jan.kratochvil@redhat.com>
869 Paul Fertser <fercerpav@gmail.com>
870 Tsutomu Seki <sekiriki@gmail.com>
872 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
873 (OBS): Add 'common/netstuff.o'.
874 (GDBREPLAY_OBS): Likewise.
875 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
876 (remote_open): Implement support for IPv6
878 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
880 (handle_accept_event): Accept connections from IPv6 sources.
881 (remote_prepare): Handle IPv6-style hostnames; implement
882 support for IPv6 connections.
883 (remote_open): Implement support for printing connections from
886 2018-07-11 Pedro Alves <palves@redhat.com>
889 * mem-break.c (any_persistent_commands): Add process_info
890 parameter and use it instead of relying on the current process.
891 Change return type to bool.
892 * mem-break.h (any_persistent_commands): Add process_info
893 parameter and change return type to bool.
894 * server.c (handle_detach): Remove require_running_or_return call.
895 Look up the process_info for the process we're about to detach.
896 If not found, return back error to GDB. Adjust
897 any_persistent_commands call to pass down a process pointer.
899 2018-07-11 Pedro Alves <palves@redhat.com>
901 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
902 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
903 instead of collect_register_by_name.
904 * regcache.c (regcache_raw_get_unsigned_by_name): New.
905 * regcache.h (regcache_raw_get_unsigned_by_name): New.
907 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
908 Pedro Alves <palves@redhat.com>
910 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
912 2018-07-03 Tom Tromey <tom@tromey.com>
914 * linux-low.c: Update.
915 * lynx-low.c: Update.
916 * mem-break.c: Update.
918 * remote-utils.c: Update.
922 * win32-low.c: Update.
924 2018-07-03 Tom Tromey <tom@tromey.com>
928 2018-07-03 Tom Tromey <tom@tromey.com>
930 * linux-low.c: Update.
932 2018-07-03 Tom Tromey <tom@tromey.com>
936 2018-07-03 Tom Tromey <tom@tromey.com>
938 * linux-low.c: Update.
939 * linux-mips-low.c: Update.
940 * lynx-low.c: Update.
942 * remote-utils.c: Update.
946 * thread-db.c: Update.
948 2018-07-03 Tom Tromey <tom@tromey.com>
950 * linux-low.c: Update.
951 * linux-mips-low.c: Update.
952 * lynx-low.c: Update.
953 * mem-break.c: Update.
955 * remote-utils.c: Update.
959 * tracepoint.c: Update.
961 2018-07-03 Tom Tromey <tom@tromey.com>
963 * linux-low.c: Update.
964 * linux-ppc-low.c: Update.
965 * linux-x86-low.c: Update.
966 * proc-service.c: Update.
969 * thread-db.c: Update.
970 * win32-low.c: Update.
972 2018-07-03 Tom Tromey <tom@tromey.com>
974 * linux-low.c: Update.
975 * lynx-low.c: Update.
977 * remote-utils.c: Update.
979 * thread-db.c: Update.
980 * win32-low.c: Update.
982 2018-06-29 Joel Brobecker <brobecker@adacore.com>
984 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
985 parameter in call to 'amd64_create_target_description'.
987 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
989 * x86-tdesc.h: Remove executable permission flag.
991 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
993 * configure.ac: Remove AC_PREREQ, add missing quoting.
994 * configure: Re-generate.
995 * config.in: Re-generate.
996 * aclocal.m4: Re-generate.
998 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1000 * tracepoint.h (current_traceframe): Remove declaration.
1002 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1004 * linux-aarch64-low.c (is_sve_tdesc): New function.
1005 (aarch64_sve_regs_copy_to_regcache): Likewise.
1006 (aarch64_sve_regs_copy_from_regcache): Likewise.
1007 (aarch64_regs_info): Add SVE checks.
1008 (initialize_low_arch): Initialize SVE.
1010 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1012 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1014 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1016 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1017 (initialize_low_tracepoint): Likewise
1018 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1019 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1021 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1023 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1025 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1027 * server.h (PBUFSIZ): Increase size
1029 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1031 * regcache.c (regcache::raw_compare): New function.
1032 * regcache.h (regcache::raw_compare): New declaration.
1034 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1036 * regcache.c (new_register_cache): Use new.
1037 (free_register_cache): Use delete.
1038 (register_data): Use const.
1039 (supply_register): Move body inside regcache.
1040 (regcache::raw_supply): New override function.
1041 (collect_register): Move body inside regcache.
1042 (regcache::raw_collect): New override function.
1043 (regcache::get_register_status): New override function.
1044 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1046 2018-06-09 Tom Tromey <tom@tromey.com>
1048 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1050 (event_queue): Use std::queue.
1051 (gdb_event_xfree): Remove.
1052 (initialize_event_loop, process_event, wait_for_event): Update.
1054 2018-06-08 Stan Cox <scox@redhat.com>
1056 * win32-low.c (win32_create_inferior): last_ptid and last_status
1057 moved to client_state.
1059 2018-06-08 Pedro Alves <palves@redhat.com>
1061 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1062 common/common-exceptions.o, common/common-utils.o,
1063 common/errors.o, common/print-utils.o and utils.o.
1064 * gdbreplay.c: Include "common-defs.h" instead of the two
1065 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1066 string.h or alloca.h.
1067 (perror_with_name): Delete.
1068 (remote_open): Use xstrdup instead of strdup.
1069 (main): Rename to ...
1070 (captured_main): ... this.
1073 2018-06-08 Tom Tromey <tom@tromey.com>
1075 * linux-low.c (linux_low_read_btrace): Update.
1077 2018-06-04 Stan Cox <scox@redhat.com>
1079 * server.h (struct client_state): New.
1080 * server.c (cont_thread, general_thread, multi_process)
1081 (report_fork_events, report_vfork_events, report_exec_events)
1082 (report_thread_events, swbreak_feature, hwbreak_feature)
1083 (vCont_supported, disable_randomization, pass_signals)
1084 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1085 Moved to client_state.
1086 * remote-utils.c (remote_debug, noack_mode)
1087 (transport_is_reliable): Moved to client_state.
1088 * tracepoint.c (current_traceframe): Moved to client_state.
1091 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1092 linux-low.c, remote-utils.h, target.c: Use client_state.
1094 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1096 * configure.srv: Add new c/h file.
1098 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1100 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1103 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1105 * gdb.arch/mips-fpregset-core.exp: New test.
1106 * gdb.arch/mips-fpregset-core.c: New test source.
1108 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1111 * hostio.c (require_int): Do not report overflow for integers
1112 between 0xfffffff and 0x7fffffff.
1114 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1116 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1117 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1118 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1120 (the_low_target): Wire them.
1122 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1124 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1125 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1126 mode. Call collect_register_by_name with vscr using
1127 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1128 (ppc_store_vrregset): Add and set vscr_offset variable as in
1129 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1132 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1134 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1135 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1136 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1138 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1140 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1141 (ppc_store_vsxregset): Likewise.
1142 (ppc_fill_vrregset): Likewise.
1143 (ppc_store_vrregset): Likewise.
1144 (ppc_fill_evrregset): Likewise.
1145 (ppc_store_evrregset): Likewise.
1146 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1147 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1150 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1152 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1153 wordsize of the inferior. Call ppc_linux_target_wordsize.
1155 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1157 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1158 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1159 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1160 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1161 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1162 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1163 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1164 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1165 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1166 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1167 (tdesc_powerpc_e500l): Remove.
1168 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1169 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1170 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1171 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1173 (ppc_arch_setup): Remove target description matching code. Fill a
1174 ppc_linux_features struct and call ppc_linux_match_description
1177 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1179 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1180 width of the requested register exceeds the width of the
1182 (mips_cannot_store_register): Likewise.
1184 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1186 * linux-mips-low.c (mips_fetch_register): New function. Update
1188 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1189 (the_low_target): Wire `mips_fetch_register'.
1191 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1193 * lynx-i386-low.c (LYNXOS_178): New macro.
1194 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1195 the layout on LynxOS-178.
1196 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1197 handle floating point registers that are not supported by
1200 2018-05-10 Tom Tromey <tom@tromey.com>
1202 * configure: Rebuild.
1204 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1207 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1208 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1209 Use it to set the expedite_regs field in the given tdesc.
1210 * x86-tdesc.h: New file.
1211 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1212 Adjust following the addition of the new expedite_regs parameter
1213 to init_target_desc.
1214 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1215 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1216 (i386_linux_read_description, amd64_linux_read_description):
1217 Adjust following the addition of the new expedite_regs parameter
1218 to init_target_desc.
1219 * lynx-i386-low.c: #include "x86-tdesc.h".
1220 (lynx_i386_arch_setup): Adjust following the addition of the new
1221 expedite_regs parameter to init_target_desc.
1222 * nto-x86-low.c: #include "x86-tdesc.h".
1223 (nto_x86_arch_setup): Adjust following the addition of the new
1224 expedite_regs parameter to init_target_desc.
1225 * win32-i386-low.c: #include "x86-tdesc.h".
1226 (i386_arch_setup): Adjust following the addition of the new
1227 expedite_regs parameter to init_target_desc.
1229 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1232 * win32-low.c (win32_create_inferior): Add call to my_wait
1233 setting last_status global.
1235 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1238 * win32-low.c (create_process): Only call gdb_tilde_expand if
1239 inferior_cwd is not NULL.
1241 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1243 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1244 registers to the cache if their values have changed.
1245 (i387_xsave_to_cache): Provide default values for x87 control
1246 registers when these features are available, but disabled.
1247 * regcache.c (supply_register_by_name_zeroed): New function.
1248 * regcache.h (supply_register_by_name_zeroed): Declare new
1251 2018-05-07 Tom Tromey <tom@tromey.com>
1253 * configure: Rebuild.
1255 2018-05-04 Tom Tromey <tom@tromey.com>
1257 * configure: Rebuild.
1259 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1260 Pedro Alves <palves@redhat.com>
1262 * linux-aarch64-low.c (aarch64_stopped_data_address):
1265 2018-04-27 Tom Tromey <tom@tromey.com>
1267 * configure: Rebuild.
1269 2018-04-23 Tom Tromey <tom@tromey.com>
1271 * configure: Rebuild.
1273 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1275 * Makefile.in (depcomp): Add "..".
1276 (all_deps_files): New and use it.
1278 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1280 * configure.srv (aarch64*-*-linux*): Don't include xml.
1281 (i[34567]86-*-cygwin*): Likewise.
1282 (i[34567]86-*-linux*): Likewise.
1283 (i[34567]86-*-lynxos*): Likewise.
1284 (i[34567]86-*-mingw32ce*): Likewise.
1285 (i[34567]86-*-mingw*): Likewise.
1286 (i[34567]86-*-nto*): Likewise.
1287 (tic6x-*-uclinux): Likewise.
1288 (x86_64-*-linux*): Likewise.
1289 (x86_64-*-mingw*): Likewise.
1290 (x86_64-*-cygwin*): Likewise.
1292 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1294 * tdesc.c: Remove xml parameter.
1296 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1298 * server.c (get_features_xml): Remove cast.
1299 * tdesc.c (void target_desc::accept): Fill in function.
1300 (tdesc_get_features_xml): Remove old xml creation.
1301 (print_xml_feature::visit_pre): Add xml vistor.
1302 * tdesc.h (struct target_desc): Make xmltarget mutable.
1303 (tdesc_get_features_xml): Remove declaration.
1305 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1307 * tdesc.c (tdesc_architecture_name): Add new function.
1308 (tdesc_osabi_name): Likewise.
1309 (tdesc_get_features_xml): Use new functions.
1311 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1313 * tdesc.c (tdesc_create_flags): Remove.
1314 (tdesc_add_flag): Likewise.
1315 (tdesc_named_type): Likewise.
1316 (tdesc_create_union): Likewise.
1317 (tdesc_create_struct): Likewise.
1318 (tdesc_create_vector): Likewise.
1319 (tdesc_add_bitfield): Likewise.
1320 (tdesc_add_field): Likewise.
1321 (tdesc_set_struct_size): Likewise.
1323 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1325 * tdesc.c (~target_desc): Remove implictly deleted items.
1326 (init_target_desc): Iterate all features.
1327 (tdesc_get_features_xml): Use vector.
1328 (tdesc_create_feature): Create feature.
1329 * tdesc.h (tdesc_feature) Remove
1330 (target_desc): Add features.
1332 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1334 * Makefile.in: Add common/tdesc.c
1335 * tdesc.c (init_target_desc): init all reg_defs from register
1337 (tdesc_create_reg): Create tdesc_reg.
1338 * tdesc.h (tdesc_feature): Add register vector.
1340 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1342 * tdesc.h (struct target_desc) <features>: Change type to
1343 std::vector<std::string>.
1344 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1346 (tdesc_get_features_xml): Likewise.
1347 (tdesc_create_feature): Likewise.
1349 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1351 * regcache.c (find_register_by_number): Return a ref.
1352 (find_regno): Use references.
1353 (register_size): Likewise.
1354 (register_data): Likewise.
1355 * tdesc.c (target_desc::~target_desc): Remove free calls.
1356 (target_desc::operator==): Use std::vector compare.
1357 (init_target_desc): Use reference.
1358 (tdesc_create_reg): Use reg constructors.
1359 * tdesc.h (struct target_desc): Replace pointer with object.
1361 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1363 * regcache.c (find_register_by_number): Make static.
1364 (find_regno): Use find_register_by_number
1365 * regcache.h (struct reg): Remove declaration.
1367 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1369 * tdesc.c (target_desc::~target_desc): Move to here.
1370 (target_desc::operator==): Likewise.
1371 * tdesc.h (target_desc::~target_desc): Move from here.
1372 (target_desc::operator==): Likewise.
1374 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1376 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1378 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1380 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1382 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1383 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1384 and init_registers_s390_gs_linux64.
1386 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1388 * linux-s390-low.c (s390_fill_gs): Remove function.
1389 (s390_fill_gsbc): Remove function.
1390 (s390_regsets): Set fill functions for the guarded storage regsets
1393 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1395 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1396 the word size. Add comment.
1397 (s390_get_wordsize): New function.
1398 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1399 pswm with it. Instead, use s390_get_wordsize to determine the
1400 word size first and derive the correct tdesc from that directly.
1402 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1404 * Makefile.in: Include silent-rules.mk.
1405 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1406 (COMPILE): Add ECHO_CXX.
1407 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1408 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1409 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1410 (version-generated.c): Add ECHO_GEN.
1411 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1412 (IPAGENT_COMPILE): Add ECHO_CXX.
1413 (%-generated.c): Add ECHO_REGDAT.
1415 2018-03-14 Tom Tromey <tom@tromey.com>
1418 * ax.c (ax_printf): Special case for NULL.
1420 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1422 * linux-low.c (linux_qxfer_libraries_svr4): Use
1423 xml_escape_text_append.
1425 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1427 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1429 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1431 * server.c (handle_general_set): Remove unnecessary xstrdup.
1433 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1435 * server.c (parse_debug_format_options): Adjust to
1436 delim_string_to_char_ptr_vec changes.
1437 * thread-db.c (thread_db_load_search): Adjust to
1438 dirnames_to_char_ptr_vec changes.
1440 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1442 * target.h (target_enable_btrace, target_disable_btrace)
1443 (target_read_btrace, target_read_btrace_conf): Turn macro into
1444 inline function. Throw error if target method is not defined.
1445 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1446 check for btrace target method. Be prepared to handle exceptions
1447 from btrace target methods.
1449 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1451 * server.c (captured_main): Change order of error message printed
1452 when the current working directory cannot be found.
1454 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1456 * server.c: Include "filenames.h" and "pathstuff.h".
1457 (program_name): Delete variable.
1458 (program_path): New anonymous class.
1459 (get_exec_wrapper): Use "program_path" instead of
1461 (handle_v_run): Likewise.
1462 (captured_main): Likewise.
1463 (process_serial_event): Likewise.
1465 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1467 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1468 (OBJS): Add "pathstuff.o".
1469 * server.c (current_directory): New global variable.
1470 (captured_main): Initialize "current_directory".
1472 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1474 * tdesc.c: Use common/tdesc.h.
1475 * tdesc.h: Likewise.
1477 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1478 Simon Marchi <simon.marchi@ericsson.com>
1480 * Makefile.in: Switch order of make rules.
1482 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1484 * Makefile.in: Add common directory in build.
1485 * configure.ac: Add common reference.
1486 * configure: Regenerate.
1488 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1490 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1491 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1492 * spu-low.c (spu_target_ops): Likewise.
1493 * win32-low.c (win32_target_ops): Likewise.
1494 * server.c (supported_btrace_packets): Report packets unconditionally.
1495 * target.h (target_ops) <supports_btrace>: Remove.
1496 (target_supports_btrace): Remove.
1498 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1500 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1501 (handle_btrace_disable): Change return type to void. Use exceptions
1503 (handle_btrace_general_set): Catch exception and copy message to
1506 2018-02-08 Tom Tromey <tom@tromey.com>
1508 * linux-low.c (install_software_single_step_breakpoints): Use
1509 make_scoped_restore.
1510 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1511 (do_restore_current_thread_cleanup): Remove.
1512 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1515 2018-02-08 Tom Tromey <tom@tromey.com>
1517 * mem-break.c (set_raw_breakpoint_at): Use
1518 gdb::unique_xmalloc_ptr.
1520 2018-01-30 Pedro Alves <palves@redhat.com>
1523 * target.c (target_terminal::terminal_state): Rename to ...
1524 (target_terminal::m_terminal_state): ... this.
1526 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1528 * linux-low.c (handle_extended_wait): Surround call to
1529 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1531 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1533 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1534 linux_ptrace_attach_fail_reason_string now returning an
1536 (linux_attach): Likewise.
1537 * thread-db.c (attach_thread): Likewise.
1539 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1542 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1543 checking for fs_base/gs_base fields in struct user_regs_struct.
1544 * configure: Regenerate.
1546 2018-01-16 Yao Qi <yao.qi@linaro.org>
1549 * linux-low.c (fetch_register): Call supply_register instead of
1552 2018-01-08 Yao Qi <yao.qi@linaro.org>
1553 Simon Marchi <simon.marchi@ericsson.com>
1555 * Makefile.in (OBS): Remove selftest.o.
1556 * configure.ac: Set srv_selftest_objs if $development is true.
1557 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1558 * configure: Re-generated.
1559 * server.c (captured_main): Wrap variable selftest_filter with
1562 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1564 * server.c (parse_debug_format_options): Return std::string.
1565 (handle_monitor_command, captured_main): Adjust.
1567 2018-01-05 Pedro Alves <palves@redhat.com>
1570 * server.c (captured_main): Pass quiet=false to
1571 save_original_signals_state.
1573 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1575 * gdbreplay.c (gdbreplay_version): Update copyright year in
1577 * server.c (gdbserver_version): Likewise.
1579 2017-12-08 Tom Tromey <tom@tromey.com>
1581 * ax.c (ax_printf): Update.
1583 2017-12-07 Yao Qi <yao.qi@linaro.org>
1585 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1586 aarch64_linux_read_description.
1587 * linux-amd64-ipa.c (idx2mask): New array.
1588 (get_ipa_tdesc): Move idx2mask out.
1589 (initialize_low_tracepoint): Initialize target descriptions.
1590 * linux-i386-ipa.c (idx2mask): New array.
1591 (get_ipa_tdesc): Move idx2mask out.
1592 (initialize_low_tracepoint): Initialize target descriptions.
1594 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1596 * tdesc.c (struct tdesc_type): Change return type.
1597 (tdesc_add_flag): Change parameter type.
1598 (tdesc_add_bitfield): Likewise.
1599 (tdesc_add_field): Likewise.
1600 (tdesc_set_struct_size): Likewise.
1602 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1604 * regcache.c (registers_to_string): Remove unused variable.
1606 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1608 * inferiors.c (for_each_inferior_with_data): Remove.
1609 * inferiors.h (for_each_inferior_with_data): Remove.
1610 * server.c (handle_qxfer_threads_worker): Change parameter type.
1611 (handle_qxfer_threads_proper): Use for_each_thread.
1613 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1615 * inferiors.c (for_each_inferior): Remove.
1616 (clear_inferiors): Use for_each_thread.
1617 * inferiors.h (for_each_inferior): Remove.
1618 * linux-low.c (linux_wait_for_event_filtered): Use
1620 (linux_stabilize_threads): Likewise.
1621 * regcache.c (regcache_release): Likewise.
1622 * server.c (gdb_wants_all_threads_stopped): Likewise.
1623 (clear_pending_status_callback): Remove.
1624 (handle_status): Use for_each_thread.
1625 (captured_main): Likewise.
1626 * win32-low.c (child_init_thread_list): Likewise.
1627 (win32_clear_inferiors): Likewise.
1628 (fake_breakpoint_event): Likewise.
1630 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1632 * inferiors.h (find_inferior): Remove.
1633 * inferiors.c (find_inferior): Remove.
1635 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1637 * linux-low.c (resume_status_pending_p): Update comment.
1638 (need_step_over_p): Update comment.
1640 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1642 * linux-low.c (proceed_one_lwp): Return void, change parameter
1644 (unsuspend_and_proceed_one_lwp): Likewise.
1645 (proceed_all_lwps): Use for_each_thread.
1646 (unstop_all_lwps): Likewise.
1648 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1650 * linux-low.c (linux_resume_one_thread): Return void, take
1652 (linux_resume): Use for_each_thread.
1654 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1656 * linux-low.c (send_sigstop_callback): Return void, change
1657 parameter type. Rename to...
1658 (send_sigstop): ... this.
1659 (suspend_and_send_sigstop_callback): Return void, change parameter
1661 (suspend_and_send_sigstop): ... this.
1662 (stop_all_lwps): Use for_each_thread.
1664 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1666 * linux-low.c (lwp_running): Return bool, remove unused
1668 (linux_stabilize_threads): Use find_thread.
1670 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1672 * linux-low.c (select_singlestep_lwp_callback): Remove.
1673 (count_events_callback): Remove.
1674 (select_event_lwp_callback): Remove.
1675 (select_event_lwp): Use find_thread/for_each_thread.
1677 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1679 * linux-low.c (not_stopped_callback): Return bool, take filter
1681 (linux_wait_for_event_filtered): Use find_thread.
1682 (linux_wait_1): Likewise.
1684 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1686 * linux-low.c (same_lwp): Remove.
1687 (find_lwp_pid): Use find_thread.
1689 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1691 * linux-low.c (delete_lwp_callback): Remove.
1692 (linux_mourn): Use for_each_thread.
1694 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1696 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1697 args parameter, don't check for pid.
1698 (linux_detach): Use for_each_thread.
1700 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1702 * linux-low.c (struct counter): Remove.
1703 (second_thread_of_pid_p): Remove.
1704 (last_thread_of_process_p): Use find_thread.
1706 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1708 * inferiors.c (find_inferior_in_random): Remove.
1709 * inferiors.h (find_inferior_in_random): Remove.
1710 * linux-low.c (status_pending_p_callback): Return bool, accept
1711 parameter ptid directly.
1712 (linux_wait_for_event_filtered): Use find_thread_in_random.
1713 (linux_wait_1): Likewise.
1715 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1717 * inferiors.c (find_inferior_id): Remove.
1718 (find_thread_ptid): Move implemention from find_inferior_id to
1720 * inferiors.h (find_inferior_id): Remove.
1721 * server.c (handle_status): Use find_thread_ptid.
1722 (process_serial_event): Likewise.
1723 * thread-db.c (find_one_thread): Likewise.
1724 (thread_db_thread_handle): Likewise.
1725 * win32-low.c (thread_rec): Likewise.
1726 (child_delete_thread): Likewise.
1727 (win32_thread_alive): Likewise.
1728 (get_child_debug_event): Likewise.
1730 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1732 * linux-mips-low.c (update_watch_registers_callback): Return
1733 void, remove pid_p parameter, don't check for pid.
1734 (mips_insert_point, mips_remove_point): Use for_each_thread.
1736 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1738 * lynx.low (lynx_delete_thread_callback): Remove.
1739 (lynx_mourn): Use for_each_thread.
1741 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1743 * regcache.c (regcache_invalidate_one): Remove.
1744 (regcache_invalidate_pid): use for_each_thread.
1746 2017-11-26 Tom Tromey <tom@tromey.com>
1748 * linux-low.c (linux_create_inferior): Update.
1750 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1752 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1754 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1756 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1757 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1758 * linux-aarch64-tdesc-selftest.c: New file.
1759 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1761 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1763 * configure.srv: Add new file.
1764 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1765 * linux-aarch64-tdesc-selftest.c: New file.
1766 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1768 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1770 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1771 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1772 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1774 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1776 * configure.srv: Add new files.
1777 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1778 aarch64_linux_read_description.
1779 * linux-aarch64-low.c (aarch64_linux_read_description):
1780 Merge with aarch64_arch_setup.
1781 (aarch64_arch_setup): Call aarch64_linux_read_description.
1782 * linux-aarch64-tdesc.c: New file.
1783 * linux-aarch64-tdesc.h: New file.
1785 2017-11-24 Yao Qi <yao.qi@linaro.org>
1787 * configure.srv: Set $srv_regobj for tic6x-linux.
1788 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1789 (tic6x_read_description): Move some code to tic6x_arch_setup.
1790 (tic6x_tdesc_test): New function.
1791 (initialize_low_arch): Call selftests::register_test.
1793 2017-11-22 Yao Qi <yao.qi@linaro.org>
1795 * remote-utils.c (prepare_resume_reply): Use memcpy.
1797 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1799 * linux-low.c (kill_one_lwp_callback): Return void, take
1800 argument directly, don't filter on pid.
1801 (linux_kill): Use for_each_thread.
1803 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1805 * linux-low.c (need_step_over_p): Return bool, remove dummy
1807 (linux_resume, proceed_all_lwps): Use find_thread.
1809 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1811 * linux-low.c (resume_status_pending_p): Return bool, remove
1813 (linux_resume): Use find_thread.
1815 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1817 * linux-low.c (struct thread_resume_array): Remove.
1818 (linux_set_resume_request): Return void, take arguments
1820 (linux_resume): Use for_each_thread.
1822 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1824 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1825 return bool, remove data argument.
1826 (linux_stabilize_threads): Use find_thread.
1828 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1830 * linux-low.c (unsuspend_one_lwp): Remove.
1831 (unsuspend_all_lwps): Use for_each_thread, inline code from
1834 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1836 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1837 * linux-low.c (struct iterate_over_lwps_args): Remove.
1838 (iterate_over_lwps_filter): Remove.
1839 (iterate_over_lwps): Use find_thread.
1841 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1843 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1844 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1845 code from reset_lwp_ptrace_options_callback.
1847 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1849 * linux-arm-low.c (struct update_registers_data): Remove.
1850 (update_registers_callback): Return void, take arguments
1851 directly, don't check thread's pid.
1852 (arm_insert_point, arm_remove_point): Use for_each_thread.
1854 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1856 * win32-low.c (continue_one_thread): Return void, take argument
1858 (child_continue): Use for_each_thread.
1860 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1862 * win32-i386-low.c (update_debug_registers_callback): Rename
1864 (update_debug_registers): ... this, return void, remove pid_p arg.
1865 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1867 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1869 * inferiors.h (struct process_info): Add constructor, initialize
1871 <syscalls_to_catch>: Change type to std::vector<int>.
1872 * inferiors.c (add_process): Allocate process_info with new.
1873 (remove_process): Free process_info with delete.
1874 * linux-low.c (handle_extended_wait): Adjust.
1875 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1876 * server.c (handle_general_set): Adjust.
1878 2017-11-16 Pedro Alves <palves@redhat.com>
1880 * remote-utils.c (remote_close): Block SIGIO signals instead of
1881 uninstalling the SIGIO handler.
1883 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1885 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1887 2017-11-16 Yao Qi <yao.qi@linaro.org>
1889 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1890 (tic6x_store_gregset): Likewise.
1891 (tic6x_usrregs_info): Move it up.
1893 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1895 * Makefile.in: Update arch rules.
1896 * configure.srv: Explicitly mark arch/ files.
1898 2017-11-13 Andreas Schwab <schwab@suse.de>
1900 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1902 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1904 2017-11-06 Pedro Alves <palves@redhat.com>
1906 * config.in, configure: Regenerate.
1908 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1910 * target.c (struct thread_search): Remove.
1911 (thread_search_callback): Remove.
1912 (prepare_to_access_memory): Use for_each_thread instead of
1913 find_inferior. Inline code from thread_search_callback.
1915 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1917 * server.c (struct visit_actioned_threads_data): Remove.
1918 (visit_actioned_threads): Change prototype to take arguments
1920 (resume): Use find_thread instead of find_inferior.
1922 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1924 * server.c (queue_stop_reply_callback): Change prototype, return
1926 (find_status_pending_thread_callback): Remove.
1927 (handle_status): Replace find_inferior with find_thread and
1930 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1932 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1934 (aarch64_store_gregset): Likewise.
1935 (aarch64_fill_fpregset): Likewise.
1936 (aarch64_store_fpregset): Likewise.
1938 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1940 * gdbthread.h (find_thread, for_each_thread): New functions.
1941 * inferiors.c (thread_of_pid): Remove.
1942 (find_any_thread_of_pid): Use find_thread.
1943 * linux-low.c (num_lwps): Use for_each_thread.
1945 2017-10-17 Yao Qi <yao.qi@linaro.org>
1947 * Makefile.in: Remove one rule.
1948 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1950 2017-10-17 Yao Qi <yao.qi@linaro.org>
1952 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1953 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1955 2017-10-17 Yao Qi <yao.qi@linaro.org>
1957 * configure.srv: Rename arm.o with arch/arm.o.
1959 2017-10-17 Yao Qi <yao.qi@linaro.org>
1961 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1962 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1963 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1964 (arch-i386.o, arch-amd64.o): Remove rules.
1965 (arch/%.o): New rule.
1966 Update POSTCOMPILE and COMPILE.pre.
1967 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1968 * configure: Re-generated.
1969 * configure.srv: Replace arch-i386.o with arch/i386.o.
1970 Replace arch-amd64.o with arch/amd64.o.
1972 2017-10-16 Yao Qi <yao.qi@linaro.org>
1974 * configure: Regenerated.
1976 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1978 * inferiors.h: (struct inferior_list): Remove.
1979 (struct inferior_list_entry); Remove.
1980 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1981 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1982 get_first_inferior): Remove.
1983 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1984 find_inferior_id, find_inferior_in_random): Change signature.
1985 * inferiors.c (all_threads): Change type to
1986 std::list<thread_info *>.
1987 (get_thread): Remove macro.
1988 (find_inferior, find_inferior_id): Change signature, implement
1990 (find_inferior_in_random): Change signature, implement using
1991 find_thread_in_random.
1992 (for_each_inferior, for_each_inferior_with_data): Change
1993 signature, implement using for_each_thread.
1994 (add_inferior_to_list, remove_inferior): Remove.
1995 (add_thread, get_first_thread, thread_of_pid,
1996 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1997 (get_first_inferior, one_inferior_p, clear_inferior_list):
1999 (clear_inferiors, get_thread_process): Update.
2000 * gdbthread.h: Include <list>.
2001 (struct thread_info) <entry>: Remove field.
2003 (all_threads): Change type to std::list<thread_info *>.
2004 (get_first_inferior): Add doc.
2005 (find_thread, for_each_thread, find_thread_in_random): New
2007 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2008 * linux-arm-low.c (update_registers_callback): Update.
2009 * linux-low.c (second_thread_of_pid_p): Update.
2010 (kill_one_lwp_callback, linux_detach_lwp_callback,
2011 delete_lwp_callback, status_pending_p_callback, same_lwp,
2012 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2013 iterate_over_lwps, not_stopped_callback,
2014 resume_stopped_resumed_lwps, count_events_callback,
2015 select_singlestep_lwp_callback, select_event_lwp_callback,
2016 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2017 suspend_and_send_sigstop_callback, wait_for_sigstop,
2018 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2019 lwp_running, linux_set_resume_request, resume_status_pending_p,
2020 need_step_over_p, start_step_over, linux_resume_one_thread,
2021 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2022 reset_lwp_ptrace_options_callback): Update.
2023 * linux-mips-low.c (update_watch_registers_callback): Update.
2024 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2026 (free_register_cache_thread_one): Remove.
2027 (regcache_release): Update.
2028 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2029 handle_qxfer_threads_worker): Update.
2030 (handle_query): Update, use list iterator.
2031 (visit_actioned_threads, handle_pending_status,
2032 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2033 clear_pending_status_callback, set_pending_status_callback,
2034 find_status_pending_thread_callback, handle_status,
2035 process_serial_event): Update.
2036 * target.c (thread_search_callback): Update.
2037 * thread-db.c (thread_db_get_tls_address): Update.
2038 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2040 * win32-i386-low.c (update_debug_registers_callback): Update.
2041 * win32-low.c (delete_thread_info, child_delete_thread,
2042 continue_one_thread, suspend_one_thread,
2043 get_child_debug_event): Adjust.
2045 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2047 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2048 * inferiors.h: Include <list>.
2049 (struct process_info) <entry>: Remove field.
2051 (pid_of): Change macro to function.
2052 (ptid_of, lwpid_of): Remove macro.
2053 (all_processes): Change type to std::list<process_info *>.
2054 (ALL_PROCESSES): Remove macro.
2055 (for_each_process, find_process): New function.
2056 * inferiors.c (all_processes): Change type to
2057 std::list<process_info *>.
2058 (find_thread_process): Adjust.
2059 (add_process): Likewise.
2060 (remove_process): Likewise.
2061 (find_process_pid): Likewise.
2062 (get_first_process): Likewise.
2063 (started_inferior_callback): Remove.
2064 (have_started_inferiors_p): Adjust.
2065 (attached_inferior_callback): Remove.
2066 (have_attached_inferiors_p): Adjust.
2067 * linux-low.c (check_zombie_leaders): Likewise.
2068 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2069 (x86_linux_update_xmltarget): Adjust.
2070 * server.c (handle_query): Likewise.
2071 (gdb_reattached_process): Remove.
2072 (handle_status): Adjust.
2073 (kill_inferior_callback): Likewise.
2074 (detach_or_kill_inferior): Remove.
2075 (print_started_pid): Likewise.
2076 (print_attached_pid): Likewise.
2077 (detach_or_kill_for_exit): Update.
2078 (process_serial_event): Likewise.
2079 * linux-arm-low.c (arm_new_fork): Likewise.
2081 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2083 * dll.h: Include <list>.
2084 (struct dll_info): Add constructor.
2085 <entry>: Remove field.
2086 (all_dlls): Change type to std::list<dll_info>.
2087 * dll.c: Include <algorithm>.
2088 (get_dll): Remove macro.
2089 (all_dlls): Change type to std::list<dll_info *>.
2090 (free_one_dll): Remove.
2091 (match_dll): Likewise.
2092 (loaded_dll): Adjust.
2093 (unloaded_dll): Adjust to all_dlls type change, use
2094 std::find_if. Inline code from match_dll.
2095 (clear_dlls): Adjust to all_dlls type change.
2096 * server.c (emit_dll_description): Remove.
2097 (handle_qxfer_libraries): Adjust to all_dlls type change,
2098 integrate emit_dll_description's functionality.
2100 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2102 * linux-low.h (struct linux_target_ops) <delete_process>: New
2104 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2105 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2106 (struct linux_target_ops): Add delete_process callback.
2107 * linux-arm-low.c (arm_delete_process): New.
2108 (struct linux_target_ops): Add delete_process callback.
2109 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2110 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2111 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2112 * linux-mips-low.c (mips_linux_delete_process): New.
2113 (struct linux_target_ops): Add delete_process callback.
2114 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2115 * linux-s390-low.c (struct linux_target_ops): Likewise.
2116 * linux-sh-low.c (struct linux_target_ops): Likewise.
2117 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2118 * linux-tile-low.c (struct linux_target_ops): Likewise.
2119 * linux-x86-low.c (x86_linux_delete_process): New.
2120 (struct linux_target_ops): Add delete_process callback.
2121 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2123 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2125 * linux-aarch64-low.c (the_low_target): Add thread delete
2127 * linux-arm-low.c (arm_delete_thread): New function.
2128 (the_low_target): Add thread delete callback.
2129 * linux-bfin-low.c (the_low_target): Likewise.
2130 * linux-crisv32-low.c (the_low_target): Likewise.
2131 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2133 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2135 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2136 * linux-mips-low.c (mips_linux_delete_thread): New function.
2137 (the_low_target): Add thread delete callback.
2138 * linux-ppc-low.c (the_low_target): Likewise.
2139 * linux-s390-low.c (the_low_target): Likewise.
2140 * linux-sh-low.c (the_low_target): Likewise.
2141 * linux-tic6x-low.c (the_low_target): Likewise.
2142 * linux-tile-low.c (the_low_target): Likewise.
2143 * linux-x86-low.c (the_low_target): Likewise.
2144 * linux-xtensa-low.c (the_low_target): Likewise.
2146 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2148 * win32-low.c: Include "common-inferior.h".
2150 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2152 * inferiors.c (set_inferior_cwd): New function.
2153 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2154 (handle_query): Inform that QSetWorkingDir is supported.
2155 * win32-low.c (create_process): Pass the inferior's cwd to
2158 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2160 * inferiors.c (current_inferior_cwd): New global variable.
2161 (get_inferior_cwd): New function.
2162 * inferiors.h (struct process_info) <cwd>: New field.
2164 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2166 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2167 (OBS): Add gdb_tilde_expand.o.
2169 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2171 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2172 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2174 2017-09-29 Pedro Alves <palves@redhat.com>
2176 * ax.c (gdb_parse_agent_expr): Constify.
2177 * ax.h (gdb_parse_agent_expr): Constify.
2178 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2180 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2181 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2182 * remote-utils.h (read_ptid): Constify.
2183 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2184 (process_point_options, process_serial_event): Constify.
2185 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2186 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2187 (cmd_qtbuffer): Constify.
2189 2017-09-29 Pedro Alves <palves@redhat.com>
2191 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2194 2017-09-29 Pedro Alves <palves@redhat.com>
2196 * linux-low.c (handle_extended_wait): Pass parent thread instead
2197 of process to thread_db_notice_clone.
2198 * linux-low.h (thread_db_notice_clone): Replace parent process
2199 parameter with parent thread parameter.
2200 * thread-db.c (find_one_thread): Add comment.
2201 (thread_db_notice_clone): Replace parent process parameter with
2202 parent thread parameter. Temporarily switch to the parent thread.
2204 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2206 * gdbthread.h: Include "common-gdbthread.h".
2207 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2208 "if" when validating the ptid.
2209 * remote-utils.c: Include "gdbthread.h".
2210 (prepare_resume_reply): Use "switch_to_thread".
2211 * target.c (done_accessing_memory): Likewise.
2213 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2215 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2216 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2217 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2218 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2219 s390x-gs-linux64-ipa.o to ipa_obj.
2220 * linux-s390-low.c (HWCAP_S390_GS): New define.
2221 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2223 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2224 (s390_arch_setup): Check for guarded-storage support and choose
2226 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2227 init_registers_s390x_gs_linux64.
2228 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2230 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2231 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2233 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2235 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2237 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2239 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2240 (thread_db_thread_handle): Declare.
2241 * linux-low.c (linux_target_ops): Initialize thread_handle.
2242 * server.c (handle_qxfer_threads_worker): Add support for
2244 * target.h (struct target_ops): Add new function pointer,
2246 (target_thread_handle): Define.
2247 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2249 (thread_db_thread_handle): New function.
2251 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2253 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2254 * linux-low.h (thread_db_notice_clone): Declare.
2255 * thread-db.c (thread_db_notice_clone): New function.
2257 2017-09-21 Pedro Alves <palves@redhat.com>
2259 * server.c (gdb_read_memory, handle_status, process_serial_event)
2260 (handle_serial_event, handle_target_event): Adjust to
2261 set_desired_thread prototype change.
2262 * target.c (set_desired_thread): Remove 'use_general' parameter
2264 * target.h (set_desired_thread): Remove 'use_general' parameter.
2266 2017-09-20 Tom Tromey <tom@tromey.com>
2268 * target.c (target_terminal::terminal_state): Define.
2269 (target_terminal::init): Rename from target_terminal_init.
2270 (target_terminal::inferior): Rename from
2271 target_terminal_inferior.
2272 (target_terminal::ours): Rename from target_terminal_ours.
2273 (target_terminal::ours_for_output, target_terminal::info): New.
2275 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2277 * server.c (accumulate_file_name_length): Remove.
2278 (emit_dll_description): Adjust to std::string change.
2279 (handle_qxfer_libraries): Use std::string to hold document.
2281 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2283 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2284 return type of xml_escape_text.
2285 * server.c (emit_dll_description): Likewise.
2287 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2289 * server.c (captured_main): Accept argument for --selftest.
2290 Update run_tests call.
2291 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2292 when registering selftests.
2294 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2296 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2297 instead of "VEC" for "target_desc.reg_defs".
2298 (regcache_cpy): Likewise.
2299 (registers_to_string): Likewise.
2300 (registers_from_string): Likewise.
2301 (find_regno): Likewise.
2302 (supply_regblock): Likewise.
2303 (regcache_raw_read_unsigned): Likewise.
2304 * tdesc.c (init_target_desc): Likewise.
2305 (tdesc_create_reg): Likewise.
2306 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2307 (struct target_desc) <reg_defs>: Convert to "std::vector".
2308 (target_desc): Do not initialize "reg_defs".
2309 (~target_desc): Update code to use "std::vector" instead of "VEC"
2310 for "target_desc.reg_defs".
2311 (operator==): Likewise.
2313 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2315 * inferiors.h (thread_to_gdb_id): Remove.
2316 * inferiors.c (thread_to_gdb_id): Remove.
2317 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2318 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2319 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2321 * nto-low.c (nto_fetch_registers, nto_store_registers,
2322 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2324 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2326 * inferiors.h (gdb_id_to_thread_id): Remove.
2327 * inferiors.c (gdb_id_to_thread_id): Remove.
2328 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2329 removal. Move pid declaration closer to where it's used.
2331 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2333 * server.c (handle_detach): New function.
2334 (process_serial_event): Move code out, call handle_detach.
2336 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2338 * server.c (require_running): Rename to ...
2339 (require_running_or_return): ... this ...
2340 (require_running_or_break): ... and this.
2341 (handle_query, process_serial_event): Adjust.
2343 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2345 * linux-low.c (linux_set_resume_request): Remove unused
2348 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2350 * server.c (first_thread_of): Remove.
2351 (process_serial_event): Replace usage of first_thread_of with
2352 find_any_thread_of_pid.
2353 * tracepoint.c (same_process_p): Remove.
2354 (gdb_agent_about_to_close): Replace usage of same_process_p with
2355 find_any_thread_of_pid.
2356 * linux-x86-low.c (same_process_callback): Remove.
2357 (x86_arch_setup_process_callback): Replace usage of
2358 same_process_callback with find_any_thread_of_pid.
2359 * thread-db.c (any_thread_of): Remove.
2360 (switch_to_process): Replace usage of any_thread_of with
2361 find_any_thread_of_pid.
2362 * inferiors.c (thread_pid_matches_callback): Remove.
2363 (find_thread_process): Adjust to use find_any_thread_of_pid.
2365 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2367 * regcache.c (get_thread_regcache): Guard calls to "memset"
2370 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2372 * linux-low.c (handle_extended_wait): Use
2373 "allocate_target_description" instead of "XNEW".
2374 * linux-x86-low.c (initialize_low_arch): Likewise.
2376 2017-09-05 Yao Qi <yao.qi@linaro.org>
2378 * configure.srv (srv_i386_regobj): Remove.
2379 (srv_amd64_regobj): Remove.
2380 (srv_regobj): Set it to "" for x86 non-linux targets.
2381 * linux-x86-tdesc.c (i386_linux_read_description):
2382 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2383 (init_registers_i386): Remove the declaration.
2384 (tdesc_i386): Remove the declaration.
2385 (lynx_i386_arch_setup): Call i386_create_target_description.
2386 * nto-x86-low.c: Likewise.
2387 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2388 [!__x86_64__]: include arch/i386.h.
2389 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2391 2017-09-05 Yao Qi <yao.qi@linaro.org>
2393 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2394 i386/amd64-XXX-linux from it.
2396 2017-09-05 Yao Qi <yao.qi@linaro.org>
2398 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2400 (ipa_amd64_linux_regobj): Remove.
2401 (ipa_x32_linux_regobj): Remove.
2403 2017-09-05 Yao Qi <yao.qi@linaro.org>
2405 * Makefile.in (arch-amd64.o): New rule.
2406 * configure.srv: Append arch-amd64.o.
2407 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2408 (get_ipa_tdesc): Call amd64_linux_read_description.
2409 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2410 and init_registers_amd64_XXX.
2411 * linux-x86-low.c (x86_linux_read_description): Call
2412 amd64_linux_read_description.
2413 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2414 (initialize_low_arch): Don't call init_registers_x32_XXX and
2415 init_registers_amd64_XXX.
2416 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2417 and tdesc_amd64_XXX.
2418 [__x86_64__] (amd64_tdesc_test): New function.
2419 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2420 and init_registers_amd64_XXX.
2421 * linux-x86-tdesc.c: Include arch/amd64.h.
2422 (xcr0_to_tdesc_idx): New function.
2423 (i386_linux_read_description): New function.
2424 (amd64_get_ipa_tdesc_idx): New function.
2425 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2426 (amd64_get_ipa_tdesc): Declare.
2428 2017-09-05 Yao Qi <yao.qi@linaro.org>
2430 * configure.srv (srv_i386_linux_xmlfiles): Remove
2431 i386/i386-XXX-linux.xml from it.
2433 2017-09-05 Yao Qi <yao.qi@linaro.org>
2435 * configure.srv: Set srv_i386_linux_regobj empty if $development
2437 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2438 initialize_low_tdesc.
2439 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2440 with #if initialize_low_tdesc.
2441 * linux-x86-tdesc-selftest.c: New file.
2442 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2444 2017-09-05 Yao Qi <yao.qi@linaro.org>
2446 * Makefile.in (arch-i386.o): New rule.
2447 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2448 (x86_64-*-linux*): Likewise.
2449 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2450 include arch/i386.h.
2451 (i386_linux_read_description): Remove code and call
2452 i386_create_target_description.
2453 * tdesc.c (allocate_target_description): New function.
2454 * tdesc.h (set_tdesc_architecture): Remove declaration.
2455 (set_tdesc_osabi): Likewise.
2457 2017-09-05 Yao Qi <yao.qi@linaro.org>
2459 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2460 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2461 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2463 * server.c (get_features_xml): Call tdesc_get_features_xml.
2464 * tdesc.c (set_tdesc_architecture): New function.
2465 (set_tdesc_osabi): New function.
2466 (tdesc_get_features_xml): New function.
2467 (tdesc_create_feature): Add an argument.
2468 * tdesc.h (struct target_desc) <features>: New field.
2469 <arch, osabi>: New field.
2470 (~target_desc): xfree features, arch, and osabi.
2471 (target_desc::oerator==): Don't compare .xmltarget.
2472 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2473 (set_tdesc_osabi): Likewise.
2474 (tdesc_get_features_xml): Likewise.
2476 2017-09-05 Yao Qi <yao.qi@linaro.org>
2478 * linux-x86-tdesc.c: Include selftest.h.
2479 (i386_tdesc_test): New function.
2480 (initialize_low_tdesc): Call selftests::register_test.
2481 * tdesc.h: Include regdef.h.
2482 (target_desc): Override operator == and !=.
2484 2017-09-05 Yao Qi <yao.qi@linaro.org>
2486 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2487 (ipa_obj): Likewise.
2488 * linux-i386-ipa.c: Include common/x86-xstate.h
2489 (get_ipa_tdesc): Call i386_linux_read_description.
2490 (initialize_low_tracepoint): Don't call init_registers_XXX
2491 functions, call initialize_low_tdesc instead.
2492 * linux-x86-low.c (x86_linux_read_description): Call
2493 i386_linux_read_description.
2494 (initialize_low_arch): Don't call init_registers_i386_XXX
2495 functions, call initialize_low_tdesc.
2496 * linux-x86-tdesc.c: New file.
2497 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2498 (i386_get_ipa_tdesc_idx): Declare.
2499 (i386_get_ipa_tdesc): Declare.
2500 (initialize_low_tdesc): Declare.
2502 2017-09-05 Yao Qi <yao.qi@linaro.org>
2504 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2507 2017-09-05 Yao Qi <yao.qi@linaro.org>
2509 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2510 * regcache.c (get_thread_regcache): Use VEC_length.
2511 (init_register_cache): Likewise.
2512 (regcache_cpy): Likewise.
2513 (registers_to_string): Iterate reg_defs via VEC_iterate.
2514 (find_regno): Likewise.
2515 (find_register_by_number): Use VEC_index.
2516 (register_size): Call find_register_by_number.
2517 (register_data): Call find_register_by_number.
2518 (supply_regblock): Use VEC_length.
2519 (regcache_raw_read_unsigned): Likewise.
2520 * tdesc.c (init_target_desc): Iterate reg_defs via
2522 (default_description): Update initializer.
2523 (copy_target_description): Don't update field num_registers.
2524 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2525 <num_registers>: Remove.
2527 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2529 * Makefile.in (.SECONDARY): Define target.
2531 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2533 * linux-low.c (linux_wait_1): Adjust.
2534 * server.c (queue_stop_reply_callback): Adjust.
2536 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2538 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2539 QEnvironmentUnset and QEnvironmentReset packets.
2540 (handle_query): Inform remote that QEnvironmentHexEncoded,
2541 QEnvironmentUnset and QEnvironmentReset are supported.
2543 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2545 * inferiors.h (inferior_target_data): Rename to ...
2546 (thread_target_data): ... this.
2547 (inferior_regcache_data): Rename to ...
2548 (thread_regcache_data): ... this.
2549 (set_inferior_regcache_data): Rename to ...
2550 (set_thread_regcache_data): ... this.
2551 * inferiors.c (inferior_target_data): Rename to ...
2552 (thread_target_data): ... this.
2553 (inferior_regcache_data): Rename to ...
2554 (thread_regcache_data): ... this.
2555 (set_inferior_regcache_data): Rename to ...
2556 (set_thread_regcache_data): ... this.
2557 (free_one_thread): Update.
2558 * linux-low.h (get_thread_lwp): Update.
2559 * regcache.c (get_thread_regcache): Update.
2560 (regcache_invalidate_thread): Update.
2561 (free_register_cache_thread): Update.
2562 * win32-i386-low.c (update_debug_registers_callback): Update.
2563 (win32_get_current_dr): Update.
2564 * win32-low.c (thread_rec): Update.
2565 (delete_thread_info): Update.
2566 (continue_one_thread): Update.
2567 (suspend_one_thread): Update.
2569 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2571 * inferiors.c (set_inferior_target_data): Remove.
2572 * inferiors.h (set_inferior_target_data): Remove.
2574 2017-08-18 Yao Qi <yao.qi@linaro.org>
2576 * Makefile.in (OBS): Add selftest.o.
2577 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2578 * configure, config.in: Re-generated.
2579 * server.c: Include common/sefltest.h.
2580 (captured_main): Handle option --selftest.
2582 2017-08-09 Yao Qi <yao.qi@linaro.org>
2584 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2585 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2586 i386-avx-mpx.o and i386-mmx.o.
2587 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2588 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2589 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2590 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2591 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2592 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2593 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2594 i386/amd64-avx-mpx.xml.
2596 2017-08-09 Yao Qi <yao.qi@linaro.org>
2598 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2599 and x32-avx-avx512.o.
2600 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2601 i386/x32-avx-avx512.xml.
2603 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2605 * tracepoint.h (enum class fast_tpoint_collect_result): New
2607 (fast_tracepoint_collecting): Change return type to
2608 fast_tpoint_collect_result.
2609 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2610 * linux-low.h: Include tracepoint.h.
2611 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2612 fast_tpoint_collect_result.
2613 * linux-low.c (handle_tracepoints): Adjust.
2614 (linux_fast_tracepoint_collecting): Change return type to
2615 fast_tpoint_collect_result.
2616 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2617 linux_wait_1, stuck_in_jump_pad_callback,
2618 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2619 proceed_one_lwp): Adjust to type change.
2621 2017-07-10 Yao Qi <yao.qi@linaro.org>
2623 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2625 2017-06-29 Yao Qi <yao.qi@linaro.org>
2627 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2629 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2631 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2633 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2635 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2637 * linux-low.c (linux_create_inferior): Adjust code to access the
2638 environment information via 'gdb_environ' class.
2639 * lynx-low.c (lynx_create_inferior): Likewise.
2640 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2641 (get_environ): Return a pointer to 'our_environ'.
2642 (captured_main): Initialize 'our_environ'.
2643 * server.h (get_environ): Adjust prototype.
2644 * spu-low.c (spu_create_inferior): Adjust code to access the
2645 environment information via 'gdb_environ' class.
2647 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2649 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2650 usage of "register" keyword.
2652 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2654 * configure: Re-generate.
2656 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2658 * configure: Re-generate.
2660 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2662 * Makefile.in (COMPILE.pre): Add "-x c++".
2664 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2666 * fork-child.c: Conditionally include <signal.h>.
2668 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2670 * server.c (handle_general_set): Handle new packet
2671 "QStartupWithShell".
2672 (handle_query): Add "QStartupWithShell" to the list of supported
2674 (gdbserver_usage): Add help text explaining the
2675 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2677 (captured_main): Recognize and act upon the presence of the new
2680 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2681 Pedro Alves <palves@redhat.com>
2683 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2684 * configure: Regenerate.
2685 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2687 (i[34567]86-*-lynxos*): Likewise.
2688 (spu*-*-*): Likewise.
2689 * fork-child.c: New file.
2690 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2692 (linux_ptrace_fun): New function.
2693 (linux_create_inferior): Adjust function prototype to reflect
2694 change on "target.h". Adjust function code to use
2696 (linux_request_interrupt): Delete "signal_pid".
2697 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2698 (lynx_ptrace_fun): New function.
2699 (lynx_create_inferior): Adjust function prototype to reflect
2700 change on "target.h". Adjust function code to use
2702 * nto-low.c (nto_create_inferior): Adjust function prototype and
2703 code to reflect change on "target.h". Update comments.
2704 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2705 "common-terminal.h" and "environ.h".
2706 (terminal_fd): Moved to fork-child.c.
2707 (old_foreground_pgrp): Likewise.
2708 (restore_old_foreground_pgrp): Likewise.
2709 (last_status): Make it global.
2710 (last_ptid): Likewise.
2711 (our_environ): New variable.
2712 (startup_with_shell): Likewise.
2713 (program_name): Likewise.
2714 (program_argv): Rename to...
2715 (program_args): ...this.
2716 (wrapper_argv): New variable.
2717 (start_inferior): Delete function.
2718 (get_exec_wrapper): New function.
2719 (get_exec_file): Likewise.
2720 (get_environ): Likewise.
2721 (prefork_hook): Likewise.
2722 (post_fork_inferior): Likewise.
2723 (postfork_hook): Likewise.
2724 (postfork_child_hook): Likewise.
2725 (handle_v_run): Update code to deal with arguments coming from the
2726 remote host. Update calls from "start_inferior" to
2728 (captured_main): Likewise. Initialize environment variable. Call
2730 * server.h (post_fork_inferior): New prototype.
2731 (get_environ): Likewise.
2732 (last_status): Declare.
2733 (last_ptid): Likewise.
2734 (signal_pid): Likewise.
2735 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2736 (spu_ptrace_fun): New function.
2737 (spu_create_inferior): Adjust function prototype to reflect change
2738 on "target.h". Adjust function code to use "fork_inferior".
2739 * target.c (target_terminal_init): New function.
2740 (target_terminal_inferior): Likewise.
2741 (target_terminal_ours): Likewise.
2742 * target.h: Include <vector>.
2743 (struct target_ops) <create_inferior>: Update prototype.
2744 (create_inferior): Update macro.
2745 * utils.c (gdb_flush_out_err): New function.
2746 * win32-low.c (win32_create_inferior): Adjust function prototype
2747 and code to reflect change on "target.h".
2749 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2751 * inferiors.c (switch_to_thread): New function.
2753 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2755 * Makefile.in (SFILE): Add "common/job-control.c".
2756 (OBS): Add "job-control.o".
2758 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2760 * Makefile: Remove "@host_makefile_frag@".
2762 2017-05-05 Pedro Alves <palves@redhat.com>
2764 * configure: Regenerate.
2766 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2768 * configure: Regenerate.
2770 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2772 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2773 software_single_step change of return type to
2774 std::vector<CORE_ADDR>.
2775 * linux-low.c (install_software_single_step_breakpoints):
2777 * linux-low.h (install_software_single_step_breakpoints):
2780 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2782 * remote-utils.c: Include "gdb_termios.h" instead of
2784 * terminal.h: Delete file.
2786 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2788 * server.c: Include <vector>.
2789 <program_argv, wrapper_argv>: Convert to std::vector.
2790 (start_inferior): Rewrite function to use C++.
2791 (handle_v_run): Likewise. Update code that calculates the argv
2792 based on the vRun packet; use C++.
2793 (captured_main): Likewise.
2795 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2797 * server.c (handle_v_cont): Initialize thread_resume::thread
2800 2017-04-05 Pedro Alves <palves@redhat.com>
2802 * configure: Regenerate.
2804 2017-04-05 Pedro Alves <palves@redhat.com>
2806 * gdbreplay.c (sync_error): Constify.
2807 * linux-x86-low.c (push_opcode): Constify.
2809 2017-04-05 Pedro Alves <palves@redhat.com>
2811 * win32-low.c (get_child_debug_event)
2812 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2813 Report TARGET_WAITKIND_SPURIOUS instead.
2815 2017-04-05 Pedro Alves <palves@redhat.com>
2817 * remote-utils.c (remote_prepare, remote_open): Constify.
2818 * remote-utils.h (remote_prepare, remote_open): Constify.
2819 * server.c (captured_main): Constify 'port' handling.
2821 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2823 * Makefile.in (clean): Clear .deps.
2825 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2827 * .gitignore: Remove generated files, replace with wildcard.
2828 * (clean): Replace removal of generated files with wildcard.
2829 (version.c): Replace with...
2830 (version-generated.c): ...this.
2831 (xml-builtin.c): Replace with...
2832 (xml-builtin-generated.c): ...this.
2833 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2834 (%.c: *regformats*): Replace with...
2835 (%-generated.c: *regformats*): ...this.
2837 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2839 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2840 (xtensa_fill_gregset): Call collect_register_by_name for
2842 (xtensa_store_gregset): Call supply_register_by_name for
2845 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2847 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2848 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2849 (xtensa_store_gregset): Call supply_register for all registers in
2850 a0_regnum..a0_regnum + C0_NREGS range.
2852 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2854 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2855 (ax-ipa.o: ax.c): Remove.
2856 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2857 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2858 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2859 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2860 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2862 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2864 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2865 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2866 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2867 (errors-ipa.o: ../common/errors.c): Remove.
2868 (format-ipa.o: ../common/format.c): Remove.
2869 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2871 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2873 * Makefile.in (%-ipa.o: %.c): New rule.
2874 (tracepoint-ipa.o: tracepoint.c): Remove.
2875 (utils-ipa.o: utils.c): Remove.
2876 (remote-utils-ipa.o: remote-utils.c): Remove.
2877 (regcache-ipa.o: regcache.c): Remove.
2878 (i386-linux-ipa.o: i386-linux.c): Remove.
2879 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2880 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2881 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2882 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2883 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2884 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2885 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2886 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2887 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2888 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2889 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2890 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2891 (aarch64-ipa.o: aarch64.c): Remove.
2892 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2893 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2894 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2895 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2896 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2897 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2898 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2899 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2900 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2901 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2902 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2903 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2904 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2905 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2906 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2907 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2908 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2909 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2910 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2911 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2912 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2913 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2914 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2915 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2916 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2917 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2918 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2919 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2920 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2921 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2922 (tdesc-ipa.o: tdesc.c): Remove.
2923 (x32-linux-ipa.o: x32-linux.c): Remove.
2924 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2925 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2927 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2929 * Makefile.in (%.o: ../arch/%.c): New rule.
2930 (arm.o: ../arch/arm.c): Remove.
2931 (arm-linux.o: ../arch/arm-linux.c): Remove.
2932 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2933 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2935 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2937 * Makefile.in (%.o: ../nat/%.c): New rule.
2938 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2939 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2940 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2941 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2942 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2943 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2944 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2945 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2946 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2947 (linux-personality.o: ../nat/linux-personality.c): Remove.
2948 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2949 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2950 (x86-linux.o: ../nat/x86-linux.c): Remove.
2951 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2952 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2954 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2956 * Makefile.in (%.o: ../common/%.c): New rule.
2957 (signals.o: ../common/signals.c): Remove.
2958 (print-utils.o: ../common/print-utils.c): Remove.
2959 (rsp-low.o: ../common/rsp-low.c): Remove.
2960 (common-utils.o: ../common/common-utils.c): Remove.
2961 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2962 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2963 (vec.o: ../common/vec.c): Remove.
2964 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2965 (xml-utils.o: ../common/xml-utils.c): Remove.
2966 (ptid.o: ../common/ptid.c): Remove.
2967 (buffer.o: ../common/buffer.c): Remove.
2968 (format.o: ../common/format.c): Remove.
2969 (filestuff.o: ../common/filestuff.c): Remove.
2970 (agent.o: ../common/agent.c): Remove.
2971 (errors.o: ../common/errors.c): Remove.
2972 (environ.o: ../common/environ.c): Remove.
2973 (common-debug.o: ../common/common-debug.c): Remove.
2974 (cleanups.o: ../common/cleanups.c): Remove.
2975 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2976 (fileio.o: ../common/fileio.c): Remove.
2977 (common-regcache.o: ../common/common-regcache.c): Remove.
2978 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2979 (new-op.o: ../common/new-op.c): Remove.
2980 (btrace-common.o: ../common/btrace-common.c): Remove.
2982 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2984 * Makefile.in (%.o: ../target/%.c): New rule.
2985 (waitstatus.o: ../target/waitstatus.c): Remove.
2987 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2990 (%.c: ../regformats/%.dat,
2991 (%.c: ../regformats/arm/%.dat,
2992 (%.c: ../regformats/i386/%.dat,
2993 (%.c: ../regformats/rs6000/%.dat): New rules.
2994 (aarch64.c): Remove.
2995 (reg-arm.c): Remove.
2996 (arm-with-iwmmxt.c): Remove.
2997 (arm-with-vfpv2.c): Remove.
2998 (arm-with-vfpv3.c): Remove.
2999 (arm-with-neon.c): Remove.
3000 (reg-bfin.c): Remove.
3001 (reg-cris.c): Remove.
3002 (reg-crisv32.c): Remove.
3004 (i386-linux.c): Remove.
3005 (i386-avx.c): Remove.
3006 (i386-avx-linux.c): Remove.
3007 (i386-avx-avx512.c): Remove.
3008 (i386-avx-avx512-linux.c): Remove.
3009 (i386-mpx.c): Remove.
3010 (i386-mpx-linux.c): Remove.
3011 (i386-avx-mpx-avx512-pku.c): Remove.
3012 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3013 (i386-avx-mpx.c): Remove.
3014 (i386-avx-mpx-linux.c): Remove.
3015 (i386-mmx.c): Remove.
3016 (i386-mmx-linux.c): Remove.
3017 (reg-ia64.c): Remove.
3018 (reg-m32r.c): Remove.
3019 (reg-m68k.c): Remove.
3021 (mips-linux.c): Remove.
3022 (mips-dsp-linux.c): Remove.
3023 (mips64-linux.c): Remove.
3024 (mips64-dsp-linux.c): Remove.
3025 (nios2-linux.c): Remove.
3026 (powerpc-32.c): Remove.
3027 (powerpc-32l.c): Remove.
3028 (powerpc-altivec32l.c): Remove.
3029 (powerpc-cell32l.c): Remove.
3030 (powerpc-vsx32l.c): Remove.
3031 (powerpc-isa205-32l.c): Remove.
3032 (powerpc-isa205-altivec32l.c): Remove.
3033 (powerpc-isa205-vsx32l.c): Remove.
3034 (powerpc-e500l.c): Remove.
3035 (powerpc-64l.c): Remove.
3036 (powerpc-altivec64l.c): Remove.
3037 (powerpc-cell64l.c): Remove.
3038 (powerpc-vsx64l.c): Remove.
3039 (powerpc-isa205-64l.c): Remove.
3040 (powerpc-isa205-altivec64l.c): Remove.
3041 (powerpc-isa205-vsx64l.c): Remove.
3042 (s390-linux32.c): Remove.
3043 (s390-linux32v1.c): Remove.
3044 (s390-linux32v2.c): Remove.
3045 (s390-linux64.c): Remove.
3046 (s390-linux64v1.c): Remove.
3047 (s390-linux64v2.c): Remove.
3048 (s390-te-linux64.c): Remove.
3049 (s390-vx-linux64.c): Remove.
3050 (s390-tevx-linux64.c): Remove.
3051 (s390x-linux64.c): Remove.
3052 (s390x-linux64v1.c): Remove.
3053 (s390x-linux64v2.c): Remove.
3054 (s390x-te-linux64.c): Remove.
3055 (s390x-vx-linux64.c): Remove.
3056 (s390x-tevx-linux64.c): Remove.
3057 (tic6x-c64xp-linux.c): Remove.
3058 (tic6x-c64x-linux.c): Remove.
3059 (tic6x-c62x-linux.c): Remove.
3061 (reg-sparc64.c): Remove.
3062 (reg-spu.c): Remove.
3064 (amd64-linux.c): Remove.
3065 (amd64-avx.c): Remove.
3066 (amd64-avx-linux.c): Remove.
3067 (amd64-avx-avx512.c): Remove.
3068 (amd64-avx-avx512-linux.c): Remove.
3069 (amd64-mpx.c): Remove.
3070 (amd64-mpx-linux.c): Remove.
3071 (amd64-avx-mpx-avx512-pku.c): Remove.
3072 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3073 (amd64-avx-mpx.c): Remove.
3074 (amd64-avx-mpx-linux.c): Remove.
3076 (x32-linux.c): Remove.
3077 (x32-avx.c): Remove.
3078 (x32-avx-linux.c): Remove.
3079 (x32-avx-avx512.c): Remove.
3080 (x32-avx-avx512-linux.c): Remove.
3081 (reg-xtensa.c): Remove.
3082 (reg-tilegx.c): Remove.
3083 (reg-tilegx32.c): Remove.
3085 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3087 * Makefile.in (SFILES): Add "common/environ.c".
3088 (OBJS): Add "common/environ.h".
3090 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3092 * configure.ac: Check if the fs_base and gs_base members of
3093 `struct user_regs_struct' exist.
3094 * config.in: Regenerated.
3095 * configure: Likewise.
3097 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3099 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3101 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3102 (get_next_pcs_syscall_next_pc): Likewise.
3104 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3106 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3107 * nto-x86-low.c: Likewise.
3109 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3111 * Makefile.in: Include disable-implicit-rules.mk.
3113 2016-11-23 Pedro Alves <palves@redhat.com>
3115 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3116 (debug_vprintf): Use std::chrono::steady_clock instead of
3117 gettimeofday. Use '.' instead of ':'.
3118 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3119 (get_timestamp): Use std::chrono::steady_clock instead of
3122 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3124 * Makefile.in: Fix whitespace formatting.
3126 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3128 * Makefile.in (SFILES, OBS): Flatten list and order
3131 2016-11-23 Pedro Alves <palves@redhat.com>
3133 * event-loop.c (handle_file_event): Use warning.
3134 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3135 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3138 2016-11-23 Pedro Alves <palves@redhat.com>
3140 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3142 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3143 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3144 debug_printf and debug_flush for debug output.
3145 * server.c (handle_general_set): Likewise.
3146 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3149 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3151 * Makefile.in (.c.o): Replace rule with ...
3152 (%.o: %.c): ... this one.
3154 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3156 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3157 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3159 * configure.ac: Remove checks for the make program.
3160 * configure: Re-generate.
3162 2016-10-28 Pedro Alves <palves@redhat.com>
3164 * Makefile.in (CXX_DIALECT): Get from configure.
3165 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3166 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3167 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3168 * config.in: Regenerate.
3169 * configure: Regenerate.
3171 2016-10-27 Yao Qi <yao.qi@linaro.org>
3173 * linux-low.c (linux_supports_range_stepping): Return true if
3174 can_software_single_step return true.
3176 2016-10-27 Yao Qi <yao.qi@linaro.org>
3178 * inferiors.c (find_inferior_in_random): New function.
3179 * inferiors.h (find_inferior_in_random): Declare.
3180 * linux-low.c (linux_wait_for_event_filtered): Call
3181 find_inferior_in_random instead of find_inferior.
3183 2016-10-27 Yao Qi <yao.qi@linaro.org>
3185 * linux-low.c (linux_wait_1): If single-step breakpoints are
3186 inserted, remove them.
3188 2016-10-26 Pedro Alves <palves@redhat.com>
3190 * linux-low.c (handle_extended_wait): Link parent/child fork
3192 (linux_wait_1): Unlink them.
3193 (linux_set_resume_request): Ignore resume requests for
3194 already-resumed and unhandled fork child threads.
3195 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3196 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3198 (handle_v_requests) <vCont>: Don't call require_running.
3199 * server.h (in_queued_stop_replies): New declaration.
3201 2016-10-24 Yao Qi <yao.qi@linaro.org>
3204 * linux-aarch64-low.c (append_insns): Cast the return value to
3207 2016-10-10 Yao Qi <yao.qi@linaro.org>
3209 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3211 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3213 * target.c (target_supports_multi_process): New function, moved
3215 * target.h (target_supports_multi_process): ... here. Remove
3218 2016-10-05 Tom Tromey <tom@tromey.com>
3221 * tracepoint.c (handle_tracepoint_bkpts): Check
3222 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3224 2016-10-05 Yao Qi <yao.qi@linaro.org>
3226 * configure.srv: Update the path of arm-*.xml files.
3228 2016-10-05 Terry Guo <terry.guo@arm.com>
3229 Yao Qi <yao.qi@linaro.org>
3231 * Makefile.in: Adjust the path of rules.
3232 * configure.srv: Update the path of xml files.
3233 * regformats/arm-with-iwmmxt.dat: Regenerated.
3234 * regformats/arm-with-neon.dat: Likewise.
3235 * regformats/arm-with-vfpv2.dat: Likewise.
3236 * regformats/arm-with-vfpv3.dat Likewise.
3238 2016-09-30 Yao Qi <yao.qi@linaro.org>
3241 * target.c (target_stop_and_wait): Don't call
3242 target_continue_no_signal, use resume_stop instead.
3244 2016-09-26 Yao Qi <yao.qi@linaro.org>
3246 * linux-low.c (linux_wait_1): Call debug_exit.
3248 2016-09-23 Pedro Alves <palves@redhat.com>
3250 * Makefile.in (SFILES): Add common/new-op.c.
3251 (OBS): Add common/new-op.o.
3252 (new-op.o): New rule.
3254 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3256 * .gitinore: Ignore more files.
3258 2016-09-21 Yao Qi <yao.qi@linaro.org>
3260 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3263 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3265 * server.c (start_inferior): Call target_mourn_inferior instead of
3266 mourn_inferior; pass ptid_t argument to it.
3268 (handle_target_event): Likewise.
3269 * target.c (target_mourn_inferior): New function.
3270 * target.h (mourn_inferior): Delete macro.
3272 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3274 * linux-low.c (lwp_is_stepping): New function.
3276 2016-09-06 Carl Love <cel@us.ibm.com>
3278 * server.c (start_inferior): Fixed comment, requested comment change
3279 didn't get updated correctly. Removed reference to ptrace () call as
3280 it is only true on Linux systems.
3282 2016-09-06 Carl Love <cel@us.ibm.com>
3284 * server.c (start_inferior): Do not call
3285 function target_post_create_inferior () if the
3286 inferior process has already exited.
3288 2016-09-05 Pedro Alves <palves@redhat.com>
3290 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3291 (COMPILE.pre, CC_LD): Use CXX directly.
3292 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3293 * acinclude.m4: Don't include build-with-cxx.m4.
3294 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3295 * configure: Regenerate.
3297 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3300 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3301 call writing data to own_buf.
3303 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3305 * target.c (mywait): Call target_wait instead of
3307 (target_wait): New function.
3309 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3311 * server.c (start_inferior): New variable 'ptid'. Replace calls
3312 to the_target->resume by target_continue{,_no_signal}, depending
3314 * target.c (target_stop_and_wait): Call target_continue_no_signal
3315 instead of the_target->resume.
3316 (target_continue): New function.
3318 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3320 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3322 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3325 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3327 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3328 * linux-arm-low.c (ps_get_thread_area): Likewise.
3329 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3330 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3331 * linux-mips-low.c (ps_get_thread_area): Likewise.
3332 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3333 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3334 * linux-x86-low.c (ps_get_thread_area): Likewise.
3335 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3337 2016-08-19 Pedro Alves <palves@redhat.com>
3339 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3341 2016-08-19 Pedro Alves <palves@redhat.com>
3343 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3344 comment. Use memcpy instead of casting through unsigned long.
3346 2016-08-19 Pedro Alves <palves@redhat.com>
3348 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3349 allocating around 0x80000000.
3351 2016-08-19 Pedro Alves <palves@redhat.com>
3354 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3355 (x32-avx512-linux-ipa.o): New rules.
3356 * configure.ac (x86_64-*-linux*): New x32 check.
3357 * configure.srv (ipa_x32_linux_regobj): New.
3358 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3359 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3361 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3363 * configure: Regenerate.
3365 2016-08-09 Pedro Alves <palves@redhat.com>
3368 * Makefile.in (OBS): Add signals-state-save-restore.o.
3369 (signals-state-save-restore.o): New rule.
3370 * config.in: Regenerate.
3371 * configure: Regenerate.
3372 * linux-low.c: Include "signals-state-save-restore.h".
3373 (linux_create_inferior): Call
3374 restore_original_signals_state.
3375 * server.c: Include "dispositions-save-restore.h".
3376 (captured_main): Call save_original_signals_state.
3378 2016-08-05 Pedro Alves <palves@redhat.com>
3380 * configure: Regenerate.
3382 2016-08-04 Yao Qi <yao.qi@linaro.org>
3384 * linux-low.c (regsets_fetch_inferior_registers): Check
3385 errno is ESRCH or not.
3387 2016-08-02 Yao Qi <yao.qi@linaro.org>
3389 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3390 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3391 (thread_db_load_search): Update.
3392 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3393 td_ta_set_event and td_ta_event_getmsg.
3395 2016-07-26 Pedro Alves <palves@redhat.com>
3398 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3399 of unsigned long for 64-bit registers and use uint32_t instead of
3400 unsigned int for 32-bit registers.
3402 2016-07-26 Pedro Alves <palves@redhat.com>
3404 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3407 2016-07-21 Tom Tromey <tom@tromey.com>
3409 * configure: Rebuild.
3411 2016-07-21 Yao Qi <yao.qi@linaro.org>
3413 * mem-break.c (find_gdb_breakpoint): Cast bp to
3414 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3416 2016-07-21 Yao Qi <yao.qi@linaro.org>
3418 * server.c (handle_v_requests): Support s and S actions
3419 if target_supports_software_single_step return true.
3421 2016-07-21 Yao Qi <yao.qi@linaro.org>
3423 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3424 is resume_step, call maybe_hw_step.
3425 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3427 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3429 (proceed_one_lwp): If resume request is resume_step, install
3430 reinsert breakpoints and call maybe_hw_step.
3432 2016-07-21 Yao Qi <yao.qi@linaro.org>
3434 * linux-low.c (proceed_one_lwp): Declare.
3435 (linux_resume_one_thread): Remove local variable 'step'.
3436 Lift code enqueue signal. Call proceed_one_lwp instead of
3437 linux_resume_one_lwp.
3439 2016-07-21 Yao Qi <yao.qi@linaro.org>
3441 * linux-low.c (linux_resume_one_thread): Call
3442 enqueue_pending_signal.
3444 2016-07-21 Yao Qi <yao.qi@linaro.org>
3446 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3447 * inferiors.c (do_restore_current_thread_cleanup): New function.
3448 (make_cleanup_restore_current_thread): Likewise.
3449 * linux-low.c (install_software_single_step_breakpoints): Call
3450 make_cleanup_restore_current_thread. Switch current_thread to
3453 2016-07-21 Yao Qi <yao.qi@linaro.org>
3455 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3456 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3457 (clone_one_breakpoint): Likewise.
3458 (delete_reinsert_breakpoints): Change parameter to thread.
3460 (has_reinsert_breakpoints): Likewise.
3461 (uninsert_reinsert_breakpoints): Likewise.
3462 (reinsert_reinsert_breakpoints): Likewise.
3463 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3464 (delete_reinsert_breakpoints): Likewise.
3465 (reinsert_reinsert_breakpoints): Likewise.
3466 (uninsert_reinsert_breakpoints): Likewise.
3467 (has_reinsert_breakpoints): Likewise.
3469 2016-07-21 Yao Qi <yao.qi@linaro.org>
3471 * inferiors.c (get_thread_process): Make parameter const.
3472 * inferiors.h (get_thread_process): Update declaration.
3473 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3474 Add new parameters child_thread and parent_thread. Callers
3476 * mem-break.h (clone_all_breakpoints): Update declaration.
3478 2016-07-21 Yao Qi <yao.qi@linaro.org>
3480 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3481 <command_list, handler>: Remove.
3482 (struct gdb_breakpoint): New.
3483 (struct other_breakpoint): New.
3484 (struct reinsert_breakpoint): New.
3485 (is_gdb_breakpoint): New function.
3486 (any_persistent_commands): Update command_list if
3487 is_gdb_breakpoint returns true.
3488 (set_breakpoint): Create breakpoints according to their types.
3489 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3490 (set_gdb_breakpoint_1): Likewise.
3491 (set_gdb_breakpoint): Likewise.
3492 (clear_breakpoint_conditions): Change parameter type to
3493 'struct gdb_breakpoint *'.
3494 (clear_breakpoint_commands): Likewise.
3495 (clear_breakpoint_conditions_and_commands): Likewise.
3496 (add_condition_to_breakpoint): Likewise.
3497 (add_breakpoint_condition): Likewise.
3498 (add_commands_to_breakpoint): Likewise.
3499 (check_breakpoints): Check other_breakpoint.
3500 (clone_one_breakpoint): Clone breakpopint according to its type.
3501 * mem-break.h (struct gdb_breakpoint): Declare.
3502 (set_gdb_breakpoint): Update declaration.
3503 (clear_breakpoint_conditions_and_commands): Likewise.
3504 (add_breakpoint_condition): Likewise.
3505 (add_breakpoint_commands): Likewise.
3506 * server.c (process_point_options): Change parameter type to
3507 'struct gdb_breakpoint *'.
3509 2016-07-21 Yao Qi <yao.qi@linaro.org>
3511 * mem-break.c (set_breakpoint_at): Rename it to ...
3512 (set_breakpoint_type_at): ... it.
3513 (set_breakpoint_at): Call set_breakpoint_type_at.
3514 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3515 * mem-break.h (set_breakpoint_at): Update comments.
3517 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3519 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3521 (nios2_store_gregset): Likewise.
3523 2016-07-01 Pedro Alves <palves@redhat.com>
3524 Antoine Tremblay <antoine.tremblay@ericsson.com>
3526 * linux-low.c: Change interface to take the target lwp_info
3527 pointer directly and return void. Handle detaching from a zombie
3529 (linux_detach_lwp_callback): New function.
3530 (linux_detach): Detach from the leader thread after detaching from
3533 2016-06-28 Yao Qi <yao.qi@linaro.org>
3535 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3536 for variable new_offset.
3537 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3538 (aarch64_ftrace_insn_reloc_cb): Likewise.
3539 (aarch64_ftrace_insn_reloc_tb): Likewise.
3540 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3541 PRIx64 instead of PRIx32.
3543 2016-06-28 Yao Qi <yao.qi@linaro.org>
3545 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3546 (the_low_target): Install arm_get_syscall_trapinfo.
3548 2016-06-28 Yao Qi <yao.qi@linaro.org>
3550 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3552 (the_low_target): Install aarch64_get_syscall_trapinfo.
3554 2016-06-28 Yao Qi <yao.qi@linaro.org>
3556 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3558 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3559 Remove parameter sysno.
3560 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3563 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3565 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3566 (s390_emit_ne_goto): Likewise.
3567 (s390_emit_lt_goto): Likewise.
3568 (s390_emit_le_goto): Likewise.
3569 (s390_emit_gt_goto): Likewise.
3570 (s390_emit_ge_goto): Likewise.
3571 (s390x_emit_eq_goto): Likewise.
3572 (s390x_emit_ne_goto): Likewise.
3573 (s390x_emit_lt_goto): Likewise.
3574 (s390x_emit_le_goto): Likewise.
3575 (s390x_emit_gt_goto): Likewise.
3576 (s390x_emit_ge_goto): Likewise.
3577 (s390_emit_ops_impl): Mark variable static.
3578 (s390x_emit_ops): Likewise.
3580 2016-06-17 Yao Qi <yao.qi@linaro.org>
3582 * linux-low.c (handle_extended_wait): Call
3583 uninsert_reinsert_breakpoints for the parent process. Remove
3584 reinsert breakpoints from the child process. Reinsert them to
3585 the parent process when vfork is done.
3586 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3587 (reinsert_reinsert_breakpoints): New function.
3588 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3589 (reinsert_reinsert_breakpoints): Declare.
3591 2016-06-17 Yao Qi <yao.qi@linaro.org>
3593 * linux-low.c (handle_extended_wait): If the parent is doing
3594 step-over, remove the reinsert breakpoints from the forked child.
3596 2016-06-17 Yao Qi <yao.qi@linaro.org>
3598 * linux-low.c (unsuspend_all_lwps): Declare.
3599 (linux_low_filter_event): If thread exited, call finish_step_over.
3600 If step-over is finished, unsuspend other threads.
3602 2016-06-17 Yao Qi <yao.qi@linaro.org>
3604 * linux-low.c (linux_resume_one_lwp_throw): Assert
3605 has_reinsert_breakpoints returns false.
3606 * mem-break.c (delete_disabled_breakpoints): Assert
3607 bp type isn't reinsert_breakpoint.
3609 2016-06-17 Yao Qi <yao.qi@linaro.org>
3611 * linux-low.c (maybe_hw_step): New function.
3612 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3613 (finish_step_over): Switch current_thread to lwp temporarily,
3614 and assert has_reinsert_breakpoints returns true.
3615 (proceed_one_lwp): Call maybe_hw_step.
3616 * mem-break.c (has_reinsert_breakpoints): New function.
3617 * mem-break.h (has_reinsert_breakpoints): Declare.
3619 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3621 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3623 2016-05-17 Yao Qi <yao.qi@linaro.org>
3625 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3626 instead of find_inferior.
3628 2016-05-05 Yao Qi <yao.qi@linaro.org>
3630 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3631 Initialize res to zero.
3633 2016-05-05 Yao Qi <yao.qi@linaro.org>
3635 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3638 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3640 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3641 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3642 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3644 2016-04-28 Par Olsson <par.olsson@windriver.com>
3645 Simon Marchi <simon.marchi@ericsson.com>
3647 * tracepoint.c (write_inferior_int8): New function.
3648 (cmd_qtenable_disable): Write enable flag using
3649 write_inferior_int8.
3651 2016-04-25 Yao Qi <yao.qi@linaro.org>
3653 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3654 (need_step_over_p): Return zero if the LWP has pending signals
3655 can be delivered on software single step target.
3657 2016-04-25 Yao Qi <yao.qi@linaro.org>
3659 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3660 return instead of error.
3662 2016-04-22 Yao Qi <yao.qi@linaro.org>
3664 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3667 2016-04-22 Yao Qi <yao.qi@linaro.org>
3669 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3670 signal when stepping over breakpoint with software single
3673 2016-04-21 Pedro Alves <palves@redhat.com>
3675 * linux-s390-low.c (s390_collect_ptrace_register)
3676 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3678 (s390_check_regset): Use void * instead of gdb_byte *.
3680 2016-04-20 Pedro Alves <palves@redhat.com>
3682 * configure: Renegerate.
3684 2016-04-20 Yao Qi <yao.qi@linaro.org>
3686 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3687 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3689 (arm_store_gregset): Likewise.
3691 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3693 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3694 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3695 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3696 (amd64-avx-mpx-linux.c): New rules.
3697 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3698 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3699 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3700 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3701 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3702 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3703 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3704 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3705 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3706 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3707 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3708 * linux-x86-low.c (x86_linux_read_description): Add case for
3709 X86_XSTATE_AVX_MPX_MASK.
3710 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3711 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3712 init_registers_i386_avx_mpx_linux.
3713 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3714 (initialize_low_tracepoint): Call
3715 init_registers_i386_avx_mpx_linux.
3716 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3717 (initialize_low_tracepoint): Call
3718 init_registers_amd64_avx_mpx_linux.
3719 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3720 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3721 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3724 2016-04-18 Pedro Alves <palves@redhat.com>
3726 * configure: Regenerate.
3728 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3730 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3731 (aarch64_emit_sub): Likewise.
3733 2016-04-12 Pedro Alves <palves@redhat.com>
3735 * utils.c (prepare_to_throw_exception): Delete.
3737 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3739 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3741 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3743 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3745 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3747 * linux-aarch64-ipa.c: Add <elf.h> include.
3748 * linux-ppc-ipa.c: Add <elf.h> include.
3749 * linux-s390-ipa.c: Add <elf.h> include.
3751 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3753 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3754 (get_raw_reg_ptr): Likewise.
3755 (get_trace_state_variable_value_ptr): Likewise.
3756 (set_trace_state_variable_value_ptr): Likewise.
3757 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3760 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3761 Marcin Kościelnicki <koriakin@0x04.net>
3764 * linux-ppc-low.c (emit_insns): New function.
3765 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3766 (ppc_emit_prologue): New function.
3767 (ppc_emit_epilogue): New function.
3768 (ppc_emit_add): New function.
3769 (ppc_emit_sub): New function.
3770 (ppc_emit_mul): New function.
3771 (ppc_emit_lsh): New function.
3772 (ppc_emit_rsh_signed): New function.
3773 (ppc_emit_rsh_unsigned): New function.
3774 (ppc_emit_ext): New function.
3775 (ppc_emit_zero_ext): New function.
3776 (ppc_emit_log_not): New function.
3777 (ppc_emit_bit_and): New function.
3778 (ppc_emit_bit_or): New function.
3779 (ppc_emit_bit_xor): New function.
3780 (ppc_emit_bit_not): New function.
3781 (ppc_emit_equal): New function.
3782 (ppc_emit_less_signed): New function.
3783 (ppc_emit_less_unsigned): New function.
3784 (ppc_emit_ref): New function.
3785 (ppc_emit_const): New function.
3786 (ppc_emit_reg): New function.
3787 (ppc_emit_pop): New function.
3788 (ppc_emit_stack_flush): New function.
3789 (ppc_emit_swap): New function.
3790 (ppc_emit_stack_adjust): New function.
3791 (ppc_emit_call): New function.
3792 (ppc_emit_int_call_1): New function.
3793 (ppc_emit_void_call_2): New function.
3794 (ppc_emit_if_goto): New function.
3795 (ppc_emit_goto): New function.
3796 (ppc_emit_eq_goto): New function.
3797 (ppc_emit_ne_goto): New function.
3798 (ppc_emit_lt_goto): New function.
3799 (ppc_emit_le_goto): New function.
3800 (ppc_emit_gt_goto): New function.
3801 (ppc_emit_ge_goto): New function.
3802 (ppc_write_goto_address): New function.
3803 (ppc_emit_ops_impl): New static variable.
3804 (ppc64v1_emit_prologue): New function.
3805 (ppc64v2_emit_prologue): New function.
3806 (ppc64_emit_epilogue): New function.
3807 (ppc64_emit_add): New function.
3808 (ppc64_emit_sub): New function.
3809 (ppc64_emit_mul): New function.
3810 (ppc64_emit_lsh): New function.
3811 (ppc64_emit_rsh_signed): New function.
3812 (ppc64_emit_rsh_unsigned): New function.
3813 (ppc64_emit_ext): New function.
3814 (ppc64_emit_zero_ext): New function.
3815 (ppc64_emit_log_not): New function.
3816 (ppc64_emit_bit_and): New function.
3817 (ppc64_emit_bit_or): New function.
3818 (ppc64_emit_bit_xor): New function.
3819 (ppc64_emit_bit_not): New function.
3820 (ppc64_emit_equal): New function.
3821 (ppc64_emit_less_signed): New function.
3822 (ppc64_emit_less_unsigned): New function.
3823 (ppc64_emit_ref): New function.
3824 (ppc64_emit_const): New function.
3825 (ppc64v1_emit_reg): New function.
3826 (ppc64v2_emit_reg): New function.
3827 (ppc64_emit_pop): New function.
3828 (ppc64_emit_stack_flush): New function.
3829 (ppc64_emit_swap): New function.
3830 (ppc64v1_emit_call): New function.
3831 (ppc64v2_emit_call): New function.
3832 (ppc64v1_emit_int_call_1): New function.
3833 (ppc64v2_emit_int_call_1): New function.
3834 (ppc64v1_emit_void_call_2): New function.
3835 (ppc64v2_emit_void_call_2): New function.
3836 (ppc64_emit_if_goto): New function.
3837 (ppc64_emit_eq_goto): New function.
3838 (ppc64_emit_ne_goto): New function.
3839 (ppc64_emit_lt_goto): New function.
3840 (ppc64_emit_le_goto): New function.
3841 (ppc64_emit_gt_goto): New function.
3842 (ppc64_emit_ge_goto): New function.
3843 (ppc64v1_emit_ops_impl): New static variable.
3844 (ppc64v2_emit_ops_impl): New static variable.
3845 (ppc_emit_ops): New function.
3846 (linux_low_target): Wire in ppc_emit_ops.
3848 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3849 Marcin Kościelnicki <koriakin@0x04.net>
3852 * Makefile.in: Add powerpc-*-ipa.o
3853 * configure.srv: Add ipa_obj for powerpc*-linux.
3854 * linux-ppc-ipa.c: New file.
3855 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3857 (PPC_FIELD): New macro.
3858 (PPC_SEXT): New macro.
3859 (PPC_OP6): New macro.
3860 (PPC_BO): New macro.
3861 (PPC_LI): New macro.
3862 (PPC_BD): New macro.
3863 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3864 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3865 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3866 (ppc_get_thread_area): New function.
3867 (is_elfv2_inferior): New function.
3868 (gen_ds_form): New function.
3869 (GEN_STD): New macro.
3870 (GEN_STDU): New macro.
3871 (GEN_LD): New macro.
3872 (GEN_LDU): New macro.
3873 (gen_d_form): New function.
3874 (GEN_ADDI): New macro.
3875 (GEN_ADDIS): New macro.
3876 (GEN_LI): New macro.
3877 (GEN_LIS): New macro.
3878 (GEN_ORI): New macro.
3879 (GEN_ORIS): New macro.
3880 (GEN_LWZ): New macro.
3881 (GEN_STW): New macro.
3882 (GEN_STWU): New macro.
3883 (gen_xfx_form): New function.
3884 (GEN_MFSPR): New macro.
3885 (GEN_MTSPR): New macro.
3886 (GEN_MFCR): New macro.
3887 (GEN_MTCR): New macro.
3888 (GEN_SYNC): New macro.
3889 (GEN_LWSYNC): New macro.
3890 (gen_x_form): New function.
3891 (GEN_OR): New macro.
3892 (GEN_MR): New macro.
3893 (GEN_LWARX): New macro.
3894 (GEN_STWCX): New macro.
3895 (GEN_CMPW): New macro.
3896 (gen_md_form): New function.
3897 (GEN_RLDICL): New macro.
3898 (GEN_RLDICR): New macro.
3899 (gen_i_form): New function.
3901 (GEN_BL): New macro.
3902 (gen_b_form): New function.
3903 (GEN_BNE): New macro.
3904 (GEN_LOAD): New macro.
3905 (GEN_STORE): New macro.
3906 (gen_limm): New function.
3907 (gen_atomic_xchg): New function.
3908 (gen_call): New function.
3909 (ppc_relocate_instruction): New function.
3910 (ppc_install_fast_tracepoint_jump_pad): New function.
3911 (ppc_get_min_fast_tracepoint_insn_len): New function.
3912 (ppc_get_ipa_tdesc_idx): New function.
3913 (the_low_target): Wire in the new functions.
3914 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3916 * linux-ppc-tdesc.h: New file.
3918 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3920 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3921 (alloc_jump_pad_buffer): New function.
3922 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3923 (alloc_jump_pad_buffer): New function.
3924 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3925 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3926 (alloc_jump_pad_buffer): New function.
3927 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3928 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3929 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3930 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3932 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3934 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3935 * linux-amd64-ipa.c: Likewise.
3936 * linux-i386-ipa.c: Likewise.
3937 * linux-s390-ipa.c: Likewise.
3938 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3939 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3940 set_trace_state_variable_value_ptr.
3941 (struct ipa_sym_addresses): Likewise.
3942 (symbol_list): Likewise.
3943 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3944 accessing gdb_collect directly.
3945 (gdb_collect_ptr_type): New typedef.
3946 (get_raw_reg_ptr_type): New typedef.
3947 (get_trace_state_variable_value_ptr_type): New typedef.
3948 (set_trace_state_variable_value_ptr_type): New typedef.
3949 (gdb_collect_ptr): New global.
3950 (get_raw_reg_ptr): New global.
3951 (get_trace_state_variable_value_ptr): New global.
3952 (set_trace_state_variable_value_ptr): New global.
3953 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3954 accessing get_raw_reg directly.
3955 (get_get_tsv_func_addr): Likewise for
3956 get_trace_state_variable_value_ptr.
3957 (get_set_tsv_func_addr): Likewise for
3958 set_trace_state_variable_value_ptr.
3959 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3961 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3963 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3965 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3967 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3969 (relocate_instruction): Remove own_buf.
3970 * server.c (own_buf): Make global.
3971 (handle_v_requests): Make global.
3972 * server.h (own_buf): New declaration.
3973 (handle_v_requests): New prototype.
3975 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3978 * linux-s390-low.c (add_insns): New function.
3979 (s390_emit_prologue): New function.
3980 (s390_emit_epilogue): New function.
3981 (s390_emit_add): New function.
3982 (s390_emit_sub): New function.
3983 (s390_emit_mul): New function.
3984 (s390_emit_lsh): New function.
3985 (s390_emit_rsh_signed): New function.
3986 (s390_emit_rsh_unsigned): New function.
3987 (s390_emit_ext): New function.
3988 (s390_emit_log_not): New function.
3989 (s390_emit_bit_and): New function.
3990 (s390_emit_bit_or): New function.
3991 (s390_emit_bit_xor): New function.
3992 (s390_emit_bit_not): New function.
3993 (s390_emit_equal): New function.
3994 (s390_emit_less_signed): New function.
3995 (s390_emit_less_unsigned): New function.
3996 (s390_emit_ref): New function.
3997 (s390_emit_if_goto): New function.
3998 (s390_emit_goto): New function.
3999 (s390_write_goto_address): New function.
4000 (s390_emit_litpool): New function.
4001 (s390_emit_const): New function.
4002 (s390_emit_call): New function.
4003 (s390_emit_reg): New function.
4004 (s390_emit_pop): New function.
4005 (s390_emit_stack_flush): New function.
4006 (s390_emit_zero_ext): New function.
4007 (s390_emit_swap): New function.
4008 (s390_emit_stack_adjust): New function.
4009 (s390_emit_set_r2): New function.
4010 (s390_emit_int_call_1): New function.
4011 (s390_emit_void_call_2): New function.
4012 (s390_emit_eq_goto): New function.
4013 (s390_emit_ne_goto): New function.
4014 (s390_emit_lt_goto): New function.
4015 (s390_emit_le_goto): New function.
4016 (s390_emit_gt_goto): New function.
4017 (s390_emit_ge_goto): New function.
4018 (s390x_emit_prologue): New function.
4019 (s390x_emit_epilogue): New function.
4020 (s390x_emit_add): New function.
4021 (s390x_emit_sub): New function.
4022 (s390x_emit_mul): New function.
4023 (s390x_emit_lsh): New function.
4024 (s390x_emit_rsh_signed): New function.
4025 (s390x_emit_rsh_unsigned): New function.
4026 (s390x_emit_ext): New function.
4027 (s390x_emit_log_not): New function.
4028 (s390x_emit_bit_and): New function.
4029 (s390x_emit_bit_or): New function.
4030 (s390x_emit_bit_xor): New function.
4031 (s390x_emit_bit_not): New function.
4032 (s390x_emit_equal): New function.
4033 (s390x_emit_less_signed): New function.
4034 (s390x_emit_less_unsigned): New function.
4035 (s390x_emit_ref): New function.
4036 (s390x_emit_if_goto): New function.
4037 (s390x_emit_const): New function.
4038 (s390x_emit_call): New function.
4039 (s390x_emit_reg): New function.
4040 (s390x_emit_pop): New function.
4041 (s390x_emit_stack_flush): New function.
4042 (s390x_emit_zero_ext): New function.
4043 (s390x_emit_swap): New function.
4044 (s390x_emit_stack_adjust): New function.
4045 (s390x_emit_int_call_1): New function.
4046 (s390x_emit_void_call_2): New function.
4047 (s390x_emit_eq_goto): New function.
4048 (s390x_emit_ne_goto): New function.
4049 (s390x_emit_lt_goto): New function.
4050 (s390x_emit_le_goto): New function.
4051 (s390x_emit_gt_goto): New function.
4052 (s390x_emit_ge_goto): New function.
4053 (s390_emit_ops): New function.
4054 (struct linux_target_ops): Fill in emit_ops hook.
4056 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4059 * Makefile.in: Add s390 IPA files.
4060 * configure.srv: Build IPA for s390.
4061 * linux-s390-ipa.c: New file.
4062 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4063 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4064 (tdesc_s390_linux32): Likewise.
4065 (init_registers_s390_linux32v1): Likewise.
4066 (tdesc_s390_linux32v1): Likewise.
4067 (init_registers_s390_linux32v2): Likewise.
4068 (tdesc_s390_linux32v2): Likewise.
4069 (init_registers_s390_linux64): Likewise.
4070 (tdesc_s390_linux64): Likewise.
4071 (init_registers_s390_linux64v1): Likewise.
4072 (tdesc_s390_linux64v1): Likewise.
4073 (init_registers_s390_linux64v2): Likewise.
4074 (tdesc_s390_linux64v2): Likewise.
4075 (init_registers_s390_te_linux64): Likewise.
4076 (tdesc_s390_te_linux64): Likewise.
4077 (init_registers_s390_vx_linux64): Likewise.
4078 (tdesc_s390_vx_linux64): Likewise.
4079 (init_registers_s390_tevx_linux64): Likewise.
4080 (tdesc_s390_tevx_linux64): Likewise.
4081 (init_registers_s390x_linux64): Likewise.
4082 (tdesc_s390x_linux64): Likewise.
4083 (init_registers_s390x_linux64v1): Likewise.
4084 (tdesc_s390x_linux64v1): Likewise.
4085 (init_registers_s390x_linux64v2): Likewise.
4086 (tdesc_s390x_linux64v2): Likewise.
4087 (init_registers_s390x_te_linux64): Likewise.
4088 (tdesc_s390x_te_linux64): Likewise.
4089 (init_registers_s390x_vx_linux64): Likewise.
4090 (tdesc_s390x_vx_linux64): Likewise.
4091 (init_registers_s390x_tevx_linux64): Likewise.
4092 (tdesc_s390x_tevx_linux64): Likewise.
4093 (have_hwcap_s390_vx): New static variable.
4094 (s390_arch_setup): Fill have_hwcap_s390_vx.
4095 (s390_get_thread_area): New function.
4096 (s390_ft_entry_gpr_esa): New const.
4097 (s390_ft_entry_gpr_zarch): New const.
4098 (s390_ft_entry_misc): New const.
4099 (s390_ft_entry_fr): New const.
4100 (s390_ft_entry_vr): New const.
4101 (s390_ft_main_31): New const.
4102 (s390_ft_main_64): New const.
4103 (s390_ft_exit_fr): New const.
4104 (s390_ft_exit_vr): New const.
4105 (s390_ft_exit_misc): New const.
4106 (s390_ft_exit_gpr_esa): New const.
4107 (s390_ft_exit_gpr_zarch): New const.
4108 (append_insns): New function.
4109 (s390_relocate_instruction): New function.
4110 (s390_install_fast_tracepoint_jump_pad): New function.
4111 (s390_get_min_fast_tracepoint_insn_len): New function.
4112 (s390_get_ipa_tdesc_idx): New function.
4113 (struct linux_target_ops): Wire in the above functions.
4114 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4115 * linux-s390-tdesc.h: New file.
4117 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4119 * linux-s390-low.c (s390_supports_tracepoints): New function.
4120 (struct linux_target_ops): Fill supports_tracepoints hook.
4122 2016-03-18 Yao Qi <yao.qi@linaro.org>
4124 * linux-low.c (lwp_signal_can_be_delivered): New function.
4125 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4127 2016-03-18 Yao Qi <yao.qi@linaro.org>
4129 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4130 0 if signal is enqueued. Remove 'signal' from one debugging
4131 message. Move one debugging message to some lines below.
4132 Remove code setting 'signal' to 0.
4134 2016-03-18 Yao Qi <yao.qi@linaro.org>
4136 * linux-low.c (linux_low_filter_event): Remove redundant
4137 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4139 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4141 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4142 (struct linux_target_ops): Wire in the above.
4144 2016-03-03 Yao Qi <yao.qi@linaro.org>
4146 * linux-low.c: Update comments to start_step_over.
4148 2016-03-03 Yao Qi <yao.qi@linaro.org>
4151 * linux-low.c (handle_extended_wait): Set child suspended
4152 if event_lwp->bp_reinsert isn't zero.
4154 2016-03-02 Yao Qi <yao.qi@linaro.org>
4156 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4157 enqueue_pending_signal.
4159 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4161 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4164 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4166 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4167 (s390_regmap_3264) [!__s390x__]: New global.
4168 (s390_collect_ptrace_register): Skip map entries containing -1.
4169 (s390_supply_ptrace_register): Ditto.
4170 (s390_fill_gprs_high): New function.
4171 (s390_store_gprs_high): New function.
4172 (s390_regsets): Add NT_S390_HIGH_GPRS.
4173 (s390_get_hwcap): Enable on 31-bit.
4174 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4175 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4176 Detect NT_S390_HIGH_GPRS.
4177 (s390_usrregs_info_3264): Enable on 31-bit.
4178 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4179 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4181 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4184 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4185 * configure.srv: Ditto.
4186 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4187 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4188 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4189 (init_registers_amd64_linux): Remove prototype.
4190 (tdesc_amd64_linux): Remove declaration.
4191 (get_ipa_tdesc): New function.
4192 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4193 initialize remaining tdescs.
4194 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4195 (init_registers_i386_linux): Remove prototype.
4196 (tdesc_i386_linux): Remove declaration.
4197 (get_ipa_tdesc): New function.
4198 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4199 initialize remaining tdescs.
4200 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4201 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4202 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4203 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4204 (x86_get_ipa_tdesc_idx): New function.
4205 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4206 * linux-x86-tdesc.h: New file.
4207 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4208 (target_get_ipa_tdesc_idx): New macro.
4209 * tracepoint.c (ipa_tdesc_idx): New macro.
4210 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4211 (symbol_list): Add ipa_tdesc_idx.
4212 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4213 (ipa_tdesc): Remove.
4214 (ipa_tdesc_idx): New variable.
4215 (get_context_regcache): Use get_ipa_tdesc.
4216 (gdb_collect): Ditto.
4218 * tracepoint.h (get_ipa_tdesc): New prototype.
4219 (ipa_tdesc): Remove.
4221 2016-02-24 Pedro Alves <palves@redhat.com>
4223 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4224 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4225 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4226 Factor out common code between the USE_SIGTRAP_SIGINFO and
4227 !USE_SIGTRAP_SIGINFO blocks.
4228 (linux_low_filter_event): Call save_stop_reason instead of
4229 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4231 (linux_wait_1): Update comments.
4233 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4235 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4236 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4237 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4238 ppc_insert_point, ppc_remove_point.
4240 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4242 * linux-s390-low.c (s390_supports_z_point_type): New function.
4243 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4245 2016-02-16 Yao Qi <yao.qi@linaro.org>
4247 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4248 PC. Get pc from regcache_read_pc.
4250 2016-02-12 Yao Qi <yao.qi@linaro.org>
4252 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4253 or linux_get_pc_32bit.
4254 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4256 2016-02-12 Yao Qi <yao.qi@linaro.org>
4258 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4259 arm_linux_get_next_pcs_fixup.
4261 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4263 * tracepoint.c (x_tracepoint_action_download): Change
4264 write_inferior_data_ptr to write_inferior_data_pointer.
4265 (cmd_qtstart): Likewise.
4266 (write_inferior_data_ptr): Remove.
4267 (download_agent_expr): Change write_inferior_data_ptr to
4268 write_inferior_data_pointer.
4269 (download_tracepoint_1): Likewise.
4270 (download_tracepoint): Likewise.
4271 (download_trace_state_variables): Likewise.
4273 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4274 Marcin Kościelnicki <koriakin@0x04.net>
4276 * tracepoint.c (struct tracepoint_action_ops): Remove.
4277 (struct tracepoint_action): Remove ops.
4278 (m_tracepoint_action_download, r_tracepoint_action_download)
4279 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4280 size and offset accordingly.
4281 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4282 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4283 (tracepoint_action_send, tracepoint_action_download): New functions.
4284 Helpers for trace action handlers.
4285 (add_tracepoint_action): Remove setup actions ops.
4286 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4288 2016-02-10 Yao Qi <yao.qi@linaro.org>
4290 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4292 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4294 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4296 * configure: Regenerate.
4298 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4300 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4301 void * to gdb_byte *.
4302 * linux-low.c (siginfo_fixup): Likewise.
4303 (linux_xfer_siginfo): Likewise.
4304 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4306 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4308 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4310 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4312 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4314 * linux-x86-low.c [__x86_64__]: Include
4315 "nat/amd64-linux-siginfo.h".
4316 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4317 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4318 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4319 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4320 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4321 (cpt_si_fd, si_timerid, si_overrun): Move from
4322 nat/amd64-linux-siginfo.c.
4323 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4325 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4327 * server.c (skip_to_semicolon): Remove.
4328 (process_point_options): Use strchrnul instead of
4331 2016-01-26 Yao Qi <yao.qi@linaro.org>
4333 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4334 * linux-low.c (install_software_single_step_breakpoints): Don't
4335 call regcache_read_pc.
4336 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4339 2016-01-26 Yao Qi <yao.qi@linaro.org>
4341 * linux-low.c (install_software_single_step_breakpoints): Call
4342 regcache_read_pc instead of get_pc.
4344 2016-01-26 Yao Qi <yao.qi@linaro.org>
4346 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4347 (unblock_async_io): Rename to ...
4348 (block_unblock_async_io): ... it. New function.
4349 (enable_async_io): Don't install SIGIO handler. Unblock it
4351 (disable_async_io): Don't ignore SIGIO. Block it instead.
4352 (initialize_async_io): Install SIGIO handler. Don't call
4355 2016-01-26 Yao Qi <yao.qi@linaro.org>
4357 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4358 first character is '\003', call *the_target->request_interrupt.
4360 2016-01-25 Yao Qi <yao.qi@linaro.org>
4362 * remote-utils.c (new_thread_notify): Remove.
4363 (dead_thread_notify): Likewise.
4364 * remote-utils.h (new_thread_notify): Remove declaration.
4365 (dead_thread_notify): Likewise.
4367 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4369 * gdb.trace/pending.exp: Fix expected message on continue.
4371 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4373 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4374 it works properly on big-endian machines where sizeof (CORE_ADDR)
4377 2016-01-21 Pedro Alves <palves@redhat.com>
4379 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4380 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4381 * configure: Regenerate.
4383 2016-01-21 Yao Qi <yao.qi@linaro.org>
4385 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4386 is_thumb and set it according to CPSR saved on the stack.
4387 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4388 arm_sigreturn_next_pc.
4390 2016-01-18 Yao Qi <yao.qi@linaro.org>
4392 * linux-low.c (linux_set_pc_64bit): New function.
4393 (linux_get_pc_64bit): New function.
4394 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4396 * linux-sparc-low.c (debug_threads): Remove declaration.
4397 (sparc_get_pc): Remove.
4398 (the_low_target): Use linux_get_pc_64bit instead of
4400 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4401 (the_low_target): Use linux_get_pc_64bit and
4404 2016-01-18 Yao Qi <yao.qi@linaro.org>
4406 * linux-arm-low.c (debug_threads): Remove declaration.
4407 (arm_get_pc, arm_set_pc): Remove.
4408 (the_low_target): Use linux_get_pc_32bit and
4410 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4411 (the_low_target): Use linux_get_pc_32bit and
4413 * linux-cris-low.c (debug_threads): Remove declaration.
4414 (cris_get_pc, cris_set_pc,): Remove.
4415 (the_low_target): Use linux_get_pc_32bit and
4417 * linux-crisv32-low.c (debug_threads): Remove declaration.
4418 (cris_get_pc, cris_set_pc): Remove.
4419 (the_low_target): Use linux_get_pc_32bit and
4421 * linux-low.c: Include inttypes.h.
4422 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4423 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4424 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4425 (the_low_target): Use linux_get_pc_32bit and
4427 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4428 (the_low_target): Use linux_get_pc_32bit and
4430 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4431 (the_low_target): Use linux_get_pc_32bit and
4433 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4434 (the_low_target): Use linux_get_pc_32bit and
4436 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4437 (the_low_target): Use linux_get_pc_32bit and
4440 2016-01-18 Gary Benson <gbenson@redhat.com>
4442 * configure.ac (AC_FUNC_FORK): New check.
4443 * config.in: Regenerate.
4444 * configure: Likewise.
4446 2016-01-14 Yao Qi <yao.qi@linaro.org>
4448 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4449 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4450 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4451 arm_get_next_pcs_ctor.
4453 2016-01-12 Josh Stone <jistone@redhat.com>
4454 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4456 * inferiors.h: Include "gdb_vecs.h".
4457 (struct process_info): Add syscalls_to_catch.
4458 * inferiors.c (remove_process): Free syscalls_to_catch.
4459 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4460 syscall_return stops.
4461 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4462 * server.c (handle_general_set): Handle QCatchSyscalls.
4463 (handle_query): Report support for QCatchSyscalls.
4464 * target.h (struct target_ops): Add supports_catch_syscall.
4465 (target_supports_catch_syscall): New macro.
4466 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4467 (struct lwp_info): Add syscall_state.
4468 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4469 Maintain syscall_state and syscalls_to_catch across exec.
4470 (get_syscall_trapinfo): New function, proxy to the_low_target.
4471 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4472 (linux_low_filter_event): Toggle syscall_state entry/return for
4473 syscall traps, and set it ignored for all others.
4474 (gdb_catching_syscalls_p): New function.
4475 (gdb_catch_this_syscall_p): New function.
4476 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4477 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4478 (linux_supports_catch_syscall): New function.
4479 (linux_target_ops): Install it.
4480 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4481 (the_low_target): Install it.
4483 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4485 * acinclude.m4: Include new ../warning.m4 file.
4486 * configure: Regenerated.
4487 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4489 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4491 * ax.c (is_goto_target): Mark static.
4492 * linux-low.c (register_addr): Likewise.
4493 (linux_fetch_registers, linux_store_registers): Likewise.
4494 * mem-break.c (any_persistent_commands): Fix old prototype.
4495 (add_commands_to_breakpoint): Mark static.
4496 * regcache.c (find_register_by_name): Delete unused func.
4497 * remote-utils.c (hex_or_minus_one): Mark static.
4498 * server.c (monitor_show_help): Mark static.
4499 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4500 handle_v_requests): Likewise.
4502 2016-01-12 Pedro Alves <palves@redhat.com>
4504 Remove use of the registered trademark symbol throughout.
4506 2016-01-08 Yao Qi <yao.qi@linaro.org>
4508 * remote-utils.c (getpkt): If c is '\003', call target hook
4511 2016-01-06 Yao Qi <yao.qi@linaro.org>
4513 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4514 linux-aarch32-low.c.
4515 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4516 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4517 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4518 (thumb2_breakpoint): Declare.
4519 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4520 linux-aarch32-low.h.
4521 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4522 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4523 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4525 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4527 * gdbreplay.c (gdbreplay_version): Change copyright year in
4529 * server.c (gdbserver_version): Likewise.
4531 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4533 * server.c (crc32_table): Delete.
4534 (crc32): Use libiberty's xcrc32 function.
4536 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4538 * lynx-low.c (lynx_delete_thread_callback): New function.
4539 (lynx_mourn): Properly delete our process and all of its
4540 threads. Remove call to clear_inferiors.
4542 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4544 * target.c (thread_search_callback): Add check that
4545 the thread_stopped target callback is not NULL before
4548 2015-12-21 Yao Qi <yao.qi@linaro.org>
4550 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4553 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4555 * server.c (handle_query): Call target_supports_software_single_step.
4557 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4559 * linux-low.c (single_step): New function.
4560 (linux_resume_one_lwp_throw): Call single_step.
4561 (start_step_over): Likewise.
4563 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4565 * Makefile.in (SFILES): Append arch/arm-linux.c,
4566 arch/arm-get-next-pcs.c.
4567 (arm-linux.o): New rule.
4568 (arm-get-next-pcs.o): New rule.
4569 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4571 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4572 to linux-aarch32-low.c.
4573 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4574 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4575 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4576 (thumb2_breakpoint_len): Likewise.
4577 (arm_is_thumb_mode): Make non-static.
4578 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4579 from linux-aarch32-low.c.
4580 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4581 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4582 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4583 (thumb2_breakpoint_len): Likewise.
4584 (arm_is_thumb_mode): New declaration.
4585 * linux-arm-low.c: Include arch/arm-linux.h
4586 aarch/arm-get-next-pcs.h, sys/syscall.h.
4587 (get_next_pcs_ops): New struct.
4588 (get_next_pcs_addr_bits_remove): New function.
4589 (get_next_pcs_is_thumb): New function.
4590 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4591 (arm_sigreturn_next_pc): Likewise.
4592 (get_next_pcs_syscall_next_pc): Likewise.
4593 (arm_gdbserver_get_next_pcs): Likewise.
4594 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4596 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4597 * server.h: Include gdb_vecs.h.
4599 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4601 * Makefile.in (SFILES): Append common/common-regcache.c.
4602 (OBS): Append common-regcache.o.
4603 (common-regcache.o): New rule.
4604 * regcache.c (init_register_cache): Initialize cache to
4606 (regcache_raw_read_unsigned): New function.
4607 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4608 register_status enum.
4610 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4612 * linux-aarch64-low.c (the_low_targets): Rename
4613 breakpoint_reinsert_addr to get_next_pcs.
4614 * linux-arm-low.c (the_low_targets): Likewise.
4615 * linux-bfin-low.c (the_low_targets): Likewise.
4616 * linux-cris-low.c (the_low_targets): Likewise.
4617 * linux-crisv32-low.c (the_low_targets): Likewise.
4618 * linux-low.c (can_software_single_step): Likewise.
4619 (install_software_single_step_breakpoints): New function.
4620 (start_step_over): Use install_software_single_step_breakpoints.
4621 * linux-low.h: New CORE_ADDR vector.
4622 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4624 * linux-mips-low.c (the_low_targets): Likewise.
4625 * linux-nios2-low.c (the_low_targets): Likewise.
4626 * linux-sparc-low.c (the_low_targets): Likewise.
4628 2015-12-17 Pedro Alves <palves@redhat.com>
4630 * linux-low.c (linux_kill_one_lwp): Remove references to
4632 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4634 (linux_init_signals): Delete.
4635 (initialize_low): Adjust.
4636 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4638 2015-12-16 Pedro Alves <palves@redhat.com>
4640 * configure.ac (compiler warning flags): When testing a
4641 -Wno-foo option, check whether -Wfoo works instead.
4642 * configure: Regenerate.
4644 2015-12-11 Don Breazeal <donb@codesourcery.com>
4646 * server.c (process_serial_event): Don't exit from gdbserver
4647 in remote mode if there are still active inferiors.
4649 2015-12-11 Yao Qi <yao.qi@linaro.org>
4651 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4652 arm_breakpoint_at if the process is 32-bit.
4654 2015-12-11 Yao Qi <yao.qi@linaro.org>
4656 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4659 2015-12-07 Yao Qi <yao.qi@linaro.org>
4661 * configure.srv: Append arm.o to srv_tgtobj for
4662 aarch64*-*-linux* target.
4663 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4664 from linux-arm-low.c.
4665 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4666 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4667 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4668 (thumb2_breakpoint_len): Likewise.
4669 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4670 (arm_breakpoint_kinds): Likewise.
4671 (arm_breakpoint_kind_from_pc): Likewise.
4672 (arm_sw_breakpoint_from_kind): Likewise.
4673 (arm_breakpoint_kind_from_current_state): Likewise.
4674 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4675 (arm_sw_breakpoint_from_kind): Declare.
4676 (arm_breakpoint_kind_from_current_state): Declare.
4677 (arm_breakpoint_at): Declare.
4678 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4679 arm_sw_breakpoint_from_kind if process is 32-bit.
4680 (aarch64_breakpoint_kind_from_pc): New function.
4681 (aarch64_breakpoint_kind_from_current_state): New function.
4682 (the_low_target): Initialize fields breakpoint_kind_from_pc
4683 and breakpoint_kind_from_current_state.
4684 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4685 linux-aarch32-low.c.
4686 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4687 (arm_breakpoint, arm_breakpoint_len): Likewise.
4688 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4689 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4690 (arm_is_thumb_mode): Likewise.
4691 (arm_breakpoint_at): Likewise.
4692 (arm_breakpoint_kind_from_pc): Likewise.
4693 (arm_sw_breakpoint_from_kind): Likewise.
4694 (arm_breakpoint_kind_from_current_state): Likewise.
4697 2015-08-04 Yao Qi <yao.qi@linaro.org>
4699 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4700 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4701 * server.c (extended_protocol): Remove "static".
4702 * server.h (extended_protocol): Declare it.
4704 2015-12-04 Josh Stone <jistone@redhat.com>
4706 * target.h (struct target_ops) <arch_setup>: Rename to ...
4707 (struct target_ops) <post_create_inferior>: ... this.
4708 (target_arch_setup): Rename to ...
4709 (target_post_create_inferior): ... this, calling post_create_inferior.
4710 * server.c (start_inferior): Update target_arch_setup calls to
4711 target_post_create_inferior.
4712 * linux-low.c (linux_low_ptrace_options): Forward declare.
4713 (linux_arch_setup): Update its comment for general use.
4714 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4715 (struct linux_target_ops): Use linux_post_create_inferior.
4716 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4717 to post_create_inferior.
4718 * nto-low.c (struct nto_target_ops): Likewise.
4719 * spu-low.c (struct spu_target_ops): Likewise.
4720 * win32-low.c (struct win32_target_ops): Likewise.
4722 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4724 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4726 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4728 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4729 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4730 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4731 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4732 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4733 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4734 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4735 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4736 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4737 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4738 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4739 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4741 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4743 * linux-low.c (linux_look_up_symbols): Don't call
4744 linux_supports_traceclone.
4745 * linux-low.h (thread_db_init): Remove use_events argument.
4746 * thread-db.c (thread_db_use_event): Remove global variable.
4747 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4748 (struct thread_db) <td_create_bp>: Remove field.
4749 (thread_db_create_event): Remove function.
4750 (thread_db_enable_reporting): Likewise.
4751 (find_one_thread): Don't check for thread_db_use_events.
4752 (attach_thread): Likewise.
4753 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4754 (try_thread_db_load_1): Don't check for thread_db_use_events.
4755 (thread_db_init): Remove use_events argument and thread events
4757 (remove_thread_event_breakpoints): Remove function.
4758 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4760 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4762 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4764 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4765 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4766 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4767 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4768 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4770 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4772 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4773 * linux-low.c (can_hardware_single_step): Use
4774 supports_hardware_single_step.
4775 (can_software_single_step): New function.
4776 (start_step_over): Call can_software_single_step.
4777 (linux_supports_hardware_single_step): New function.
4778 (struct target_ops) <supports_software_single_step>: Initialize.
4779 * linux-low.h (struct linux_target_ops)
4780 <supports_hardware_single_step>: Initialize.
4781 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4782 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4783 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4784 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4785 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4786 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4787 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4788 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4789 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4790 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4792 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4793 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4795 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4796 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4797 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4799 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4800 * target.h (struct target_ops): <supports_software_single_step>:
4802 (target_supports_software_single_step): New macro.
4804 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4806 * linux-low.c (linux_wait_1): Fix pc advance condition.
4807 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4808 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4810 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4812 * linux-arm-low.c (arm_is_thumb_mode): New function.
4813 (arm_breakpoint_at): Use arm_is_thumb_mode.
4814 (arm_breakpoint_kind_from_current_state): New function.
4815 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4817 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4818 (linux_breakpoint_kind_from_current_state): New function.
4819 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4820 * linux-low.h (struct linux_target_ops)
4821 <breakpoint_kind_from_current_state>: New field.
4822 * target.h (struct target_ops): Likewise.
4823 (target_breakpoint_kind_from_current_state): New macro.
4825 2015-11-30 Pedro Alves <palves@redhat.com>
4827 * linux-low.c (linux_resume): Wake up the event loop before
4830 2015-11-30 Pedro Alves <palves@redhat.com>
4832 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4834 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4836 * target.c (struct thread_search): New structure.
4837 (thread_search_callback): New function.
4838 (prev_general_thread): New global.
4839 (prepare_to_access_memory, done_accessing_memory): New functions.
4840 * target.h (prepare_to_access_memory, done_accessing_memory):
4841 Replace macros with function declarations.
4843 2015-11-30 Pedro Alves <palves@redhat.com>
4846 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4847 report TARGET_WAITKIND_NO_RESUMED.
4848 * remote-utils.c (prepare_resume_reply): Handle
4849 TARGET_WAITKIND_NO_RESUMED.
4850 * server.c (report_no_resumed): New global.
4851 (handle_query) <qSupported>: Handle "no-resumed+". Report
4852 "no-resumed+" support.
4853 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4854 return error if the client doesn't support no-resumed events.
4855 (push_stop_notification): New function.
4856 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4857 events if the client supports them.
4859 2015-11-30 Pedro Alves <palves@redhat.com>
4861 * linux-low.c (thread_still_has_status_pending_p): Don't check
4863 (lwp_resumed): New function.
4864 (status_pending_p_callback): Return early if the LWP is not
4865 supposed to be resumed.
4867 2015-11-30 Pedro Alves <palves@redhat.com>
4869 * linux-low.c (handle_extended_wait): Assert that the LWP's
4870 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4871 thread create events, leave the new child's status pending.
4872 (linux_low_filter_event): If GDB wants to hear about thread exit
4873 events, leave the LWP marked dead and don't delete it.
4874 (linux_wait_for_event_filtered): Don't check for thread exit.
4875 (filter_exit_event): New function.
4876 (linux_wait_1): Use it, when returning an exit event.
4877 (linux_resume_one_lwp_throw): Assert that the LWP's
4878 waitstatus is TARGET_WAITKIND_IGNORE.
4879 * remote-utils.c (prepare_resume_reply): Handle
4880 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4881 * server.c (report_thread_events): New global.
4882 (handle_general_set): Handle QThreadEvents.
4883 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4884 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4885 TARGET_WAITKIND_THREAD_EXITED.
4886 * server.h (report_thread_events): Declare.
4888 2015-11-30 Pedro Alves <palves@redhat.com>
4890 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4891 the thread's last_resume_kind was resume_stop.
4893 2015-11-30 Pedro Alves <palves@redhat.com>
4895 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4898 2015-11-30 Pedro Alves <palves@redhat.com>
4900 * server.c (handle_v_requests): Handle vCtrlC.
4902 2015-11-30 Pedro Alves <palves@redhat.com>
4904 * gdbthread.h (find_any_thread_of_pid): Declare.
4905 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4907 * server.c (handle_query): If current_thread is NULL, look for
4908 another thread of the selected process.
4910 2015-11-26 Daniel Colascione <dancol@dancol.org>
4911 Simon Marchi <simon.marchi@ericsson.com>
4913 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4914 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4916 * target.h (struct target_ops) <thread_name>: New field.
4917 (target_thread_name): New macro.
4919 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4921 * regcache.h (regcache_invalidate_pid): Add declaration.
4922 * regcache.c (regcache_invalidate_pid): New function, extracted
4923 from regcache_invalidate.
4924 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4925 Add trivial documentation comment.
4926 * lynx-low.c: Use regcache_invalidate_pid instead of
4927 regcache_invalidate.
4929 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4931 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4932 and Elf64_auxv_t if the target is Android.
4934 2015-11-22 Doug Evans <xdje42@gmail.com>
4936 * target.h: #include <sys/types.h>.
4938 2015-11-19 Pedro Alves <palves@redhat.com>
4940 * linux-low.c (linux_process_qsupported): Change prototype.
4942 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4944 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4945 and adjust to loop over all features.
4946 * server.c (handle_query) <qSupported>: Adjust to call
4947 target_process_qsupported once, passing it a vector of unprocessed
4949 * target.h (struct target_ops) <process_qsupported>: Change
4951 (target_process_qsupported): Adjust.
4953 2015-11-19 Pedro Alves <palves@redhat.com>
4955 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4957 * configure: Regenerate.
4959 2015-11-19 Pedro Alves <palves@redhat.com>
4961 * configure: Regenerate.
4963 2015-11-19 Yao Qi <yao.qi@linaro.org>
4965 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4968 2015-11-19 Yao Qi <yao.qi@linaro.org>
4970 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4971 (struct aarch64_operand): Move enum out.
4973 2015-11-19 Yao Qi <yao.qi@linaro.org>
4975 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4976 struct user_fpsimd_state *.
4977 (aarch64_store_fpregset): Likewise.
4979 2015-11-19 Yao Qi <yao.qi@linaro.org>
4981 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4982 struct user_pt_regs *.
4983 (aarch64_store_gregset): Likewise.
4985 2015-11-18 Pedro Alves <palves@redhat.com>
4987 * Makefile.in (all_object_files): Add $IPA_OBJS.
4989 2015-11-17 Pedro Alves <palves@redhat.com>
4991 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4992 GDB_SIGNAL_0 and gdb_signal_to_string.
4994 2015-11-17 Pedro Alves <palves@redhat.com>
4996 * win32-low.c (handle_output_debug_string): Remove parameter.
4997 (win32_kill): Remove our_status local and adjust call to
4998 handle_output_debug_string.
4999 (get_child_debug_event): Adjust call to
5000 handle_output_debug_string.
5002 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5004 * linux-mips-low.c (mips_fill_gregset): Add cast.
5005 (mips_store_gregset): Likewise.
5006 (mips_fill_fpregset): Likewise.
5007 (mips_store_fpregset): Likewise.
5009 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5011 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5014 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5016 * linux-mips-low.c (mips_linux_new_thread): Change type of
5017 watch_type to enum target_hw_bp_type.
5019 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5021 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5022 Change return type to arm_hwbp_type.
5024 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5026 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5027 (arm_store_gregset): Likewise.
5028 * linux-arm-low.c (arm_get_hwcap): Likewise.
5029 (arm_read_description): Likewise.
5031 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5033 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5035 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5037 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5038 (ppc_fill_vsxregset): Likewise.
5039 (ppc_store_vsxregset): Likewise.
5040 (ppc_fill_vrregset): Likewise.
5041 (ppc_store_vrregset): Likewise.
5042 (ppc_fill_evrregset): Likewise.
5043 (ppc_store_evrregset): Likewise.
5045 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5047 * linux-ppc-low.c (ppc_usrregs_info): Remove
5048 forward-declaration.
5049 (ppc_arch_setup): Move lower in file.
5051 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5053 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5054 (ps_pdwrite): Likewise.
5056 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5058 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5059 to after assert checks.
5061 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5063 * proc-service.c (ps_pdread): Add/adjust casts.
5064 (ps_pdwrite): Add/adjust casts.
5066 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5068 * server.c (handle_search_memory_1): Cast return value of
5071 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5073 * server.c (write_qxfer_response): Change type of data to
5076 2015-10-29 Pedro Alves <palves@redhat.com>
5078 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5080 2015-10-29 Pedro Alves <palves@redhat.com>
5082 * tracepoint.c (clear_installed_tracepoints): Add casts.
5084 2015-10-29 Pedro Alves <palves@redhat.com>
5086 * server.c (handle_v_cont, process_serial_event): Add enum
5087 gdb_signal casts to signal parsing code.
5089 2015-10-29 Pedro Alves <palves@redhat.com>
5091 * linux-low.h (NULL_REGSET): Define.
5092 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5093 * linux-arm-low.c (arm_regsets): Likewise.
5094 * linux-crisv32-low.c (cris_regsets): Likewise.
5095 * linux-m68k-low.c (m68k_regsets): Likewise.
5096 * linux-mips-low.c (mips_regsets): Likewise.
5097 * linux-nios2-low.c (nios2_regsets): Likewise.
5098 * linux-ppc-low.c (ppc_regsets): Likewise.
5099 * linux-s390-low.c (s390_regsets): Likewise.
5100 * linux-sh-low.c (sh_regsets): Likewise.
5101 * linux-sparc-low.c (sparc_regsets): Likewise.
5102 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5103 * linux-tile-low.c (tile_regsets): Likewise.
5104 * linux-x86-low.c (x86_regsets): Likewise.
5105 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5107 2015-10-29 Pedro Alves <palves@redhat.com>
5109 * linux-low.h (NULL_REGSET): Define.
5110 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5111 * linux-arm-low.c (arm_regsets): Likewise.
5112 * linux-crisv32-low.c (cris_regsets): Likewise.
5113 * linux-m68k-low.c (m68k_regsets): Likewise.
5114 * linux-mips-low.c (mips_regsets): Likewise.
5115 * linux-nios2-low.c (nios2_regsets): Likewise.
5116 * linux-ppc-low.c (ppc_regsets): Likewise.
5117 * linux-s390-low.c (s390_regsets): Likewise.
5118 * linux-sh-low.c (sh_regsets): Likewise.
5119 * linux-sparc-low.c (sparc_regsets): Likewise.
5120 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5121 * linux-tile-low.c (tile_regsets): Likewise.
5122 * linux-x86-low.c (x86_regsets): Likewise.
5123 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5125 2015-10-26 Doug Evans <dje@google.com>
5127 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5129 2015-10-26 Doug Evans <dje@google.com>
5131 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5133 2015-10-26 Doug Evans <dje@google.com>
5135 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5137 (attach_thread, find_new_threads_callback): Ditto.
5139 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5141 * mem-break.h (set_breakpoint_data): Remove.
5143 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5145 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5146 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5147 (initialize_low): Remove set_breakpoint_data call.
5148 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5149 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5150 (initialize_low): Remove set_breakpoint_data call.
5151 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5152 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5153 (initialize_low): Remove set_breakpoint_data call.
5155 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5157 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5158 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5159 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5160 * target.h (target_breakpoint_kind_from_pc): New macro.
5162 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5164 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5165 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5166 the default breakpoint kind.
5168 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5170 * linux-arm-low.c (arm_supports_z_point_type): Add software
5173 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5175 * linux-arm-low.c: Refactor breakpoint definitions.
5176 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5177 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5179 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5181 * Makefile.in: Add arm.c/o.
5182 * configure.srv: Likewise.
5183 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5184 (arm_breakpoint_kind_from_pc): New function.
5185 (arm_sw_breakpoint_from_kind): Return proper kind.
5186 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5188 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5190 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5192 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5193 (struct raw_breakpoint) <size>: Remove.
5194 (struct raw_breakpoint) <kind>: Add.
5195 (bp_size): New function.
5196 (bp_opcode): Likewise.
5197 (find_raw_breakpoint_at): Adjust for kind.
5198 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5199 (remove_memory_breakpoint): Adjust for kind call bp_size.
5200 (set_raw_breakpoint_at): Adjust for kind.
5201 (set_breakpoint): Likewise.
5202 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5203 (delete_raw_breakpoint): Adjust for kind.
5204 (delete_breakpoint): Likewise.
5205 (find_gdb_breakpoint): Likewise.
5206 (set_gdb_breakpoint_1): Likewise.
5207 (set_gdb_breakpoint): Likewise.
5208 (delete_gdb_breakpoint_1): Likewise.
5209 (delete_gdb_breakpoint): Likewise.
5210 (uninsert_raw_breakpoint): Likewise.
5211 (reinsert_raw_breakpoint): Likewise.
5212 (set_breakpoint_data): Remove.
5213 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5214 (check_mem_read): Adjust for kind call bp_size.
5215 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5216 (clone_one_breakpoint): Adjust for kind.
5217 * mem-break.h (set_gdb_breakpoint): Likewise.
5218 (delete_gdb_breakpoint): Likewise.
5219 * server.c (process_serial_event): Likewise.
5221 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5223 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5224 (struct linux_target_ops) <breakpoint>: Remove.
5225 (struct linux_target_ops) <breakpoint_len>: Remove.
5226 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5227 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5228 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5229 (arm_sw_breakpoint_from_kind): New function.
5230 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5231 (struct linux_target_ops) <breakpoint>: Remove.
5232 (struct linux_target_ops) <breakpoint_len>: Remove.
5233 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5234 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5235 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5236 (struct linux_target_ops) <breakpoint>: Remove.
5237 (struct linux_target_ops) <breakpoint_len>: Remove.
5238 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5240 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5241 (struct linux_target_ops) <breakpoint>: Remove.
5242 (struct linux_target_ops) <breakpoint_len>: Remove.
5243 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5244 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5245 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5246 and sw_breakpoint_from_kind to increment the pc.
5247 (linux_breakpoint_kind_from_pc): New function.
5248 (linux_sw_breakpoint_from_kind): New function.
5249 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5250 (initialize_low): Call breakpoint_kind_from_pc and
5251 sw_breakpoint_from_kind to replace breakpoint_data/len.
5252 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5254 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5255 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5256 (struct linux_target_ops) <breakpoint>: Remove.
5257 (struct linux_target_ops) <breakpoint_len>: Remove.
5258 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5259 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5260 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5261 (struct linux_target_ops) <breakpoint>: Remove.
5262 (struct linux_target_ops) <breakpoint_len>: Remove.
5263 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5264 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5265 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5266 (struct linux_target_ops) <breakpoint>: Remove.
5267 (struct linux_target_ops) <breakpoint_len>: Remove.
5268 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5269 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5270 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5271 (struct linux_target_ops) <breakpoint>: Remove.
5272 (struct linux_target_ops) <breakpoint_len>: Remove.
5273 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5274 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5275 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5276 (struct linux_target_ops) <breakpoint>: Remove.
5277 (struct linux_target_ops) <breakpoint_len>: Remove.
5278 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5279 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5280 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5281 (struct linux_target_ops) <breakpoint>: Remove.
5282 (struct linux_target_ops) <breakpoint_len>: Remove.
5283 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5284 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5285 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5286 (struct linux_target_ops) <breakpoint>: Remove.
5287 (struct linux_target_ops) <breakpoint_len>: Remove.
5288 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5289 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5290 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5291 (struct linux_target_ops) <breakpoint>: Remove.
5292 (struct linux_target_ops) <breakpoint_len>: Remove.
5293 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5294 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5295 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5296 (struct linux_target_ops) <breakpoint>: Remove.
5297 (struct linux_target_ops) <breakpoint_len>: Remove.
5298 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5299 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5300 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5301 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5302 (struct linux_target_ops) <breakpoint>: Remove.
5303 (struct linux_target_ops) <breakpoint_len>: Remove.
5304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5306 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5307 (struct linux_target_ops) <breakpoint>: Remove.
5308 (struct linux_target_ops) <breakpoint_len>: Remove.
5309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5312 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5314 * linux-cris-low.c (cris_get_pc): Remove void arg.
5316 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5318 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5321 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5323 * inferiors.c (thread_pid_matches_callback): New function.
5324 (find_thread_process): New function.
5325 (remove_thread): Reset current_thread.
5326 (remove_process): Assert threads have been removed first.
5328 2015-10-15 Yao Qi <yao.qi@linaro.org>
5330 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5332 (aarch64_remove_point): Likewise.
5333 * regcache.c (regcache_register_size): New function.
5335 2015-10-12 Yao Qi <yao.qi@linaro.org>
5337 * linux-aarch64-low.c: Update all callers as emit_load_store
5338 is renamed to aarch64_emit_load_store.
5340 2015-10-12 Yao Qi <yao.qi@linaro.org>
5342 * linux-aarch64-low.c: Update all callers of function renaming
5343 from emit_insn to aarch64_emit_insn.
5345 2015-10-12 Yao Qi <yao.qi@linaro.org>
5347 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5348 arch/aarch64-insn.h.
5349 (struct aarch64_memory_operand): Likewise.
5351 (emit_insn): Move to arch/aarch64-insn.c.
5352 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5353 (emit_load_store): Move to arch/aarch64-insn.c.
5354 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5355 (can_encode_int32): Remove.
5357 2015-10-12 Yao Qi <yao.qi@linaro.org>
5359 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5360 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5361 (aarch64_relocate_instruction): Likewise.
5362 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5363 (struct aarch64_insn_visitor): Likewise.
5365 2015-10-12 Yao Qi <yao.qi@linaro.org>
5367 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5368 (struct aarch64_insn_visitor): New.
5369 (struct aarch64_insn_relocation_data): New.
5370 (aarch64_ftrace_insn_reloc_b): New function.
5371 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5372 (aarch64_ftrace_insn_reloc_cb): Likewise.
5373 (aarch64_ftrace_insn_reloc_tb): Likewise.
5374 (aarch64_ftrace_insn_reloc_adr): Likewise.
5375 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5376 (aarch64_ftrace_insn_reloc_others): Likewise.
5378 (aarch64_relocate_instruction): Use visitor.
5380 2015-10-12 Yao Qi <yao.qi@linaro.org>
5382 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5383 int. Add argument buf.
5384 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5385 aarch64_relocate_instruction.
5387 2015-10-12 Yao Qi <yao.qi@linaro.org>
5389 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5390 argument insn. Remove local variable insn. Don't call
5392 (aarch64_install_fast_tracepoint_jump_pad): Call
5395 2015-09-30 Yao Qi <yao.qi@linaro.org>
5397 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5398 (emit_load_store_pair): Likewise.
5400 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5402 * dll.c (match_dll): Add cast(s).
5403 (unloaded_dll): Likewise.
5404 * linux-low.c (second_thread_of_pid_p): Likewise.
5405 (delete_lwp_callback): Likewise.
5406 (count_events_callback): Likewise.
5407 (select_event_lwp_callback): Likewise.
5408 (linux_set_resume_request): Likewise.
5409 * server.c (accumulate_file_name_length): Likewise.
5410 (emit_dll_description): Likewise.
5411 (handle_qxfer_threads_worker): Likewise.
5412 (visit_actioned_threads): Likewise.
5413 * thread-db.c (any_thread_of): Likewise.
5414 * tracepoint.c (same_process_p): Likewise.
5415 (match_blocktype): Likewise.
5416 (build_traceframe_info_xml): Likewise.
5418 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5420 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5422 (gdb_unparse_agent_expr): Likewise.
5423 * hostio.c (require_data): Likewise.
5424 (handle_pread): Likewise.
5425 * linux-low.c (disable_regset): Likewise.
5426 (fetch_register): Likewise.
5427 (store_register): Likewise.
5428 (get_dynamic): Likewise.
5429 (linux_qxfer_libraries_svr4): Likewise.
5430 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5431 (set_fast_tracepoint_jump): Likewise.
5432 (uninsert_fast_tracepoint_jumps_at): Likewise.
5433 (reinsert_fast_tracepoint_jumps_at): Likewise.
5434 (validate_inserted_breakpoint): Likewise.
5435 (clone_agent_expr): Likewise.
5436 * regcache.c (init_register_cache): Likewise.
5437 * remote-utils.c (putpkt_binary_1): Likewise.
5438 (decode_M_packet): Likewise.
5439 (decode_X_packet): Likewise.
5440 (look_up_one_symbol): Likewise.
5441 (relocate_instruction): Likewise.
5442 (monitor_output): Likewise.
5443 * server.c (handle_search_memory): Likewise.
5444 (handle_qxfer_exec_file): Likewise.
5445 (handle_qxfer_libraries): Likewise.
5446 (handle_qxfer): Likewise.
5447 (handle_query): Likewise.
5448 (handle_v_cont): Likewise.
5449 (handle_v_run): Likewise.
5450 (captured_main): Likewise.
5451 * target.c (write_inferior_memory): Likewise.
5452 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5453 * tracepoint.c (init_trace_buffer): Likewise.
5454 (add_tracepoint_action): Likewise.
5455 (add_traceframe): Likewise.
5456 (add_traceframe_block): Likewise.
5457 (cmd_qtdpsrc): Likewise.
5458 (cmd_qtdv): Likewise.
5459 (cmd_qtstatus): Likewise.
5460 (response_source): Likewise.
5461 (response_tsv): Likewise.
5462 (cmd_qtnotes): Likewise.
5463 (gdb_collect): Likewise.
5464 (initialize_tracepoint): Likewise.
5466 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5468 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5469 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5470 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5472 (enum aarch64_condition_codes): New enum.
5473 (w0): New static global.
5476 (struct aarch64_memory_operand) <type>: New
5477 MEMORY_OPERAND_POSTINDEX type.
5478 (postindex_memory_operand): New helper function.
5479 (emit_ret): New function.
5480 (emit_load_store_pair): New function, factored out of emit_stp
5481 with support for MEMORY_OPERAND_POSTINDEX.
5482 (emit_stp): Rewrite using emit_load_store_pair.
5483 (emit_ldp): New function.
5484 (emit_load_store): Likewise.
5485 (emit_ldr): Mention post-index instruction in comment.
5486 (emit_ldrh): New function.
5487 (emit_ldrb): New function.
5488 (emit_ldrsw): Mention post-index instruction in comment.
5489 (emit_str): Likewise.
5490 (emit_subs): New function.
5491 (emit_cmp): Likewise.
5492 (emit_and): Likewise.
5493 (emit_orr): Likewise.
5494 (emit_orn): Likewise.
5495 (emit_eor): Likewise.
5496 (emit_mvn): Likewise.
5497 (emit_lslv): Likewise.
5498 (emit_lsrv): Likewise.
5499 (emit_asrv): Likewise.
5500 (emit_mul): Likewise.
5501 (emit_sbfm): Likewise.
5502 (emit_sbfx): Likewise.
5503 (emit_ubfm): Likewise.
5504 (emit_ubfx): Likewise.
5505 (emit_csinc): Likewise.
5506 (emit_cset): Likewise.
5507 (emit_nop): Likewise.
5508 (emit_ops_insns): New helper function.
5509 (emit_pop): Likewise.
5510 (emit_push): Likewise.
5511 (aarch64_emit_prologue): New function.
5512 (aarch64_emit_epilogue): Likewise.
5513 (aarch64_emit_add): Likewise.
5514 (aarch64_emit_sub): Likewise.
5515 (aarch64_emit_mul): Likewise.
5516 (aarch64_emit_lsh): Likewise.
5517 (aarch64_emit_rsh_signed): Likewise.
5518 (aarch64_emit_rsh_unsigned): Likewise.
5519 (aarch64_emit_ext): Likewise.
5520 (aarch64_emit_log_not): Likewise.
5521 (aarch64_emit_bit_and): Likewise.
5522 (aarch64_emit_bit_or): Likewise.
5523 (aarch64_emit_bit_xor): Likewise.
5524 (aarch64_emit_bit_not): Likewise.
5525 (aarch64_emit_equal): Likewise.
5526 (aarch64_emit_less_signed): Likewise.
5527 (aarch64_emit_less_unsigned): Likewise.
5528 (aarch64_emit_ref): Likewise.
5529 (aarch64_emit_if_goto): Likewise.
5530 (aarch64_emit_goto): Likewise.
5531 (aarch64_write_goto_address): Likewise.
5532 (aarch64_emit_const): Likewise.
5533 (aarch64_emit_call): Likewise.
5534 (aarch64_emit_reg): Likewise.
5535 (aarch64_emit_pop): Likewise.
5536 (aarch64_emit_stack_flush): Likewise.
5537 (aarch64_emit_zero_ext): Likewise.
5538 (aarch64_emit_swap): Likewise.
5539 (aarch64_emit_stack_adjust): Likewise.
5540 (aarch64_emit_int_call_1): Likewise.
5541 (aarch64_emit_void_call_2): Likewise.
5542 (aarch64_emit_eq_goto): Likewise.
5543 (aarch64_emit_ne_goto): Likewise.
5544 (aarch64_emit_lt_goto): Likewise.
5545 (aarch64_emit_le_goto): Likewise.
5546 (aarch64_emit_gt_goto): Likewise.
5547 (aarch64_emit_ge_got): Likewise.
5548 (aarch64_emit_ops_impl): New static global variable.
5549 (aarch64_emit_ops): New target function, return
5550 &aarch64_emit_ops_impl.
5551 (struct linux_target_ops): Install it.
5553 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5555 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5556 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5558 * linux-aarch64-ipa.c: New file.
5559 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5561 (aarch64_get_thread_area): New target method.
5562 (extract_signed_bitfield): New helper function.
5563 (aarch64_decode_ldr_literal): New function.
5564 (enum aarch64_opcodes): New enum.
5565 (struct aarch64_register): New struct.
5566 (struct aarch64_operand): New struct.
5567 (x0): New static global.
5576 (aarch64_register): New helper function.
5577 (register_operand): Likewise.
5578 (immediate_operand): Likewise.
5579 (struct aarch64_memory_operand): New struct.
5580 (offset_memory_operand): New helper function.
5581 (preindex_memory_operand): Likewise.
5582 (enum aarch64_system_control_registers): New enum.
5583 (ENCODE): New macro.
5584 (emit_insn): New helper function.
5585 (emit_b): New function.
5586 (emit_bcond): Likewise.
5587 (emit_cb): Likewise.
5588 (emit_tb): Likewise.
5589 (emit_blr): Likewise.
5590 (emit_stp): Likewise.
5591 (emit_ldp_q_offset): Likewise.
5592 (emit_stp_q_offset): Likewise.
5593 (emit_load_store): Likewise.
5594 (emit_ldr): Likewise.
5595 (emit_ldrsw): Likewise.
5596 (emit_str): Likewise.
5597 (emit_ldaxr): Likewise.
5598 (emit_stxr): Likewise.
5599 (emit_stlr): Likewise.
5600 (emit_data_processing_reg): Likewise.
5601 (emit_data_processing): Likewise.
5602 (emit_add): Likewise.
5603 (emit_sub): Likewise.
5604 (emit_mov): Likewise.
5605 (emit_movk): Likewise.
5606 (emit_mov_addr): Likewise.
5607 (emit_mrs): Likewise.
5608 (emit_msr): Likewise.
5609 (emit_sevl): Likewise.
5610 (emit_wfe): Likewise.
5611 (append_insns): Likewise.
5612 (can_encode_int32_in): New helper function.
5613 (aarch64_relocate_instruction): New function.
5614 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5615 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5616 (struct linux_target_ops): Install aarch64_get_thread_area,
5617 aarch64_install_fast_tracepoint_jump_pad and
5618 aarch64_get_min_fast_tracepoint_insn_len.
5620 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5622 * Makefile.in (aarch64-insn.o): New rule.
5623 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5625 2015-09-21 Yao Qi <yao.qi@linaro.org>
5627 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5629 2015-09-21 Yao Qi <yao.qi@linaro.org>
5631 * tracepoint.c (max_jump_pad_size): Remove.
5633 2015-09-18 Yao Qi <yao.qi@linaro.org>
5635 * linux-aarch64-low.c: Don't include sys/uio.h.
5636 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5638 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5640 * tracepoint.c (eval_result_type): Change prototype.
5641 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5643 2015-09-15 Pedro Alves <palves@redhat.com>
5645 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5646 Check whether to report exec events instead of checking whether
5647 multiprocess is enabled.
5649 2015-09-15 Pedro Alves <palves@redhat.com>
5652 * remote-utils.c (prepare_resume_reply): Merge
5653 TARGET_WAITKIND_VFORK_DONE switch case with the
5654 TARGET_WAITKIND_FORKED case.
5656 2015-09-15 Yao Qi <yao.qi@linaro.org>
5658 * server.c (handle_query): Check string comparison using
5659 "else if" instead of "if".
5661 2015-09-15 Yao Qi <yao.qi@linaro.org>
5663 * server.c (vCont_supported): New global variable.
5664 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5665 matches. Append ";vContSupported+" to own_buf.
5666 (handle_v_requests): Append ";s;S" to own_buf if target supports
5667 hardware single step or vCont_supported is false.
5668 (capture_main): Set vCont_supported to zero.
5670 2015-09-15 Yao Qi <yao.qi@linaro.org>
5672 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5674 (linux_supports_hardware_single_step): ... New function.
5675 (linux_target_ops): Update.
5676 * lynx-low.c (lynx_target_ops): Set field
5677 supports_hardware_single_step to target_can_do_hardware_single_step.
5678 * nto-low.c (nto_target_ops): Likewise.
5679 * spu-low.c (spu_target_ops): Likewise.
5680 * win32-low.c (win32_target_ops): Likewise.
5681 * target.c (target_can_do_hardware_single_step): New function.
5682 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5683 Remove. <supports_hardware_single_step>: New field.
5684 (target_supports_conditional_breakpoints): Remove.
5685 (target_supports_hardware_single_step): New macro.
5686 (target_can_do_hardware_single_step): Declare.
5687 * server.c (handle_query): Use target_supports_hardware_single_step
5688 instead of target_supports_conditional_breakpoints.
5690 2015-09-15 Yao Qi <yao.qi@linaro.org>
5692 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5694 (struct linux_target_ops the_low_target): Install
5695 aarch64_linux_siginfo_fixup.
5697 2015-09-11 Don Breazeal <donb@codesourcery.com>
5698 Luis Machado <lgustavo@codesourcery.com>
5700 * linux-low.c (linux_mourn): Static declaration.
5701 (linux_arch_setup): Move in front of
5702 handle_extended_wait.
5703 (linux_arch_setup_thread): New function.
5704 (handle_extended_wait): Handle exec events. Call
5705 linux_arch_setup_thread. Make event_lwp argument a
5706 pointer-to-a-pointer.
5707 (check_zombie_leaders): Do not check stopped threads.
5708 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5709 (linux_low_filter_event): Add lwp and thread for exec'ing
5710 non-leader thread if leader thread has been deleted.
5711 Refactor code into linux_arch_setup_thread and call it.
5712 Pass child lwp pointer by reference to handle_extended_wait.
5713 (linux_wait_for_event_filtered): Update comment.
5714 (linux_wait_1): Prevent clobbering exec event status.
5715 (linux_supports_exec_events): New function.
5716 (linux_target_ops) <supports_exec_events>: Initialize new member.
5717 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5719 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5720 * server.c (report_exec_events): New global variable.
5721 (handle_query): Handle qSupported query for exec-events feature.
5722 (captured_main): Initialize report_exec_events.
5723 * server.h (report_exec_events): Declare new global variable.
5724 * target.h (struct target_ops) <supports_exec_events>: New
5726 (target_supports_exec_events): New macro.
5727 * win32-low.c (win32_target_ops) <supports_exec_events>:
5728 Initialize new member.
5730 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5732 * linux-low.c (linux_low_enable_btrace): Remove.
5733 (linux_target_ops): Replace linux_low_enable_btrace with
5734 linux_enable_btrace.
5736 2015-09-03 Yao Qi <yao.qi@linaro.org>
5738 * linux-aarch64-low.c (aarch64_insert_point): Call
5739 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5742 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5744 * linux-low.c (check_stopped_by_breakpoint): Use
5745 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5747 2015-08-27 Pedro Alves <palves@redhat.com>
5749 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5751 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5753 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5754 the XNEW-family equivalent.
5755 (compile_bytecodes): Likewise.
5756 * dll.c (loaded_dll): Likewise.
5757 * event-loop.c (append_callback_event): Likewise.
5758 (create_file_handler): Likewise.
5759 (create_file_event): Likewise.
5760 * hostio.c (handle_open): Likewise.
5761 * inferiors.c (add_thread): Likewise.
5762 (add_process): Likewise.
5763 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5764 * linux-arm-low.c (arm_new_process): Likewise.
5765 (arm_new_thread): Likewise.
5766 * linux-low.c (add_to_pid_list): Likewise.
5767 (linux_add_process): Likewise.
5768 (handle_extended_wait): Likewise.
5769 (add_lwp): Likewise.
5770 (enqueue_one_deferred_signal): Likewise.
5771 (enqueue_pending_signal): Likewise.
5772 (linux_resume_one_lwp_throw): Likewise.
5773 (linux_resume_one_thread): Likewise.
5774 (linux_read_memory): Likewise.
5775 (linux_write_memory): Likewise.
5776 * linux-mips-low.c (mips_linux_new_process): Likewise.
5777 (mips_linux_new_thread): Likewise.
5778 (mips_add_watchpoint): Likewise.
5779 * linux-x86-low.c (initialize_low_arch): Likewise.
5780 * lynx-low.c (lynx_add_process): Likewise.
5781 * mem-break.c (set_raw_breakpoint_at): Likewise.
5782 (set_breakpoint): Likewise.
5783 (add_condition_to_breakpoint): Likewise.
5784 (add_commands_to_breakpoint): Likewise.
5785 (clone_agent_expr): Likewise.
5786 (clone_one_breakpoint): Likewise.
5787 * regcache.c (new_register_cache): Likewise.
5788 * remote-utils.c (look_up_one_symbol): Likewise.
5789 * server.c (queue_stop_reply): Likewise.
5790 (start_inferior): Likewise.
5791 (queue_stop_reply_callback): Likewise.
5792 (handle_target_event): Likewise.
5793 * spu-low.c (fetch_ppc_memory): Likewise.
5794 (store_ppc_memory): Likewise.
5795 * target.c (set_target_ops): Likewise.
5796 * thread-db.c (thread_db_load_search): Likewise.
5797 (try_thread_db_load_1): Likewise.
5798 * tracepoint.c (add_tracepoint): Likewise.
5799 (add_tracepoint_action): Likewise.
5800 (create_trace_state_variable): Likewise.
5801 (cmd_qtdpsrc): Likewise.
5802 (cmd_qtro): Likewise.
5803 (add_while_stepping_state): Likewise.
5804 * win32-low.c (child_add_thread): Likewise.
5805 (get_image_name): Likewise.
5807 2015-08-25 Yao Qi <yao.qi@linaro.org>
5809 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5811 2015-08-25 Yao Qi <yao.qi@linaro.org>
5813 * Makefile.in (aarch64-linux.o): New rule.
5814 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5816 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5817 (aarch64_init_debug_reg_state): Make it extern.
5818 (aarch64_linux_prepare_to_resume): Remove.
5820 2015-08-25 Yao Qi <yao.qi@linaro.org>
5822 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5823 lwp_arch_private_info and ptid_of_lwp.
5825 2015-08-25 Yao Qi <yao.qi@linaro.org>
5827 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5828 Find proc_info by find_process_pid. All callers updated.
5830 2015-08-25 Yao Qi <yao.qi@linaro.org>
5832 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5834 (debug_reg_change_callback): Remove.
5835 (aarch64_notify_debug_reg_change): Remove.
5837 2015-08-25 Yao Qi <yao.qi@linaro.org>
5839 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5840 Call current_lwp_ptid.
5842 2015-08-25 Yao Qi <yao.qi@linaro.org>
5844 * linux-aarch64-low.c (debug_reg_change_callback): Use
5847 2015-08-25 Yao Qi <yao.qi@linaro.org>
5849 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5851 2015-08-25 Yao Qi <yao.qi@linaro.org>
5853 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5855 2015-08-25 Yao Qi <yao.qi@linaro.org>
5857 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5860 2015-08-25 Yao Qi <yao.qi@linaro.org>
5862 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5864 (debug_reg_change_callback): Remove argument entry and add argument
5865 lwp. Remove local variable thread. Don't print thread id in the
5866 debugging output. Don't check whether pid of thread equals to pid.
5867 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5868 iterate_over_lwps instead find_inferior.
5870 2015-08-24 Pedro Alves <palves@redhat.com>
5872 * inferiors.c (get_first_process): New function.
5873 * inferiors.h (get_first_process): New declaration.
5874 * remote-utils.c (read_ptid): Default to the first process in the
5875 list, instead of to the current thread's process.
5877 2015-08-24 Pedro Alves <palves@redhat.com>
5879 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5880 * event-loop.c: Likewise.
5881 * remote-utils.c: Likewise.
5882 * tracepoint.c: Likewise.
5884 2015-08-24 Pedro Alves <palves@redhat.com>
5886 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5889 2015-08-21 Pedro Alves <palves@redhat.com>
5891 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5892 instead of literal 1.
5894 2015-08-21 Pedro Alves <palves@redhat.com>
5896 * tdesc.c (default_description): Explicitly zero-initialize.
5898 2015-08-21 Pedro Alves <palves@redhat.com>
5901 * inferiors.c (remove_thread): Discard any pending stop reply for
5903 * server.c (remove_all_on_match_pid): Rename to ...
5904 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5906 (discard_queued_stop_replies): Change parameter to a ptid. Now
5908 (handle_v_kill, kill_inferior_callback, captured_main)
5909 (process_serial_event): Adjust.
5910 * server.h (discard_queued_stop_replies): Declare.
5912 2015-08-21 Pedro Alves <palves@redhat.com>
5914 * linux-low.c (wait_for_sigstop): Always switch to no thread
5915 selected if the previously current thread dies.
5916 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5917 process instead of the current thread's.
5918 * remote-utils.c (input_interrupt): Don't check if there's no
5920 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5921 current thread to the general thread fails, error out.
5922 (handle_qxfer_auxv, handle_qxfer_libraries)
5923 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5924 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5925 (handle_query): Check if there's a thread selected instead of
5926 checking whether there's any thread in the thread list.
5927 (handle_qxfer_threads, handle_qxfer_btrace)
5928 (handle_qxfer_btrace_conf): Don't error out early if there's no
5929 thread in the thread list.
5930 (handle_v_cont, myresume): Don't set the current thread to the
5932 (process_serial_event) <Hg handling>: Also set thread_id if the
5933 previous general thread is still alive.
5934 (process_serial_event) <g/G handling>: If setting the current
5935 thread to the general thread fails, error out.
5936 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5937 thread's lwp instead of the current thread's.
5938 * target.c (set_desired_thread): If the desired thread was not
5939 found, leave the current thread pointing to NULL. Return an int
5940 (boolean) indicating success.
5941 * target.h (set_desired_thread): Change return type to int.
5943 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5945 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5946 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5948 (ps_get_thread_area): New function.
5950 2015-08-19 Gary Benson <gbenson@redhat.com>
5952 * hostio.c (handle_pread): Do not attempt to read more data
5953 than hostio_reply_with_data can fit in a packet.
5955 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5957 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5959 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5961 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5963 2015-08-06 Pedro Alves <palves@redhat.com>
5965 * tracepoint.c (expr_eval_result): Now an int.
5967 2015-08-06 Pedro Alves <palves@redhat.com>
5969 * gdbthread.h (struct regcache): Forward declare.
5970 (struct thread_info) <regcache_data>: Now a struct regcache
5972 * inferiors.c (inferior_regcache_data)
5973 (set_inferior_regcache_data): Now work with struct regcache
5975 * inferiors.h (struct regcache): Forward declare.
5976 (inferior_regcache_data, set_inferior_regcache_data): Now work
5977 with struct regcache pointers.
5978 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5979 (free_register_cache_thread): Remove struct regcache pointer
5982 2015-08-06 Pedro Alves <palves@redhat.com>
5984 * server.c (captured_main): On error, print the exception message
5985 to stderr, and if run_once is set, throw a quit.
5987 2015-08-06 Pedro Alves <palves@redhat.com>
5989 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5992 2015-08-06 Pedro Alves <palves@redhat.com>
5994 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5995 reading beyond the passed in buffer length.
5997 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5999 * tracepoint.c (symbol_list) <required>: Remove.
6001 2015-08-06 Pedro Alves <palves@redhat.com>
6003 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6004 count if stopping and suspending threads.
6005 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6006 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6007 (linux_detach): Complete an ongoing step-over.
6008 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6010 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6011 (linux_wait_1): If passing a signal to the inferior after
6012 finishing a step-over, unsuspend and re-resume all lwps. If we
6013 see a single-step event but the thread should be continuing, don't
6014 pass the trap to gdb.
6015 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6016 internal_error instead of gdb_assert.
6017 (enqueue_pending_signal): New function.
6018 (check_ptrace_stopped_lwp_gone): Add debug output.
6019 (start_step_over): Use internal_error instead of gdb_assert.
6020 (complete_ongoing_step_over): New function.
6021 (linux_resume_one_thread): Don't resume a suspended thread.
6022 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6025 2015-08-06 Pedro Alves <palves@redhat.com>
6027 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6028 (linux_thread_alive): Use lwp_is_marked_dead.
6029 (extended_event_reported): Delete.
6030 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6031 instead of extended_event_reported.
6032 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6034 (lwp_is_marked_dead): New function.
6035 (lwp_running): Use lwp_is_marked_dead.
6036 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6039 2015-08-06 Pedro Alves <palves@redhat.com>
6041 * linux-low.c (linux_wait_1): Move fork event output out of the
6042 !report_to_gdb check. Pass event_child->waitstatus to
6043 target_waitstatus_to_string instead of ourstatus.
6045 2015-08-04 Yao Qi <yao.qi@linaro.org>
6047 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6048 if current_thread is 32 bit.
6050 2015-08-04 Yao Qi <yao.qi@linaro.org>
6052 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6053 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6054 * server.c (extended_protocol): Remove "static".
6055 * server.h (extended_protocol): Declare it.
6057 2015-08-04 Yao Qi <yao.qi@linaro.org>
6059 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6060 both aarch64 and aarch32.
6061 (aarch64_set_pc): Likewise.
6063 2015-08-04 Yao Qi <yao.qi@linaro.org>
6065 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6066 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6067 arm-with-neon.xml to srv_xmlfiles.
6068 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6069 (is_64bit_tdesc): New function.
6070 (aarch64_linux_read_description): New function.
6071 (aarch64_arch_setup): Call aarch64_linux_read_description.
6072 (regs_info): Rename to regs_info_aarch64.
6073 (aarch64_regs_info): Return right regs_info.
6074 (initialize_low_arch): Call initialize_low_arch_aarch32.
6076 2015-08-04 Yao Qi <yao.qi@linaro.org>
6078 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6079 * linux-aarch32-low.c: New file.
6080 * linux-aarch32-low.h: New file.
6081 * linux-arm-low.c (arm_fill_gregset): Move it to
6082 linux-aarch32-low.c.
6083 (arm_store_gregset): Likewise.
6084 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6085 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6086 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6087 (regs_info): Rename to regs_info_arm.
6088 (arm_regs_info): Return regs_info_aarch32 if
6089 have_ptrace_getregset is 1 and target description is
6090 arm_with_neon or arm_with_vfpv3.
6091 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6092 Call initialize_low_arch_aarch32 instead.
6094 2015-08-04 Yao Qi <yao.qi@linaro.org>
6096 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6097 * linux-low.c: ... here.
6098 * linux-low.h (have_ptrace_getregset): Declare it.
6100 2015-08-04 Pedro Alves <palves@redhat.com>
6102 * thread-db.c (struct thread_db): Use new typedefs.
6103 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6105 (disable_thread_event_reporting): Cast result of dlsym to
6106 destination function pointer type.
6107 (thread_db_mourn): Use td_ta_delete_ftype.
6109 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6111 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6113 (CDX_BREAKPOINT): Define for R2.
6114 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6115 (the_low_target): Add comments.
6117 2015-07-30 Yao Qi <yao.qi@linaro.org>
6119 * linux-arm-low.c (arm_hwcap): Remove it.
6120 (arm_read_description): New local variable arm_hwcap. Don't
6121 set arm_hwcap to zero.
6123 2015-07-30 Yao Qi <yao.qi@linaro.org>
6125 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6126 Use regcache->tdesc instead.
6127 (arm_store_wmmxregset): Likewise.
6128 (arm_fill_vfpregset): Likewise.
6129 (arm_store_vfpregset): Likewise.
6131 2015-07-30 Yao Qi <yao.qi@linaro.org>
6133 * linux-arm-low.c: Include arch/arm.h.
6134 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6135 (arm_store_gregset): Likewise.
6137 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6139 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6140 ptrace's 4th parameter.
6142 2015-07-27 Yao Qi <yao.qi@linaro.org>
6144 * configure.srv (case aarch64*-*-linux*): Don't set
6147 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6149 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6151 * linux-arm-low.c: Likewise.
6152 * linux-cris-low.c: Likewise.
6153 * linux-crisv32-low.c: Likewise.
6154 * linux-low.c: Likewise.
6155 * linux-m68k-low.c: Likewise.
6156 * linux-mips-low.c: Likewise.
6157 * linux-nios2-low.c: Likewise.
6158 * linux-s390-low.c: Likewise.
6159 * linux-sparc-low.c: Likewise.
6160 * linux-tic6x-low.c: Likewise.
6161 * linux-tile-low.c: Likewise.
6162 * linux-x86-low.c: Likewise.
6164 2015-07-24 Pedro Alves <palves@redhat.com>
6166 * config.in: Regenerate.
6167 * configure: Regenerate.
6169 2015-07-24 Pedro Alves <palves@redhat.com>
6171 * acinclude.m4: Include ../ptrace.m4.
6172 * configure.ac: Call GDB_AC_PTRACE.
6173 * config.in, configure: Regenerate.
6175 2015-07-24 Yao Qi <yao.qi@linaro.org>
6177 * linux-low.c (linux_create_inferior): Remove setting to
6178 proc->priv->new_inferior.
6179 (linux_attach): Likewise.
6180 (linux_low_filter_event): Likewise.
6181 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6183 2015-07-24 Yao Qi <yao.qi@linaro.org>
6185 * linux-low.c (linux_arch_setup): New function.
6186 (linux_low_filter_event): If proc->tdesc is NULL and
6187 proc->attached is true, call the_low_target.arch_setup.
6188 Otherwise, keep status pending, and return.
6189 (linux_resume_one_lwp_throw): Don't call get_pc if
6190 thread->while_stepping isn't NULL. Don't call
6191 get_thread_regcache if proc->tdesc is NULL.
6192 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6193 (linux_target_ops): Install arch_setup.
6194 * server.c (start_inferior): Call the_target->arch_setup.
6195 * target.h (struct target_ops) <arch_setup>: New field.
6196 (target_arch_setup): New marco.
6197 * lynx-low.c (lynx_target_ops): Update.
6198 * nto-low.c (nto_target_ops): Update.
6199 * spu-low.c (spu_target_ops): Update.
6200 * win32-low.c (win32_target_ops): Update.
6202 2015-07-24 Yao Qi <yao.qi@linaro.org>
6204 * linux-low.c (linux_add_process): Don't set
6205 proc->priv->new_inferior.
6206 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6207 (linux_attach): Likewise.
6209 2015-07-24 Yao Qi <yao.qi@linaro.org>
6211 * server.c (start_inferior): Code refactor.
6213 2015-07-24 Yao Qi <yao.qi@linaro.org>
6215 * server.c (process_serial_event): Set general_thread.
6217 2015-07-21 Yao Qi <yao.qi@linaro.org>
6219 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6220 aarch64_linux_get_debug_reg_capacity.
6222 2015-07-17 Yao Qi <yao.qi@linaro.org>
6224 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6225 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6226 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6227 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6228 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6229 (AARCH64_HWP_ALIGNMENT): Likewise.
6230 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6231 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6232 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6233 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6234 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6235 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6236 (struct aarch64_debug_reg_state): Likewise.
6237 (struct arch_lwp_info): Likewise.
6238 (aarch64_align_watchpoint): Likewise.
6239 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6240 (aarch64_watchpoint_length): Likewise.
6241 (aarch64_point_encode_ctrl_reg): Likewise
6242 (aarch64_point_is_aligned): Likewise.
6243 (aarch64_align_watchpoint): Likewise.
6244 (aarch64_linux_set_debug_regs):
6245 (aarch64_dr_state_insert_one_point): Likewise.
6246 (aarch64_dr_state_remove_one_point): Likewise.
6247 (aarch64_handle_breakpoint): Likewise.
6248 (aarch64_handle_aligned_watchpoint): Likewise.
6249 (aarch64_handle_unaligned_watchpoint): Likewise.
6250 (aarch64_handle_watchpoint): Likewise.
6252 2015-07-17 Yao Qi <yao.qi@linaro.org>
6254 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6255 and don't aarch64_get_debug_reg_state. All callers update.
6256 (aarch64_handle_aligned_watchpoint): Likewise.
6257 (aarch64_handle_unaligned_watchpoint): Likewise.
6258 (aarch64_handle_watchpoint): Likewise.
6259 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6260 (aarch64_remove_point): Likewise.
6262 2015-07-17 Yao Qi <yao.qi@linaro.org>
6264 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6266 (aarch64_handle_unaligned_watchpoint): Likewise.
6268 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6270 Revert the previous 3 commits:
6271 Move gdb_regex* to common/
6272 Move linux_find_memory_regions_full & co.
6273 gdbserver build-id attribute generator
6275 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6276 Jan Kratochvil <jan.kratochvil@redhat.com>
6278 gdbserver build-id attribute generator.
6279 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6280 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6281 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6283 (get_dynamic): Use find_pdhr to traverse program headers.
6284 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6285 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6286 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6287 (get_hex_build_id): New.
6288 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6289 to reply XML document.
6291 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6292 Jan Kratochvil <jan.kratochvil@redhat.com>
6294 * target.c: Include target/target-utils.h and fcntl.h.
6295 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6296 (target_fileio_read_stralloc): New functions.
6298 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6300 * Makefile.in (OBS): Add gdb_regex.o.
6302 * config.in: Rebuilt.
6303 * configure: Rebuilt.
6305 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6306 Jan Kratochvil <jan.kratochvil@redhat.com>
6308 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6309 * Makefile.in (OBS): Add target-utils.o.
6310 (linux-maps.o, target-utils.o): New.
6311 * configure.srv (srv_linux_obj): Add linux-maps.o.
6313 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6315 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6317 (the_low_target): Install it.
6319 2015-07-14 Pedro Alves <palves@redhat.com>
6321 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6322 Instead, ignore ECHILD, and throw an error for other errnos.
6324 2015-07-10 Pedro Alves <palves@redhat.com>
6326 * event-loop.c (struct callback_event) <data>: Change type to
6327 gdb_client_data instance instead of gdb_client_data pointer.
6328 (append_callback_event): Adjust.
6330 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6332 * linux-aarch64-low.c: Add comments for each linux_target_ops
6333 method. Remove comments already covered in target_ops and
6334 linux_target_ops definitions.
6335 (the_low_target): Add comments for each unimplemented method.
6337 2015-07-09 Yao Qi <yao.qi@linaro.org>
6339 * linux-aarch64-low.c (aarch64_regmap): Remove.
6340 (aarch64_usrregs_info): Remove.
6341 (regs_info): Set field usrregs to NULL.
6343 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6345 * linux-low.c: Include "rsp-low.h"
6346 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6347 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6348 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6349 (handle_btrace_enable_pt): New.
6350 (handle_btrace_general_set): Support "pt".
6351 (handle_btrace_conf_general_set): Support "pt:size".
6353 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6355 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6358 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6360 * linux-aarch64-low.c: Remove comment about endianness.
6361 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6362 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6365 2015-06-24 Gary Benson <gbenson@redhat.com>
6367 * linux-i386-ipa.c (stdint.h): Do not include.
6368 * lynx-i386-low.c (stdint.h): Likewise.
6369 * lynx-ppc-low.c (stdint.h): Likewise.
6370 * mem-break.c (stdint.h): Likewise.
6371 * thread-db.c (stdint.h): Likewise.
6372 * tracepoint.c (stdint.h): Likewise.
6373 * win32-low.c (stdint.h): Likewise.
6375 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6377 * server.c (write_qxfer_response): Update call to
6378 remote_escape_output.
6380 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6381 Jan Kratochvil <jan.kratochvil@redhat.com>
6383 Merge multiple hex conversions.
6384 * gdbreplay.c (tohex): Rename to 'fromhex'.
6385 (logchar): Use fromhex.
6387 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6389 * server.c (handle_qxfer_libraries): Set `version' attribute for
6392 2015-06-10 Gary Benson <gbenson@redhat.com>
6394 * target.h (struct target_ops) <multifs_open>: New field.
6395 <multifs_unlink>: Likewise.
6396 <multifs_readlink>: Likewise.
6397 * linux-low.c (nat/linux-namespaces.h): New include.
6398 (linux_target_ops): Initialize the_target->multifs_open,
6399 the_target->multifs_unlink and the_target->multifs_readlink.
6400 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6401 * hostio.c (hostio_fs_pid): New static variable.
6402 (hostio_handle_new_gdb_connection): New function.
6403 (handle_setfs): Likewise.
6404 (handle_open): Use the_target->multifs_open as appropriate.
6405 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6406 (handle_readlink): Use the_target->multifs_readlink as
6408 (handle_vFile): Handle vFile:setfs packets.
6409 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6410 after target_handle_new_gdb_connection.
6412 2015-06-10 Gary Benson <gbenson@redhat.com>
6414 * configure.ac (AC_CHECK_FUNCS): Add setns.
6415 * config.in: Regenerate.
6416 * configure: Likewise.
6417 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6418 (linux-namespaces.o): New rule.
6419 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6421 2015-06-09 Gary Benson <gbenson@redhat.com>
6423 * hostio.c (handle_open): Process mode argument with
6424 fileio_to_host_mode.
6426 2015-06-01 Yao Qi <yao.qi@linaro.org>
6428 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6429 * linux-x86-low.c: Likewise.
6431 2015-05-28 Don Breazeal <donb@codesourcery.com>
6433 * linux-low.c (handle_extended_wait): Initialize
6434 thread_info.last_resume_kind for new fork children.
6436 2015-05-15 Pedro Alves <palves@redhat.com>
6438 * target.h (target_handle_new_gdb_connection): Rewrite using if
6439 wrapped in do/while.
6441 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6443 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6444 * configure, config.in: Regenerate.
6445 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6448 2015-05-12 Don Breazeal <donb@codesourcery.com>
6450 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6451 PTRACE_EVENT_VFORK_DONE.
6452 (linux_low_ptrace_options, extended_event_reported): Add vfork
6454 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6455 and "vforkdone" for RSP 'T' Stop Reply Packet.
6456 * server.h (report_vfork_events): Declare
6459 2015-05-12 Don Breazeal <donb@codesourcery.com>
6461 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6462 (the_low_target) <new_fork>: Initialize new member.
6463 * linux-arm-low.c (arm_new_fork): New function.
6464 (the_low_target) <new_fork>: Initialize new member.
6465 * linux-low.c (handle_extended_wait): Call new target function
6467 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6468 * linux-mips-low.c (mips_add_watchpoint): New function
6469 extracted from mips_insert_point.
6470 (the_low_target) <new_fork>: Initialize new member.
6471 (mips_linux_new_fork): New function.
6472 (mips_insert_point): Call mips_add_watchpoint.
6473 * linux-x86-low.c (x86_linux_new_fork): New function.
6474 (the_low_target) <new_fork>: Initialize new member.
6476 2015-05-12 Don Breazeal <donb@codesourcery.com>
6478 * linux-low.c (handle_extended_wait): Implement return value,
6479 rename argument 'event_child' to 'event_lwp', handle
6480 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6481 (linux_low_ptrace_options): New function.
6482 (linux_low_filter_event): Call linux_low_ptrace_options,
6483 use different argument fo linux_enable_event_reporting,
6484 use return value from handle_extended_wait.
6485 (extended_event_reported): New function.
6486 (linux_wait_1): Call extended_event_reported and set
6487 status to report fork events.
6488 (linux_write_memory): Add pid to debug message.
6489 (reset_lwp_ptrace_options_callback): New function.
6490 (linux_handle_new_gdb_connection): New function.
6491 (linux_target_ops): Initialize new structure member.
6492 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6493 * lynx-low.c: Initialize new structure member.
6494 * remote-utils.c (prepare_resume_reply): Implement stop reason
6495 "fork" for "T" stop message.
6496 * server.c (handle_query): Call handle_new_gdb_connection.
6497 * server.h (report_fork_events): Declare global flag.
6498 * target.h (struct target_ops) <handle_new_gdb_connection>:
6500 (target_handle_new_gdb_connection): New macro.
6501 * win32-low.c: Initialize new structure member.
6503 2015-05-12 Don Breazeal <donb@codesourcery.com>
6505 * mem-break.c (APPEND_TO_LIST): Define macro.
6506 (clone_agent_expr): New function.
6507 (clone_one_breakpoint): New function.
6508 (clone_all_breakpoints): New function.
6509 * mem-break.h: Declare new functions.
6511 2015-05-12 Don Breazeal <donb@codesourcery.com>
6513 * linux-low.c (linux_supports_fork_events): New function.
6514 (linux_supports_vfork_events): New function.
6515 (linux_target_ops): Initialize new structure members.
6516 (initialize_low): Call linux_check_ptrace_features.
6517 * lynx-low.c (lynx_target_ops): Initialize new structure
6519 * server.c (report_fork_events, report_vfork_events):
6521 (handle_query): Add new features to qSupported packet and
6523 (captured_main): Initialize new global variables.
6524 * target.h (struct target_ops) <supports_fork_events>:
6526 <supports_vfork_events>: New member.
6527 (target_supports_fork_events): New macro.
6528 (target_supports_vfork_events): New macro.
6529 * win32-low.c (win32_target_ops): Initialize new structure
6532 2015-05-12 Gary Benson <gbenson@redhat.com>
6534 * server.c (handle_qxfer_exec_file): Use current process
6537 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6539 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6540 Remove HAVE_PTRACE_GETREGS conditionals.
6541 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6542 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6544 2015-05-08 Yao Qi <yao.qi@linaro.org>
6546 * linux-low.c (linux_supports_conditional_breakpoints): New
6548 (linux_target_ops): Install new target method.
6549 * lynx-low.c (lynx_target_ops): Install NULL hook for
6550 supports_conditional_breakpoints.
6551 * nto-low.c (nto_target_ops): Likewise.
6552 * spu-low.c (spu_target_ops): Likewise.
6553 * win32-low.c (win32_target_ops): Likewise.
6554 * server.c (handle_query): Check
6555 target_supports_conditional_breakpoints.
6556 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6558 (target_supports_conditional_breakpoints): New macro.
6560 2015-05-06 Pedro Alves <palves@redhat.com>
6563 * server.c (start_inferior): If the process exits, mourn it.
6565 2015-04-21 Gary Benson <gbenson@redhat.com>
6567 * hostio.c (fileio_open_flags_to_host): Factored out to
6568 fileio_to_host_openflags in common/fileio.c. Single use
6571 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6573 * linux-xtensa-low.c (xtensa_fill_gregset)
6574 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6577 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6579 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6580 (regs_info): Replace usrregs pointer with NULL.
6582 2015-04-17 Gary Benson <gbenson@redhat.com>
6584 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6585 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6586 * server.c (handle_qxfer_exec_file): New function.
6587 (qxfer_packets): Add exec-file entry.
6588 (handle_query): Report qXfer:exec-file:read as supported packet.
6590 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6592 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6594 2015-04-09 Gary Benson <gbenson@redhat.com>
6596 * hostio-errno.c (errno_to_fileio_error): Remove function.
6597 Update caller to use remote_fileio_to_fio_error.
6599 2015-04-09 Yao Qi <yao.qi@linaro.org>
6601 * linux-low.c (linux_insert_point): Call
6602 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6603 (linux_remove_point): Call remove_memory_breakpoint if type is
6605 * linux-x86-low.c (x86_insert_point): Don't call
6606 insert_memory_breakpoint.
6607 (x86_remove_point): Don't call remove_memory_breakpoint.
6609 2015-04-01 Pedro Alves <palves@redhat.com>
6610 Cleber Rosa <crosa@redhat.com>
6612 * server.c (gdbserver_usage): Reorganize and extend the usage
6615 2015-03-24 Pedro Alves <palves@redhat.com>
6617 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6618 output. Also dump TRAP_TRACE.
6619 (linux_low_filter_event): In debug output, distinguish a
6620 resume_stop SIGSTOP from a delayed SIGSTOP.
6622 2015-03-24 Gary Benson <gbenson@redhat.com>
6624 * linux-x86-low.c (x86_linux_new_thread): Moved to
6626 (x86_linux_prepare_to_resume): Likewise.
6628 2015-03-24 Gary Benson <gbenson@redhat.com>
6630 * Makefile.in (x86-linux-dregs.o): New rule.
6631 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6632 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6633 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6634 (x86_linux_dr_get): Likewise.
6635 (x86_linux_dr_set): Likewise.
6636 (update_debug_registers_callback): Likewise.
6637 (x86_linux_dr_set_addr): Likewise.
6638 (x86_linux_dr_get_addr): Likewise.
6639 (x86_linux_dr_set_control): Likewise.
6640 (x86_linux_dr_get_control): Likewise.
6641 (x86_linux_dr_get_status): Likewise.
6642 (x86_linux_update_debug_registers): Likewise.
6644 2015-03-24 Gary Benson <gbenson@redhat.com>
6646 * linux-x86-low.c (x86_linux_update_debug_registers):
6647 New function, factored out from...
6648 (x86_linux_prepare_to_resume): ...this.
6650 2015-03-24 Gary Benson <gbenson@redhat.com>
6652 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6653 (x86_linux_dr_set): Likewise.
6654 (update_debug_registers_callback): Likewise.
6655 (x86_linux_dr_set_addr): Likewise.
6656 (x86_linux_dr_get_addr): Likewise.
6657 (x86_linux_dr_set_control): Likewise.
6658 (x86_linux_dr_get_control): Likewise.
6659 (x86_linux_dr_get_status): Likewise.
6660 (x86_linux_prepare_to_resume): Likewise.
6662 2015-03-24 Gary Benson <gbenson@redhat.com>
6664 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6665 Use perror_with_name. Pass string through gettext.
6666 (x86_linux_dr_set): Likewise.
6668 2015-03-24 Gary Benson <gbenson@redhat.com>
6670 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6671 (x86_linux_dr_set_addr): ...this.
6672 (x86_dr_low_get_addr): Rename to...
6673 (x86_linux_dr_get_addr): ...this.
6674 (x86_dr_low_set_control): Rename to...
6675 (x86_linux_dr_set_control): ...this.
6676 (x86_dr_low_get_control): Rename to...
6677 (x86_linux_dr_get_control): ...this.
6678 (x86_dr_low_get_status): Rename to...
6679 (x86_linux_dr_get_status): ...this.
6680 (x86_dr_low): Update with new function names.
6682 2015-03-24 Gary Benson <gbenson@redhat.com>
6684 * Makefile.in (x86-linux.o): New rule.
6685 * configure.srv: Add x86-linux.o to relevant targets.
6686 * linux-low.c (lwp_set_arch_private_info): New function.
6687 (lwp_arch_private_info): Likewise.
6688 * linux-x86-low.c: Include nat/x86-linux.h.
6689 (arch_lwp_info): Removed structure.
6690 (update_debug_registers_callback):
6691 Use lwp_set_debug_registers_changed.
6692 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6693 and lwp_set_debug_registers_changed.
6694 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6696 2015-03-24 Gary Benson <gbenson@redhat.com>
6698 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6699 * linux-arm-low.c (arm_new_thread): Likewise.
6700 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6701 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6702 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6703 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6705 2015-03-24 Gary Benson <gbenson@redhat.com>
6707 * linux-low.c (ptid_of_lwp): New function.
6708 (lwp_is_stopped): Likewise.
6709 (lwp_stop_reason): Likewise.
6710 * linux-x86-low.c (update_debug_registers_callback):
6712 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6715 2015-03-24 Gary Benson <gbenson@redhat.com>
6717 * linux-low.h (linux_stop_lwp): Remove declaration.
6719 2015-03-24 Gary Benson <gbenson@redhat.com>
6721 * linux-low.h: Include nat/linux-nat.h.
6722 * linux-low.c (iterate_over_lwps_args): New structure.
6723 (iterate_over_lwps_filter): New function.
6724 (iterate_over_lwps): Likewise.
6725 * linux-x86-low.c (update_debug_registers_callback):
6726 Update signature to what iterate_over_lwps expects.
6727 Remove PID check that iterate_over_lwps now performs.
6728 (x86_dr_low_set_addr): Use iterate_over_lwps.
6729 (x86_dr_low_set_control): Likewise.
6731 2015-03-24 Gary Benson <gbenson@redhat.com>
6733 * linux-x86-low.c (x86_debug_reg_state): New function.
6734 (x86_linux_prepare_to_resume): Use the above.
6736 2015-03-24 Gary Benson <gbenson@redhat.com>
6738 * linux-low.c (current_lwp_ptid): New function.
6739 * linux-x86-low.c: Include nat/linux-nat.h.
6740 (x86_dr_low_get_addr): Use current_lwp_ptid.
6741 (x86_dr_low_get_control): Likewise.
6742 (x86_dr_low_get_status): Likewise.
6744 2015-03-20 Pedro Alves <palves@redhat.com>
6746 * tracepoint.c (cmd_qtstatus): Make "str" const.
6748 2015-03-20 Pedro Alves <palves@redhat.com>
6750 * server.c (handle_general_set): Make "req_str" const.
6752 2015-03-19 Pedro Alves <palves@redhat.com>
6754 * linux-low.c (linux_resume_one_lwp): Rename to ...
6755 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6756 instead call perror_with_name.
6757 (check_ptrace_stopped_lwp_gone): New function.
6758 (linux_resume_one_lwp): Reimplement as wrapper around
6759 linux_resume_one_lwp_throw that swallows errors if the LWP is
6762 2015-03-19 Pedro Alves <palves@redhat.com>
6764 * linux-low.c (count_events_callback, select_event_lwp_callback):
6765 No longer check whether the thread has resume_stop as last resume
6768 2015-03-19 Pedro Alves <palves@redhat.com>
6770 * linux-low.c (count_events_callback, select_event_lwp_callback):
6771 Use the lwp's status_pending_p field, not the thread's.
6773 2015-03-19 Pedro Alves <palves@redhat.com>
6775 * linux-low.c (select_event_lwp_callback): Update comments to
6776 no longer mention SIGTRAP.
6778 2015-03-18 Gary Benson <gbenson@redhat.com>
6780 * server.c (handle_query): Do not report vFile:fstat as supported.
6782 2015-03-11 Gary Benson <gbenson@redhat.com>
6784 * hostio.c (sys/types.h): New include.
6785 (sys/stat.h): Likewise.
6786 (common-remote-fileio.h): Likewise.
6787 (handle_fstat): New function.
6788 (handle_vFile): Handle vFile:fstat packets.
6790 2015-03-11 Gary Benson <gbenson@redhat.com>
6792 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6793 struct stat.st_blocks and struct stat.st_blksize.
6794 * configure: Regenerate.
6795 * config.in: Likewise.
6796 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6797 (OBS): Add common-remote-fileio.o.
6798 (common-remote-fileio.o): New rule.
6800 2015-03-09 Pedro Alves <palves@redhat.com>
6802 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6803 'struct sockaddr' pointer in 'accept' call.
6805 2015-03-09 Pedro Alves <palves@redhat.com>
6808 2015-03-07 Pedro Alves <palves@redhat.com>
6809 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6810 or <winsock2.h> here. Instead include "gdb_socket.h".
6811 (remote_open): Use union gdb_sockaddr_u.
6812 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6813 or <winsock2.h> here. Instead include "gdb_socket.h".
6814 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6815 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6817 (init_named_socket, gdb_agent_helper_thread): Use union
6820 2015-03-07 Pedro Alves <palves@redhat.com>
6822 * configure.ac (build_warnings): Move
6823 -Wdeclaration-after-statement to the C-specific set.
6824 * configure: Regenerate.
6826 2015-03-07 Pedro Alves <palves@redhat.com>
6828 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6829 or <winsock2.h> here. Instead include "gdb_socket.h".
6830 (remote_open): Use union gdb_sockaddr_u.
6831 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6832 or <winsock2.h> here. Instead include "gdb_socket.h".
6833 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6834 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6836 (init_named_socket, gdb_agent_helper_thread): Use union
6839 2015-03-07 Pedro Alves <palves@redhat.com>
6841 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6844 2015-03-06 Yao Qi <yao.qi@linaro.org>
6846 * linux-aarch64-low.c (aarch64_insert_point): Use
6847 show_debug_regs as a boolean.
6848 (aarch64_remove_point): Likewise.
6850 2015-03-05 Pedro Alves <palves@redhat.com>
6852 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6853 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6854 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6855 * nto-low.c (nto_target_ops): Likewise.
6856 * spu-low.c (spu_target_ops): Likewise.
6857 * win32-low.c (win32_target_ops): Likewise.
6859 2015-03-04 Pedro Alves <palves@redhat.com>
6861 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6862 Decide whether a breakpoint triggered based on the SIGTRAP's
6864 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6865 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6866 (linux_low_filter_event): Check for breakpoints before checking
6868 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6870 (linux_stopped_by_sw_breakpoint)
6871 (linux_supports_stopped_by_sw_breakpoint)
6872 (linux_stopped_by_hw_breakpoint)
6873 (linux_supports_stopped_by_hw_breakpoint): New functions.
6874 (linux_target_ops): Install new target methods.
6876 2015-03-04 Pedro Alves <palves@redhat.com>
6878 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6879 * server.c (swbreak_feature, hwbreak_feature): New globals.
6880 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6881 (captured_main): Clear swbreak_feature and hwbreak_feature.
6882 * server.h (swbreak_feature, hwbreak_feature): Declare.
6883 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6884 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6885 supports_stopped_by_hw_breakpoint>: New fields.
6886 (target_supports_stopped_by_sw_breakpoint)
6887 (target_stopped_by_sw_breakpoint)
6888 (target_supports_stopped_by_hw_breakpoint)
6889 (target_stopped_by_hw_breakpoint): Declare.
6891 2015-03-04 Pedro Alves <palves@redhat.com>
6893 enum lwp_stop_reason -> enum target_stop_reason
6894 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6895 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6896 (linux_wait_1, stuck_in_jump_pad_callback)
6897 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6898 (linux_stopped_by_watchpoint):
6899 * linux-low.h (enum lwp_stop_reason): Delete.
6900 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6901 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6903 2015-03-04 Yao Qi <yao.qi@linaro.org>
6905 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6907 2015-03-03 Gary Benson <gbenson@redhat.com>
6909 * hostio.c (handle_vFile): Fix prefix lengths.
6911 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6913 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6916 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6918 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6919 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6920 (clean): Add "rm -f" for above C files.
6921 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6922 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6923 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6924 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6925 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6926 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6927 (init_registers_s390x_vx_linux64)
6928 (init_registers_s390x_tevx_linux64)
6929 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6930 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6932 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6933 (s390_store_vxrs_high): New functions.
6934 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6936 (s390_arch_setup): Add logic for selecting one of the new target
6937 descriptions. Activate the new vector regsets if applicable.
6938 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6939 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6940 and init_registers_s390x_tevx_linux64.
6942 2015-03-01 Pedro Alves <palves@redhat.com>
6944 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6947 2015-02-27 Pedro Alves <palves@redhat.com>
6949 * linux-x86-low.c (u_debugreg_offset): New function.
6950 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6952 2015-02-27 Pedro Alves <palves@redhat.com>
6954 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6955 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6956 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6957 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6958 (ps_lsetfpregs, ps_getpid)
6959 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6960 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6961 (ps_lsetxregs, ps_plog): Declare.
6963 2015-02-27 Pedro Alves <palves@redhat.com>
6965 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6966 IP_AGENT_EXPORT_FUNC.
6967 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6968 IP_AGENT_EXPORT_FUNC.
6969 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6970 (IP_AGENT_EXPORT): Delete.
6971 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6972 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6973 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6974 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6975 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6976 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6977 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6978 (traceframe_read_count, traceframe_write_count)
6979 (traceframes_created, trace_state_variables, get_raw_reg)
6980 (get_trace_state_variable_value, set_trace_state_variable_value)
6981 (ust_loaded, helper_thread_id, cmd_buf): Use
6982 IPA_SYM_EXPORTED_NAME.
6983 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6984 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6985 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6986 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6987 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6988 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6989 EXTERN_C_PUSH/EXTERN_C_POP.
6990 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6991 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6992 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6993 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6994 (traceframe_write_count, traceframe_read_count)
6995 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6996 (about_to_request_buffer_space, get_trace_state_variable_value)
6997 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6998 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6999 EXTERN_C_PUSH/EXTERN_C_POP.
7000 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7001 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7002 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7003 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7004 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7005 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7006 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7007 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7009 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7010 (IP_AGENT_EXPORT_VAR_DECL): Define.
7012 (gdb_agent_get_raw_reg): Declare.
7014 2015-02-27 Tom Tromey <tromey@redhat.com>
7015 Pedro Alves <palves@redhat.com>
7017 Rename symbols whose names are reserved C++ keywords throughout.
7019 2015-02-27 Pedro Alves <palves@redhat.com>
7021 * Makefile.in (COMPILER): New, get it from autoconf.
7022 (CXX): Get from autoconf instead.
7023 (COMPILE.pre): Use COMPILER.
7024 (CC-LD): Rename to ...
7025 (CC_LD): ... this. Use COMPILER.
7026 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7027 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7028 * acinclude.m4: Include build-with-cxx.m4.
7029 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7030 Disable -Werror by default if building in C++ mode.
7031 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7032 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7033 the C++ compiler. Save/restore CXXFLAGS too.
7034 * configure: Regenerate.
7036 2015-02-27 Pedro Alves <palves@redhat.com>
7038 * acinclude.m4: Include libiberty.m4.
7039 * configure.ac: Call libiberty_INIT.
7040 * config.in, configure: Regenerate.
7042 2015-02-26 Pedro Alves <palves@redhat.com>
7044 * linux-low.c (linux_wait_1): When incrementing the PC past a
7045 program breakpoint always use the_low_target.breakpoint_len as
7046 increment, rather than the maximum between that and
7047 the_low_target.decr_pc_after_break.
7049 2015-02-23 Pedro Alves <palves@redhat.com>
7051 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7052 thread was doing a step-over; always adjust the PC if
7053 we stepped over a permanent breakpoint.
7054 (linux_wait_1): If we stepped over breakpoint that was on top of a
7055 permanent breakpoint, manually advance the PC past it.
7057 2015-02-23 Pedro Alves <palves@redhat.com>
7059 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7061 (x86_fill_gregset, x86_store_gregset): Use it when handling
7064 2015-02-20 Pedro Alves <palves@redhat.com>
7066 * thread-db.c: Include "nat/linux-procfs.h".
7067 (thread_db_init): Skip listing new threads if the kernel supports
7068 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7070 2015-02-20 Pedro Alves <palves@redhat.com>
7072 * linux-low.c (status_pending_p_callback): Use ptid_match.
7074 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7076 PR breakpoints/16812
7077 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7078 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7079 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7081 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7083 PR breakpoints/15956
7084 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7086 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7088 * linux-low.c (linux_low_btrace_conf): Print size.
7089 * server.c (handle_btrace_conf_general_set): New.
7090 (hanle_general_set): Call handle_btrace_conf_general_set.
7091 (handle_query): Report Qbtrace-conf:bts:size as supported.
7093 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7095 * linux-low.c (linux_low_enable_btrace): Update parameters.
7096 (linux_low_btrace_conf): New.
7097 (linux_target_ops)<to_btrace_conf>: Initialize.
7098 * server.c (current_btrace_conf): New.
7099 (handle_btrace_enable): Rename to ...
7100 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7101 to target_enable_btrace. Update comment. Update users.
7102 (handle_qxfer_btrace_conf): New.
7103 (qxfer_packets): Add btrace-conf entry.
7104 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7105 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7106 (target_ops)<read_btrace_conf>: New.
7107 (target_enable_btrace): Update parameters.
7108 (target_read_btrace_conf): New.
7110 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7112 * server.c (handle_btrace_general_set): Remove call to
7113 target_supports_btrace.
7114 (supported_btrace_packets): New.
7115 (handle_query): Call supported_btrace_packets.
7116 * target.h: include btrace-common.h.
7117 (btrace_target_info): Removed.
7118 (supports_btrace, target_supports_btrace): Update parameters.
7120 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7122 * Makefile.in (SFILES): Add common/btrace-common.c.
7123 (OBS): Add common/btrace-common.o.
7124 (btrace-common.o): Add build rules.
7125 * linux-low: Include btrace-common.h.
7126 (linux_low_read_btrace): Use struct btrace_data. Call
7127 btrace_data_init and btrace_data_fini.
7129 2015-02-06 Pedro Alves <palves@redhat.com>
7131 * thread-db.c (find_new_threads_callback): Add debug output.
7133 2015-02-04 Pedro Alves <palves@redhat.com>
7135 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7136 (resume_stopped_resumed_lwps): New function.
7137 (linux_wait_for_event_filtered): Use it.
7139 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7141 * Makefile.in (SFILES): Add linux-personality.c.
7142 (linux-personality.o): New rule.
7143 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7144 list of objects to be built.
7145 * linux-low.c: Include nat/linux-personality.h.
7146 (linux_create_inferior): Remove code to disable address space
7147 randomization (moved to ../nat/linux-personality.c). Create
7148 cleanup to disable address space randomization.
7150 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7152 * Makefile.in (posix-strerror.o): New rule.
7153 (mingw-strerror.o): Likewise.
7154 * configure: Regenerated.
7155 * configure.ac: Source file ../common/common.host. Initialize new
7156 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7158 2015-01-14 Yao Qi <yao@codesourcery.com>
7160 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7161 (ppc-linux.o): New rule.
7162 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7163 * configure.ac: AC_CHECK_FUNCS(getauxval).
7164 * config.in: Re-generated.
7165 * configure: Re-generated.
7166 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7167 ppc64_64bit_inferior_p
7169 2015-01-14 Yao Qi <yao@codesourcery.com>
7171 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7172 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7173 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7174 (PT_ORIG_R3, PT_TRAP): Likewise.
7175 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7176 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7177 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7179 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7181 * i387-fp.c (i387_cache_to_xsave): In look over
7182 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7183 zmmh_low_space field by use of zmmh_high_space.
7185 2015-01-09 Pedro Alves <palves@redhat.com>
7187 * linux-low.c (step_over_bkpt): Move higher up in the file.
7188 (handle_extended_wait): Don't store the stop_pc here.
7189 (get_stop_pc): Adjust comments and rename to ...
7190 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7191 stopped for a software breakpoint or hardware breakpoint.
7192 (thread_still_has_status_pending_p): New function.
7193 (status_pending_p_callback): Use
7194 thread_still_has_status_pending_p. If the event is no longer
7195 interesting, resume the LWP.
7196 (handle_tracepoints): Add assert.
7197 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7198 (wstatus_maybe_breakpoint): New function.
7199 (cancel_breakpoint): Delete function.
7200 (check_stopped_by_watchpoint): New function, factored out from
7201 linux_low_filter_event.
7202 (lp_status_maybe_breakpoint): Delete function.
7203 (linux_low_filter_event): Remove filter_ptid argument.
7204 Leave thread group exits pending here. Store the LWP's stop PC.
7205 Always leave events pending.
7206 (linux_wait_for_event_filtered): Pull all events out of the
7207 kernel, and leave them all pending.
7208 (count_events_callback, select_event_lwp_callback): Consider all
7210 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7211 (select_event_lwp): Only give preference to the stepping LWP in
7212 all-stop mode. Adjust comments.
7213 (ignore_event): New function.
7214 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7215 references to cancel_breakpoints. Adjust to renames. Also give
7216 equal priority to all LWPs that have had events in non-stop mode.
7217 If reporting a software breakpoint event, unadjust the LWP's PC.
7218 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7219 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7221 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7222 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7223 (linux_stopped_by_watchpoint): Adjust.
7224 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7225 * linux-low.h (enum lwp_stop_reason): New.
7226 (struct lwp_info) <stop_pc>: Adjust comment.
7227 <stopped_by_watchpoint>: Delete field.
7228 <stop_reason>: New field.
7229 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7230 * mem-break.c (software_breakpoint_inserted_here)
7231 (hardware_breakpoint_inserted_here): New function.
7232 * mem-break.h (software_breakpoint_inserted_here)
7233 (hardware_breakpoint_inserted_here): Declare.
7234 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7235 (cancel_breakpoints): Delete.
7236 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7237 (upload_fast_traceframes): Remove references to
7240 2015-01-09 Pedro Alves <palves@redhat.com>
7242 * thread-db.c (find_new_threads_callback): Ignore thread if the
7243 kernel thread ID is -1.
7245 2015-01-09 Pedro Alves <palves@redhat.com>
7247 * linux-low.c (linux_attach_fail_reason_string): Move to
7248 nat/linux-ptrace.c, and rename.
7249 (linux_attach_lwp): Update comment.
7250 (attach_proc_task_lwp_callback): New function.
7251 (linux_attach): Adjust to rename and use
7252 linux_proc_attach_tgid_threads.
7253 (linux_attach_fail_reason_string): Delete declaration.
7255 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7257 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7258 * server.c (gdbserver_version): Likewise.
7260 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7262 * remote-utils.c: Include ctype.h.
7263 (input_interrupt): Explicitly handle the case when the char
7264 received is the NUL byte. Improve the printing of non-ASCII
7267 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7269 * linux-low.c (linux_low_filter_event): Update call to
7270 linux_enable_event_reporting following the addition of
7271 a new parameter to that function.
7273 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7276 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7277 (AARCH64_FPCR_REGNO): Likewise.
7278 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7279 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7280 (aarch64_store_fpregset): Likewise.
7282 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7284 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7285 Remove FIXME comment about assumption about N.
7287 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7289 * configure.ac: If large-file support is disabled in GDBserver,
7290 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7291 * configure: Regenerate.
7293 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7295 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7296 warning upon ENODATA from ptrace.
7297 * linux-s390-low.c (s390_store_tdb): New.
7298 (s390_regsets): Add regset for NT_S390_TDB.
7300 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7302 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7303 without a fill_function.
7304 * linux-s390-low.c (s390_fill_last_break): Remove.
7305 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7306 (s390_arch_setup): Use regset's size instead of fill_function for
7309 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7311 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7312 the regset's store function when ptrace returned an error.
7313 * regcache.c (get_thread_regcache): Invalidate register cache
7314 before fetching inferior's registers.
7316 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7318 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7319 while-loop as for-loop.
7320 (regsets_store_inferior_registers): Likewise.
7322 2014-11-28 Yao Qi <yao@codesourcery.com>
7324 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7325 * config.in, configure: Re-generate.
7326 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7329 2014-11-21 Yao Qi <yao@codesourcery.com>
7331 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7332 (AC_CHECK_HEADERS): Remove malloc.h.
7333 * configure: Re-generated.
7334 * config.in: Re-generated.
7335 * server.h: Don't include alloca.h and malloc.h.
7336 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7337 Don't include malloc.h.
7339 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7341 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7342 corresponding ERRNO check in same block.
7344 2014-11-12 Pedro Alves <palves@redhat.com>
7346 * server.c (cont_thread): Update comment.
7347 (start_inferior, attach_inferior): No longer clear cont_thread.
7348 (handle_v_cont): No longer set cont_thread.
7349 (captured_main): Clear cont_thread each time a GDB connects.
7351 2014-11-12 Pedro Alves <palves@redhat.com>
7353 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7354 thread, and don't resume all threads if the Hc thread has exited.
7356 2014-11-12 Pedro Alves <palves@redhat.com>
7358 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7359 the process group instead of to a specific LWP.
7361 2014-10-15 Pedro Alves <palves@redhat.com>
7364 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7366 (arm_set_thread_context): Delete.
7367 (the_low_target): Adjust.
7368 * win32-i386-low.c (debug_registers_changed)
7369 (debug_registers_used): Delete.
7370 (update_debug_registers_callback): New function.
7371 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7372 needing to update their debug registers.
7373 (win32_get_current_dr): New function.
7374 (x86_dr_low_get_addr, x86_dr_low_get_control)
7375 (x86_dr_low_get_status): Fetch the debug register from the thread
7377 (i386_initial_stuff): Adjust.
7378 (i386_get_thread_context): Remove current_event parameter. Don't
7379 clear debug_registers_changed nor copy DR values to
7381 (i386_set_thread_context): Delete.
7382 (i386_prepare_to_resume): New function.
7383 (i386_thread_added): Mark the thread as needing to update irs
7385 (the_low_target): Remove i386_set_thread_context and install
7386 i386_prepare_to_resume.
7387 * win32-low.c (win32_get_thread_context): Adjust.
7388 (win32_set_thread_context): Use SetThreadContext
7390 (win32_prepare_to_resume): New function.
7391 (win32_require_context): New function, factored out from ...
7392 (thread_rec): ... this.
7393 (continue_one_thread): Call win32_prepare_to_resume on each thread
7394 we're about to continue.
7395 (win32_resume): Call win32_prepare_to_resume on the event thread.
7396 * win32-low.h (struct win32_thread_info)
7397 <debug_registers_changed>: New field.
7398 (struct win32_target_ops): Change prototype of set_thread_context,
7399 delete set_thread_context and add prepare_to_resume.
7400 (win32_require_context): New declaration.
7402 2014-10-08 Gary Benson <gbenson@redhat.com>
7404 * server.h: Do not include common-exceptions.h.
7406 2014-10-08 Gary Benson <gbenson@redhat.com>
7408 * server.h: Do not include cleanups.h.
7410 2014-09-30 James Hogan <james.hogan@imgtec.com>
7412 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7415 2014-09-23 Yao Qi <yao@codesourcery.com>
7417 * linux-low.c (lp_status_maybe_breakpoint): New function.
7418 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7419 (count_events_callback): Likewise.
7420 (select_event_lwp_callback): Likewise.
7421 (cancel_breakpoints_callback): Likewise.
7423 2014-09-19 Don Breazeal <donb@codesourcery.com>
7425 * linux-low.c (handle_extended_wait): Call
7426 linux_ptrace_get_extended_event.
7427 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7428 linux_is_extended_waitstatus.
7430 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7432 * Makefile.in (CPPFLAGS): Define.
7433 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7434 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7436 2014-09-16 Gary Benson <gbenson@redhat.com>
7438 * inferiors.h (current_inferior): Renamed as...
7439 (current_thread): New variable. All uses updated.
7440 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7441 (maybe_move_out_of_jump_pad): Likewise.
7442 (cancel_breakpoint): Likewise.
7443 (linux_low_filter_event): Likewise.
7444 (wait_for_sigstop): Likewise.
7445 (linux_resume_one_lwp): Likewise.
7446 (need_step_over_p): Likewise.
7447 (start_step_over): Likewise.
7448 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7449 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7450 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7451 and save_inferior as saved_thread.
7452 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7454 (regcache_invalidate_thread): Likewise.
7455 * remote-utils.c (prepare_resume_reply): Likewise.
7456 * thread-db.c (thread_db_get_tls_address): Likewise.
7457 (disable_thread_event_reporting): Likewise.
7458 (remove_thread_event_breakpoints): Likewise.
7459 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7461 * target.h (set_desired_inferior): Renamed as...
7462 (set_desired_thread): New declaration. All uses updated.
7463 * server.c (myresume): Updated comment to reference thread instead
7465 (handle_serial_event): Likewise.
7466 (handle_target_event): Likewise.
7468 2014-09-12 Tom Tromey <tromey@redhat.com>
7469 Gary Benson <gbenson@redhat.com>
7471 * regcache.h: Include common-regcache.h.
7472 (regcache_read_pc): Don't declare.
7473 * regcache.c (get_thread_regcache_for_ptid): New function.
7475 2014-09-11 Tom Tromey <tromey@redhat.com>
7476 Gary Benson <gbenson@redhat.com>
7478 * symbol.c: New file.
7479 * Makefile.in (SFILES): Add symbol.c.
7480 (OBS): Add symbol.o.
7482 2014-09-11 Gary Benson <gbenson@redhat.com>
7484 * target.c (target_stop_ptid, target_continue_ptid): New
7487 2014-09-11 Tom Tromey <tromey@redhat.com>
7488 Gary Benson <gbenson@redhat.com>
7490 * target.h: Include target/target.h.
7491 * target.c (target_read_memory, target_read_uint32)
7492 (target_write_memory): New functions.
7494 2014-09-11 Gary Benson <gbenson@redhat.com>
7496 * server.h (debug_hw_points): Don't declare.
7497 * server.c (debug_hw_points): Don't define. Replace all uses
7498 with show_debug_regs.
7499 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7500 all uses with show_debug_regs.
7502 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7504 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7505 endianness into account.
7506 (ppc_supply_ptrace_register): Likewise.
7508 2014-09-03 James Hogan <james.hogan@imgtec.com>
7510 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7511 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7513 2014-09-03 Gary Benson <gbenson@redhat.com>
7515 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7516 ALL_DEBUG_ADDRESS_REGISTERS.
7518 2014-09-02 Gary Benson <gbenson@redhat.com>
7520 * i386-low.h: Renamed as...
7521 * x86-low.h: New file. All type, function and variable name
7522 prefixes changed from "i386_" to "x86_". All references updated.
7523 * i386-low.c: Renamed as...
7524 * x86-low.c: New file. All type, function and variable name
7525 prefixes changed from "i386_" to "x86_". All references updated.
7527 2014-09-02 Gary Benson <gbenson@redhat.com>
7529 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7530 (x86_linux_new_thread): Likewise.
7532 2014-08-29 Gary Benson <gbenson@redhat.com>
7534 * server.h (setjmp.h): Do not include.
7535 (toplevel): Do not declare.
7536 (common-exceptions.h): Include.
7537 (cleanups.h): Likewise.
7538 * server.c (toplevel): Do not define.
7539 (exit_code): New static global.
7540 (detach_or_kill_for_exit_cleanup): New function.
7541 (main): New function. Original main renamed to...
7542 (captured_main): New function.
7543 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7545 2014-08-29 Gary Benson <gbenson@redhat.com>
7547 * Makefile.in (SFILES): Add common/common-exceptions.c.
7548 (OBS): Add common-exceptions.o.
7549 (common-exceptions.o): New rule.
7550 * utils.c (prepare_to_throw_exception): New function.
7552 2014-08-29 Gary Benson <gbenson@redhat.com>
7554 * config.in: Regenerate.
7555 * configure: Likewise.
7557 2014-08-29 Gary Benson <gbenson@redhat.com>
7559 * Makefile.in (SFILES): Add common/cleanups.c.
7561 (cleanups.o): New rule.
7563 2014-08-29 Gary Benson <gbenson@redhat.com>
7565 * utils.c (internal_vwarning): New function.
7567 2014-08-28 Gary Benson <gbenson@redhat.com>
7569 * utils.h (fatal): Remove declaration.
7570 * utils.c (fatal): Remove function.
7572 2014-08-28 Gary Benson <gbenson@redhat.com>
7574 * tracepoint.c (gdb_agent_init): Replace fatal with
7576 (initialize_tracepoint): Likewise.
7578 2014-08-28 Gary Benson <gbenson@redhat.com>
7580 * remote-utils.c (remote_prepare): Replace fatal with error.
7582 2014-08-28 Gary Benson <gbenson@redhat.com>
7584 * linux-low.c (linux_async): Replace fatal with warning.
7586 (linux_start_non_stop): Return -1 if linux_async failed.
7588 2014-08-28 Gary Benson <gbenson@redhat.com>
7590 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7592 (i386_dr_low_get_addr): Remove vague comment.
7593 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7596 2014-08-28 Gary Benson <gbenson@redhat.com>
7598 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7599 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7601 (linux_resume_one_lwp): Likewise.
7602 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7604 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7605 with internal_error.
7606 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7607 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7608 (find_register_by_name): Replace fatal with internal_error.
7609 (find_regno): Likewise.
7610 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7611 * thread-db.c (thread_db_create_event): Likewise.
7612 (thread_db_load_search): Likewise.
7613 (try_thread_db_load_1): Likewise.
7614 * tracepoint.c (get_jump_space_head): Replace fatal with
7616 (claim_trampoline_space): Likewise.
7617 (have_fast_tracepoint_trampoline_buffer): Likewise.
7618 (cmd_qtstart): Likewise.
7619 (stop_tracing): Likewise.
7620 (fast_tracepoint_collecting): Likewise.
7621 (target_malloc): Likewise.
7622 (download_tracepoint): Likewise.
7623 (download_trace_state_variables): Replace check with gdb_assert.
7624 (upload_fast_traceframes): Replace fatal with internal_error.
7626 2014-08-19 Tom Tromey <tromey@redhat.com>
7627 Gary Benson <gbenson@redhat.com>
7629 * Makefile.in (SFILES): Add common/common-debug.c.
7630 (OBS): Add common-debug.o.
7631 (common-debug.o): New rule.
7632 * debug.h (debug_printf): Don't declare.
7633 * debug.c (debug_printf): Renamed and rewritten as...
7634 (debug_vprintf): New function.
7636 2014-08-19 Gary Benson <gbenson@redhat.com>
7638 * utils.h: Do not include print-utils.h.
7640 2014-08-19 Tom Tromey <tromey@redhat.com>
7641 Gary Benson <gbenson@redhat.com>
7643 * server.h: Add static assertion.
7644 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7646 2014-08-19 Tom Tromey <tromey@redhat.com>
7647 Gary Benson <gbenson@redhat.com>
7649 * Makefile.in (SFILES): Add common/errors.c.
7650 (OBS): Add errors.o.
7651 (IPA_OBS): Add errors-ipa.o.
7652 (errors.o): New rule.
7653 (errors-ipa.o): Likewise.
7654 * utils.h (perror_with_name, error, warning): Don't declare.
7655 * utils.c (warning): Renamed and rewritten as...
7656 (vwarning): New function.
7657 (error): Renamed and rewritten as...
7658 (verror): New function.
7659 (internal_error): Renamed and rewritten as...
7660 (internal_verror): New function.
7662 2014-08-07 Gary Benson <gbenson@redhat.com>
7664 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7665 * configure: Regenerate.
7666 * config.in: Likewise.
7667 * server.h: Do not include errno.h.
7668 * event-loop.c: Likewise.
7669 * hostio-errno.c: Likewise.
7670 * linux-low.c: Likewise.
7671 * remote-utils.c: Likewise.
7672 * spu-low.c: Likewise.
7673 * utils.c: Likewise.
7674 * gdbreplay.c: Unconditionally include errno.h.
7676 2014-08-07 Gary Benson <gbenson@redhat.com>
7678 * server.h: Do not include string.h.
7679 * event-loop.c: Likewise.
7680 * linux-low.c: Likewise.
7681 * regcache.c: Likewise.
7682 * remote-utils.c: Likewise.
7683 * spu-low.c: Likewise.
7684 * utils.c: Likewise.
7686 2014-08-07 Gary Benson <gbenson@redhat.com>
7688 * server.h: Do not include gdb_assert.h.
7690 2014-08-07 Gary Benson <gbenson@redhat.com>
7692 * server.h: Do not include common-utils.h.
7694 2014-08-07 Gary Benson <gbenson@redhat.com>
7696 * server.h: Do not include ptid.h.
7697 * notif.h: Likewise.
7699 2014-08-07 Gary Benson <gbenson@redhat.com>
7701 * server.h: Do not include gdb_locale.h.
7703 2014-08-07 Gary Benson <gbenson@redhat.com>
7705 * server.h: Do not include gdb/signals.h.
7706 * win32-low.c: Likewise.
7708 2014-08-07 Gary Benson <gbenson@redhat.com>
7710 * server.h: Do not include pathmax.h.
7712 2014-08-07 Gary Benson <gbenson@redhat.com>
7714 * server.h: Do not include libiberty.h.
7715 * linux-bfin-low.c: Likewise.
7717 2014-08-07 Gary Benson <gbenson@redhat.com>
7719 * server.h: Do not include ansidecl.h.
7721 2014-08-07 Gary Benson <gbenson@redhat.com>
7723 * linux-x86-low.c: Do not include stddef.h.
7724 * lynx-ppc-low.c: Likewise.
7725 * tracepoint.c: Likewise.
7727 2014-08-07 Gary Benson <gbenson@redhat.com>
7729 * server.h: Do not include stdarg.h.
7730 * nto-low.c: Likewise.
7732 2014-08-07 Gary Benson <gbenson@redhat.com>
7734 * server.h: Do not include stdlib.h.
7735 * inferiors.c: Likewise.
7736 * linux-low.c: Likewise.
7737 * regcache.c: Likewise.
7738 * spu-low.c: Likewise.
7739 * tracepoint.c: Likewise.
7740 * utils.c: Likewise.
7742 2014-08-07 Gary Benson <gbenson@redhat.com>
7744 * server.h: Do not include stdio.h.
7745 * linux-low.c: Likewise.
7746 * remote-utils.c: Likewise.
7747 * spu-low.c: Likewise.
7748 * utils.c: Likewise.
7749 * wincecompat.c: Likewise.
7751 2014-08-06 Gary Benson <gbenson@redhat.com>
7753 * regcache.c (init_register_cache): Move conditionals inside if.
7755 2014-08-06 Gary Benson <gbenson@redhat.com>
7757 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7759 2014-07-31 Gary Benson <gbenson@redhat.com>
7761 * ax.h: Do not include server.h.
7762 * gdbthread.h: Likewise.
7763 * lynx-low.h: Likewise.
7764 * notif.h: Likewise.
7766 2014-07-30 Gary Benson <gbenson@redhat.com>
7768 * server.h: Include common-defs.h.
7769 Do not include config.h or build-gnulib-gdbserver/config.h.
7771 2014-07-30 Gary Benson <gbenson@redhat.com>
7773 * hostio-errno.c: Move server.h to top of includes list.
7774 * inferiors.c: Likewise.
7775 * linux-x86-low.c: Likewise.
7776 * notif.c: Include server.h.
7778 2014-07-24 Tom Tromey <tromey@redhat.com>
7779 Gary Benson <gbenson@redhat.com>
7781 * server.h (CORE_ADDR): Now unsigned.
7783 2014-07-16 Pedro Alves <palves@redhat.com>
7785 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7787 2014-07-15 Pedro Alves <palves@redhat.com>
7789 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7792 2014-07-11 Pedro Alves <palves@redhat.com>
7794 * linux-low.c (kill_wait_lwp): New function, based on
7795 kill_one_lwp_callback, but use my_waitpid directly.
7796 (kill_one_lwp_callback, linux_kill): Use it.
7798 2014-06-23 Pedro Alves <palves@redhat.com>
7800 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7801 before setting DR0..DR3.
7803 2014-06-20 Gary Benson <gbenson@redhat.com>
7805 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7806 * configure: Regenerated.
7807 * config.in: Likewise.
7809 2014-06-20 Gary Benson <gbenson@redhat.com>
7811 * Makefile.in (SFILES): Update locations for files moved
7813 (object file files): Reordered.
7815 2014-06-20 Gary Benson <gbenson@redhat.com>
7817 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7818 (i386_dr_low_set_addr): Likewise.
7819 (i386_dr_low_get_addr): Likewise.
7820 (i386_dr_low_can_set_control): Likewise.
7821 (i386_dr_low_set_control): Likewise.
7822 (i386_dr_low_get_control): Likewise.
7823 (i386_dr_low_get_status): Likewise.
7824 (i386_get_debug_register_length): Likewise.
7825 * linux-x86-low.c (i386_dr_low_set_addr):
7826 Changed signature. Made static.
7827 (i386_dr_low_get_addr): Likewise.
7828 (i386_dr_low_set_control): Likewise.
7829 (i386_dr_low_get_control): Likewise.
7830 (i386_dr_low_get_status): Likewise.
7831 (i386_dr_low): New global variable.
7832 * win32-i386-low.c (i386_dr_low_set_addr):
7833 Changed signature. Made static.
7834 (i386_dr_low_get_addr): Likewise.
7835 (i386_dr_low_set_control): Likewise.
7836 (i386_dr_low_get_control): Likewise.
7837 (i386_dr_low_get_status): Likewise.
7838 (i386_dr_low): New global variable.
7840 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7842 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7843 * Makefile.in (AR, AR_FLAGS): Define.
7844 * configure: Regenerate.
7846 2014-06-19 Gary Benson <gbenson@redhat.com>
7848 * Makefile.in (i386-dregs.o): New rule.
7849 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7850 * i386-low.c (target.h): Remove include.
7851 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7852 (DR_CONTROL_SHIFT): Likewise.
7853 (DR_CONTROL_SIZE): Likewise.
7854 (DR_RW_EXECUTE): Likewise.
7855 (DR_RW_WRITE): Likewise.
7856 (DR_RW_READ): Likewise.
7857 (DR_RW_IORW): Likewise.
7858 (DR_LEN_1): Likewise.
7859 (DR_LEN_2): Likewise.
7860 (DR_LEN_4): Likewise.
7861 (DR_LEN_8): Likewise.
7862 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7863 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7864 (DR_ENABLE_SIZE): Likewise.
7865 (DR_LOCAL_SLOWDOWN): Likewise.
7866 (DR_GLOBAL_SLOWDOWN): Likewise.
7867 (DR_CONTROL_RESERVED): Likewise.
7868 (I386_DR_CONTROL_MASK): Likewise.
7869 (I386_DR_VACANT): Likewise.
7870 (I386_DR_LOCAL_ENABLE): Likewise.
7871 (I386_DR_GLOBAL_ENABLE): Likewise.
7872 (I386_DR_DISABLE): Likewise.
7873 (I386_DR_SET_RW_LEN): Likewise.
7874 (I386_DR_GET_RW_LEN): Likewise.
7875 (I386_DR_WATCH_HIT): Likewise.
7876 (i386_wp_op_t): Likewise.
7877 (i386_show_dr): Likewise.
7878 (i386_length_and_rw_bits): Likewise.
7879 (i386_insert_aligned_watchpoint): Likewise.
7880 (i386_remove_aligned_watchpoint): Likewise.
7881 (i386_handle_nonaligned_watchpoint): Likewise.
7882 i386_update_inferior_debug_regs(): Likewise.
7883 (i386_dr_insert_watchpoint): Likewise.
7884 (i386_dr_remove_watchpoint): Likewise.
7885 (i386_dr_region_ok_for_watchpoint): Likewise.
7886 (i386_dr_stopped_data_address): Likewise.
7887 (i386_dr_stopped_by_watchpoint): Likewise.
7889 2014-06-19 Gary Benson <gbenson@redhat.com>
7891 * i386-low.c (i386_dr_show): Renamed to
7892 i386_show_dr and made static. All uses updated.
7893 (i386_dr_length_and_rw_bits): Renamed to
7894 i386_length_and_rw_bits and made static.
7896 (i386_dr_insert_aligned_watchpoint): Renamed to
7897 i386_insert_aligned_watchpoint and made static.
7899 (i386_dr_remove_aligned_watchpoint): Renamed to
7900 i386_remove_aligned_watchpoint and made static.
7902 (i386_dr_update_inferior_debug_regs): Renamed to
7903 i386_update_inferior_debug_regs and made static.
7906 2014-06-18 Gary Benson <gbenson@redhat.com>
7908 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7909 (i386_dr_low_can_set_control): Likewise.
7910 (i386_get_debug_register_length): Likewise.
7911 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7912 (i386_dr_low_can_set_control): Likewise.
7913 (i386_get_debug_register_length): Likewise.
7915 2014-06-17 Gary Benson <gbenson@redhat.com>
7917 * i386-low.h (i386-dregs.h): New include.
7918 (DR_FIRSTADDR): Now in i386-dregs.h.
7919 (DR_LASTADDR): Likewise.
7920 (DR_NADDR): Likewise.
7921 (DR_STATUS): Likewise.
7922 (DR_CONTROL): Likewise.
7923 (i386_debug_reg_state): Likewise.
7924 (i386_dr_insert_watchpoint): Likewise.
7925 (i386_dr_remove_watchpoint): Likewise.
7926 (i386_dr_region_ok_for_watchpoint): Likewise.
7927 (i386_dr_stopped_data_address): Likewise.
7928 (i386_dr_stopped_by_watchpoint): Likewise.
7929 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7931 2014-06-18 Gary Benson <gbenson@redhat.com>
7933 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7934 i386_dr_insert_watchpoint.
7935 (i386_low_remove_watchpoint): Renamed to
7936 i386_dr_remove_watchpoint.
7937 (i386_low_region_ok_for_watchpoint): Renamed to
7938 i386_dr_region_ok_for_watchpoint.
7939 (i386_low_stopped_data_address): Renamed to
7940 i386_dr_stopped_data_address.
7941 (i386_low_stopped_by_watchpoint): Renamed to
7942 i386_dr_stopped_by_watchpoint.
7943 * i386-low.c (i386_show_dr): Renamed to
7944 i386_dr_show and made nonstatic. All uses updated.
7945 (i386_length_and_rw_bits): Renamed to
7946 i386_dr_length_and_rw_bits and made nonstatic.
7948 (i386_insert_aligned_watchpoint): Renamed to
7949 i386_dr_insert_aligned_watchpoint and made nonstatic.
7951 (i386_remove_aligned_watchpoint): Renamed to
7952 i386_dr_remove_aligned_watchpoint and made nonstatic.
7954 (i386_update_inferior_debug_regs): Renamed to
7955 i386_dr_update_inferior_debug_regs and made nonstatic.
7957 (i386_low_insert_watchpoint): Renamed to
7958 i386_dr_insert_watchpoint. All uses updated.
7959 (i386_low_remove_watchpoint): Renamed to
7960 i386_dr_remove_watchpoint. All uses updated.
7961 (i386_low_region_ok_for_watchpoint): Renamed to
7962 i386_dr_region_ok_for_watchpoint. All uses updated.
7963 (i386_low_stopped_data_address): Renamed to
7964 i386_dr_stopped_data_address. All uses updated.
7965 (i386_low_stopped_by_watchpoint): Renamed to
7966 i386_dr_stopped_by_watchpoint. All uses updated.
7968 2014-06-18 Gary Benson <gbenson@redhat.com>
7970 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7971 (i386_dr_low_can_set_control): Likewise.
7972 (i386_insert_aligned_watchpoint): New check.
7974 2014-06-18 Gary Benson <gbenson@redhat.com>
7976 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7979 2014-06-18 Gary Benson <gbenson@redhat.com>
7981 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7982 instead of fatal and error.
7983 (i386_handle_nonaligned_watchpoint): Likewise.
7985 2014-06-18 Gary Benson <gbenson@redhat.com>
7987 * i386-low.c (i386_get_debug_register_length): New macro.
7988 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7989 (i386_show_dr): Use debug_printf instead of fprintf. Use
7990 phex to format values.
7992 2014-06-18 Gary Benson <gbenson@redhat.com>
7994 * i386-low.h: Comment changes.
7995 * i386-low.c: Likewise.
7997 2014-06-18 Gary Benson <gbenson@redhat.com>
7999 * i386-low.c: Whitespace changes.
8001 2014-06-12 Tom Tromey <tromey@redhat.com>
8003 * utils.c (freeargv): Remove.
8005 2014-06-12 Tom Tromey <tromey@redhat.com>
8007 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8008 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8009 (parse_debug_format_options): Likewise.
8010 (gdbserver_usage): Likewise.
8011 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8012 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8013 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8015 ($(LIBGNU)): Depend on libiberty.
8016 (all-lib): Recurse into all subdirs.
8017 (install-only): Invoke "install" target in subdirs.
8018 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8020 * configure: Rebuild.
8021 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8022 for vasprintf, vsnprintf, or gettimeofday.
8023 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8026 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8028 * development.sh: Delete.
8029 * Makefile.in (config.status): Adjust dependency on development.sh.
8030 * configure.ac: Adjust development.sh source call.
8031 * configure: Regenerate.
8033 2014-06-02 Pedro Alves <palves@redhat.com>
8035 * ax.c (gdb_free_agent_expr): New function.
8036 * ax.h (gdb_free_agent_expr): New declaration.
8037 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8039 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8041 (clear_breakpoint_conditions_and_commands): New function.
8042 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8043 (clear_breakpoint_conditions_and_commands): New declaration.
8045 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8047 * linux-aarch64-low.c (asm/ptrace.h): Include.
8049 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8051 Fix TLS access for -static -pthread.
8052 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8053 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8054 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8056 2014-05-20 Pedro Alves <palves@redhat.com>
8058 * linux-aarch64-low.c (aarch64_insert_point)
8059 (aarch64_remove_point): No longer check whether the type is
8060 supported here. Adjust to new interface.
8061 (the_low_target): Install aarch64_supports_z_point_type as
8062 supports_z_point_type method.
8063 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8064 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8065 instead of a Z packet char. Adjust.
8066 (arm_supports_z_point_type): New function.
8067 (arm_insert_point, arm_remove_point): Adjust to new interface.
8068 (the_low_target): Install arm_supports_z_point_type.
8069 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8070 (cris_insert_point, cris_remove_point): Adjust to new interface.
8071 Don't check whether the type is supported here.
8072 (the_low_target): Install cris_supports_z_point_type.
8073 * linux-low.c (linux_supports_z_point_type): New function.
8074 (linux_insert_point, linux_remove_point): Adjust to new interface.
8075 * linux-low.h (struct linux_target_ops) <insert_point,
8076 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8077 raw_breakpoint pointer parameter.
8078 <supports_z_point_type>: New method.
8079 * linux-mips-low.c (mips_supports_z_point_type): New function.
8080 (mips_insert_point, mips_remove_point): Adjust to new interface.
8081 Use mips_supports_z_point_type.
8082 (the_low_target): Install mips_supports_z_point_type.
8083 * linux-ppc-low.c (the_low_target): Install NULL as
8084 supports_z_point_type method.
8085 * linux-s390-low.c (the_low_target): Install NULL as
8086 supports_z_point_type method.
8087 * linux-sparc-low.c (the_low_target): Install NULL as
8088 supports_z_point_type method.
8089 * linux-x86-low.c (x86_supports_z_point_type): New function.
8090 (x86_insert_point): Adjust to new insert_point interface. Use
8091 insert_memory_breakpoint. Adjust to new
8092 i386_low_insert_watchpoint interface.
8093 (x86_remove_point): Adjust to remove_point interface. Use
8094 remove_memory_breakpoint. Adjust to new
8095 i386_low_remove_watchpoint interface.
8096 (the_low_target): Install x86_supports_z_point_type.
8097 * lynx-low.c (lynx_target_ops): Install NULL as
8098 supports_z_point_type callback.
8099 * nto-low.c (nto_supports_z_point_type): New.
8100 (nto_insert_point, nto_remove_point): Adjust to new interface.
8101 (nto_target_ops): Install nto_supports_z_point_type.
8102 * mem-break.c: Adjust intro comment.
8103 (struct raw_breakpoint) <raw_type, size>: New fields.
8104 <inserted>: Update comment.
8105 <shlib_disabled>: Delete field.
8106 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8107 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8108 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8109 (raw_bkpt_type_to_target_hw_bp_type): New function.
8110 (find_enabled_raw_code_breakpoint_at): New function.
8111 (find_raw_breakpoint_at): New type and size parameters. Use them.
8112 (insert_memory_breakpoint): New function, based off
8113 set_raw_breakpoint_at.
8114 (remove_memory_breakpoint): New function.
8115 (set_raw_breakpoint_at): Reimplement.
8116 (set_breakpoint): New, based on set_breakpoint_at.
8117 (set_breakpoint_at): Reimplement.
8118 (delete_raw_breakpoint): Go through the_target->remove_point
8119 instead of assuming memory breakpoints.
8120 (find_gdb_breakpoint_at): Delete.
8121 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8122 (find_gdb_breakpoint): New function.
8123 (set_gdb_breakpoint_at): Delete.
8124 (z_type_supported): New function.
8125 (set_gdb_breakpoint_1): New function, loosely based off
8126 set_gdb_breakpoint_at.
8127 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8128 (delete_gdb_breakpoint_at): Delete.
8129 (delete_gdb_breakpoint_1): New function, loosely based off
8130 delete_gdb_breakpoint_at.
8131 (delete_gdb_breakpoint): New function.
8132 (clear_gdb_breakpoint_conditions): Rename to ...
8133 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8135 (add_condition_to_breakpoint): Make static.
8136 (add_breakpoint_condition): Take a struct breakpoint pointer
8137 instead of an address. Adjust.
8138 (gdb_condition_true_at_breakpoint): Rename to ...
8139 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8141 (gdb_condition_true_at_breakpoint): Reimplement.
8142 (add_breakpoint_commands): Take a struct breakpoint pointer
8143 instead of an address. Adjust.
8144 (gdb_no_commands_at_breakpoint): Rename to ...
8145 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8146 parameter. Return true if no breakpoint was found. Change debug
8148 (gdb_no_commands_at_breakpoint): Reimplement.
8149 (run_breakpoint_commands): Rename to ...
8150 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8151 and change return type to boolean.
8152 (run_breakpoint_commands): New function.
8153 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8154 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8155 breakpoint. Go through the_target->remove_point instead of
8156 assuming memory breakpoint.
8157 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8158 software and hardware breakpoints.
8159 (reinsert_raw_breakpoint): Go through the_target->insert_point
8160 instead of assuming memory breakpoint.
8161 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8162 software and hardware breakpoints.
8163 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8164 Check both software and hardware breakpoints.
8165 (validate_inserted_breakpoint): Assert the breakpoint is a
8166 software breakpoint. Set the inserted flag to -1 instead of
8167 setting shlib_disabled.
8168 (delete_disabled_breakpoints): Adjust.
8169 (validate_breakpoints): Only validate software breakpoints.
8170 Adjust to inserted flag change.
8171 (check_mem_read, check_mem_write): Skip breakpoint types other
8172 than software breakpoints. Adjust to inserted flag change.
8173 * mem-break.h (enum raw_bkpt_type): New enum.
8174 (raw_breakpoint, struct process_info): Forward declare.
8175 (Z_packet_to_target_hw_bp_type): Delete declaration.
8176 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8177 (set_gdb_breakpoint, delete_gdb_breakpoint)
8178 (clear_breakpoint_conditions): New declarations.
8179 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8180 (breakpoint_inserted_here): Update comment.
8181 (add_breakpoint_condition, add_breakpoint_commands): Replace
8182 address parameter with a breakpoint pointer parameter.
8183 (gdb_breakpoint_here): Update comment.
8184 (delete_gdb_breakpoint_at): Delete.
8185 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8186 * server.c (process_point_options): Take a struct breakpoint
8187 pointer instead of an address. Adjust.
8188 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8189 delete_gdb_breakpoint.
8190 * spu-low.c (spu_target_ops): Install NULL as
8191 supports_z_point_type method.
8192 * target.h: Include mem-break.h.
8193 (struct target_ops) <prepare_to_access_memory>: Update comment.
8194 <supports_z_point_type>: New field.
8195 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8196 instead of a char. Also take a raw breakpoint pointer.
8197 * win32-arm-low.c (the_low_target): Install NULL as
8198 supports_z_point_type.
8199 * win32-i386-low.c (i386_supports_z_point_type): New function.
8200 (i386_insert_point, i386_remove_point): Adjust to new interface.
8201 (the_low_target): Install i386_supports_z_point_type.
8202 * win32-low.c (win32_supports_z_point_type): New function.
8203 (win32_insert_point, win32_remove_point): Adjust to new interface.
8204 (win32_target_ops): Install win32_supports_z_point_type.
8205 * win32-low.h (struct win32_target_ops):
8206 <supports_z_point_type>: New method.
8207 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8208 instead of a char. Also take a raw breakpoint pointer.
8210 2014-05-20 Pedro Alves <palves@redhat.com>
8212 * mem-break.h: Include break-common.h.
8213 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8214 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8215 (Z_packet_to_target_hw_bp_type): New declaration.
8216 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8217 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8218 (Z_PACKET_ACCESS_WP): Delete macros.
8219 (Z_packet_to_hw_type): Delete function.
8220 * i386-low.h: Don't include break-common.h here.
8221 (Z_packet_to_hw_type): Delete declaration.
8222 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8223 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8224 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8225 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8226 * linux-aarch64-low.c: Don't include break-common.h here.
8227 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8228 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8229 (Z_packet_to_target_hw_bp_type): Delete function.
8230 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8232 (mips_insert_point, mips_remove_point): Use
8233 Z_packet_to_target_hw_bp_type.
8235 2014-05-20 Pedro Alves <palves@redhat.com>
8237 * linux-aarch64-low.c: Include break-common.h.
8238 (enum target_point_type): Delete.
8239 (Z_packet_to_point_type): Rename to ...
8240 (Z_packet_to_target_hw_bp_type): ... this, and return a
8241 target_hw_bp_type instead.
8242 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8243 instead of an enum target_point_type.
8244 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8246 (aarch64_dr_state_insert_one_point)
8247 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8248 (aarch64_handle_aligned_watchpoint)
8249 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8250 Take an enum target_hw_bp_type instead of an enum
8252 (aarch64_supports_z_point_type): New function.
8253 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8254 use Z_packet_to_target_hw_bp_type.
8256 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8258 * configure.ac: Only use -Werror by default when DEVELOPMENT
8260 * configure: Regenerate.
8262 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8264 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8265 * linux-x86-low.c (X86_64_USER_REGS): New.
8266 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8268 2014-04-28 Yao Qi <yao@codesourcery.com>
8270 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8273 2014-04-25 Pedro Alves <palves@redhat.com>
8276 * linux-low.c (linux_attach_fail_reason_string): New function.
8277 (linux_attach_lwp): Delete.
8278 (linux_attach_lwp_1): Rename to ...
8279 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8280 argument. Remove "initial" parameter. Return int instead of
8281 void. Don't error or warn here.
8282 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8283 failure to attach to the tgid. Call warning when failing to
8285 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8286 argument. Remove "initial" parameter. Return int instead of
8287 void. Don't error or warn here.
8288 (linux_attach_fail_reason_string): New declaration.
8289 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8290 interface change. Use linux_attach_fail_reason_string.
8292 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8293 Walfred Tedeschi <walfred.tedeschi@intel.com>
8295 * Makefile.in: Added rules to handle new files
8296 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8297 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8298 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8299 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8300 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8301 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8303 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8304 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8305 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8306 i386/x32-avx512.xml.
8307 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8308 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8309 i386/x32-avx512-linux.xml.
8310 * i387-fp.c (num_avx512_k_registers): New constant for number
8312 (num_avx512_zmmh_low_registers): New constant for number of
8313 lower ZMM registers (0-15).
8314 (num_avx512_zmmh_high_registers): New constant for number of
8315 higher ZMM registers (16-31).
8316 (num_avx512_ymmh_registers): New contant for number of higher
8317 YMM registers (ymm16-31 added by avx521 on x86_64).
8318 (num_avx512_xmm_registers): New constant for number of higher
8319 XMM registers (xmm16-31 added by AVX512 on x86_64).
8320 (struct i387_xsave): Add space for AVX512 registers.
8321 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8322 Add code to handle AVX512 registers.
8323 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8324 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8325 prototypei from generated file.
8326 (tdesc_amd64_avx512_linux): Likewise.
8327 (init_registers_x32_avx512_linux): Likewise.
8328 (tdesc_x32_avx512_linux): Likewise.
8329 (init_registers_i386_avx512_linux): Likewise.
8330 (tdesc_i386_avx512_linux): Likewise.
8331 (x86_64_regmap): Add AVX512 registers.
8332 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8334 (initialize_low_arch): Add code to initialize AVX512 registers.
8336 2014-04-23 Pedro Alves <palves@redhat.com>
8338 * mem-break.c (find_gdb_breakpoint_at): Make static.
8339 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8341 2014-04-23 Pedro Alves <palves@redhat.com>
8343 * i386-low.c: Don't include break-common.h here.
8344 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8345 prototype to take target_hw_bp_type as argument instead of a Z
8347 * i386-low.h: Include break-common.h here.
8348 (Z_packet_to_hw_type): Declare.
8349 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8351 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8352 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8353 (x86_remove_point): Convert the packet number to a
8354 target_hw_bp_type before calling i386_low_remove_watchpoint.
8355 * win32-i386-low.c (i386_insert_point): Convert the packet number
8356 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8357 (i386_remove_point): Convert the packet number to a
8358 target_hw_bp_type before calling i386_low_remove_watchpoint.
8360 2014-04-23 Pedro Alves <palves@redhat.com>
8362 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8364 2014-04-10 Pedro Alves <palves@redhat.com>
8366 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8367 Check if the condition or command is NULL before checking if the
8368 breakpoint is known. On success, return true.
8369 * mem-break.h (add_breakpoint_condition): Document return.
8370 (add_breakpoint_commands): Add describing comment.
8371 * server.c (skip_to_semicolon): New function.
8372 (process_point_options): Use it.
8374 2014-04-09 Pedro Alves <palves@redhat.com>
8376 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8379 2014-02-27 Pedro Alves <palves@redhat.com>
8382 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8384 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8386 (last_thread_of_process_p): Take a PID argument instead of a
8388 (linux_wait_for_lwp): Delete.
8389 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8391 (linux_low_filter_event): New function, party factored out from
8392 linux_wait_for_event.
8393 (linux_wait_for_event): Rename to ...
8394 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8395 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8396 sigsuspend. Check for zombie leaders.
8397 (linux_wait_for_event): Reimplement as wrapper around
8398 linux_wait_for_event_filtered.
8399 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8400 a normal or signal exit is seen, it's the whole process exiting.
8401 (wait_for_sigstop): No longer a for_each_inferior callback.
8402 Rewrite on top of linux_wait_for_event_filtered.
8403 (stop_all_lwps): Call wait_for_sigstop directly.
8404 * server.c (resume, handle_target_event): Handle
8405 TARGET_WAITKIND_NO_RESUMED.
8407 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8409 * win32-low.c (psapi_get_dll_name,
8410 * win32_CreateToolhelp32Snapshot): Delete.
8411 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8412 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8414 (handle_load_dll): Add function description.
8415 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8417 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8419 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8421 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8422 base address when calling win32_add_one_solib.
8423 (handle_load_dll): Delete local variable load_addr.
8424 Remove 0x1000 offset applied to DLL base address when calling
8425 win32_add_one_solib.
8426 (handle_unload_dll): Add comment.
8428 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8430 * win32-low.c (win32_add_all_dlls): Renames
8431 win32_ensure_ntdll_loaded. Rewrite function documentation.
8432 Adjust implementation to always load all DLLs.
8433 Add 0x1000 offset to DLL base address when calling
8434 win32_add_one_solib.
8435 (child_initialization_done): New static global.
8436 (do_initial_child_stuff): Set child_initialization_done to
8437 zero during child initialization, and 1 after. Replace call
8438 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8440 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8441 (handle_unload_dll): Add function documentation.
8442 (get_child_debug_event): Ignore load and unload DLL events
8443 during child initialization.
8445 2014-02-20 Doug Evans <dje@google.com>
8447 Remove global all_lwps.
8448 * inferiors.h (ptid_of): Move here from linux-low.h.
8449 (pid_of, lwpid_of): Ditto.
8450 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8451 parameter is a struct thread_info * now.
8452 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8453 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8454 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8456 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8457 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8458 * linux-arm-low.c (update_registers_callback): Update, "entry"
8459 parameter is a struct thread_info * now.
8460 Fetch lwpid from current_inferior directly.
8461 (arm_insert_point): Pass &all_threads to find_inferior instead of
8463 (arm_remove_point): Ditto.
8464 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8465 (arm_prepare_to_resume): Fetch pid from thread.
8466 (arm_read_description): Fetch lwpid from current_inferior directly.
8467 * linux-low.c (all_lwps): Delete.
8468 (delete_lwp): Delete call to remove_inferior.
8469 (handle_extended_wait): Fetch lwpid from thread.
8470 (add_lwp): Don't set lwp->entry.id. Remove call to
8471 add_inferior_to_list.
8472 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8473 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8474 (kill_one_lwp_callback): Ditto.
8475 (linux_kill): Don't dereference NULL pointer.
8476 Fetch ptid,lwpid from thread.
8477 (get_detach_signal): Fetch ptid from thread.
8478 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8479 Simplify call to regcache_invalidate_thread.
8480 (delete_lwp_callback): Update, "entry" parameter is a
8481 struct thread_info * now. Fetch pid from thread.
8482 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8483 (status_pending_p_callback): Update, "entry" parameter is a
8484 struct thread_info * now. Fetch ptid from thread.
8485 (find_lwp_pid): Update, "entry" parameter is a
8486 struct thread_info * now.
8487 (linux_wait_for_lwp): Fetch pid from thread.
8488 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8489 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8490 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8491 (dequeue_one_deferred_signal): Ditto.
8492 (cancel_breakpoint): Fetch ptid from current_inferior.
8493 (linux_wait_for_event): Pass &all_threads to find_inferior,
8494 not &all_lwps. Fetch ptid, lwpid from thread.
8495 (count_events_callback): Update, "entry" parameter is a
8496 struct thread_info * now.
8497 (select_singlestep_lwp_callback): Ditto.
8498 (select_event_lwp_callback): Ditto.
8499 (cancel_breakpoints_callback): Ditto.
8500 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8502 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8503 (unsuspend_one_lwp): Update, "entry" parameter is a
8504 struct thread_info * now.
8505 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8507 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8508 Fetch lwpid from thread, not lwp.
8509 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8510 Pass &all_threads to find_inferior, not &all_lwps.
8511 (send_sigstop): Fetch lwpid from thread, not lwp.
8512 (send_sigstop_callback): Update, "entry" parameter is a
8513 struct thread_info * now.
8514 (suspend_and_send_sigstop_callback): Ditto.
8515 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8516 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8517 struct thread_info * now.
8518 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8520 (lwp_running): Update, "entry" parameter is a
8521 struct thread_info * now.
8522 (stop_all_lwps): Fetch ptid from thread.
8523 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8524 (linux_resume_one_lwp): Fetch lwpid from thread.
8525 (linux_set_resume_request): Update, "entry" parameter is a
8526 struct thread_info * now. Fetch pid, lwpid from thread.
8527 (resume_status_pending_p): Update, "entry" parameter is a
8528 struct thread_info * now.
8529 (need_step_over_p): Ditto. Fetch lwpid from thread.
8530 (start_step_over): Fetch lwpid from thread.
8531 (linux_resume_one_thread): Update, "entry" parameter is a
8532 struct thread_info * now. Fetch lwpid from thread.
8533 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8534 (proceed_one_lwp): Update, "entry" parameter is a
8535 struct thread_info * now. Fetch lwpid from thread.
8536 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8537 struct thread_info * now.
8538 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8539 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8540 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8542 (regsets_store_inferior_registers): Ditto.
8543 (fetch_register, store_register): Ditto.
8544 (linux_read_memory, linux_write_memory): Ditto.
8545 (linux_request_interrupt): Ditto.
8546 (linux_read_auxv): Ditto.
8547 (linux_xfer_siginfo): Ditto.
8548 (linux_qxfer_spu): Ditto.
8549 (linux_qxfer_libraries_svr4): Ditto.
8550 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8551 moved to inferiors.h.
8553 (get_thread_lwp): Update.
8554 (struct lwp_info): Delete member "entry". Simplify comment for
8557 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8558 current_inferior directly.
8559 (update_watch_registers_callback): Update, "entry" parameter is a
8560 struct thread_info * now. Fetch pid from thread.
8561 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8562 (mips_insert_point): Fetch lwpid from current_inferior.
8563 Pass &all_threads to find_inferior, not &all_lwps.
8564 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8565 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8567 (mips_stopped_data_address): Ditto.
8568 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8570 * linux-tile-low.c (tile_arch_setup): Ditto.
8571 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8572 (update_debug_registers_callback): Update, "entry" parameter is a
8573 struct thread_info * now. Fetch pid from thread.
8574 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8575 Pass &all_threads to find_inferior, not &all_lwps.
8576 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8577 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8578 Pass &all_threads to find_inferior, not &all_lwps.
8579 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8580 (i386_dr_low_get_status): Ditto.
8581 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8582 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8583 (x86_linux_read_description): Ditto.
8584 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8586 2014-02-20 Doug Evans <dje@google.com>
8588 * inferiors.c (get_first_inferior): Fix buglet.
8590 2014-02-19 Doug Evans <dje@google.com>
8592 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8593 * inferiors.c (add_thread): Change result type to struct thread_info *.
8594 All callers updated.
8595 (add_lwp): Call add_thread here instead of in callers.
8596 All callers updated.
8597 * linux-low.h (get_lwp_thread): Rewrite.
8598 (struct lwp_info): New member "thread".
8600 2014-02-19 Doug Evans <dje@google.com>
8602 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8603 All callers updated.
8605 2014-02-19 Doug Evans <dje@google.com>
8607 * inferiors.c (add_thread): Fix whitespace.
8609 2014-02-19 Doug Evans <dje@google.com>
8611 * dll.c (clear_dlls): Replace accessing list implemention details
8613 * gdbthread.h (get_first_thread): Declare.
8614 * inferiors.c (for_each_inferior_with_data): New function.
8615 (get_first_thread): New function.
8616 (find_thread_ptid): Simplify.
8617 (get_first_inferior): New function.
8618 (clear_list): Delete.
8619 (one_inferior_p): New function.
8620 (clear_inferior_list): New function.
8621 (clear_inferiors): Update.
8622 * inferiors.h (for_each_inferior_with_data): Declare.
8623 (clear_inferior_list): Declare.
8624 (one_inferior_p): Declare.
8625 (get_first_inferior): Declare.
8626 * linux-low.c (linux_wait_for_event): Replace accessing list
8627 implemention details with API function.
8628 * server.c (target_running): Ditto.
8629 (accumulate_file_name_length): New function.
8630 (emit_dll_description): New function.
8631 (handle_qxfer_libraries): Replace accessing list implemention
8632 details with API function.
8633 (handle_qxfer_threads_worker): New function.
8634 (handle_qxfer_threads_proper): Replace accessing list implemention
8635 details with API function.
8636 (handle_query): Ditto.
8637 (visit_actioned_threads_callback_ftype): New typedef.
8638 (visit_actioned_threads_data): New struct.
8639 (visit_actioned_threads): Rewrite to be find_inferior callback.
8640 (resume): Call find_inferior.
8641 (handle_status): Replace accessing list implemention
8642 details with API function.
8643 (process_serial_event): Replace accessing list implemention details
8645 * target.c (set_desired_inferior): Replace accessing list implemention
8646 details with API function.
8647 * tracepoint.c (same_process_p): New function.
8648 (gdb_agent_about_to_close): Replace accessing list implemention
8649 details with API function.
8650 * win32-low.c (child_delete_thread): Replace accessing list
8651 implemention details with API function.
8652 (match_dll_by_basename): New function.
8653 (dll_is_loaded_by_basename): New function.
8654 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8655 details call to dll_is_loaded_by_basename.
8657 2014-02-19 Doug Evans <dje@google.com>
8659 * dll.h (struct dll_info): Add comment.
8660 * gdbthread.h (struct thread_info): Add comment.
8661 (current_ptid): Simplify.
8662 * inferiors.c (add_process): Update.
8663 (remove_process): Update.
8664 * inferiors.h (struct process_info): Rename member "head" to "entry".
8665 * linux-low.c (delete_lwp): Update.
8667 (last_thread_of_process_p): Update.
8668 (kill_one_lwp_callback, linux_kill): Update.
8669 (status_pending_p_callback): Update.
8670 (wait_for_sigstop): Update. Simplify read of ptid.
8671 (start_step_over): Update.
8672 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8673 (get_lwp_thread): Update.
8674 (struct lwp_info): Rename member "head" to "entry".
8675 * regcache.h (inferior_list_entry): Delete.
8676 * server.c (kill_inferior_callback): Update.
8677 (detach_or_kill_inferior_callback): Update.
8678 (print_started_pid): Update.
8679 (print_attached_pid): Update.
8680 (process_serial_event): Simplify read of ptid.
8681 * thread-db.c (thread_db_create_event): Update.
8682 (thread_db_get_tls_address): Update.
8683 * win32-low.c (current_inferior_ptid): Simplify.
8685 2014-02-19 Tom Tromey <tromey@redhat.com>
8687 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8689 (target_supports_btrace): Update.
8691 2014-02-14 Yao Qi <yao@codesourcery.com>
8693 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8694 (rsp-low-ipa.o): New target.
8696 2014-02-12 Tom Tromey <tromey@redhat.com>
8698 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8699 convert_ascii_to_int.
8700 * regcache.c (registers_to_string): Likewise.
8701 * remote-utils.c (decode_M_packet): Likewise.
8702 * server.c (process_serial_event): Likewise.
8704 2014-02-12 Tom Tromey <tromey@redhat.com>
8706 * server.c (handle_query, handle_v_run): Use hex2bin, not
8708 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8710 2014-02-12 Tom Tromey <tromey@redhat.com>
8712 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8713 convert_int_to_ascii.
8714 * regcache.c (registers_to_string, collect_register_as_string):
8716 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8718 * server.c (process_serial_event): Likewise.
8719 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8720 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8722 2014-02-12 Tom Tromey <tromey@redhat.com>
8724 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8725 bin2hex, not hexify.
8726 * tracepoint.c (cmd_qtstatus): Likewise.
8728 2014-02-12 Tom Tromey <tromey@redhat.com>
8730 * remote-utils.c (monitor_output): Pass explicit length to
8733 2014-02-12 Tom Tromey <tromey@redhat.com>
8735 * tracepoint.c: Include rsp-low.h.
8736 * server.c: Include rsp-low.h.
8737 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8738 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8740 * remote-utils.c: Include rsp-low.h.
8741 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8742 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8743 (convert_int_to_ascii, convert_ascii_to_int): Move to
8745 * regcache.c: Include rsp-low.h.
8746 * ax.c: Include rsp-low.h.
8747 * Makefile.in (SFILES): Add common/rsp-low.c.
8748 (OBS): Add rsp-low.o.
8749 (rsp-low.o): New target.
8751 2014-02-12 Tom Tromey <tromey@redhat.com>
8753 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8754 Include print-utils.h.
8755 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8756 (plongest, thirty_two, phex_nz): Remove.
8757 * Makefile.in (SFILES): Add common/print-utils.c.
8758 (OBS): Add print-utils.o.
8759 (print-utils-ipa.o): New target.
8760 (print-utils.o): New target.
8761 (IPA_OBJS): Add print-utils-ipa.o.
8763 2014-02-06 Tom Tromey <tromey@redhat.com>
8765 * Makefile.in (SFILES): Fix indentation.
8767 2014-02-05 Doug Evans <dje@google.com>
8769 * linux-low.c (linux_wait_for_event): Improve comment.
8770 (linux_wait_1): Keep current_inferior in sync with event_child.
8772 2014-01-22 Doug Evans <dje@google.com>
8774 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8776 2014-01-22 Doug Evans <dje@google.com>
8778 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8779 * configure: Regenerate.
8780 * config.in: Regenerate.
8781 * Makefile.in (SFILES): Add debug.c.
8783 * debug.c: New file.
8784 * debug.h: New file.
8785 * linux-aarch64-low.c (*): Update all debugging printfs to use
8786 debug_printf instead of fprintf.
8787 * linux-arm-low.c (*): Ditto.
8788 * linux-cris-low.c (*): Ditto.
8789 * linux-crisv32-low.c (*): Ditto.
8790 * linux-m32r-low.c (*): Ditto.
8791 * linux-sparc-low.c (*): Ditto.
8792 * linux-x86.c (*): Ditto.
8793 * linux-low.c (*): Ditto.
8794 (linux_wait_1): Add calls to debug_enter, debug_exit.
8795 (linux_wait): Remove redundant debugging printf.
8796 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8797 (linux_resume, unstop_all_lwps): Ditto.
8798 * mem-break.c (*): Update all debugging printfs to use
8799 debug_printf instead of fprintf.
8800 * remote-utils.c (*): Ditto.
8801 * thread-db.c (*): Ditto.
8802 * server.c #include <ctype.h>, "gdb_vecs.h".
8803 (debug_threads): Moved to debug.c.
8804 (*): Update all debugging printfs to use debug_printf instead of
8806 (start_inferior): Replace call to fflush with call to debug_flush.
8807 (monitor_show_help): Mention set debug-format.
8808 (parse_debug_format_options): New function.
8809 (handle_monitor_command): Handle "monitor set debug-format".
8810 (gdbserver_usage): Mention --debug-format.
8811 (main): Parse --debug-format.
8812 * server.h (debug_threads): Declaration moved to debug.h.
8814 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8815 trace_debug_1 that uses debug_printf.
8816 (tracepoint_look_up_symbols): Update all debugging printfs to use
8817 debug_printf instead of fprintf.
8819 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8821 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8824 2014-01-17 Pedro Alves <palves@redhat.com>
8827 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8828 defined after including gdb_proc_service.h.
8830 2014-01-16 Doug Evans <dje@google.com>
8832 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8833 (match_dll): Use it.
8835 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8837 * target.h (target_ops) <read_btrace>: Change parameters and
8838 return type to allow error reporting.
8839 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8840 trace reading errors on.
8841 * linux-low.c (linux_low_read_btrace): Pass trace reading
8843 (linux_low_disable_btrace): New.
8845 2014-01-15 Doug Evans <dje@google.com>
8847 * inferiors.c (thread_id_to_gdb_id): Delete.
8848 * inferiors.h (thread_id_to_gdb_id): Delete.
8850 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8852 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8853 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8856 2014-01-08 Pedro Alves <palves@redhat.com>
8858 * server.c (handle_status): Don't discard previous queued stop
8859 replies or thread's pending status here.
8860 (main) <disconnection>: Do it here instead.
8862 2014-01-08 Pedro Alves <palves@redhat.com>
8864 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8865 * server.c (visit_actioned_threads, handle_pending_status): New
8867 (handle_v_cont): Factor out parts to ...
8868 (resume): ... this new function. If in all-stop, and a thread
8869 being resumed has a pending status, report it without actually
8871 (myresume): Adjust to use the new 'resume' function.
8872 (clear_pending_status_callback, set_pending_status_callback)
8873 (find_status_pending_thread_callback): New functions.
8874 (handle_status): Handle the case of multiple threads having
8875 interesting statuses to report. Report threads' real last signal
8876 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8877 with an interesting thread to report the status for, instead of
8878 always reporting the status of the first thread.
8880 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8882 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8883 * gdbreplay.c (gdbreplay_version): Likewise.
8885 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8887 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8888 iov.iov_len with the real length in use.
8890 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8892 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8893 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8894 for all targets that use win32-low.c.
8895 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8896 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8898 2013-12-13 Pedro Alves <palves@redhat.com>
8900 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8901 if equal to TARGET_WAITKIND_LOADED.
8902 * win32-low.c (cached_status): New static global.
8903 (win32_wait): Add declaration.
8904 (do_initial_child_stuff): Flush all initial pending debug events
8905 up to the initial breakpoint.
8906 (win32_wait): If CACHED_STATUS was set, return that instead
8907 of doing a real wait. Remove the code resuming the execution
8908 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8909 during the initial phase. Also remove the code changing
8910 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8911 TARGET_WAITKIND_STOPPED.
8913 2013-12-11 Yao Qi <yao@codesourcery.com>
8915 * notif.c (handle_notif_ack): Return 0 if no notification
8918 2013-11-20 Doug Evans <dje@google.com>
8920 * linux-low.c (linux_set_resume_request): Fix comment.
8922 2013-11-20 Doug Evans <dje@google.com>
8924 * linux-low.c (resume_status_pending_p): Tweak comment.
8926 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8928 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8929 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8930 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8931 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8932 (srv_amd64_regobj): Add amd64-mpx.o.
8933 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8934 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8935 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8936 * i387-fp.c (num_pl_bnd_register) Added constant.
8937 (num_pl_bnd_cfg_registers) Added constant.
8938 (struct i387_xsave) Added reserved area and MPX fields.
8939 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8940 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8942 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8943 (init_registers_amd64_mpx_linux): Declare new function.
8944 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8945 (x86_64_regmap): Add MPX registers.
8946 (x86_linux_read_description): Add MPX case.
8947 (initialize_low_arch): Initialize MPX targets.
8949 2013-11-18 Tom Tromey <tromey@redhat.com>
8951 * configure: Rebuild.
8952 * configure.ac: Don't check for stdlib.h.
8953 * gdbreplay.c: Unconditionally include stdlib.h.
8955 2013-11-18 Tom Tromey <tromey@redhat.com>
8957 * config.in: Rebuild.
8958 * configure: Rebuild.
8959 * configure.ac: Don't use AC_HEADER_DIRENT.
8961 2013-11-18 Tom Tromey <tromey@redhat.com>
8963 * server.h: Don't check HAVE_STRING_H.
8964 * gdbreplay.c: Don't check HAVE_STRING_H.
8965 * configure: Rebuild.
8967 2013-11-18 Tom Tromey <tromey@redhat.com>
8969 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8972 2013-11-08 Tom Tromey <tromey@redhat.com>
8974 * configure, config.in: Rebuild.
8975 * configure.ac: Remove unused configury.
8977 2013-11-08 Tom Tromey <tromey@redhat.com>
8979 * acinclude.m4: Include common.m4, codeset.m4.
8980 * configure, config.in: Rebuild.
8981 * configure.ac: Use GDB_AC_COMMON.
8983 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8985 * linux-s390-low.c (HWCAP_S390_TE): New define.
8986 (s390_arch_setup): Consider the TE field in the HWCAP for
8987 determining 'have_regset_tdb'.
8989 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8992 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8995 2013-10-02 Pedro Alves <palves@redhat.com>
8997 * server.c (process_serial_event): Don't output "GDBserver
8998 exiting" if GDB is connected through stdio.
8999 * target.c (mywait): Likewise, be silent if GDB is connected
9002 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9004 * lynx-low.c (lynx_add_threads_after_attach): New function.
9005 (lynx_attach): Remove call to add_thread. Add call to
9006 lynx_add_threads_after_attach instead.
9008 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9010 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9011 * config.in, configure: Regenerated.
9013 2013-09-18 Yao Qi <yao@codesourcery.com>
9016 * server.c (start_inferior): Clear 'resume_info'.
9018 2013-09-16 Jiong Wang <jiwang@tilera.com>
9020 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9023 2013-09-16 Jiong Wang <jiwang@tilera.com>
9025 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9026 linux-tile-low.o to srv_tgtobj.
9028 2013-09-16 Will Newton <will.newton@linaro.org>
9030 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9033 2013-09-06 Pedro Alves <palves@redhat.com>
9035 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9036 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9037 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9038 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9039 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9040 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9042 2013-09-06 Pedro Alves <palves@redhat.com>
9044 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9045 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9047 2013-09-06 Pedro Alves <palves@redhat.com>
9049 * linux-amd64-ipa.c: Include tracepoint.h.
9050 * linux-i386-ipa.c: Include tracepoint.h.
9052 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9054 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9055 (ps_get_thread_area): New function.
9057 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9059 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9060 (initialize_low_arch): Call init_registers_crisv32 rather than
9061 init_register_crisv32.
9063 2013-09-05 Pedro Alves <palves@redhat.com>
9065 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9067 * hostio.h: ... this new file.
9068 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9069 win32-low.c: Include hostio.h.
9071 2013-09-05 Pedro Alves <palves@redhat.com>
9073 * server.h (gdb_client_data, handler_func, callback_handler_func)
9074 (delete_file_handler, add_file_handler, append_callback_event)
9075 (delete_callback_event, start_event_loop, initialize_event_loop):
9076 Move to event-loop.h and include it.
9077 * event-loop.h: New file.
9079 2013-09-05 Pedro Alves <palves@redhat.com>
9081 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9082 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9083 (loaded_dll, unloaded_dll): Move to ...
9084 * dll.h: ... this new file.
9085 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9087 2013-09-05 Pedro Alves <palves@redhat.com>
9089 * server.h (current_process, get_thread_process, all_processes)
9090 (add_inferior_to_list, for_each_inferior, current_inferior)
9091 (remove_inferior, add_process, remove_process, find_process_pid)
9092 (have_started_inferiors_p, have_attached_inferiors_p)
9093 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9094 (clear_inferiors, find_inferior, find_inferior_id)
9095 (inferior_target_data, set_inferior_target_data)
9096 (inferior_regcache_data, set_inferior_regcache_data): Move to
9097 inferiors.h, and include it.
9098 * inferiors.h: New file.
9100 2013-09-05 Pedro Alves <palves@redhat.com>
9102 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9106 2013-09-05 Pedro Alves <palves@redhat.com>
9108 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9110 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9111 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9112 (handle_tracepoint_general_set, handle_tracepoint_query)
9113 (tracepoint_finished_step, tracepoint_was_hit)
9114 (release_while_stepping_state_list, current_traceframe)
9115 (in_readonly_region, traceframe_read_mem)
9116 (fetch_traceframe_registers, traceframe_read_sdata)
9117 (traceframe_read_info, struct fast_tpoint_collect_status)
9118 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9119 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9120 (supply_fast_tracepoint_registers)
9121 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9122 (ipa_tdesc, claim_trampoline_space)
9123 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9124 (agent_mem_read, agent_get_trace_state_variable_value)
9125 (agent_set_trace_state_variable_value, agent_tsv_read)
9126 (agent_mem_read_string, get_raw_reg_func_addr)
9127 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9128 * tracepoint.h: ... this new file.
9130 2013-09-05 Pedro Alves <palves@redhat.com>
9132 * server.h (perror_with_name, error, fatal, warning, paddress)
9133 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9135 * utils.h: New file.
9137 2013-09-05 Pedro Alves <palves@redhat.com>
9139 * server.h (remote_debug, noack_mode, transport_is_reliable)
9140 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9141 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9142 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9143 (write_enn, initialize_async_io, enable_async_io)
9144 (disable_async_io, check_remote_input_interrupt_request)
9145 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9146 (dead_thread_notify, prepare_resume_reply)
9147 (decode_address_to_semicolon, decode_address, decode_m_packet)
9148 (decode_M_packet, decode_X_packet, decode_xfer_write)
9149 (decode_search_memory_packet, unhexify, hexify)
9150 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9151 (look_up_one_symbol, relocate_instruction)
9152 (monitor_output): Move to remote-utils.h, and include it.
9153 * remote-utils.h: New file.
9155 2013-09-05 Pedro Alves <palves@redhat.com>
9157 * server.h (_): Delete.
9159 2013-09-02 Pedro Alves <palves@redhat.com>
9161 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9162 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9164 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9166 2013-09-02 Pierre Muller <muller@sourceware.org>
9168 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9169 or WriteProcessMemory complete successfully and handle
9170 ERROR_PARTIAL_COPY error.
9172 2013-09-02 Pedro Alves <palves@redhat.com>
9174 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9175 error instead of EIO.
9177 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9180 * linux-low.c: Include filestuff.h.
9181 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9182 * lynx-low.c: Include filestuff.h.
9183 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9184 * server.c: Include filestuff.h.
9185 (main): Call notice_open_fds.
9186 * spu-low.c: Include filestuff.h.
9187 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9189 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9191 * Makefile.in: Explain why ../target and ../nat are not
9192 listed as include file search paths.
9193 (linux-waitpid.o): New object file rule.
9194 * configure.srv (srv_native_linux_obj): New variable.
9195 Replace all occurrences of linux native object files with
9196 $srv_native_linux_obj.
9197 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9198 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9199 (linux_enable_event_reporting): Remove declaration.
9200 (my_waitpid): Moved to common/linux-waitpid.c.
9201 (linux_wait_for_event): Pass ptid when calling
9202 linux_enable_event_reporting.
9203 (linux_supports_tracefork_flag): Remove.
9204 (linux_enable_event_reporting): Likewise.
9205 (linux_tracefork_grandchild): Remove.
9206 (STACK_SIZE): Moved to common/linux-ptrace.c.
9207 (linux_tracefork_child): Remove.
9208 (linux_test_for_tracefork): Remove.
9209 (linux_look_up_symbols): Call linux_supports_traceclone.
9210 (initialize_low): Remove call to linux_test_for_tracefork.
9211 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9212 common/linux-ptrace.h.
9213 (PTRACE_TYPE_ARG4): Likewise.
9214 Include linux-ptrace.h.
9216 2013-08-21 Pedro Alves <palves@redhat.com>
9218 * config.in: Renegerate.
9220 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9222 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9223 (SFILES): Remove $(srcdir)/common/target-common.c and
9224 add $(srcdir)/target/waitstatus.c.
9225 (OBS): Remove target-common.o and add waitstatus.o.
9226 (server_h): Remove $(srcdir)/../common/target-common.h and
9227 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9228 and $(srcdir)/../target/waitstatus.h.
9229 (target-common.o): Remove.
9230 (waitstatus.o): New target object file.
9231 * target.h: Do not include target-common.h and
9232 include target/resume.h, target/wait.h and
9233 target/waitstatus.h.
9235 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9237 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9238 to PTRACE_TYPE_ARG3.
9239 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9240 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9242 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9243 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9245 2013-07-27 Jie Zhang <jie@codesourcery.com>
9246 Daniel Jacobowitz <dan@codesourcery.com>
9247 Yao Qi <yao@codesourcery.com>
9249 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9250 (mips-linux-watch.o): New rule.
9251 (mips_linux_watch_h): New variable.
9252 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9254 * linux-mips-low.c: Include mips-linux-watch.h.
9255 (struct arch_process_info, struct arch_lwp_info): New.
9256 (update_watch_registers_callback): New function.
9257 (mips_linux_new_process, mips_linux_new_thread) New functions.
9258 (mips_linux_prepare_to_resume, mips_insert_point): New
9260 (mips_remove_point, mips_stopped_by_watchpoint): New
9262 (rsp_bp_type_to_target_hw_bp_type): New function.
9263 (mips_stopped_data_address): New function.
9264 (the_low_target): Add watchpoint support functions.
9266 2013-07-27 Yao Qi <yao@codesourcery.com>
9268 * i386-low.c: Include break-common.h.
9269 (enum target_hw_bp_type): Remove.
9271 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9273 * Makefile.in (SFILES): /common/target-common.c.
9274 (OBS): Add target-common.o.
9275 (server_h): Add $(srcdir)/../common/target-common.h.
9276 (target-common.o): New target.
9277 * server.c (queue_stop_reply_callback): Free
9278 status string after use.
9279 * target.c (target_waitstatus_to_string): Remove.
9280 * target.h: Include target-common.h.
9281 (resume_kind): Likewise.
9282 (target_waitkind): Likewise.
9283 (target_waitstatus): Likewise.
9284 (TARGET_WNOHANG): Likewise.
9286 2013-07-04 Yao Qi <yao@codesourcery.com>
9288 * Makefile.in (host_alias): Use @host_noncanonical@.
9289 (target_alias): Use @target_noncanonical@.
9290 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9291 ACX_NONCANONICAL_HOST.
9292 * configure: Regenerated.
9295 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9297 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9298 * configure: Rebuild.
9299 * Makefile.in (version_host, version_target): Get from configure.
9300 (version.c): Use $(version_host) and $(version_target).
9302 2013-07-03 Pedro Alves <palves@redhat.com>
9304 * Makefile.in (config.status): Depend on development.sh.
9305 * acinclude.m4: Include libmcheck.m4.
9306 * configure: Regenerate.
9308 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9310 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9311 attribute inside the parentheses.
9312 (winapi_DebugSetProcessKillOnExit): Ditto.
9313 (winapi_DebugBreakProcess): Ditto.
9314 (winapi_GenerateConsoleCtrlEvent): Ditto.
9316 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9318 * notif.h (notif_event): Add a dummy member to avoid compiler
9321 2013-07-01 Pedro Alves <palves@redhat.com>
9323 * hostio.c (HOSTIO_PATH_MAX): Define.
9324 (require_filename, handle_open, handle_unlink, handle_readlink):
9327 2013-07-01 Pedro Alves <palves@redhat.com>
9329 * server.h: Include "pathmax.h".
9330 * linux-low.c: Don't include sys/param.h.
9331 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9333 * win32-low.c: Don't include sys/param.h.
9334 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9336 2013-07-01 Pedro Alves <palves@redhat.com>
9338 * event-loop.c: Don't check HAVE_UNISTD_H before including
9340 * gdbreplay.c: Likewise.
9341 * remote-utils.c: Likewise.
9342 * server.c: Likewise.
9343 * configure.ac: Don't check for unistd.h.
9344 * configure: Regenerate.
9346 2013-06-28 Tom Tromey <tromey@redhat.com>
9348 * Makefile.in (version.c): Use version.in, not
9351 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9353 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9354 * configure: Rebuild.
9355 * Makefile.in (version_host, version_target): Get from configure.
9356 (version.c): Use $(version_host) and $(version_target).
9358 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9360 Fix trace-status to output user name without trailing colon.
9361 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9363 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9365 Fix trace-status to output proper start-time and stop-time.
9366 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9367 output start time and stop time in hex as gdb expects.
9369 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9371 * tracepoint.c (build_traceframe_info_xml): Output trace state
9372 variables present in the trace buffer.
9374 2013-06-24 Tom Tromey <tromey@redhat.com>
9376 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9378 (version.o): Remove.
9379 * gdbreplay.c: Include version.h.
9380 (version, host_name): Don't declare.
9381 * server.h: Include version.h.
9382 (version, host_name): Don't declare.
9384 2013-06-12 Pedro Alves <palves@redhat.com>
9386 * linux-x86-low.c (linux_is_elf64): Delete global.
9387 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9388 with local linux_pid_exe_is_elf_64_file use.
9390 2013-06-11 Pedro Alves <palves@redhat.com>
9392 * linux-low.c (regset_disabled, disable_regset): New functions.
9393 (regsets_fetch_inferior_registers)
9394 (regsets_store_inferior_registers): Use them.
9395 (initialize_regsets_info); Don't allocate the disabled_regsets
9397 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9400 2013-06-11 Pedro Alves <palves@redhat.com>
9402 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9405 2013-06-11 Pedro Alves <palves@redhat.com>
9407 * linux-x86-low.c (initialize_low_arch): Call
9408 init_registers_x32_avx_linux.
9410 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9412 Fix compatibility with Android Bionic.
9413 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9416 2013-06-07 Pedro Alves <palves@redhat.com>
9419 * Makefile.in (OBS): Add tdesc.o.
9420 (IPA_OBJS): Add tdesc-ipa.o.
9421 (tdesc-ipa.o): New rule.
9422 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9424 * linux-low.c (new_inferior): Delete.
9425 (disabled_regsets, num_regsets): Delete.
9426 (linux_add_process): Adjust to set the new per-process
9428 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9429 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9430 was a stop. When calling arch_setup, switch the current inferior
9431 to the thread that got an event.
9432 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9433 (regsets_fetch_inferior_registers)
9434 (regsets_store_inferior_registers): New regsets_info parameter.
9436 (linux_register_in_regsets): New regs_info parameter. Adjust to
9438 (register_addr, fetch_register, store_register): New usrregs_info
9439 parameter. Adjust to use it.
9440 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9441 parameter regs_info. Adjust to use it.
9442 (linux_fetch_registers): Get the current inferior's regs_info, and
9444 (linux_store_registers): Ditto.
9445 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9446 (initialize_low): Don't initialize the target_regsets here. Call
9447 initialize_low_arch.
9448 * linux-low.h (target_regsets): Delete declaration.
9449 (struct regsets_info): New.
9450 (struct usrregs_info): New.
9451 (struct regs_info): New.
9452 (struct process_info_private) <new_inferior>: New field.
9453 (struct linux_target_ops): Delete the num_regs, regmap, and
9454 regset_bitmap fields. New field regs_info.
9455 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9456 * i387-fp.c (num_xmm_registers): Delete.
9457 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9458 calls to new interface.
9459 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9460 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9461 Infer the number of xmm registers from the regcache's target
9463 * i387-fp.h (num_xmm_registers): Delete.
9464 * inferiors.c (add_thread): Don't install the thread's regcache
9466 * proc-service.c (gregset_info): Fetch the current inferior's
9467 regs_info. Adjust to use it.
9468 * regcache.c: Include tdesc.h.
9469 (register_bytes, reg_defs, num_registers)
9470 (gdbserver_expedite_regs): Delete.
9471 (get_thread_regcache): If the thread doesn't have a regcache yet,
9472 create one, instead of aborting gdbserver.
9473 (regcache_invalidate_one): Rename to ...
9474 (regcache_invalidate_thread): ... this.
9475 (regcache_invalidate_one): New.
9476 (regcache_invalidate): Only invalidate registers of the current
9478 (init_register_cache): Add target_desc parameter, and use it.
9479 (new_register_cache): Ditto. Assert the target description has a
9480 non zero registers_size.
9481 (regcache_cpy): Add assertions. Adjust.
9482 (realloc_register_cache, set_register_cache): Delete.
9483 (registers_to_string, registers_from_string): Adjust.
9484 (find_register_by_name, find_regno, find_register_by_number)
9485 (register_cache_size): Add target_desc parameter, and use it.
9486 (free_register_cache_thread, free_register_cache_thread_one)
9487 (regcache_release, register_cache_size): New.
9488 (register_size): Add target_desc parameter, and use it.
9489 (register_data, supply_register, supply_register_zeroed)
9490 (supply_regblock, supply_register_by_name, collect_register)
9491 (collect_register_as_string, collect_register_by_name): Adjust.
9492 * regcache.h (struct target_desc): Forward declare.
9493 (struct regcache) <tdesc>: New field.
9494 (init_register_cache, new_register_cache): Add target_desc
9496 (regcache_invalidate_thread): Declare.
9497 (regcache_invalidate_one): Delete declaration.
9498 (regcache_release): Declare.
9499 (find_register_by_number, register_cache_size, register_size)
9500 (find_regno): Add target_desc parameter.
9501 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9503 * remote-utils.c: Include tdesc.h.
9504 (outreg, prepare_resume_reply): Adjust.
9505 * server.c: Include tdesc.h.
9506 (gdbserver_xmltarget): Delete declaration.
9507 (get_features_xml, process_serial_event): Adjust.
9508 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9510 (struct process_info) <tdesc>: New field.
9511 (ipa_tdesc): Declare.
9512 * tdesc.c: New file.
9513 * tdesc.h: New file.
9514 * tracepoint.c: Include tdesc.h.
9515 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9516 (get_context_regcache): Adjust to pass ipa_tdesc down.
9517 (do_action_at_tracepoint): Adjust to get the register cache size
9518 from the context regcache's description.
9519 (traceframe_walk_blocks): Adjust to get the register cache size
9520 from the current trace frame's description.
9521 (traceframe_get_pc): Adjust to get current trace frame's
9522 description and pass it down.
9523 (gdb_collect): Adjust to get the register cache size from the
9525 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9526 (gdbserver_xmltarget): Delete.
9527 (initialize_low_tracepoint): Set the ipa's target description.
9528 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9529 (initialize_low_tracepoint): Set the ipa's target description.
9530 * linux-x86-low.c: Include tdesc.h.
9531 [__x86_64__] (is_64bit_tdesc): New.
9532 (ps_get_thread_area, x86_get_thread_area): Use it.
9533 (i386_cannot_store_register): Rename to ...
9534 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9535 (i386_cannot_fetch_register): Rename to ...
9536 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9537 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9539 (target_regsets): Rename to ...
9540 (x86_regsets): ... this.
9541 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9543 (x86_siginfo_fixup): Use is_64bit_tdesc.
9544 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9545 (tdesc_x32_avx_linux, tdesc_x32_linux)
9546 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9548 (x86_linux_update_xmltarget): Delete.
9549 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9550 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9551 (AMD64_LINUX_USER64_CS): New.
9552 (x86_linux_read_description): New, based on
9553 x86_linux_update_xmltarget.
9554 (same_process_callback): New.
9555 (x86_arch_setup_process_callback): New.
9556 (x86_linux_update_xmltarget): New.
9557 (x86_regsets_info): New.
9558 (amd64_linux_regs_info): New.
9559 (i386_linux_usrregs_info): New.
9560 (i386_linux_regs_info): New.
9561 (x86_linux_regs_info): New.
9562 (x86_arch_setup): Reimplement.
9563 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9564 (x86_emit_ops): Ditto.
9565 (the_low_target): Adjust. Install x86_linux_regs_info,
9566 x86_cannot_fetch_register, and x86_cannot_store_register.
9567 (initialize_low_arch): New.
9568 * linux-ia64-low.c (tdesc_ia64): Declare.
9569 (ia64_fetch_register): Adjust.
9570 (ia64_usrregs_info, regs_info): New globals.
9571 (ia64_regs_info): New function.
9572 (the_low_target): Adjust.
9573 (initialize_low_arch): New function.
9574 * linux-sparc-low.c (tdesc_sparc64): Declare.
9575 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9577 (sparc_arch_setup): New function.
9578 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9579 (the_low_target): Adjust.
9580 (initialize_low_arch): New function.
9581 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9582 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9583 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9584 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9585 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9586 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9587 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9588 (tdesc_powerpc_isa205_vsx64l): Declare.
9589 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9590 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9591 (ppc_set_pc, ppc_get_hwcap): Adjust.
9592 (ppc_usrregs_info): Forward declare.
9593 (!__powerpc64__) ppc_regmap_adjusted: New global.
9594 (ppc_arch_setup): Adjust to the current process'es target
9596 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9597 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9598 (ppc_store_evrregset): Adjust.
9599 (target_regsets): Rename to ...
9600 (ppc_regsets): ... this, and make static.
9601 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9602 (ppc_regs_info): New function.
9603 (the_low_target): Adjust.
9604 (initialize_low_arch): New function.
9605 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9606 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9607 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9608 (tdesc_s390x_linux64v2): Declare.
9609 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9610 (s390_fill_gregset, s390_store_last_break): Adjust.
9611 (target_regsets): Rename to ...
9612 (s390_regsets): ... this, and make static.
9613 (s390_get_pc, s390_set_pc): Adjust.
9614 (s390_get_hwcap): New target_desc parameter, and use it.
9615 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9616 (s390_arch_setup): Adjust to set the current process'es target
9617 description. Don't adjust the regmap.
9618 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9619 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9620 (regs_info_3264): New globals.
9621 (s390_regs_info): New function.
9622 (the_low_target): Adjust.
9623 (initialize_low_arch): New function.
9624 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9625 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9626 [__mips64] (init_registers_mips_linux)
9627 (init_registers_mips_dsp_linux): Delete defines.
9628 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9629 (have_dsp): New global.
9630 (mips_read_description): New, based on mips_arch_setup.
9631 (mips_arch_setup): Reimplement.
9632 (get_usrregs_info): New function.
9633 (mips_cannot_fetch_register, mips_cannot_store_register)
9634 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9635 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9636 (target_regsets): Rename to ...
9637 (mips_regsets): ... this, and make static.
9638 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9639 (dsp_regs_info, regs_info): New globals.
9640 (mips_regs_info): New function.
9641 (the_low_target): Adjust.
9642 (initialize_low_arch): New function.
9643 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9644 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9646 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9647 (arm_read_description): New, with bits factored from
9649 (arm_arch_setup): Reimplement.
9650 (target_regsets): Rename to ...
9651 (arm_regsets): ... this, and make static.
9652 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9653 (arm_regs_info): New function.
9654 (the_low_target): Adjust.
9655 (initialize_low_arch): New function.
9656 * linux-m68k-low.c (tdesc_m68k): Declare.
9657 (target_regsets): Rename to ...
9658 (m68k_regsets): ... this, and make static.
9659 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9660 (m68k_regs_info): New function.
9661 (m68k_arch_setup): New function.
9662 (the_low_target): Adjust.
9663 (initialize_low_arch): New function.
9664 * linux-sh-low.c (tdesc_sharch): Declare.
9665 (target_regsets): Rename to ...
9666 (sh_regsets): ... this, and make static.
9667 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9668 (sh_regs_info, sh_arch_setup): New functions.
9669 (the_low_target): Adjust.
9670 (initialize_low_arch): New function.
9671 * linux-bfin-low.c (tdesc_bfin): Declare.
9672 (bfin_arch_setup): New function.
9673 (bfin_usrregs_info, regs_info): New globals.
9674 (bfin_regs_info): New function.
9675 (the_low_target): Adjust.
9676 (initialize_low_arch): New function.
9677 * linux-cris-low.c (tdesc_cris): Declare.
9678 (cris_arch_setup): New function.
9679 (cris_usrregs_info, regs_info): New globals.
9680 (cris_regs_info): New function.
9681 (the_low_target): Adjust.
9682 (initialize_low_arch): New function.
9683 * linux-cris-low.c (tdesc_crisv32): Declare.
9684 (cris_arch_setup): New function.
9685 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9686 (cris_regs_info): New function.
9687 (the_low_target): Adjust.
9688 (initialize_low_arch): New function.
9689 * linux-m32r-low.c (tdesc_m32r): Declare.
9690 (m32r_arch_setup): New function.
9691 (m32r_usrregs_info, regs_info): New globals.
9692 (m32r_regs_info): Adjust.
9693 (initialize_low_arch): New function.
9694 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9695 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9696 (tic6x_usrregs_info): Forward declare.
9697 (tic6x_read_description): New function, based on ...
9698 (tic6x_arch_setup): ... this. Reimplement.
9699 (target_regsets): Rename to ...
9700 (tic6x_regsets): ... this, and make static.
9701 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9702 (tic6x_regs_info): New function.
9703 (the_low_target): Adjust.
9704 (initialize_low_arch): New function.
9705 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9706 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9707 (target_regsets): Rename to ...
9708 (xtensa_regsets): ... this, and make static.
9709 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9711 (xtensa_arch_setup, xtensa_regs_info): New functions.
9712 (the_low_target): Adjust.
9713 (initialize_low_arch): New function.
9714 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9715 (nios2_arch_setup): Set the current process'es tdesc.
9716 (target_regsets): Rename to ...
9717 (nios2_regsets): ... this.
9718 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9719 (nios2_regs_info): New function.
9720 (the_low_target): Adjust.
9721 (initialize_low_arch): New function.
9722 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9723 (aarch64_arch_setup): Set the current process'es tdesc.
9724 (target_regsets): Rename to ...
9725 (aarch64_regsets): ... this.
9726 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9727 (aarch64_regs_info): New function.
9728 (the_low_target): Adjust.
9729 (initialize_low_arch): New function.
9730 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9732 (target_regsets): Rename to ...
9733 (tile_regsets): ... this.
9734 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9735 (tile_regs_info): New function.
9736 (tile_arch_setup): Set the current process'es tdesc.
9737 (the_low_target): Adjust.
9738 (initialize_low_arch): New function.
9739 * spu-low.c (tdesc_spu): Declare.
9740 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9741 * win32-arm-low.c (tdesc_arm): Declare.
9742 (arm_arch_setup): New function.
9743 (the_low_target): Install arm_arch_setup instead of
9745 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9746 (init_windows_x86): Rename to ...
9747 (i386_arch_setup): ... this. Set `win32_tdesc'.
9748 (the_low_target): Adjust.
9749 * win32-low.c (win32_tdesc): New global.
9750 (child_add_thread): Don't create the thread cache here.
9751 (do_initial_child_stuff): Set the new process'es tdesc.
9752 * win32-low.h (struct target_desc): Forward declare.
9753 (win32_tdesc): Declare.
9754 * lynx-i386-low.c (tdesc_i386): Declare global.
9755 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9756 * lynx-low.c (lynx_tdesc): New global.
9757 (lynx_add_process): Set the new process'es tdesc.
9758 * lynx-low.h (struct target_desc): Forward declare.
9759 (lynx_tdesc): Declare global.
9760 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9761 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9762 * nto-low.c (nto_tdesc): New global.
9763 (do_attach): Set the new process'es tdesc.
9764 * nto-low.h (struct target_desc): Forward declare.
9765 (nto_tdesc): Declare.
9766 * nto-x86-low.c (tdesc_i386): Declare.
9767 (nto_x86_arch_setup): Set `nto_tdesc'.
9769 2013-06-04 Gary Benson <gbenson@redhat.com>
9771 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9772 to qSupported response when appropriate.
9773 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9774 with nonzero-length annex.
9775 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9776 arguments supplied in annex.
9778 2013-05-31 Doug Evans <dje@google.com>
9781 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9782 64 bits in 64-cross-32 environment.
9784 2013-05-28 Pedro Alves <palves@redhat.com>
9786 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9787 (aarch64-without-fpu.c): Delete rule.
9788 * configure.srv (aarch64*-*-linux*): Remove references to
9789 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9790 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9793 2013-05-24 Pedro Alves <palves@redhat.com>
9795 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9796 instead of strchr/decode_address. Error if the range isn't split
9797 with a ','. Don't assume there's be a ':' in the action.
9799 2013-05-23 Yao Qi <yao@codesourcery.com>
9800 Pedro Alves <palves@redhat.com>
9802 * linux-low.c (lwp_in_step_range): New function.
9803 (linux_wait_1): If the thread was range stepping and stopped
9804 outside the stepping range, report the stop to GDB. Otherwise,
9805 continue stepping. Add range stepping debug output.
9806 (linux_set_resume_request): Copy the step range from the resume
9808 (linux_supports_range_stepping): New.
9809 (linux_target_ops) <supports_range_stepping>: Set to
9810 linux_supports_range_stepping.
9811 * linux-low.h (struct linux_target_ops)
9812 <supports_range_stepping>: New field.
9813 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9814 * linux-x86-low.c (x86_supports_range_stepping): New.
9815 (the_low_target) <supports_range_stepping>: Set to
9816 x86_supports_range_stepping.
9817 * server.c (handle_v_cont): Handle 'r' action.
9818 (handle_v_requests): Append ";r" if the target supports range
9820 * target.h (struct thread_resume) <step_range_start,
9821 step_range_end>: New fields.
9822 (struct target_ops) <supports_range_stepping>:
9824 (target_supports_range_stepping): New macro.
9826 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9828 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9829 confusion in comment.
9831 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9833 * lynx-low.c (struct process_info_private): New type.
9834 (lynx_add_process): New function.
9835 (lynx_create_inferior, lynx_attach): Replace calls to
9836 add_process by calls to lynx_add_process.
9837 (lynx_resume): If PTID is null, then try using
9838 current_process()->private->last_wait_event_ptid.
9840 (lynx_clear_inferiors): Delete. The contents of that function
9841 has been inlined in lynx_mourn;
9842 (lynx_wait_1): Save the ptid in the process's private data.
9843 (lynx_mourn): Free the process' private data. Replace call
9844 to lynx_clear_inferiors by call to clear_inferiors.
9846 2013-05-17 Yao Qi <yao@codesourcery.com>
9848 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9851 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9853 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9854 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9855 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9856 PT_TEXT_END_ADDR guards. Update comments.
9857 (linux_target_op) <read_offsets>: Conditionally define to
9858 linux_read_offsets if the target is UCLIBC and if it defines
9859 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9861 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9862 Andrew Jenner <andrew@codesourcery.com>
9864 * Makefile.in (SFILES): Add linux-nios2-low.c.
9865 (clean): Add action to delete nios2-linux.c.
9866 (nios2-linux.c): New rule.
9867 * configure.srv: Add nios2*-*-linux*.
9868 * linux-nios2-low.c: New.
9870 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9872 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9874 2013-04-25 Hui Zhu <hui@codesourcery.com>
9877 * ax.c (ax_printf): Add fflush.
9879 2013-04-22 Tom Tromey <tromey@redhat.com>
9881 * Makefile.in (SFILES): Add filestuff.c.
9882 (OBS): Add filestuff.o.
9883 (filestuff.o): New target.
9884 * config.in, configure: Rebuild.
9885 * configure.ac: Check for fdwalk, pipe2.
9887 2013-04-17 Pedro Alves <palves@redhat.com>
9889 * configure.ac (USE_THREAD_DB): Delete variable.
9890 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9891 Don't AC_SUBST USE_THREAD_DB.
9892 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9893 * config.in, configure: Regenerate.
9895 2013-04-16 Pedro Alves <palves@redhat.com>
9897 * linux-low.h (struct lwp_info) <thread_known>: Move under
9898 the USE_THREAD_DB #ifdef.
9900 2013-04-16 Pedro Alves <palves@redhat.com>
9902 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9903 (linux-low.o): Delete rule.
9904 * linux-low.h: Always include "gdb_thread_db.h" instead of
9905 conditionally including thread_db.h.
9906 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9909 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9911 * Makefile.in (install-only): Fix make install regression.
9913 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9915 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9916 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9918 * gdbserver.1: Remove.
9920 2013-03-22 Pedro Alves <palves@redhat.com>
9922 * linux-low.c (handle_extended_wait): Don't call
9923 linux_enable_event_reporting.
9925 2013-03-15 Tony Theodore <tonyt@logyst.com>
9928 * Makefile.in (SHELL): Use @SHELL@.
9930 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9932 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9935 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9937 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9938 Remove extraneous NULL element.
9940 2013-03-13 Yao Qi <yao@codesourcery.com>
9942 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9943 'V' block in trace frame.
9945 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9947 * target.h (struct target_ops): Add btrace ops.
9948 (target_supports_btrace): New macro.
9949 (target_enable_btrace): New macro.
9950 (target_disable_btrace): New macro.
9951 (target_read_btrace): New macro.
9952 * gdbthread.h (struct thread_info): Add btrace field.
9953 * server.c: Include btrace-common.h.
9954 (handle_btrace_general_set): New function.
9955 (handle_btrace_enable): New function.
9956 (handle_btrace_disable): New function.
9957 (handle_general_set): Call handle_btrace_general_set.
9958 (handle_qxfer_btrace): New function.
9959 (struct qxfer qxfer_packets[]): Add btrace entry.
9960 * inferiors.c (remove_thread): Disable btrace.
9961 * linux-low: Include linux-btrace.h.
9962 (linux_low_enable_btrace): New function.
9963 (linux_low_read_btrace): New function.
9964 (linux_target_ops): Add btrace ops.
9965 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9966 Add srv_linux_btrace=yes.
9967 (x86_64-*-linux*): Add linux-btrace.o.
9968 Add srv_linux_btrace=yes.
9969 * configure.ac: Define HAVE_LINUX_BTRACE.
9970 * config.in: Regenerated.
9971 * configure: Regenerated.
9973 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9975 * server.c (handle_qxfer): Preserve error message if -3 is
9977 (qxfer): Document the -3 return value.
9979 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9981 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9982 (linux_btrace_h): New variable.
9983 (linux-btrace.o): New rule.
9985 2013-03-08 Stan Shebs <stan@codesourcery.com>
9986 Hafiz Abid Qadeer <abidh@codesourcery.com>
9988 * tracepoint.c (trace_buffer_size): New global.
9989 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9990 (init_trace_buffer): Change to one-argument function. Allocate
9991 trace buffer memory.
9992 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9993 handle QTBuffer:size packet.
9994 (cmd_bigqtbuffer_size): New function.
9995 (initialize_tracepoint): Call init_trace_buffer with
9996 DEFAULT_TRACE_BUFFER_SIZE.
9997 * server.c (handle_query): Add QTBuffer:size in the
10000 2013-03-07 Yao Qi <yao@codesourcery.com>
10002 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10003 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10005 (cmd_qtsp): Adjust condition. Do post increment.
10006 Set cur_action and cur_step_action back to 0.
10008 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10011 * linux-low.c (linux_write_memory): Return early success if LEN is
10014 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10016 * configure.srv: Add x86_64-*-cygwin* as target.
10018 2013-02-28 Tom Tromey <tromey@redhat.com>
10020 * configure.ac: Invoke AC_SYS_LARGEFILE.
10021 * configure, config.in: Rebuild.
10023 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10025 * win32-low.c: Throughout, fix format strings and casts of
10026 printf-like functions to avoid type related warnings on all
10028 (get_child_debug_event): Print dwDebugEventCode as hex since
10029 that's how it's usually documented.
10031 2013-02-28 Yao Qi <yao@codesourcery.com>
10033 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10036 2013-02-27 Jiong Wang <jiwang@tilera.com>
10038 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10039 (reg-tilegx32.c): New rule.
10040 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10041 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10042 different register info initializer according to elf class.
10043 (init_registers_tilgx32): New function. The tilegx32 register info
10045 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10046 (tile_store_gregset): Likewise.
10048 2013-02-27 Yao Qi <yao@codesourcery.com>
10050 * server.c (process_point_options): Print debug message when
10051 debug_threads is true.
10053 2013-02-26 Yao Qi <yao@codesourcery.com>
10055 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10057 2013-02-19 Pedro Alves <palves@redhat.com>
10058 Kai Tietz <ktietz@redhat.com>
10062 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10063 instead of strtoul to extract address from packet.
10064 (process_serial_event) <'z'>: Likewise.
10066 2013-02-18 Yao Qi <yao@codesourcery.com>
10068 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10070 2013-02-14 Pedro Alves <palves@redhat.com>
10074 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10075 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10077 2013-02-14 Pedro Alves <palves@redhat.com>
10079 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10081 2013-02-14 Pedro Alves <palves@redhat.com>
10083 * tracepoint.c (save_string): Delete.
10084 (add_tracepoint_action): Use savestring instead of save_string.
10086 2013-02-12 Pedro Alves <palves@redhat.com>
10088 * linux-xtensa-low.c: Ditto.
10089 * xtensa-xtregs.c: Ditto.
10091 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10093 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10096 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10098 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10099 aarch64_num_wp_regs and aarch64_num_bp_regs to
10100 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10102 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10104 * linux-aarch64-low.c (ps_get_thread_area): Replace
10105 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10107 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10108 Marcus Shawcroft <marcus.shawcroft@arm.com>
10109 Nigel Stephens <nigel.stephens@arm.com>
10110 Yufeng Zhang <yufeng.zhang@arm.com>
10112 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10113 (aarch64.c, aarch64-without-fpu.c): New targets.
10114 * configure.srv (aarch64*-*-linux*): New.
10115 * linux-aarch64-low.c: New file.
10117 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10119 * linux-low.c (handle_extended_wait, linux_create_inferior)
10120 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10121 (dequeue_one_deferred_signal, linux_resume_one_thread)
10122 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10123 (linux_tracefork_grandchild, linux_test_for_tracefork)
10124 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10125 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10126 where the argument is 0.
10128 2013-01-25 Yao Qi <yao@codesourcery.com>
10130 * event-loop.c: Include "queue.h".
10131 (gdb_event_p): New typedef.
10132 (struct gdb_event) <next_event>: Remove.
10133 (event_queue): Change to QUEUE(gdb_event_p).
10134 (async_queue_event): Remove.
10135 (gdb_event_xfree): New.
10136 (initialize_event_loop): New.
10137 (process_event): Use API from QUEUE.
10138 (wait_for_event): Likewise.
10139 * server.c (main): Call initialize_event_loop.
10140 * server.h (initialize_event_loop): Declare.
10142 2013-01-18 Yao Qi <yao@codesourcery.com>
10144 * ax.h (struct eval_agent_expr_context): New.
10145 (gdb_eval_agent_expr): Update declaration.
10146 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10147 TFRAME. Add new argument CTX.
10148 * server.h (struct eval_agent_expr_context): Declare.
10149 (agent_mem_read, agent_tsv_read): Update declaration.
10150 (agent_mem_read_string): Likewise.
10151 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10152 (add_traceframe_block): Add new argument TPOINT.
10153 Increase TPOINT->traceframe_usage.
10154 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10155 eval_tracepoint_agent_expr.
10156 (condition_true_at_tracepoint): Likewise.
10157 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10158 (agent_mem_read_string, agent_tsv_read): Likewise.
10160 2013-01-16 Yao Qi <yao@codesourcery.com>
10162 * linux-low.c (linux_resume_one_lwp): Don't check
10163 'lwp->bp_reinsert != 0'.
10165 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10166 Pedro Alves <palves@redhat.com>
10168 * lynx-low.c (ptrace_request_to_str): Define a temporary
10169 macro and use it to simplify this function's implementation.
10171 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10173 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10176 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10178 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10180 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10182 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10184 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10186 * lynx-low.c (lynx_resume): Use the resume_info parameter
10187 to determine the ptid for the lynx_ptrace call, unless
10188 it is equal to minus_one_ptid, in which case we use the
10189 ptid of the current_inferior.
10190 (lynx_wait_1): After having received a thread create/exit
10191 event, resume the inferior's execution using the signaling
10192 thread's ptid, rather than the old ptid.
10194 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10196 * lynx-low.c (lynx_resume): Delete variable ret.
10198 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10200 * gdbreplay.c (gdbreplay_version): Update copyright year.
10201 * server.c (gdbserver_version): Likewise.
10203 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10205 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10208 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10210 * lynx-low.c (ptrace_request_to_str): Add handling for
10211 PTRACE_GETTRACESIG.
10213 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10215 * lynx-low.c (lynx_attach): Delete variable new_process.
10217 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10219 * lynx-low.c (lynx_create_inferior): Delete variable
10222 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10224 * lynx-low.c (ptrace_request_to_str): Do not handle
10225 PTRACE_GETTHREADLIST if this macro does not exist.
10227 2012-12-15 Yao Qi <yao@codesourcery.com>
10229 * Makefile.in (OBS): Add notif.o.
10230 * notif.c, notif.h: New.
10231 * server.c: Include "notif.h".
10232 (struct vstop_notif) <next>: Remove.
10234 (queue_stop_reply): Update.
10235 (push_event, send_next_stop_reply): Remove.
10236 (discard_queued_stop_replies): Update.
10237 (notif_stop): New variable.
10238 (handle_v_stopped): Remove.
10239 (handle_v_requests): Don't call handle_v_stopped. Call
10240 handle_ack_notif instead.
10241 (queue_stop_reply_callback): Call notif_event_enque instead
10242 of queue_stop_reply.
10243 (handle_status): Don't call send_next_stop_reply, call
10244 notif_write_event instead.
10245 (kill_inferior_callback): Likewise.
10246 (detach_or_kill_inferior_callback): Likewise.
10247 (main): Call initialize_notif.
10248 (process_serial_event): Call QUEUE_is_empty.
10249 (handle_target_event): Call notif_push instead of push event.
10250 * server.h (push_event): Remove declaration.
10252 2012-12-10 Tom Tromey <tromey@redhat.com>
10254 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10255 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10258 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10259 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10260 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10261 (amd64-linux-ipa.o, ax.o): Rewrite.
10262 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10263 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10264 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10265 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10266 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10267 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10268 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10269 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10270 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10271 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10272 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10273 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10274 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10275 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10276 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10277 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10278 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10279 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10280 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10281 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10282 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10283 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10284 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10285 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10286 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10287 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10288 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10289 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10290 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10291 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10292 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10293 (reg-tilegx.o): Remove.
10294 (all_object_files): New macro.
10295 Include .deps files.
10296 * aclocal.m4, configure: Rebuild.
10297 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10298 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10299 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10301 2012-12-05 Tom Tromey <tromey@redhat.com>
10304 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10306 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10308 * configure.ac: Check for linux/perf_event.h.
10309 * config.in: Regenerated.
10310 * configure: Regenerated.
10312 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10314 * hostio.c (handle_readlink): Decrease buffer size
10315 parameter passed to readlink by one byte.
10317 2012-11-26 Yao Qi <yao@codesourcery.com>
10319 * configure.ac (build_warnings): Append '-Wempty-body'.
10320 * configure: Regenerated.
10321 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10324 2012-11-15 Pierre Muller <muller@sourceware.org>
10326 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10327 * config.in: Regenerate.
10328 * configure: Regenerate.
10329 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10330 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10331 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10332 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10334 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10335 instead of <sys/wait.h> header.
10336 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10338 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10340 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10341 (various make rules): Remove -DGDBSERVER
10343 2012-11-09 Yao Qi <yao@codesourcery.com>
10345 * spu-low.c (current_ptid): Move it to ..
10346 * gdbthread.h: ... here. New.
10347 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10348 * server.c (myresume, process_serial_event): Likewise.
10349 * thread-db.c (thread_db_find_new_threads): Likewise.
10350 * tracepoint.c (run_inferior_command): Likewise.
10352 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10354 * server.c (handle_search_memory_1): Include access length in
10357 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10359 * linux-crisv32-low.c: Fix compile errors.
10361 2012-09-04 Yao Qi <yao@codesourcery.com>
10363 * tracepoint.c (cmd_qtsv): Adjust debug message.
10364 Don't check CUR_TPOINT.
10366 2012-08-28 Yao Qi <yao@codesourcery.com>
10368 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10369 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10370 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10371 Remove declarations of xmalloc, xreallloc, xstrdup and
10373 * Makefile.in (libiberty_h): New.
10374 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10375 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10377 2012-08-23 Yao Qi <yao@codesourcery.com>
10379 * server.h: Remove declaration of 'xsnprintf'.
10381 2012-08-22 Keith Seitz <keiths@redhat.com>
10383 * server.h: Include build-gnulib-gbserver/config.h.
10384 * gdbreplay.c: Likewise.
10386 2012-08-08 Doug Evans <dje@google.com>
10388 * Makefile.in (SFILES): Add gdb_vecs.c.
10389 (OBS): Add gdb_vecs.o.
10390 (gdb_vecs_h, host_defs_h): New variables.
10391 (thread-db.o): Add $(gdb_vecs_h) dependency.
10392 (gdb_vecs.o): New rule.
10393 * thread-db.c: #include "gdb_vecs.h".
10394 (thread_db_load_search): Use a vector to iterate over path elements.
10395 Handle text appearing after "$pdir".
10397 * configure.ac: Add check for strstr.
10398 * config.in: Regenerate.
10399 * configure: Regenerate.
10401 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10403 * hostio.c (handle_pread): If pread fails, fall back to attempting
10405 (handle_pwrite): Likewise for pwrite.
10407 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10409 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10410 between unsupported TYPE and unimplementable ADDR/LEN combination.
10411 (arm_insert_point): Act on new return value.
10413 2012-07-31 Pedro Alves <palves@redhat.com>
10415 * server.c (process_point_options): Only skip tokens if we find
10416 one that is unrecognized. Don't treat 'X' specially while
10417 skipping unrecognized tokens.
10419 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10421 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10422 to 4-byte-align HW breakpoint addresses for Thumb.
10424 2012-07-27 Yao Qi <yao@codesourcery.com>
10428 * server.h: Declare gdb_agent_about_to_close.
10429 * target.c (kill_inferior): Include "agent.h".
10430 New. Send command 'kill'.
10431 * target.h (kill_inferior): Removed macro.
10432 * tracepoint.c (gdb_agent_about_to_close): New.
10433 (gdb_agent_helper_thread): Handle command 'close'.
10434 Wait endlessly until the inferior stops.
10435 Install gdb_agent_remove_socket to atexit hook.
10436 (agent_socket_name): New static variable.
10437 (gdb_agent_socket_init): Replace local variable 'name' with
10438 'agent_socket_name'.
10439 (gdb_agent_remove_socket): New.
10441 2012-07-27 Yao Qi <yao@codesourcery.com>
10443 * server.c (process_point_options): Stop at 'X' when parsing.
10445 2012-07-19 Michael Eager <eager@eagercon.com>
10447 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10449 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10450 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10451 hardware breakpoint.
10453 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10455 * gdbserver/linux-low.c (initialize_low): Call
10456 linux_ptrace_init_warnings.
10458 2012-07-02 Doug Evans <dje@google.com>
10460 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10463 2012-07-02 Stan Shebs <stan@codesourcery.com>
10465 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10466 (ax.o): Add it to build rule.
10468 (OBS): Add format.o.
10469 (IPA_OBS): Add format.o.
10470 * server.c (handle_query): Claim support for breakpoint commands.
10471 (process_point_options): Add command case.
10472 (process_serial_event): Leave running if there are printfs in
10474 * mem-break.h (any_persistent_commands): Declare.
10475 (add_breakpoint_commands): Declare.
10476 (gdb_no_commands_at_breakpoint): Declare.
10477 (run_breakpoint_commands): Declare.
10478 * mem-break.c (struct point_command_list): New struct.
10479 (struct breakpoint): New field command_list.
10480 (any_persistent_commands): New function.
10481 (add_commands_to_breakpoint): New function.
10482 (add_breakpoint_commands): New function.
10483 (gdb_no_commands_at_breakpoint): New function.
10484 (run_breakpoint_commands): New function.
10485 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10487 * ax.c: Include format.h.
10488 (ax_printf): New function.
10489 (gdb_eval_agent_expr): Add printf opcode.
10491 2012-06-13 Yao Qi <yao@codesourcery.com>
10493 * server.c (start_inferior): Remove duplicated writes to fields
10494 'last_resume_kind' and 'last_status' of 'current_inferior'.
10496 2012-06-12 Yao Qi <yao@codesourcery.com>
10497 Pedro Alves <palves@redhat.com>
10499 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10501 * server.c (handle_v_cont): Extend comment.
10503 2012-06-11 Yao Qi <yao@codesourcery.com>
10505 * linux-low.c (linux_attach): Add 'static'.
10507 2012-06-06 Yao Qi <yao@codesourcery.com>
10509 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10511 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10513 Fix gcc -flto compilation warning.
10514 * server.c (main): Make variable multi_mode and attach volatile.
10516 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10518 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10519 if the platform doesn't know about it.
10521 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10523 * Makefile.in (SFILES): Add linux-tile-low.c.
10524 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10525 * configure.srv: Handle tilegx-*-linux*.
10526 * linux-tile-low.c: New file.
10528 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10530 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10532 2012-05-24 Pedro Alves <palves@redhat.com>
10536 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10538 2012-05-24 Pedro Alves <palves@redhat.com>
10542 Replace target_signal with gdb_signal throughout.
10544 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10546 * linux-low.c (linux_store_registers): Avoid the copying sequence
10547 when no data has been retrieved by ptrace.
10549 2012-05-22 Will Deacon <will.deacon@arm.com>
10551 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10552 Include asm/ptrace.h.
10553 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10556 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10558 * linux-low.c (linux_store_registers): Don't re-retrieve data
10559 with ptrace that has already been obtained from /proc. Always
10560 copy any data retrieved with ptrace to the buffer supplied.
10562 2012-05-11 Yao Qi <yao@codesourcery.com>
10563 Pedro Alves <palves@redhat.com>
10565 * linux-low.c (enum stopping_threads_kind): New.
10566 (stopping_threads): Change type to `enum stopping_threads_kind'.
10567 (handle_extended_wait): If stopping and suspending threads, leave
10568 the new_lwp suspended too.
10569 (linux_wait_for_event): Adjust.
10570 (stop_all_lwps): Set `stopping_threads' to
10571 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10572 whether we're suspending threads or just stopping them. Assert no
10575 2012-04-29 Yao Qi <yao@codesourcery.com>
10577 * server.h: Move some code to ...
10578 * gdbthread.h: ... here. New.
10579 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10580 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10581 (nto-low.o, win32-low.o): Likewise.
10582 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10583 * regcache.c, remote-utils.c, server.c: Likewise.
10584 * target.c, tracepoint.c, win32-low.c: Likewise.
10586 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10588 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10589 (PTRACE_ARG4_TYPE): Likewise.
10590 (PTRACE_XFER_TYPE): Likewise.
10591 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10592 ptrace to PTRACE_ARG3_TYPE.
10593 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10594 (PTRACE_ARG4_TYPE): Likewise.
10595 (PTRACE_XFER_TYPE): Likewise.
10596 (linux_detach_one_lwp): Cast fourth argument of
10597 ptrace to long then PTRACE_ARG4_TYPE.
10598 (regsets_fetch_inferior_registers): Cast third argument of
10599 ptrace to long then PTRACE_ARG3_TYPE.
10600 (regsets_store_inferior_registers): Likewise.
10602 2012-04-20 Pedro Alves <palves@redhat.com>
10604 * configure: Regenerate.
10606 2012-04-19 Pedro Alves <palves@redhat.com>
10608 * Makefile.in (GNULIB_BUILDDIR): New.
10609 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10610 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10611 (all, install-only, uninstall, clean-info, all-lib, clean): No
10612 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10613 (maintainer-clean realclean distclean): Use subdir_do.
10615 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10616 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10617 * acinclude.m4: Include acx_configure_dir.m4.
10618 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10619 calls. Call AC_PROG_RANLIB. Configure gnulib using
10622 (GNULIB_STDINT_H): Adjust.
10623 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10624 * gdbreplay.c: Include build-gnulib/config.h.
10625 * server.h: Likewise.
10626 * aclocal.m4: Regenerate.
10627 * config.in: Regenerate.
10628 * configure: Regenerate.
10630 2012-04-19 Pedro Alves <palves@redhat.com>
10632 * Makefile.in (LIBGNU, INCGNU): Adjust.
10633 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10634 (all, install-only, uninstall, clean-info, all-lib, clean)
10635 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10636 * configure.ac: Adjust AC_OUTPUT output.
10637 * aclocal.m4: Regenerate.
10638 * configure: Regenerate.
10640 2012-04-19 Pedro Alves <palves@redhat.com>
10642 * Makefile.in (generated_files): New.
10643 (server_h): Remove the explicit dependency on config.h, and depend
10644 on $generated_files.
10646 2012-04-19 Pedro Alves <palves@redhat.com>
10648 * Makefile.in (INCGNU): Add -Ignulib.
10650 2012-04-19 Pedro Alves <palves@redhat.com>
10652 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10653 (INCGNU): ... this, and spell out -I here.
10654 (GNULIB_LIB): Rename to ...
10655 (LIBGNU): ... this.
10656 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10658 2012-04-19 Pedro Alves <palves@redhat.com>
10660 * config.in: Regenerate.
10662 2012-04-19 Pedro Alves <palves@redhat.com>
10664 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10665 * server.h (memmem): Remove declaration.
10666 * config.in: Regenerate.
10667 * configure: Regenerate.
10669 2012-04-19 Yao Qi <yao@codesourcery.com>
10671 * Makefile.in (SFILES): Add common/vec.c.
10675 2012-04-19 Yao Qi <yao@codesourcery.com>
10677 * remote-utils.c (prepare_resume_reply): Replace with macro
10678 target_core_of_thread.
10679 * server.c (handle_qxfer_threads_proper): Likewise.
10680 * target.h (traget_core_of_thread): New macro.
10682 2012-04-18 Pedro Alves <palves@redhat.com>
10684 * aclocal.m4: Regenerate.
10685 * configure: Regenerate.
10687 2012-04-16 Yao Qi <yao@codesourcery.com>
10689 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10690 duplicated on address.
10692 2012-04-16 Yao Qi <yao@codesourcery.com>
10694 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10695 (struct tracepoint_action_ops) <send>: New field.
10696 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10697 (agent_expr_send, x_tracepoint_action_send): New.
10698 (l_tracepoint_action_send): New.
10699 (cmd_qtdp): Download and install tracepoint
10700 according to `use_agent'.
10701 (run_inferior_command): Add one more parameter `len'.
10703 (tracepoint_send_agent): New.
10704 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10706 2012-04-16 Yao Qi <yao@codesourcery.com>
10708 * tracepoint.c (download_tracepoints): Moved to ...
10709 (cmd_qtstart): ... here.
10711 2012-04-14 Yao Qi <yao@codesourcery.com>
10713 * tracepoint.c: Include inttypes.h.
10714 (struct collect_memory_action): Use sized types.
10715 (struct tracepoint): Likewise.
10716 (cmd_qtdp, stop_tracing): Update print specifiers.
10717 (cmd_qtp, response_tracepoint): Likewise.
10718 (collect_data_at_tracepoint): Likewise.
10719 (collect_data_at_step): Likewise.
10721 2012-04-14 Yao Qi <yao@codesourcery.com>
10723 Import gnulib module inttypes.
10724 * aclocal.m4, config.in, configure: Regenerated.
10726 2012-04-14 Yao Qi <yao@codesourcery.com>
10728 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10729 Makefile and config.status at last.
10731 2012-04-13 Yao Qi <yao@codesourcery.com>
10733 * tracepoint.c: Include stdint.h unconditionally.
10735 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10737 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10738 on BFD_HAVE_SYS_PROCFS_TYPE.
10739 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10740 * configure: Regenerate.
10741 * config.in: Likewise.
10743 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10745 * Makefile.in (clean): Also remove x32.c x32-linux.c
10746 x32-avx.c x32-avx-linux.c.
10747 (x32.o): New target.
10749 (x32-linux.o): Likewise.
10750 (x32-linux.c): Likewise.
10751 (x32-avx.o): Likewise.
10752 (x32-avx.c): Likewise.
10753 (x32-avx-linux.o): Likewise.
10754 (x32-avx-linux.c): Likewise.
10756 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10757 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10758 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10759 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10760 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10761 i386/x32-avx-linux.xml.
10763 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10764 (init_registers_x32_avx_linux): Likwise.
10765 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10766 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10768 2012-04-13 Pedro Alves <palves@redhat.com>
10770 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10771 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10772 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10773 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10776 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10778 * linux-x86-low.c (compat_x32_clock_t): New.
10779 (compat_x32_siginfo_t): Likewise.
10780 (compat_x32_siginfo_from_siginfo): Likewise.
10781 (siginfo_from_compat_x32_siginfo): Likewise.
10782 (linux_is_elf64): Likewise.
10783 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10784 and siginfo_from_compat_x32_siginfo for x32.
10785 (x86_arch_setup): Set linux_is_elf64.
10787 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10790 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10792 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10793 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10794 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10795 compatible with process.
10797 2012-04-12 Yao Qi <yao@codesourcery.com>
10799 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10800 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10801 (install-only, install-info, clean): Handle sub dir gnulib.
10802 (all-lib, am--refresh): New targets.
10803 (memmem.o): Remove target.
10804 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10805 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10806 (AC_REPLACE_FUNCS): Remove memmem.
10807 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10808 (AC_OUTPUT): Generate Makefile in gnulib/.
10809 * aclocal.m4, config.in, configure: Regenerated.
10811 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10813 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10815 2012-04-05 Pedro Alves <palves@redhat.com>
10817 -Werror=strict-aliasing
10819 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10822 2012-04-04 Pedro Alves <palves@redhat.com>
10824 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10825 (sparc_store_gregset_from_stack, sparc_store_gregset)
10826 (sparc_breakpoint_at): Fix formatting.
10828 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10830 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10832 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10833 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10834 * config.in: Regenerate.
10835 * configure: Likewise.
10837 2012-03-29 Pedro Alves <palves@redhat.com>
10839 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10840 Correct ptrace arguments.
10842 2012-03-28 Pedro Alves <palves@redhat.com>
10844 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10845 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10846 (IA64_FR1_REGNUM): New defines.
10847 (ia64_fetch_register): New.
10848 (the_low_target): Install it.
10849 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10851 * linux-low.c (linux_fetch_registers): Try the
10852 the_low_target.fetch_register hook first.
10854 * linux-arm-low.c (the_low_target): Adjust.
10855 * linux-bfin-low.c (the_low_target): Adjust.
10856 * linux-cris-low.c (the_low_target): Adjust.
10857 * linux-crisv32-low.c (the_low_target): Adjust.
10858 * linux-m32r-low.c (the_low_target): Adjust.
10859 * linux-m68k-low.c (the_low_target): Adjust.
10860 * linux-mips-low.c (the_low_target): Adjust.
10861 * linux-ppc-low.c (the_low_target): Adjust.
10862 * linux-s390-low.c (the_low_target): Adjust.
10863 * linux-sh-low.c (the_low_target): Adjust.
10864 * linux-sparc-low.c (the_low_target): Adjust.
10865 * linux-tic6x-low.c (the_low_target): Adjust.
10866 * linux-x86-low.c (the_low_target): Adjust.
10867 * linux-xtensa-low.c (the_low_target): Adjust.
10869 2012-03-26 Pedro Alves <palves@redhat.com>
10871 * server.c (handle_qxfer_libraries): Don't bail early if
10872 the_target->qxfer_libraries_svr4 is not NULL.
10874 2012-03-26 Pedro Alves <palves@redhat.com>
10876 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10878 2012-03-23 Pedro Alves <palves@redhat.com>
10880 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10881 "library-list-svr4" element's start tag when the the DSO list is
10884 2012-03-23 Pedro Alves <palves@redhat.com>
10886 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10887 a variable whose type size is the same as the inferior's pointer
10890 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10892 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10894 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10895 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10896 * linux-low.h: Include <signal.h>.
10897 (struct siginfo): Remove forward declaration.
10898 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10901 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10903 * .gitignore: Ignore more files.
10905 2012-03-19 Pedro Alves <palves@redhat.com>
10906 Jan Kratochvil <jan.kratochvil@redhat.com>
10908 * server.c (cont_thread, general_thread): Add describing comments.
10909 (start_inferior): Clear `cont_thread'.
10910 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10913 2012-03-15 Yao Qi <yao@codesourcery.com>
10915 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10917 (cmd_qtdp): ... here.
10919 2012-03-15 Yao Qi <yao@codesourcery.com>
10921 * tracepoint.c (struct tracepoint_action_ops): New.
10922 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10923 (m_tracepoint_action_download): New.
10924 (r_tracepoint_action_download): New.
10925 (x_tracepoint_action_download): New.
10926 (l_tracepoint_action_download): New.
10927 (add_tracepoint_action): Install `action->ops' according type.
10928 (download_tracepoint_1): Move code `download' function pointer
10929 of various tracepoint_action_ops.
10931 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10933 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10934 linux_ptrace_attach_warnings.
10936 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10938 * Makefile.in (linux-ptrace.o): New.
10939 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10940 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10941 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10942 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10943 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10945 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10947 2012-03-08 Yao Qi <yao@codesourcery.com>
10948 Pedro Alves <palves@redhat.com>
10950 Fix PR server/13392.
10951 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10952 offset of JMP insn.
10953 * tracepoint.c (remove_tracepoint): New.
10954 (cmd_qtdp): Call remove_tracepoint when failed to install.
10956 2012-03-07 Pedro Alves <palves@redhat.com>
10958 * linux-low.c (get_detach_signal): New.
10959 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10960 Pass on pending signals to PTRACE_DETACH. Check the result of the
10962 * server.c (program_signals, program_signals_p): New.
10963 (handle_general_set): Handle QProgramSignals.
10964 * server.h (program_signals, program_signals_p): Declare.
10966 2012-03-05 Pedro Alves <palves@redhat.com>
10967 Jan Kratochvil <jan.kratochvil@redhat.com>
10969 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10972 2012-03-03 Yao Qi <yao@codesourcery.com>
10974 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10975 agent_look_up_symbols.
10977 2012-03-03 Yao Qi <yao@codesourcery.com>
10979 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10980 (linux-x86-low.o): Likewise.
10981 * server.h: Remove in_process_agent_loaded.
10982 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10986 2012-03-03 Yao Qi <yao@codesourcery.com>
10988 * tracepoint.c (gdb_agent_capability): New global.
10989 (in_process_agent_loaded_ust): Renamed to
10990 `in_process_agent_supports_ust'.
10992 (in_process_agent_supports_ust): Call agent_capability_check.
10993 (clear_installed_tracepoints): Assert that agent supports
10996 2012-03-03 Yao Qi <yao@codesourcery.com>
10998 * linux-low.c (linux_supports_agent): New.
10999 (linux_target_ops): Initialize field `supports_agent' with
11000 linux_supports_agent.
11001 * target.h (struct target_ops) <supports_agent>: New.
11002 (target_supports_agent): New macro.
11003 * server.c (handle_general_set): Handle packet 'QAgent'.
11004 (handle_query): Send `QAgent+'.
11005 * Makefile.in (server.o): Depends on agent.h.
11007 2012-03-03 Yao Qi <yao@codesourcery.com>
11009 * Makefile.in (OBS): Add agent.o.
11010 Add new rule for agent.o.
11011 Track dependence of tracepoint.c on agent.h.
11012 * tracepoint.c (run_inferior_command_1):
11013 (run_inferior_command): Call agent_run_command.
11014 (gdb_ust_connect_sync_socket): Deleted. Move it to
11016 (resume_thread, stop_thread): Likewise.
11017 (gdb_ust_socket_init): Renamed to ...
11018 (gdb_agent_socket_init): ... New.
11019 (gdb_ust_thread): Renamed to ...
11020 (gdb_agent_helper_thread): ... New.
11021 (gdb_ust_init): Move some code to ...
11022 (gdb_agent_init): ... here. New.
11023 [HAVE_UST]: Call gdb_ust_init.
11024 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11025 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11026 * config.in, configure: Regenerated.
11028 2012-03-02 Pedro Alves <palves@redhat.com>
11030 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11031 * linux-low.c (struct simple_pid_list): New.
11032 (stopped_pids): New a struct simple_pid_list pointer.
11033 (add_to_pid_list, pull_pid_from_list): New.
11034 (handle_extended_wait): Don't assume the first signal new children
11035 report is SIGSTOP. Adjust call to pull_pid_from_list.
11036 (linux_wait_for_lwp): Adjust.
11038 2012-03-02 Yao Qi <yao@codesourcery.com>
11040 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11043 2012-03-02 Yao Qi <yao@codesourcery.com>
11045 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11046 `stop_pc' and `tpoint'. Update caller.
11048 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11050 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11051 * linux-low.c (use_linux_regsets): New macro.
11052 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11053 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11054 (linux_register_in_regsets): New function.
11055 (usr_fetch_inferior_registers): Skip registers covered by
11057 (usr_store_inferior_registers): Likewise.
11058 (usr_fetch_inferior_registers): New macro.
11059 (usr_store_inferior_registers): Likewise.
11060 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11061 (linux_store_registers): Likewise.
11062 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11064 (init_registers_mips64_dsp_linux): Likewise.
11065 (init_registers_mips_linux): New macro.
11066 (init_registers_mips_dsp_linux): Likewise.
11067 (mips_dsp_num_regs): Likewise.
11068 (DSP_BASE, DSP_CONTROL): New fallback macros.
11069 (mips_base_regs): New macro.
11070 (mips_regmap): Use it. Fix the size.
11071 (mips_dsp_regmap): New variable.
11072 (mips_dsp_regset_bitmap): Likewise.
11073 (mips_arch_setup): New function.
11074 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11076 (mips_cannot_store_register): Likewise.
11077 (the_low_target): Update .arch_setup, .num_regs and .regmap
11078 initializers. Add .regset_bitmap initializer.
11079 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11081 * linux-bfin-low.c (the_low_target): Likewise.
11082 * linux-cris-low.c (the_low_target): Likewise.
11083 * linux-crisv32-low.c (the_low_target): Likewise.
11084 * linux-ia64-low.c (the_low_target): Likewise.
11085 * linux-m32r-low.c (the_low_target): Likewise.
11086 * linux-m68k-low.c (the_low_target): Likewise.
11087 * linux-ppc-low.c (the_low_target): Likewise.
11088 * linux-s390-low.c (the_low_target): Likewise.
11089 * linux-sh-low.c (the_low_target): Likewise.
11090 * linux-sparc-low.c (the_low_target): Likewise.
11091 * linux-tic6x-low.c (the_low_target): Likewise.
11092 * linux-x86-low.c (the_low_target): Likewise.
11093 * linux-xtensa-low.c (the_low_target): Likewise.
11094 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11095 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11096 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11098 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11099 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11101 2012-02-29 Yao Qi <yao@codesourcery.com>
11102 Pedro Alves <palves@redhat.com>
11104 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11105 `step_over_finished' is true.
11107 2012-02-27 Pedro Alves <palves@redhat.com>
11109 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11110 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11112 2012-02-27 Pedro Alves <palves@redhat.com>
11115 * linux-low.c (pid_is_stopped): New.
11116 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11118 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11120 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11123 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11125 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11127 2012-02-24 Luis Machado <lgustavo@codesourcery>
11129 * server.c (handle_query): Advertise support for target-side
11130 breakpoint condition evaluation.
11131 (process_point_options): New function.
11132 (process_serial_event): When inserting a breakpoint, check for
11133 a target-side condition that should be evaluated.
11135 * mem-break.c: Include regcache.h and ax.h.
11136 (point_cond_list_t): New data structure.
11137 (breakpoint) <cond_list>: New field.
11138 (find_gdb_breakpoint_at): Make non-static.
11139 (delete_gdb_breakpoint_at): Clear any target-side
11141 (clear_gdb_breakpoint_conditions): New function.
11142 (add_condition_to_breakpoint): Likewise.
11143 (add_breakpoint_condition): Likewise.
11144 (gdb_condition_true_at_breakpoint): Likewise.
11145 (gdb_breakpoint_here): Return result directly instead
11146 of going through a local variable.
11148 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11149 (clear_gdb_breakpoint_conditions): Likewise.
11150 (add_breakpoint_condition): Likewise.
11151 (gdb_condition_true_at_breakpoint): Likewise.
11153 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11154 (need_step_over_p): Take target-side breakpoint condition into
11157 2012-02-24 Luis Machado <lgustavo@codesourcery>
11159 * server.h: Include tracepoint.h.
11160 (agent_mem_read, agent_get_trace_state_variable_value,
11161 agent_set_trace_state_variable_value,
11162 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11163 get_set_tsv_func_addr): New prototypes.
11165 * ax.h: New include file.
11166 * ax.c: New source file.
11168 * tracepoint.c: Include ax.h.
11169 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11170 agent_expr, eval_result_type): Move to ax.h.
11171 (parse_agent_expr): Rename to ...
11172 (gdb_parse_agent_expr): ... this, make it non-static and move
11174 (unparse_agent_expr) Rename to ...
11175 (gdb_unparse_agent_expr): ... this, make it non-static and move
11177 (eval_agent_expr): Rename to ...
11178 (eval_tracepoint_agent_expr): ... this.
11179 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11180 forward declarations.
11181 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11182 (agent_get_trace_state_variable_value): New function.
11183 (agent_set_trace_state_variable_value): New function.
11184 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11185 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11186 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11187 (condition_true_at_tracepoint): Likewise.
11188 (parse_agent_expr): Rename to ...
11189 (gdb_parse_agent_expr): ... this and move to ax.c.
11190 (unparse_agent_expr): Rename to ...
11191 (gdb_unparse_agent_expr): ... this and move to ax.c.
11192 (gdb_agent_op_name): Move to ax.c.
11193 (eval_agent_expr): Rename to ...
11194 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11196 (eval_tracepoint_agent_expr): New function.
11197 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11199 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11201 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11202 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11203 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11204 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11205 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11206 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11207 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11208 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11209 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11210 (compile_bytecodes): Remove forward declaration.
11211 (is_goto_target): Move to ax.c.
11212 (compile_bytecodes): Move to ax.c and call
11213 agent_get_trace_state_variable_value (...) and
11214 agent_set_trace_state_variable_value (...).
11216 * Makefile.in: Update ax.c and IPA dependencies.
11218 2012-02-24 Pedro Alves <palves@redhat.com>
11220 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11221 (cmd_bigqtbuffer_circular): ... this. Only handle
11222 'QTBuffer:circular:'.
11223 (handle_tracepoint_general_set): Adjust.
11225 2012-02-16 Yao Qi <yao@codesourcery.com>
11227 * inferiors.c: Move code to ...
11228 * dll.c: .... here. New.
11229 * server.h: Declare clear_dlls.
11230 * Makefile.in (SFILES): Add dll.c.
11234 2012-02-11 Yao Qi <yao@codesourcery.com>
11236 * server.c: (handle_monitor_command): Add a new parameter
11238 (handle_query): Update caller.
11240 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11242 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11243 * configure, config.in: Regenerate.
11244 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11247 2012-02-02 Pedro Alves <palves@redhat.com>
11249 Try SIGKILL first, then PTRACE_KILL.
11250 * linux-low.c (linux_kill_one_lwp): New.
11251 (linux_kill_one_lwp): Rename to ...
11252 (kill_one_lwp_callback): ... this. Use the new
11253 linux_kill_one_lwp.
11255 2012-02-02 Pedro Alves <palves@redhat.com>
11257 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11260 2012-01-27 Pedro Alves <palves@redhat.com>
11262 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11263 (elf_64_file_p): Make static.
11264 (linux_pid_exe_is_elf_64_file): New.
11265 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11266 Delete declarations.
11267 (linux_pid_exe_is_elf_64_file): Declare.
11268 * linux-x86-low.c (x86_arch_setup): Use
11269 linux_pid_exe_is_elf_64_file.
11271 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11273 * linux-low.c (linux_wait_for_event_1): Rename to ...
11274 (linux_wait_for_event): ... here and merge it with former
11275 linux_wait_for_event - new variable wait_ptid, use it.
11276 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11278 2012-01-23 Pedro Alves <palves@redhat.com>
11280 * server.c (main): Avoid yet another case of infinite loop while
11281 detaching/killing after a longjmp.
11283 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11286 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11288 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11290 * hostio.c (handle_readlink): New function.
11291 (handle_vFile): Call it to handle "vFile:readlink" packets.
11293 2012-01-20 Pedro Alves <palves@redhat.com>
11294 Ulrich Weigand <ulrich.weigand@linaro.org>
11296 * server.c (handle_v_requests): Only support vAttach and vRun to
11297 start multiple processes when in extended protocol mode.
11299 2012-01-17 Pedro Alves <palves@redhat.com>
11301 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11302 memalign plus mprotect to allocate the scratch buffer.
11304 2012-01-13 Pedro Alves <palves@redhat.com>
11306 * server.c (attach_inferior): Clear `cont_thread'.
11308 2012-01-13 Pedro Alves <palves@redhat.com>
11310 * server.c (main): Avoid infinite loop while detaching/killing
11313 2012-01-09 Doug Evans <dje@google.com>
11315 * server.c (start_inferior): Set last_ptid in --wrapper case.
11317 2012-01-06 Yao Qi <yao@codesourcery.com>
11319 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11321 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11323 2012-01-04 Yao Qi <yao@codesourcery.com>
11325 * tracepoint.c (cmd_qtdp): Print debug message
11326 for static tracepoint.
11328 2012-01-04 Yao Qi <yao@codesourcery.com>
11330 * tracepoint.c (trace_vdebug): Differentiate debug message
11331 between gdbserver and IPA.
11333 2012-01-03 Yao Qi <yao@codesourcery.com>
11335 * tracepoint.c (tracepoint_was_hit): Don't collect for
11338 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11340 * terminal.h: Reformat copyright header.
11342 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11344 * server.c (gdbserver_version): Update copyright year.
11345 * gdbreplay.c (gdbreplay_version): Likewise.
11347 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11349 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11352 2011-12-18 Hui Zhu <teawater@gmail.com>
11353 * linux-low.c (linux_create_inferior): Save return value to ret.
11355 2011-12-18 Hui Zhu <teawater@gmail.com>
11357 * linux-low.c (linux_create_inferior): Save return value to ret.
11359 2011-12-16 Doug Evans <dje@google.com>
11361 * linux-low.c (linux_create_inferior): If stdio connection,
11362 redirect stdin from /dev/null, stdout to stderr.
11363 * remote-utils.c (remote_is_stdio): New static global.
11364 (remote_connection_is_stdio): New function.
11365 (remote_prepare): Handle stdio connection.
11366 (remote_open): Ditto.
11367 (remote_close): Don't close stdin for stdio connections.
11368 (read_prim,write_prim): New functions. Replace all calls to
11369 read/write to these.
11370 * server.c (main): Watch for "-" argument. Move call to
11371 remote_prepare before start_inferior.
11372 * server.h (STDIO_CONNECTION_NAME): New macro.
11373 (remote_connection_is_stdio): Declare.
11375 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11376 in debugging output.
11378 2011-12-15 Yao Qi <yao@codesourcery.com>
11380 * tracepoint.c: Include sys/syscall.h.
11381 (gdb_ust_thread): Remove preprocessor conditional.
11383 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11385 * linux-low.c (linux_detach_one_lwp): Call
11386 the_low_target.prepare_to_resume before detaching.
11388 2011-12-14 Yao Qi <yao@codesourcery.com>
11390 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11393 2011-12-14 Yao Qi <yao@codesourcery.com>
11395 * i386-low.c (i386_low_stopped_data_address): Initialize local
11396 variable `control'.
11398 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11402 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11403 DR_CONTROL unless necessary. Extend comments.
11404 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11405 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11407 2011-12-13 Yao Qi <yao@codesourcery.com>
11409 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11411 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11413 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11415 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11416 Print new debug message for such case.
11418 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11420 Fix overlapping memcpy.
11421 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11422 the read_inferior_memory transfer.
11423 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11424 write_inferior_memory transfer.
11425 (set_fast_tracepoint_jump): New variable buf. Use it for the
11426 read_inferior_memory and write_inferior_memory transfers.
11427 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11428 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11429 Use it for the write_inferior_memory transfer.
11430 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11433 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11435 * linux-low.c (fetch_register, store_register): Make code
11436 consistent, fix formatting.
11438 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11440 * linux-low.c (usr_store_inferior_registers): Factor out code
11441 to handle individual registers into...
11442 (store_register): ... this new function.
11444 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11446 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11447 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11448 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11449 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11450 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11451 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11452 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11453 (srv_xmlfiles): Add new XML files.
11455 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11457 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11458 (init_registers_s390_linux32v1): Add prototype.
11459 (init_registers_s390_linux32v2): Likewise.
11460 (init_registers_s390_linux64v1): Likewise.
11461 (init_registers_s390_linux64v2): Likewise.
11462 (init_registers_s390x_linux64v1): Likewise.
11463 (init_registers_s390x_linux64v2): Likewise.
11464 (s390_num_regs): Increment to 52.
11465 (s390_regmap): Add orig_r2 register.
11466 (s390_num_regs_3264): Increment to 68.
11467 (s390_regmap_3264): Add orig_r2 register.
11468 (s390_collect_ptrace_register): Handle orig_r2 register.
11469 (s390_supply_ptrace_register): Likewise.
11470 (s390_fill_last_break): New function.
11471 (s390_store_last_break): Likewise.
11472 (s390_fill_system_call): New function.
11473 (s390_store_system_call): Likewise.
11474 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11476 (s390_check_regset): New function.
11477 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11478 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11479 Update target_regsets for available register sets.
11481 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11482 Jan Kratochvil <jan.kratochvil@redhat.com>
11484 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11485 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11487 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11488 * linux-low.h (struct process_info_private): New member r_debug.
11489 * server.c (handle_qxfer_libraries): Call
11490 the_target->qxfer_libraries_svr4.
11491 (handle_qxfer_libraries_svr4): New function.
11492 (qxfer_packets): New entry "libraries-svr4".
11493 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11494 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11495 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11496 PACKET_qXfer_libraries_svr4.
11498 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11500 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11501 PSW address/mask between 8-byte and 16-byte formats.
11502 (s390_supply_ptrace_register): Likewise.
11503 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11504 basic addressing mode bit.
11506 2011-11-24 Stan Shebs <stan@codesourcery.com>
11508 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11510 2011-11-17 Stan Shebs <stan@codesourcery.com>
11512 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11513 (tracing_start_time): New global.
11514 (tracing_stop_time): New global.
11515 (tracing_user_name): New global.
11516 (tracing_notes): New global.
11517 (tracing_stop_note): New global.
11518 (cmd_qtstart): Set traceframe_usage, start_time.
11519 (stop_tracing): Set stop_time.
11520 (cmd_qtstatus): Report additional status.
11521 (cmd_qtp): New function.
11522 (handle_tracepoint_query): Call it.
11523 (cmd_qtnotes): New function.
11524 (handle_tracepoint_general_set): Call it.
11525 (get_timestamp): Rename from tsv_get_timestamp.
11527 2011-11-14 Stan Shebs <stan@codesourcery.com>
11528 Kwok Cheung Yeung <kcy@codesourcery.com>
11530 * linux-x86-low.c (small_jump_insn): New.
11531 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11532 trampoline and error message, build a trampoline and issue a small
11533 jump instruction to it.
11534 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11535 trampoline and error message.
11536 (x86_get_min_fast_tracepoint_insn_len): New.
11537 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11538 * linux-low.h (struct linux_target_ops): Add arguments to
11539 install_fast_tracepoint_jump_pad operation, add new operation.
11540 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11542 (linux_get_min_fast_tracepoint_insn_len): New function.
11543 (linux_target_op): Add new operation.
11544 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11545 (gdb_trampoline_buffer_end): Ditto.
11546 (gdb_trampoline_buffer_error): Ditto.
11547 (struct ipa_sym_addresses): Add fields for new IPA variables.
11548 (symbol_list): Add entries for new IPA variables.
11549 (struct tracepoint): Add fields to hold the address range of the
11550 trampoline used by the tracepoint.
11551 (trampoline_buffer_head): New static variable.
11552 (trampoline_buffer_tail): Ditto.
11553 (claim_trampoline_space): New function.
11554 (have_fast_tracepoint_trampoline_buffer): New function.
11555 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11557 (install_fast_tracepoint): Ditto, also add error buffer argument.
11558 (cmd_qtminftpilen): New function.
11559 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11560 (fast_tracepoint_from_trampoline_address): New function.
11561 (fast_tracepoint_collecting): Handle trampoline as part of jump
11563 (set_trampoline_buffer_space): New function.
11564 (initialize_tracepoint): Initialize new IPA variables.
11565 * target.h (struct target_ops): Add arguments to
11566 install_fast_tracepoint_jump_pad operation, add new
11567 get_min_fast_tracepoint_insn_len operation.
11568 (target_get_min_fast_tracepoint_insn_len): New.
11569 (install_fast_tracepoint_jump_pad): Add arguments.
11570 * server.h (IPA_BUFSIZ): Define.
11571 * linux-i386-ipa.c: Include extra header files.
11572 (initialize_fast_tracepoint_trampoline_buffer): New function.
11573 (initialize_low_tracepoint): Call it.
11574 * server.h (set_trampoline_buffer_space): Declare.
11575 (claim_trampoline_space): Ditto.
11576 (have_fast_tracepoint_trampoline_buffer): Ditto.
11578 2011-11-14 Yao Qi <yao@codesourcery.com>
11580 * server.c (handle_query): Handle InstallInTrace for qSupported.
11581 * tracepoint.c (add_tracepoint): Sort list.
11582 (install_tracepoint, download_tracepoint): New.
11583 (cmd_qtdp): Call them to install and download tracepoints.
11584 (sort_tracepoints): Removed.
11585 (cmd_qtstart): Update.
11587 2011-11-14 Yao Qi <yao@codesourcery.com>
11589 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11590 * mem-break.h: Declare.
11591 * tracepoint.c (cmd_qtstart): Move some code to ...
11592 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11594 (download_tracepoints): Move some code to ...
11595 (download_tracepoint_1): ... here. New.
11597 2011-11-08 Yao Qi <yao@codesourcery.com>
11599 * remote-utils.c (relocate_instruction): A comment fix.
11601 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11603 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11604 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11605 dr_status_mirror and dr_control_mirror from debug_reg_state.
11606 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11607 (i386_initial_stuff): Remove use of deleted globals.
11608 (i386_get_thread_context, i386_set_thread_context,
11609 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11610 from debug_reg_state.
11612 2011-11-05 Yao Qi <yao@codesourcery.com>
11614 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11615 address as TPOINT's.
11617 2011-11-02 Stan Shebs <stan@codesourcery.com>
11619 * tracepoint.c (agent_mem_read_string): New function.
11620 (eval_agent_expr): Call it for tracenz.
11621 * server.c (handle_query): Report support for tracenz.
11623 2011-11-02 Yao Qi <yao@codesourcery.com>
11625 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11627 2011-11-02 Yao Qi <yao@codesourcery.com>
11629 * target.h: Fix a typo in comment.
11631 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11633 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11634 clobber the breakpoints' shadows with fast tracepoint jumps.
11635 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11636 * target.c (write_inferior_memory): Also pass MYADDR down to
11639 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11641 * configure.ac: Check support for personality routine.
11642 * configure: Regenerate.
11643 * config.in: Likewise.
11644 * linux-low.c: Include <sys/personality.h>.
11645 Define ADDR_NO_RANDOMIZE if necessary.
11646 (linux_create_inferior): Disable address space randomization when
11647 forking inferior, if requested.
11648 (linux_supports_disable_randomization): New function.
11649 (linux_target_ops): Install it.
11650 * server.h (disable_randomization): Declare.
11651 * server.c (disable_randomization): New global variable.
11652 (handle_general_set): Handle QDisableRandomization.
11653 (handle_query): Likewise for qSupported.
11654 (main): Support --disable-randomization and --no-disable-randomization
11655 command line arguments.
11656 * target.h (struct target_ops): Add supports_disable_randomization.
11657 (target_supports_disable_randomization): New macro.
11659 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11661 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11663 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11664 [!PT_GETDSBT] (target_loadmap): New definition.
11665 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11666 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11667 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11668 and PT_GETDSBT to LINUX_LOADMAP.
11669 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11670 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11672 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11674 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11675 (arm_linux_hwbp_cap): New static variable.
11676 (arm_linux_get_hwbp_cap): Replace by ...
11677 (arm_linux_init_hwbp_cap): ... this new function.
11678 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11679 (arm_linux_get_hw_watchpoint_count): Likewise.
11680 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11681 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11682 (arm_prepare_to_resume): Use perror_with_name instead of error.
11684 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11686 * linux-arm-low.c: Include <signal.h>.
11687 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11688 (struct arm_linux_hwbp_cap): New data type.
11689 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11690 (struct arm_linux_hw_breakpoint): New data type.
11691 (MAX_BPTS, MAX_WPTS): Define.
11692 (struct arch_process_info, struct arch_lwp_info): New data types.
11693 (arm_linux_get_hwbp_cap): New function.
11694 (arm_linux_get_hw_breakpoint_count): Likewise.
11695 (arm_linux_get_hw_watchpoint_count): Likewise.
11696 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11697 (arm_hwbp_control_initialize): Likewise.
11698 (arm_hwbp_control_is_enabled): Likewise.
11699 (arm_hwbp_control_is_initialized): Likewise.
11700 (arm_hwbp_control_disable): Likewise.
11701 (arm_linux_hw_breakpoint_equal): Likewise.
11702 (arm_linux_hw_point_initialize): Likewise.
11703 (struct update_registers_data): New data structure.
11704 (update_registers_callback: New function.
11705 (arm_insert_point): Likewise.
11706 (arm_remove_point): Likewise.
11707 (arm_stopped_by_watchpoint): Likewise.
11708 (arm_stopped_data_address): Likewise.
11709 (arm_new_process): Likewise.
11710 (arm_new_thread): Likewise.
11711 (arm_prepare_to_resume): Likewise.
11712 (the_low_target): Register arm_insert_point, arm_remove_point,
11713 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11714 arm_new_thread, and arm_prepare_to_resume.
11716 2011-09-15 Stan Shebs <stan@codesourcery.com>
11718 * server.h (struct emit_ops): Add compare-goto fields.
11719 * tracepoint.c (gdb_agent_op_sizes): New table.
11720 (emit_eq_goto): New function.
11721 (emit_ne_goto): New function.
11722 (emit_lt_goto): New function.
11723 (emit_le_goto): New function.
11724 (emit_gt_goto): New function.
11725 (emit_ge_goto): New function.
11726 (is_goto_target): New function.
11727 (compile_bytecodes): Recognize special cases of compare-goto
11728 combinations and call specialized emitters for them.
11729 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11730 (amd64_emit_ne_goto): New function.
11731 (amd64_emit_lt_goto): New function.
11732 (amd64_emit_le_goto): New function.
11733 (amd64_emit_gt_goto): New function.
11734 (amd64_emit_ge_goto): New function.
11735 (amd64_emit_ops): Add the new functions.
11736 (i386_emit_eq_goto): New function.
11737 (i386_emit_ne_goto): New function.
11738 (i386_emit_lt_goto): New function.
11739 (i386_emit_le_goto): New function.
11740 (i386_emit_gt_goto): New function.
11741 (i386_emit_ge_goto): New function.
11742 (i386_emit_ops): Add the new functions.
11744 2011-09-08 Stan Shebs <stan@codesourcery.com>
11746 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11747 (i386_emit_epilogue): Restore %ebx.
11749 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11751 * server.c (step_thread): Remove definition.
11752 (process_serial_event): Don't handle Hs.
11753 * server.h (step_thread): Remove declaration.
11754 * target.c (set_desired_inferior): Remove use of step_thread.
11756 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11758 * linux-low.c: Include linux-procfs.h.
11759 (linux_attach_lwp_1): Update comments.
11760 (linux_attach): Scan for existing threads when attaching to a
11761 process that is the tgid.
11762 * Makefile.in: Update dependencies.
11764 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11766 * configure.srv: Add linux-procfs.o dependencies.
11768 2011-08-14 Yao Qi <yao@codesourcery.com>
11770 * target.h (struct target_ops): Fix indent.
11771 * win32-low.c (win32_target_ops): Fix comment.
11773 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11774 Yao Qi <yao@codesourcery.com>
11776 * Makefile.in (clean): Remove tic6x-*.c files.
11777 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11778 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11779 (tic6x-c64xp-linux.c): Likewise.
11780 * configure.srv: Add support for tic6x-*-uclinux.
11781 * linux-tic6x-low.c: New.
11782 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11784 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11785 Yao Qi <yao@codesourcery.com>
11787 * target.h (struct target_ops): Add read_loadmap.
11788 * linux-low.c (struct target_loadseg): New type.
11789 (struct target_loadmap): New type.
11790 (linux_read_loadmap): New function.
11791 (linux_target_ops): Add linux_read_loadmap.
11792 * server.c (handle_query): Support qXfer:fdpic:read packet.
11793 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11796 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11798 * win32-low.c: Include <stdint.h>.
11800 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11802 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11803 to the inferior here.
11804 (i386_remove_aligned_watchpoint): Ditto.
11805 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11806 fit part of the watchpoint in the debug registers.
11807 (i386_update_inferior_debug_regs): New.
11808 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11809 registers, and only update the inferior on success.
11810 (i386_low_remove_watchpoint): Ditto.
11812 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11814 * linux-low.c (compare_ints, unique, list_threads, show_process,
11815 linux_core_of_thread): Delete.
11816 (linux_target_ops): Change linux_core_of_thread to
11817 linux_common_core_of_thread.
11818 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11819 * utils.c (malloc_failure): Change type of argument.
11820 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11821 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11822 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11823 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11824 (IPA_OBJS): Add common-utils-ipa.o.
11825 (ptid_h, linux_osdata_h): New macros.
11826 (server_h): Add common/common-utils.h, common/xml-utils.h,
11827 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11829 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11830 ptid.o, buffer.o): New rules.
11831 (linux-low.o): Add common/linux-osdata.h as a dependency.
11832 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11833 * configure.ac: Add AC_HEADER_DIRENT check.
11834 * config.in: Regenerate.
11835 * configure: Regenerate.
11836 * remote-utils.c (xml_escape_text): Delete.
11837 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11838 buffer_xml_printf): Move to common/buffer.c.
11839 * server.c (main): Remove call to initialize_inferiors.
11840 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11841 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11842 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11843 internal_error, gdb_assert, gdb_assert_fail): Delete.
11844 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11845 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11847 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11848 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11849 initialize_inferiors): Delete.
11851 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11853 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11856 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11858 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11860 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11862 2011-05-26 Yao Qi <yao@codesourcery.com>
11864 * Makefile.in (thread-db.o): Track dependence to
11865 common/gdb_thread_db.h.
11866 * thread-db.c: include gdb_thread_db.h from right place.
11868 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11870 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11871 __FILE__ and __LINE__ to internal_error.
11873 2011-05-13 Doug Evans <dje@google.com>
11875 * thread-db.c (try_thread_db_load_from_sdir): New function.
11876 (try_thread_db_load_from_dir): New function.
11877 (thread_db_load_search): Handle $sdir, ignore $pdir.
11878 Remove trying of system directories if search of
11879 libthread-db-search-path fails, that is now done via $sdir.
11881 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11883 * server.c (handle_query): Add EnableDisableTracepoints to the list
11884 of supported features.
11885 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11887 (cmd_qtenable_disable): New.
11888 (cmd_qtstart): Install tracepoints even if disabled.
11889 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11890 receiving a QTEnable or QTDisable packet.
11891 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11892 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11894 (gdb_probe): Skip data collection if static tracepoint is disabled.
11896 2011-05-10 Doug Evans <dje@google.com>
11898 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11900 2011-05-04 Doug Evans <dje@google.com>
11902 * linux-low.c (linux_join): Skip process lookup.
11903 * spu-low.c (spu_join): Ditto.
11904 * server.c (join_inferiors_callback): Delete.
11905 (process_serial_event): For 'D' packet (detach) call join_inferior
11908 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11910 * README: Don't mention xscale*-*-linux*.
11911 * configure.srv (xscale*-*-linux*): Don't handle target.
11913 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11915 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11917 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11918 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11919 (i386_emit_void_call_2): Likewise.
11921 2011-04-26 Yao Qi <yao@codesourcery.com>
11923 * linux-low.c: Move common macros to linux-ptrace.h.
11924 Include linux-ptrace.h.
11925 * Makefile.in (linux_ptrace_h): New.
11926 (linux-low.o): Depends on linux-ptrace.h.
11928 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11930 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11931 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11932 (remote_prepare): New function with most of the TCP code from ...
11933 (remote_open): ... here. Detect PORT here unconditionally. Move also
11934 setting transport_is_reliable.
11935 * server.c (run_once): New variable.
11936 (gdbserver_usage): Document it.
11937 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11938 the first run if RUN_ONCE.
11939 * server.h (run_once, remote_prepare): New declarations.
11941 2011-04-19 Tom Tromey <tromey@redhat.com>
11943 * win32-low.c (handle_load_dll): Remove duplicate "the".
11945 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11947 Remove support for old Cygwin 1.5 versions.
11948 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11949 function to avoid warning.
11950 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11953 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11955 * gdbserver/server.h (Macro _): Define it if not available.
11957 2011-03-14 Michael Snyder <msnyder@vmware.com>
11959 * hostio.c (handle_close): Remove unnecessary null test.
11961 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11963 * Makefile.in (maintainer-clean realclean distclean): Remove
11964 "make ... subdir_do" command.
11966 2011-03-10 Michael Snyder <msnyder@vmware.com>
11968 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11970 * server.c (handle_v_run): Free alloced buffer on early return.
11972 2011-03-09 Yao Qi <yao@codesourcery.com>
11975 2011-03-04 Yao Qi <yao@codesourcery.com>
11977 * Makefile.in: Remove GNU make feature --directory.
11979 2011-03-05 Yao Qi <yao@codesourcery.com>
11981 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11982 (subdir_do): New make target. Copied from gdb/Makefile.
11983 (maintainer-clean, realclean, distclean, clean): Call corresponding
11984 make targets in common/Makefile.
11986 2011-02-11 Yao Qi <yao@codesourcery.com>
11988 * configure.ac: Call AC_PROG_RANLIB.
11989 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11990 * configure: Regenerate.
11992 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11994 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11996 2011-03-06 Yao Qi <yao@codesourcery.com>
11998 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12000 2011-03-05 Yao Qi <yao@codesourcery.com>
12002 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12003 (subdir_do): New make target. Copied from gdb/Makefile.
12004 (maintainer-clean, realclean, distclean, clean): Call corresponding
12005 make targets in common/Makefile.
12007 2011-03-04 Yao Qi <yao@codesourcery.com>
12009 * Makefile.in: Remove GNU make feature --directory.
12011 2011-03-04 Michael Snyder <msnyder@vmware.com>
12013 * server.c (queue_stop_reply): Call xmalloc not malloc.
12015 2011-03-02 Michael Snyder <msnyder@vmware.com>
12017 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12019 2011-02-28 Michael Snyder <msnyder@vmware.com>
12021 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12022 (cmd_qtframe): Ditto.
12023 (cmd_qtbuffer): Ditto.
12024 (cmd_bigqtbuffer): Ditto.
12026 * utils.c (decimal2str): Initialize 'width' to nine, then
12027 don't mess with it.
12029 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12031 * hostio.c (require_data): Free *data, not data.
12033 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12035 * hostio.c (require_data): Use free, not xfree.
12037 2011-02-27 Michael Snyder <msnyder@vmware.com>
12039 * server.c (handle_query): Discard unused value.
12041 * hostio.c (require_data): Free malloc memory before returning
12044 2011-02-26 Michael Snyder <msnyder@vmware.com>
12046 * linux-low.c (list_threads): Call closedir for dirent.
12048 2011-02-27 Michael Snyder <msnyder@vmware.com>
12050 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12051 a case statement falls through.
12053 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12055 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12058 2011-02-26 Michael Snyder <msnyder@vmware.com>
12060 * utils.c (decimal2str): Eliminate dead code and dead param.
12061 (pulongest): Drop dead param from call to decimal2str.
12064 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12066 Revert the following patch (not approved yet):
12067 2011-02-21 Hui Zhu <teawater@gmail.com>
12068 * tracepoint.c (tp_printf): New function.
12069 (eval_agent_expr): Handle gdb_agent_op_printf.
12071 2011-02-21 Hui Zhu <teawater@gmail.com>
12073 * tracepoint.c (tp_printf): New function.
12074 (eval_agent_expr): Handle gdb_agent_op_printf.
12076 2011-02-18 Tom Tromey <tromey@redhat.com>
12078 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12079 (tracepoint.o): Likewise.
12080 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12081 (gdb_agent_op_names): Likewise.
12083 2011-02-18 Tom Tromey <tromey@redhat.com>
12085 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12086 gdb_agent_op_rot>: New constants.
12087 (gdb_agent_op_names): Add pick and roll.
12088 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12091 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12093 * aclocal.m4: Regenerated with aclocal-1.11.1.
12095 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12097 * server.c (handle_qxfer_traceframe_info): New.
12098 (qxfer_packets): Register "traceframe-info".
12099 (handle_query): Report support for qXfer:traceframe-info:read+.
12100 * tracepoint.c (match_blocktype): New.
12101 (traceframe_find_block_type): Rename to ...
12102 (traceframe_walk_blocks): ... this. Add callback filter argument,
12104 (traceframe_find_block_type): New, reimplemented on top of
12105 traceframe_walk_blocks.
12106 (build_traceframe_info_xml): New.
12107 (traceframe_read_info): New.
12108 * server.h (traceframe_read_info): Declare.
12110 2011-02-11 Yao Qi <yao@codesourcery.com>
12112 * configure.ac: Call AC_PROG_RANLIB.
12113 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12114 * configure: Regenerate.
12116 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12118 * server.c (gdb_read_memory): Change return semantics to allow
12120 (handle_search_memory_1): Adjust.
12121 (process_serial_event) <'m' packet>: Handle partial transfers.
12122 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12124 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12126 * regcache.c (init_register_cache): Initialize
12127 regcache->register_status.
12128 (free_register_cache): Release regcache->register_status.
12129 (regcache_cpy): Copy register_status.
12130 (registers_to_string): Print 'x's for unavailable registers.
12131 (supply_register): Mark the register's status valid or
12132 unavailable, depending on whether a buffer was passed in or not.
12133 (supply_register_zeroed): New.
12134 (supply_regblock): Mark the registers' status valid or
12135 unavailable, depending on whether a buffer was passed in or not.
12136 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12137 (struct regcache): New `register_status' field.
12138 (supply_register_zeroed): Declare.
12139 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12140 supply_register_zeroed, rather than passing a NULL buffer to
12142 * tracepoint.c (fetch_traceframe_registers): Update comment.
12144 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12146 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12149 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12151 * server.h (decode_xfer_write): Change prototype.
12152 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12153 and don't extract the annex here.
12154 * server.c (decode_xfer_read): Remove `annex' parameter,
12155 and don't extract the annex here.
12156 (decode_xfer): New.
12157 (struct qxfer): New.
12158 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12159 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12160 (handle_qxfer_statictrace): New functions, abstracted out from
12161 handle_query, and made to use the struct qxfer interface.
12162 (handle_threads_qxfer_proper): Rename to ...
12163 (handle_qxfer_threads_proper): ... this.
12164 (handle_threads_qxfer): Rename to ...
12165 (handle_qxfer_threads): ... this. Adjust.
12166 (qxfer_packets): New array.
12167 (handle_qxfer): New function.
12168 (handle_query): Use handle_qxfer.
12170 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12172 * gdbreplay.c: Shorten lines of >= 80 columns.
12173 * linux-low.c: Ditto.
12174 * linux-ppc-low.c: Ditto.
12175 * linux-s390-low.c: Ditto.
12176 * linux-sparc-low.c: Ditto.
12177 * linux-x86-low.c: Ditto.
12178 * linux-xtensa-low.c: Ditto.
12179 * mem-break.c: Ditto.
12180 * nto-low.c: Ditto.
12181 * regcache.h: Ditto.
12182 * remote-utils.c: Ditto.
12185 * thread-db.c: Ditto.
12186 * tracepoint.c: Ditto.
12188 * win32-low.h: Ditto.
12190 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12192 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12195 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12197 * server.c (gdbserver_version): Update copyright year in version
12199 * gdbreplay.c (gdbreplay_version): Ditto.
12201 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12203 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12204 * linux-bfin-low.c: New file.
12205 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12206 PT_DATA_ADDR for BFIN targets.
12207 * Makefile.in (SFILES): Add linux-bfin-low.c.
12208 (clean): Remove reg-bfin.c.
12209 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12210 * README: Mention supported Blackfin targets.
12212 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12214 * .gitignore: New file.
12216 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12218 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12220 2010-10-22 Jie Zhang <jie@codesourcery.com>
12222 * Makefile.in: Add FLAGS_TO_PASS variable.
12223 (install): Remove dependency of install-only and recursively
12224 invoke make for install-only.
12226 2010-10-04 Doug Evans <dje@google.com>
12228 * Makefile.in (uninstall): Use $(DESTDIR).
12230 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12234 * linux-x86-low.c (compat_siginfo_from_siginfo)
12235 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12236 si_code is < 0. Check for si_code == SI_TIMER before checking for
12239 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12241 * lynx-i386-low.c: New file.
12242 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12244 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12246 * lynx-low.c (ptrace_request_to_str): Remove handling for
12247 request values that have been removed in LynxOS 5.x.
12249 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12251 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12254 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12256 * configure.ac: Add --enable-inprocess-agent option.
12257 * configure: Rebuilt.
12259 2010-09-06 Yao Qi <yao@codesourcery.com>
12261 * linux-low.c (linux_kill): Remove unused variable.
12262 (linux_stabilize_threads): Likewise.
12263 * server.c (start_inferior): Likewise.
12264 (queue_stop_reply_callback): Likewise.
12265 * tracepoint.c (do_action_at_tracepoint): Likewise.
12267 2010-09-06 Yao Qi <yao@codesourcery.com>
12269 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12272 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12274 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12276 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12278 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12281 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12283 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12284 gdbserver/lynx-ppc-low.c: New files.
12285 * Makefile.in (lynx_low_h): New variable.
12286 (lynx-low.o, lynx-ppc-low.o): New rules.
12287 * configure.ac: On LynxOS, link with -lnetinet.
12288 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12289 * configure: regenerate.
12291 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12293 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12294 * configure.ac: Add check for vasprintf and vsnprintf.
12295 * configure, config.in: Regenerate.
12296 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12298 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12300 * gdbreplay.c: Move include of alloca.h up, next to include of
12302 * server.h: Add include of malloc.h.
12303 * mem-break.c: Remove include of malloc.h.
12304 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12306 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12308 * Makefile.in (memmem.o): Build with -Wno-error.
12310 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12312 * utils.c (xsnprintf): Make non-static.
12313 * server.h: Add xsnprintf declaration.
12314 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12315 replace calls to snprintf by calls to xsnprintf throughout.
12317 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12319 * configure.ac: Add configure check for alloca.
12320 * configure, config.in: Regenerate.
12321 * server.h: Include alloca.h if it exists.
12322 * gdbreplay.c: Include alloca.h if it exists.
12324 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12326 * linux-low.c (__SIGRTMIN): Define if not already defined.
12327 (linux_create_inferior): Check for __ANDROID__ rather than
12329 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12330 are already deferred.
12331 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12332 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12333 stopped and already has a pending signal to report.
12334 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12335 a pending signal to report or is moving out of a jump pad.
12336 (linux_init_signals): Check for __ANDROID__ rather than
12339 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12341 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12342 debug_threads check. Avoid a linear search when not doing debug
12345 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12347 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12348 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12349 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12350 (process_event): Change local fd's type to gdb_fildes_t.
12351 (create_file_handler): Adjust prototype.
12352 (delete_file_handler): Adjust prototype.
12353 (handle_file_event): Adjust prototype. Use pfildes.
12354 (create_file_event): Adjsut prototype.
12355 * remote-utils.c (remote_desc, listen_desc): Change type to
12357 * server.h: New gdb_fildes_t typedef.
12358 [USE_WIN32API]: Include winsock2.h.
12359 (delete_file_handler, add_file_handler): Adjust prototypes.
12360 (pfildes): Declare.
12361 * utils.c (pfildes): New.
12363 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12365 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12366 * configure: Regenerate.
12368 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12370 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12371 (linux_done_accessing_memory): ... this.
12372 (linux_target_ops): Adjust.
12373 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12374 * nto-low.c (nto_target_ops): Adjust comment.
12375 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12376 * spu-low.c (spu_target_ops): Adjust comment.
12377 * target.h (target_ops): Rename unprepare_to_access_memory field
12378 to done_accessing_memory.
12379 (unprepare_to_access_memory): Rename to ...
12380 (done_accessing_memory): ... this.
12382 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12384 * linux-low.c (linux_prepare_to_access_memory): New.
12385 (linux_unprepare_to_access_memory): New.
12386 (linux_target_ops): Install them.
12387 * server.c (read_memory): Rename to ...
12388 (gdb_read_memory): ... this. Use
12389 prepare_to_access_memory/prepare_to_access_memory.
12390 (write_memory): Rename to ...
12391 (gdb_write_memory): ... this. Use
12392 prepare_to_access_memory/prepare_to_access_memory.
12393 (handle_search_memory_1): Adjust.
12394 (process_serial_event): Adjust.
12395 * target.h (struct target_ops): New fields
12396 prepare_to_access_memory and unprepare_to_access_memory.
12397 (prepare_to_access_memory, unprepare_to_access_memory): New.
12398 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12399 prepare_to_access_memory/prepare_to_access_memory.
12400 * nto-low.c (nto_target_ops): Adjust.
12401 * spu-low.c (spu_target_ops): Adjust.
12402 * win32-low.c (win32_target_ops): Adjust.
12404 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12406 * Makefile.in (WARN_CFLAGS): Get it from configure.
12407 (WERROR_CFLAGS): New.
12408 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12409 * configure.ac: Introduce --enable-werror, which adds -Werror to
12410 the compiler command line. Enabled by default. Disable with
12411 --disable-werror. Add -Wdeclaration-after-statement
12412 Wpointer-arith and -Wformat-nonliteral to warning flags.
12413 * configure: Regenerate.
12415 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12417 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12419 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12421 * gdbreplay.c (remote_error): New.
12423 (expect): Use gdbchar. Check for error reading from GDB.
12424 Clarify sync error output.
12425 (play): Check for errors writing to GDB.
12426 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12427 * remote-utils.c (getpkt): Check for errors writing to the remote
12430 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12432 * linux-low.c (linux_wait_1): Move non-debugging code out of
12433 `debug_threads' control.
12435 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12437 * linux-low.c (linux_wait_1): Don't set last_status here.
12438 * server.c (push_event, queue_stop_reply_callback): Assert we're
12439 not pushing a TARGET_WAITKIND_IGNORE event.
12440 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12441 (myresume, handle_target_event): Set the thread's last_resume_kind
12442 and last_status from the target returned status.
12444 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12448 * linux-x86-low.c (update_debug_registers_callback): New.
12449 (i386_dr_low_set_addr): Use it.
12450 (i386_dr_low_get_addr): New.
12451 (i386_dr_low_set_control): Use update_debug_registers_callback.
12452 (i386_dr_low_get_control): New.
12453 (i386_dr_low_get_status): Adjust.
12454 * linux-low.c (linux_stop_lwp): New.
12455 * linux-low.h (linux_stop_lwp): Declare.
12457 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12458 argument instead of a i386_debug_reg_state.
12459 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12460 a i386_debug_reg_state.
12461 (i386_insert_aligned_watchpoint): Adjust.
12462 (i386_remove_aligned_watchpoint): Adjust.
12463 (i386_low_stopped_data_address): Read the debug registers from the
12464 inferior instead of from the mirrors.
12465 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12466 (i386_dr_low_get_addr): Declare.
12467 (i386_dr_low_get_control): Declare.
12468 (i386_dr_low_get_status): Change prototype.
12470 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12471 (i386_dr_low_get_addr): New.
12472 (i386_dr_low_get_control): New.
12473 (i386_dr_low_get_status): Adjust prototype. Return
12475 (i386_initial_stuff): Clear dr_status_mirror and
12477 (i386_get_thread_context): Adjust.
12478 (i386_set_thread_context): Adjust.
12479 (i386_thread_added): Adjust.
12481 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12483 * linux-low.h (linux_thread_area): Delete declaration.
12485 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12487 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12488 after its termination.
12490 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12492 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12493 (gdb_wants_all_stopped): Delete.
12494 (linux_wait_1): Don't call them.
12495 * server.c (handle_v_cont): Tag all threads as want-stopped.
12496 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12497 stopped as "client-wants-stopped".
12499 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12501 * Makefile.in (signals_h): New.
12502 (server_h): Depend on it.
12503 (server.o): Don't depend on $(signals_def).
12504 (signals.o): Depend on $(signals_def).
12506 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12508 * Makefile.in (signals_def): New.
12509 (server_h): Append include/gdb/signals.h and signals_def.
12510 (server.o): Append signals_def.
12512 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12514 * server.c (handle_target_event): Use target_signal_to_host for
12515 resume_info.sig initialization.
12516 * target.h (struct thread_resume) <sig>: New comment.
12518 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12520 * server.c (handle_query): strcpy() the returned string from paddress()
12521 instead of sprintf().
12522 * utils.c (paddress): Return phex_nz().
12524 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12526 * server.c (handle_v_cont): Call mourn_inferior if process
12528 (myresume): Likewise.
12530 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12532 Static tracepoints, and integration with UST.
12534 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12535 * mem-break.c (uninsert_all_breakpoints)
12536 (reinsert_all_breakpoints): New.
12537 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12538 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12539 (gdb_agent_ust_loaded, helper_thread_id)
12540 (gdb_agent_helper_thread_id): New macros.
12541 (struct ipa_sym_addresses): Add addr_ust_loaded,
12542 addr_helper_thread_id, addr_cmd_buf.
12543 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12544 (in_process_agent_loaded_ust): New.
12545 (write_e_ust_not_loaded): New.
12546 (maybe_write_ipa_ust_not_loaded): New.
12547 (struct collect_static_trace_data_action): New.
12548 (enum tracepoint_type) <static_tracepoint>: New.
12549 (struct tracepoint) <handle>: Mention static tracepoints.
12550 (struct static_tracepoint_ctx): New.
12551 (CMD_BUF_SIZE): New.
12552 (add_tracepoint_action): Handle static tracepoint actions.
12553 (unprobe_marker_at): New.
12554 (clear_installed_tracepoints): Handle static tracepoints.
12555 (cmd_qtdp): Handle static tracepoints.
12556 (probe_marker_at): New.
12557 (cmd_qtstart): Handle static tracepoints.
12558 (response_tracepoint): Handle static tracepoints.
12559 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12560 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12561 (get_context_regcache): Handle static tracepoints.
12562 (do_action_at_tracepoint): Handle static tracepoint actions.
12563 (traceframe_find_block_type): Handle static trace data blocks.
12564 (traceframe_read_sdata): New.
12565 (download_tracepoints): Download static tracepoint actions.
12566 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12567 (GDB_PROBE_NAME): New.
12569 (GET_UST_SYM): New.
12572 (ust_marker_to_static_tracepoint): New.
12574 (collect_ust_data_at_tracepoint): New.
12575 (gdb_ust_probe): New.
12576 (UNIX_PATH_MAX, SOCK_DIR): New.
12577 (gdb_ust_connect_sync_socket): New.
12578 (resume_thread, stop_thread): New.
12579 (run_inferior_command): New.
12580 (init_named_socket): New.
12581 (gdb_ust_socket_init): New.
12582 (cstr_to_hexstr): New.
12584 (first_marker, next_marker): New.
12585 (response_ust_marker): New.
12586 (cmd_qtfstm, cmd_qtsstm): New.
12587 (unprobe_marker_at, probe_marker_at): New.
12588 (cmd_qtstmat, gdb_ust_thread): New.
12589 (gdb_ust_init): New.
12590 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12591 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12592 (ST_REGENTRY): New.
12593 (x86_64_st_collect_regmap): New.
12594 (X86_64_NUM_ST_COLLECT_GREGS): New.
12595 (AMD64_RIP_REGNUM): New.
12596 (supply_static_tracepoint_registers): New.
12597 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12598 (ST_REGENTRY): New.
12599 (i386_st_collect_regmap): New.
12600 (i386_NUM_ST_COLLECT_GREGS): New.
12601 (supply_static_tracepoint_registers): New.
12602 * server.c (handle_query): Handle qXfer:statictrace:read.
12603 <qSupported>: Report support for StaticTracepoints, and
12604 qXfer:statictrace:read features.
12605 * server.h (traceframe_read_sdata)
12606 (supply_static_tracepoint_registers): Declare.
12607 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12608 (unpack_varlen_hex): Include in IPA build.
12609 * Makefile.in (ustlibs, ustinc): New.
12610 (IPA_OBJS): Add remote-utils-ipa.o.
12611 ($(IPA_LIB)): Link -ldl and -lpthread.
12613 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12614 * config.in, configure: Regenerate.
12616 2010-06-20 Ian Lance Taylor <iant@google.com>
12617 Pedro Alves <pedro@codesourcery.com>
12619 * linux-x86-low.c (always_true): Delete.
12620 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12621 trying to fool the compiler with always_true.
12623 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12625 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12626 conditions in gdbserver.
12628 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12630 * spu-low.c (spu_read_memory): Wrap around local store limit.
12631 (spu_write_memory): Likewise.
12633 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12635 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12636 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12638 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12640 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12641 uses with LONGEST uses.
12643 2010-06-14 Stan Shebs <stan@codesourcery.com>
12644 Pedro Alves <pedro@codesourcery.com>
12648 * linux-x86-low.c: Include limits.h.
12650 (always_true): New.
12653 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12654 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12655 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12656 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12657 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12658 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12659 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12660 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12661 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12662 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12663 (amd64_emit_void_call_2): New.
12664 (amd64_emit_ops): New.
12665 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12666 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12667 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12668 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12669 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12670 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12671 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12672 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12673 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12674 (i386_emit_stack_adjust, i386_emit_int_call_1)
12675 (i386_emit_void_call_2): New.
12676 (i386_emit_ops): New.
12677 (x86_emit_ops): New.
12678 (the_low_target): Install x86_emit_ops.
12679 * server.h (struct emit_ops): New.
12680 (get_raw_reg_func_addr): Declare.
12681 (current_insn_ptr, emit_error): Declare.
12682 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12683 (set_trace_state_variable_value): New defines.
12684 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12685 addr_get_trace_state_variable_value and
12686 addr_set_trace_state_variable_value.
12687 (symbol_list): New fields for get_raw_reg,
12688 get_trace_state_variable_value and set_trace_state_variable_value.
12689 (condfn): New typedef.
12690 (struct tracepoint): New field `compiled_cond'.
12691 (do_action_at_tracepoint): Clear compiled_cond.
12692 (get_trace_state_variable_value, set_trace_state_variable_value):
12694 (condition_true_at_tracepoint): If there's a compiled condition,
12696 (current_insn_ptr, emit_error): New globals.
12697 (struct bytecode_address): New.
12698 (get_raw_reg_func_addr): New.
12699 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12700 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12701 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12702 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12703 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12704 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12705 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12706 (compile_tracepoint_condition, compile_bytecodes): New.
12707 * target.h (emit_ops): Forward declare.
12708 (struct target_ops): New field emit_ops.
12709 (target_emit_ops): New.
12710 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12711 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12712 * linux-low.c (linux_emit_ops): New.
12713 (linux_target_ops): Install it.
12714 * linux-low.h (struct linux_target_ops): New field emit_ops.
12716 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12718 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12719 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12721 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12722 Stan Shebs <stan@codesourcery.com>
12724 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12725 (all): Depend on $(extra_libraries).
12726 (install-only): Install the IPA.
12727 (IPA_OBJS, IPA_LIB): New.
12728 (clean): Remove the IPA lib.
12729 (IPAGENT_CFLAGS): New.
12730 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12731 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12732 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12733 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12734 * configure.ac: Check for atomic builtins support in the compiler.
12735 (IPA_DEPFILES, extra_libraries): Define.
12736 * configure.srv (ipa_obj): Add description.
12737 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12738 (i[34567]86-*-linux*): Set ipa_obj.
12739 (x86_64-*-linux*): Set ipa_obj.
12740 * linux-low.c (stabilizing_threads): New.
12741 (supports_fast_tracepoints): New.
12742 (linux_detach): Stabilize threads before detaching.
12743 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12744 the lwp is either not stabilizing, or is moving out of a jump pad.
12745 (linux_fast_tracepoint_collecting): New.
12746 (maybe_move_out_of_jump_pad): New.
12747 (enqueue_one_deferred_signal): New.
12748 (dequeue_one_deferred_signal): New.
12749 (linux_wait_for_event_1): If moving out of a jump pad, defer
12750 pending signals to later.
12751 (linux_stabilize_threads): New.
12752 (linux_wait_1): Check if threads need moving out of jump pads, and
12754 (stuck_in_jump_pad_callback): New.
12755 (move_out_of_jump_pad_callback): New.
12756 (lwp_running): New.
12757 (linux_resume_one_lwp): Handle moving out of jump pads.
12758 (linux_set_resume_request): Dequeue deferred signals.
12759 (need_step_over_p): Also step over fast tracepoint jumps.
12760 (start_step_over): Also uninsert fast tracepoint jumps.
12761 (finish_step_over): Also reinsert fast tracepoint jumps.
12762 (linux_install_fast_tracepoint_jump): New.
12763 (linux_target_ops): Install linux_stabilize_threads and
12764 linux_install_fast_tracepoint_jump_pad.
12765 * linux-low.h (linux_target_ops) <get_thread_area,
12766 install_fast_tracepoint_jump_pad>: New fields.
12767 (struct lwp_info) <collecting_fast_tracepoint,
12768 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12769 (linux_get_thread_area): Declare.
12770 * linux-x86-low.c (jump_insn): New.
12771 (x86_get_thread_area): New.
12772 (append_insns): New.
12773 (push_opcode): New.
12774 (amd64_install_fast_tracepoint_jump_pad): New.
12775 (i386_install_fast_tracepoint_jump_pad): New.
12776 (x86_install_fast_tracepoint_jump_pad): New.
12777 (the_low_target): Install x86_get_thread_area and
12778 x86_install_fast_tracepoint_jump_pad.
12779 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12780 (struct fast_tracepoint_jump): New.
12781 (fast_tracepoint_jump_insn): New.
12782 (fast_tracepoint_jump_shadow): New.
12783 (find_fast_tracepoint_jump_at): New.
12784 (fast_tracepoint_jump_here): New.
12785 (delete_fast_tracepoint_jump): New.
12786 (set_fast_tracepoint_jump): New.
12787 (uninsert_fast_tracepoint_jumps_at): New.
12788 (reinsert_fast_tracepoint_jumps_at): New.
12789 (set_breakpoint_at): Use write_inferior_memory.
12790 (uninsert_raw_breakpoint): Use write_inferior_memory.
12791 (check_mem_read): Mask out fast tracepoint jumps.
12792 (check_mem_write): Mask out fast tracepoint jumps.
12793 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12794 (set_fast_tracepoint_jump): Declare.
12795 (delete_fast_tracepoint_jump)
12796 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12797 (reinsert_fast_tracepoint_jumps_at): Declare.
12798 * regcache.c: Don't compile many functions when building the
12799 in-process agent library.
12800 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12801 the register buffer in the heap.
12802 (free_register_cache): If the register buffer isn't owned by the
12803 regcache, don't free it.
12804 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12805 pre-existing register caches.
12806 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12808 (convert_ascii_to_int): : Constify `from' parameter type.
12809 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12810 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12811 the needed buffer in-place.
12812 (relocate_instruction): New.
12813 * server.c (handle_query) <qSymbols>: If the target supports
12814 tracepoints, give it a chance of looking up symbols. Report
12815 support for fast tracepoints.
12816 (handle_status): Stabilize threads.
12817 (process_serial_event): Adjust.
12818 * server.h (struct fast_tracepoint_jump): Forward declare.
12819 (struct process_info) <fast_tracepoint_jumps>: New field.
12820 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12821 (decode_X_packet, decode_M_packet): Adjust.
12822 (relocate_instruction): Declare.
12823 (in_process_agent_loaded): Declare.
12824 (tracepoint_look_up_symbols): Declare.
12825 (struct fast_tpoint_collect_status): Declare.
12826 (fast_tracepoint_collecting): Declare.
12827 (force_unlock_trace_buffer): Declare.
12828 (handle_tracepoint_bkpts): Declare.
12829 (initialize_low_tracepoint)
12830 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12831 * target.h (struct target_ops) <stabilize_threads,
12832 install_fast_tracepoint_jump_pad>: New fields.
12833 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12834 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12835 [HAVE_STDINT_H]: Include stdint.h.
12836 (trace_debug_1): Rename to ...
12837 (trace_vdebug): ... this.
12838 (trace_debug): Rename to ...
12839 (trace_debug_1): ... this. Add `level' parameter.
12840 (trace_debug): New.
12841 (ATTR_USED, ATTR_NOINLINE): New.
12842 (IP_AGENT_EXPORT): New.
12843 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12844 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12845 (about_to_request_buffer_space, trace_buffer_is_full)
12846 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12847 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12848 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12849 (traceframe_write_count, traceframes_created)
12850 (trace_state_variables)
12851 New renaming defines.
12852 (struct ipa_sym_addresses): New.
12853 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12854 (symbol_list): New.
12855 (ipa_sym_addrs): New.
12856 (all_tracepoint_symbols_looked_up): New.
12857 (in_process_agent_loaded): New.
12858 (write_e_ipa_not_loaded): New.
12859 (maybe_write_ipa_not_loaded): New.
12860 (tracepoint_look_up_symbols): New.
12861 (debug_threads) [IN_PROCESS_AGENT]: New.
12862 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12863 (UNKNOWN_SIDE_EFFECTS): New.
12864 (stop_tracing): New.
12865 (flush_trace_buffer): New.
12866 (stop_tracing_bkpt): New.
12867 (flush_trace_buffer_bkpt): New.
12868 (read_inferior_integer): New.
12869 (read_inferior_uinteger): New.
12870 (read_inferior_data_pointer): New.
12871 (write_inferior_data_pointer): New.
12872 (write_inferior_integer): New.
12873 (write_inferior_uinteger): New.
12874 (struct collect_static_trace_data_action): Delete.
12875 (enum tracepoint_type): New.
12876 (struct tracepoint) <type>: New field `type'.
12877 <actions_str, step_actions, step_actions_str>: Only include in
12879 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12880 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12881 (tracepoints): Use IP_AGENT_EXPORT.
12882 (last_tracepoint): Don't include in the IPA.
12883 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12884 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12885 (alloced_trace_state_variables): New.
12886 (trace_state_variables): Use IP_AGENT_EXPORT.
12887 (traceframe_t): Delete unused variable.
12888 (circular_trace_buffer): Don't include in the IPA.
12889 (trace_buffer_start): Delete.
12890 (struct trace_buffer_control): New.
12891 (trace_buffer_free): Delete.
12892 (struct ipa_trace_buffer_control): New.
12893 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12894 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12896 (trace_buffer_ctrl): New.
12897 (TRACE_BUFFER_CTRL_CURR): New.
12898 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12899 Reimplement as macros.
12900 (trace_buffer_wrap): Delete.
12901 (traceframe_write_count, traceframe_read_count)
12902 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12903 (struct tracepoint_hit_ctx) <type>: New field.
12904 (struct fast_tracepoint_ctx): New.
12905 (memory_barrier): New.
12907 (record_tracepoint_error): Update atomically in the IPA.
12908 (clear_inferior_trace_buffer): New.
12909 (about_to_request_buffer_space): New.
12910 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12911 updating the same buffer.
12912 (add_tracepoint): Default the tracepoint's type to trap
12913 tracepoint, and orig_size to -1.
12914 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12915 internal variables.
12916 (create_trace_state_variable): New parameter `gdb'. Handle it.
12917 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12918 (cmd_qtdp): Handle fast tracepoints.
12919 (cmd_qtdv): Adjust.
12920 (max_jump_pad_size): New.
12921 (gdb_jump_pad_head): New.
12922 (get_jump_space_head): New.
12923 (claim_jump_space): New.
12924 (sort_tracepoints): New.
12925 (MAX_JUMP_SIZE): New.
12926 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12928 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12929 support. Upload fast traceframes, and delete internal IPA
12931 (stop_tracing_handler): New.
12932 (flush_trace_buffer_handler): New.
12933 (cmd_qtstop): Upload fast tracepoints.
12934 (response_tracepoint): Handle fast tracepoints.
12935 (tracepoint_finished_step): Upload fast traceframes. Set the
12936 tracepoint hit context's tracepoint type.
12937 (handle_tracepoint_bkpts): New.
12938 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12939 type. Add comment about fast tracepoints.
12940 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12941 non-existing action_str field.
12942 (get_context_regcache): Handle fast tracepoints.
12943 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12945 (fast_tracepoint_from_jump_pad_address): New.
12946 (fast_tracepoint_from_ipa_tpoint_address): New.
12947 (collecting_t): New.
12948 (force_unlock_trace_buffer): New.
12949 (fast_tracepoint_collecting): New.
12951 (gdb_collect): New.
12952 (write_inferior_data_ptr): New.
12953 (target_tp_heap): New.
12954 (target_malloc): New.
12955 (download_agent_expr): New.
12957 (download_tracepoints): New.
12958 (download_trace_state_variables): New.
12959 (upload_fast_traceframes): New.
12960 (IPA_FIRST_TRACEFRAME): New.
12961 (IPA_NEXT_TRACEFRAME_1): New.
12962 (IPA_NEXT_TRACEFRAME): New.
12963 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12964 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12965 (gdb_jump_pad_buffer_end): New.
12966 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12967 (initialize_tracepoint): Adjust.
12968 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12969 buffer. Initialize the low module.
12970 * utils.c (PREFIX, TOOLNAME): New.
12971 (malloc_failure): Use PREFIX.
12972 (error): In the IPA, an error causes an exit.
12973 (fatal, warning): Use PREFIX.
12974 (internal_error): Use TOOLNAME.
12975 (NUMCELLS): Increase to 10.
12976 * configure, config.in: Regenerate.
12978 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12980 * server.c (handle_query) <qSupported>: Do two passes over the
12981 qSupported string to avoid nesting strtok.
12983 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12985 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12987 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12988 -Wl,--dynamic-list.
12989 * configure: Regenerate.
12990 * proc-service.list: New.
12992 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12994 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12997 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12999 * gdbreplay.c (remote_open): Check error return from socket() call by
13000 its equality to -1 not by it being negative.
13001 * remote-utils.c (remote_open): Likewise.
13003 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13005 * config.h: Regenerate.
13007 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13009 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13010 doesn't provide PTRACE_GET_THREAD_AREA.
13012 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13014 * linux-m68k-low.c: Include <asm/ptrace.h>
13015 (ps_get_thread_area): Implement.
13017 2010-05-03 Doug Evans <dje@google.com>
13019 * event-loop.c (struct callback_event): New struct.
13020 (callback_list): New global.
13021 (append_callback_event, delete_callback_event): New functions.
13022 (process_callback): New function.
13023 (start_event_loop): Call it.
13024 * remote-utils.c (NOT_SCHEDULED): Define.
13025 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13026 moved out of readchar.
13027 (readchar): Rewrite. Call reschedule before returning.
13028 (reset_readchar): New function.
13029 (remote_close): Call it.
13030 (process_remaining, reschedule): New functions.
13031 * server.h (callback_handler_func): New typedef.
13032 (append_callback_event, delete_callback_event): Declare.
13034 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13036 * proc-service.c (ps_pglobal_lookup): Use
13037 thread_db_look_up_one_symbol.
13038 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13039 parameter. Use it instead of all_symbols_looked_up.
13040 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13042 (all_symbols_looked_up): Don't declare.
13043 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13044 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13046 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13047 Set all_symbols_looked_up here.
13048 (thread_db_look_up_one_symbol): New.
13049 (thread_db_get_tls_address): Adjust.
13050 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13051 thread_db object on the heap, and tentatively set it in the
13053 (thread_db_init): Don't set all_symbols_looked_up here.
13054 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13056 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13058 * linux-low.c (linux_kill, linux_detach): Adjust.
13059 (status_pending_p_callback): Remove redundant statement. Check
13060 for !TARGET_WAITIKIND_IGNORE, instead of
13061 TARGET_WAITKIND_STOPPED.
13062 (handle_tracepoints): Make sure LWP is locked. Adjust.
13063 (linux_wait_for_event_1): Adjust.
13064 (linux_cancel_breakpoints): New.
13065 (unsuspend_one_lwp): New.
13066 (unsuspend_all_lwps): New.
13067 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13068 (send_sigstop_callback): Change return type to int, add new
13069 `except' parameter and handle it.
13070 (suspend_and_send_sigstop_callback): New.
13071 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13072 pass them down. If SUSPEND, also increment the lwp's suspend
13074 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13075 (need_step_over_p): Don't consider suspended LWPs.
13076 (start_step_over): Adjust.
13077 (proceed_one_lwp): Change return type to int, add new `except'
13078 parameter and handle it.
13079 (unsuspend_and_proceed_one_lwp): New.
13080 (proceed_all_lwps): Use find_inferior instead of
13082 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13083 also decrement the suspend count of LWPs. Pass `except' down,
13084 instead of hacking its suspend count.
13085 (linux_pause_all): Add `freeze' parameter. Adjust.
13086 (linux_unpause_all): New.
13087 (linux_target_ops): Install linux_unpause_all.
13088 * server.c (handle_status): Adjust.
13089 * target.h (struct target_ops): New fields `unpause_all' and
13090 `cancel_breakpoints'. Add new parameter to `pause_all'.
13091 (pause_all): Add new `freeze' parameter.
13092 (unpause_all): New.
13093 (cancel_breakpoints): New.
13094 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13095 cancel breakpoints.
13096 (cmd_qtstart): Pause threads.
13097 (stop_tracing): Pause threads, and cancel breakpoints.
13098 * win32-low.c (win32_target_ops): Adjust.
13100 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13102 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13103 the inferior right away from here...
13104 (linux_wait_1): ... to here, and adjust to check the thread's
13105 last_resume_kind instead of the lwp's step or stop_expected flags.
13107 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13109 * README: Use consistent `GDB' and `GDBserver' spellings.
13111 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13113 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13114 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13115 (linux_detach_one_lwp): Assume the lwp is stopped.
13116 (any_thread_of): Delete.
13117 (linux_detach): Stop all lwps here. Don't blindly delete all
13119 (delete_lwp_callback): New.
13120 (linux_mourn): Delete all lwps of the process that is gone.
13121 (linux_wait_1): Don't delete the last lwp of the process here.
13122 * mem-break.h (mark_breakpoints_out): Declare.
13123 * mem-break.c (mark_breakpoints_out): New.
13124 (free_all_breakpoints): Use it.
13125 * server.c (handle_target_event): If the process is gone, mark
13127 * thread-db.c (struct thread_db) <create_bp>: New field.
13128 (thread_db_enable_reporting): Fix prototype. Store a thread event
13129 breakpoint reference in the thread_db struct.
13130 (thread_db_load_search): Clear the thread_db object.
13131 (try_thread_db_load_1): Ditto.
13132 (switch_to_process): New.
13133 (disable_thread_event_reporting): Use it.
13134 (remove_thread_event_breakpoints): New.
13135 (thread_db_detach, thread_db_mourn): Use it.
13137 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13139 * linux-low.c (linux_enable_event_reporting): New.
13140 (linux_wait_for_event_1, handle_extended_wait): Use it.
13142 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13144 * linux-low.c (linux_kill_one_lwp, linux_kill)
13145 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13146 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13147 SIGSTOP even if the LWP is stopped.
13148 (send_sigstop_callback): New.
13149 (stop_all_lwps): Use send_sigstop_callback instead.
13150 (linux_resume_one_thread): Adjust.
13151 (proceed_one_lwp): Still proceed an LWP that the client has
13152 requested to stop, if we haven't reported it as stopped yet. Make
13153 sure that LWPs the client want stopped, have a pending SIGSTOP.
13155 2010-04-26 Doug Evans <dje@google.com>
13157 * server.c (handle_general_set): Make static.
13159 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13160 Print received char after testing for error/eof instead of before.
13161 (input_interrupt): Tweak comment.
13163 2010-04-23 Doug Evans <dje@google.com>
13165 * server.c (start_inferior): Print inferior argv if --debug.
13167 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13169 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13170 * nto-x86-low.c: Include server.h
13172 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13174 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13175 be consistent with other sources of this directory.
13176 (init_registers_amd64): Correct name of source file of this function
13179 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13181 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13182 64-bit executables.
13184 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13186 * win32-i386-low.c: Add 64-bit support.
13187 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13188 (init_registers_amd64): Declare.
13189 (mappings): Add 64-bit version of array.
13190 (init_windows_x86): New function.
13191 (the_low_target): Change init_arch field to init_windows_x86.
13193 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13195 * win32-low.c: Adapt to support also 64-bit architecture.
13196 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13197 (get_image_name): Use SIZE_T type for local variable `done'.
13198 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13199 (toolhelp_get_dll_name): Idem.
13200 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13201 Use uintptr_t typecast to avoid warning.
13202 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13203 (handle_exception): Use phex_nz to avoid warning.
13204 (win32_wait): Remove unused local variable `process'.
13206 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13208 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13211 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13213 * configure.ac: Use `ws2_32' library for srv_mingw.
13214 * configure: Regenerate.
13215 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13216 * remote-utils.c: Likewise.
13218 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13220 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13221 if __x86_64__ is defined.
13223 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13225 * configure: Regenerate.
13227 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13229 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13230 * target.h (target_ops): New get_tib_address field.
13231 * win32-low.h (win32_thread_info): Add thread_local_base field.
13232 * win32-low.c (child_add_thread): Add tlb argument.
13233 Set thread_local_base field to TLB.
13234 (get_child_debug_event): Adapt to child_add_thread change.
13235 (win32_get_tib_address): New function.
13236 (win32_target_ops): Set get_tib_address field to
13237 win32_get_tib_address.
13238 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13240 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13242 * linux-low.c (linux_mourn): Also remove the process.
13243 * server.c (handle_target_event): Don't remove the process here.
13244 * nto-low.c (nto_mourn): New.
13245 (nto_target_ops): Install it.
13246 * spu-low.c (spu_mourn): New.
13247 (spu_target_ops): Install it.
13248 * win32-low.c (win32_mourn): New.
13249 (win32_target_ops): Install it.
13251 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13253 * server.h (buffer_xml_printf): Remove redundant `;'.
13255 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13257 * regcache.c (set_register_cache): Invalidate regcaches before
13258 changing the register cache layout.
13259 (regcache_invalidate_one): Allow a NULL regcache.
13260 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13261 regcaches before changing the register cache layout or the target
13264 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13266 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13267 variable warning on Linux/x86-64.
13269 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13271 GDBserver disconnected tracing support.
13273 * linux-low.c (linux_remove_process): Delete.
13274 (add_lwp): Don't set last_resume_kind here.
13275 (linux_kill): Use `mourn'.
13276 (linux_detach): Use `thread_db_detach', and `mourn'.
13277 (linux_mourn): New.
13278 (linux_attach_lwp_1): Adjust comment.
13279 (linux_attach): last_resume_kind moved the thread_info; adjust.
13280 (status_pending_p_callback): Adjust.
13281 (linux_wait_for_event_1): Adjust.
13282 (count_events_callback, select_singlestep_lwp_callback)
13283 (select_event_lwp_callback, cancel_breakpoints_callback)
13284 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13285 (proceed_one_lwp): Adjust.
13286 (linux_async): Add debug output.
13287 (linux_thread_stopped): New.
13288 (linux_pause_all): New.
13289 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13291 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13292 (thread_db_free): Delete declaration.
13293 (thread_db_detach, thread_db_mourn): Declare.
13294 * thread-db.c (thread_db_init): Use thread_db_mourn.
13295 (thread_db_free): Delete, split in two.
13296 (disable_thread_event_reporting): New.
13297 (thread_db_detach): New.
13298 (thread_db_mourn): New.
13300 * server.h (struct thread_info) <last_resume_kind>: New field.
13301 <attached>: Add comment.
13302 <gdb_detached>: New field.
13303 (handler_func): Change return type to int.
13304 (handle_serial_event, handle_target_event): Ditto.
13305 (gdb_connected): Declare.
13307 (disconnected_tracing): Declare.
13308 (stop_tracing): Declare.
13310 * server.c (handle_query) <qSupported>: Report support for
13311 disconnected tracing.
13312 (queue_stop_reply_callback): Account for running threads.
13313 (gdb_wants_thread_stopped): New.
13314 (gdb_wants_all_threads_stopped): New.
13315 (gdb_reattached_process): New.
13316 (handle_status): Clear the `gdb_detached' flag of all processes.
13317 In all-stop, stop all threads.
13318 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13319 (process_serial_event): If the remote connection breaks, or if an
13320 exit was forced with "monitor exit", force an event loop exit.
13321 Handle disconnected tracing on detach.
13322 (handle_serial_event): Adjust.
13323 (handle_target_event): If GDB isn't connected, forward events back
13324 to the inferior, unless the last process exited, in which case,
13325 exit gdbserver. Adjust interface.
13327 * remote-utils.c (remote_open): Don't block in accept. Instead
13328 register an event loop source on the listen socket file
13329 descriptor. Refactor bits into ...
13330 (listen_desc): ... this new global.
13331 (gdb_connected): ... this new function.
13332 (enable_async_notification): ... this new function.
13333 (handle_accept_event): ... this new function.
13334 (remote_close): Clear remote_desc.
13336 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13338 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13340 (mourn_inferior): Define.
13341 (target_process_qsupported): Avoid the dangling else problem.
13342 (thread_stopped): Define.
13343 (pause_all): Define.
13344 (target_waitstatus_to_string): Declare.
13345 * target.c (target_waitstatus_to_string): New.
13347 * tracepoint.c (tracing): Make extern.
13348 (disconnected_tracing): New.
13349 (stop_tracing): Make extern. Handle tracing stops due to GDB
13351 (cmd_qtdisconnected): New.
13352 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13353 (handle_tracepoint_general_set): Handle QTDisconnected.
13355 * event-loop.c (event_handler_func): Change return type to int.
13356 (process_event): Bail out if the event handler wants the event
13358 (handle_file_event): Ditto.
13359 (start_event_loop): Bail out if the event handler wants the event
13362 * nto-low.c (nto_target_ops): Adjust.
13363 * spu-low.c (spu_wait): Don't remove the process here.
13364 (spu_target_ops): Adjust.
13365 * win32-low.c (win32_wait): Don't remove the process here.
13366 (win32_target_ops): Adjust.
13368 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13370 * regcache.c (realloc_register_cache): Invalidate inferior's
13371 regcache before recreating it.
13373 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13375 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13377 2010-04-09 Stan Shebs <stan@codesourcery.com>
13378 Pedro Alves <pedro@codesourcery.com>
13380 * server.h (LONGEST): New.
13381 (struct thread_info) <while_stepping>: New field.
13382 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13384 (initialize_tracepoint, handle_tracepoint_general_set)
13385 (handle_tracepoint_query, tracepoint_finished_step)
13386 (tracepoint_was_hit, release_while_stepping_state_list):
13387 (current_traceframe): Declare.
13388 * server.c (handle_general_set): Handle tracepoint packets.
13389 (read_memory): New.
13390 (write_memory): New.
13391 (handle_search_memory_1): Use read_memory.
13392 (handle_query): Report support for conditional tracepoints, trace
13393 state variables, and tracepoint sources. Handle tracepoint
13395 (main): Initialize the tracepoints module.
13396 (process_serial_event): Handle traceframe reads/writes.
13398 * linux-low.c (handle_tracepoints): New.
13399 (linux_wait_1): Call it.
13400 (linux_resume_one_lwp): Handle while-stepping.
13401 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13402 (linux_target_ops): Install them.
13403 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13405 * linux-x86-low.c (x86_supports_tracepoints): New.
13406 (the_low_target). Install it.
13408 * mem-break.h (delete_breakpoint): Declare.
13409 * mem-break.c (delete_breakpoint): Make external.
13411 * target.h (struct target_ops): Add `supports_tracepoints',
13412 `read_pc', and `write_pc' fields.
13413 (target_supports_tracepoints): Define.
13414 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13417 * regcache.h (struct regcache) <registers_owned>: New field.
13418 (init_register_cache, regcache_cpy): Declare.
13419 (regcache_read_pc, regcache_write_pc): Declare.
13420 (register_cache_size): Declare.
13421 (supply_regblock): Declare.
13422 * regcache.c (init_register_cache): New.
13423 (new_register_cache): Use it.
13424 (regcache_cpy): New.
13425 (register_cache_size): New.
13426 (supply_regblock): New.
13427 (regcache_read_pc, regcache_write_pc): New.
13429 * tracepoint.c: New.
13431 * Makefile.in (OBS): Add tracepoint.o.
13432 (tracepoint.o): New rule.
13434 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13436 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13438 (i386-mmx.c): Likewise.
13439 (i386-mmx-linux.o): Likewise.
13440 (i386-mmx-linux.c): Likewise.
13442 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13443 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13444 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13445 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13447 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13448 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13449 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13451 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13453 * Makefile.in (clean): Updated.
13455 (i386-avx.c): Likewise.
13456 (i386-avx-linux.o): Likewise.
13457 (i386-avx-linux.c): Likewise.
13458 (amd64-avx.o): Likewise.
13459 (amd64-avx.c): Likewise.
13460 (amd64-avx-linux.o): Likewise.
13461 (amd64-avx-linux.c): Likewise.
13463 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13464 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13465 (srv_amd64_regobj): Add amd64-avx.o.
13466 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13467 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13468 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13469 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13470 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13471 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13472 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13474 * i387-fp.c: Include "i386-xstate.h".
13476 (i387_cache_to_xsave): Likewise.
13477 (i387_xsave_to_cache): Likewise.
13478 (x86_xcr0): Likewise.
13480 * i387-fp.h (i387_cache_to_xsave): Likewise.
13481 (i387_xsave_to_cache): Likewise.
13482 (x86_xcr0): Likewise.
13484 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13485 * linux-crisv32-low.c (target_regsets): Likewise.
13486 * linux-m68k-low.c (target_regsets): Likewise.
13487 * linux-mips-low.c (target_regsets): Likewise.
13488 * linux-ppc-low.c (target_regsets): Likewise.
13489 * linux-s390-low.c (target_regsets): Likewise.
13490 * linux-sh-low.c (target_regsets): Likewise.
13491 * linux-sparc-low.c (target_regsets): Likewise.
13492 * linux-xtensa-low.c (target_regsets): Likewise.
13494 * linux-low.c: Include <sys/uio.h>.
13495 (regsets_fetch_inferior_registers): Support nt_type.
13496 (regsets_store_inferior_registers): Likewise.
13497 (linux_process_qsupported): New.
13498 (linux_target_ops): Add linux_process_qsupported.
13500 * linux-low.h (regset_info): Add nt_type.
13501 (linux_target_ops): Add process_qsupported.
13503 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13505 (init_registers_i386_avx_linux): New.
13506 (init_registers_amd64_avx_linux): Likewise.
13507 (xmltarget_i386_linux_no_xml): Likewise.
13508 (xmltarget_amd64_linux_no_xml): Likewise.
13509 (PTRACE_GETREGSET): Likewise.
13510 (PTRACE_SETREGSET): Likewise.
13511 (x86_fill_xstateregset): Likewise.
13512 (x86_store_xstateregset): Likewise.
13513 (use_xml): Likewise.
13514 (x86_linux_update_xmltarget): Likewise.
13515 (x86_linux_process_qsupported): Likewise.
13516 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13517 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13518 init_registers_i386_linux here. Call
13519 x86_linux_update_xmltarget.
13520 (the_low_target): Add x86_linux_process_qsupported.
13522 * server.c (handle_query): Call target_process_qsupported.
13524 * target.h (target_ops): Add process_qsupported.
13525 (target_process_qsupported): New.
13527 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13529 * inferiors.c (add_thread): Set last_status kind to
13530 TARGET_WAITKIND_IGNORE.
13531 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13532 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13533 (linux_wait_1): Move `thread' local definition to block that uses
13534 it. Don't NULL initialize `event_child'.
13535 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13536 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13537 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13539 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13541 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13542 an extended waitstatus, or by a watchpoint.
13543 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13544 thread was stepping or has been stopped by a watchpoint.
13546 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13548 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13549 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13550 of another, then delete the previous, and validate all
13552 (validate_inserted_breakpoint): New.
13553 (delete_disabled_breakpoints): New.
13554 (validate_breakpoints): New.
13555 (check_mem_read): Validate breakpoints before trusting their
13556 shadow. Delete disabled breakpoints.
13557 (check_mem_write): Validate breakpoints before trusting they
13558 should be inserted. Delete disabled breakpoints.
13559 * mem-break.h (validate_breakpoints):
13560 * server.c (handle_query): Validate breakpoints when we see a
13563 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13565 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13566 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13567 if we could tell there's a GDB breakpoint at stop_pc.
13568 (need_step_over_p): Don't do a step over if we find a GDB
13569 breakpoint at the resume PC.
13571 * mem-break.c (struct raw_breakpoint): New.
13572 (enum bkpt_type): New type `gdb_breakpoint'.
13573 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13574 fields. New field `raw'.
13575 (find_raw_breakpoint_at): New.
13576 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13577 breakpoint instead.
13578 (set_breakpoint_at): Adjust.
13579 (delete_raw_breakpoint): New.
13580 (release_breakpoint): New.
13581 (delete_breakpoint): Rename to...
13582 (delete_breakpoint_1): ... this. Add proc parameter. Use
13583 release_breakpoint. Return ENOENT.
13584 (delete_breakpoint): Reimplement.
13585 (find_breakpoint_at): Delete.
13586 (find_gdb_breakpoint_at): New.
13587 (delete_breakpoint_at): Delete.
13588 (set_gdb_breakpoint_at): New.
13589 (delete_gdb_breakpoint_at): New.
13590 (gdb_breakpoint_here): New.
13591 (set_reinsert_breakpoint): Use release_breakpoint.
13592 (uninsert_breakpoint): Rename to ...
13593 (uninsert_raw_breakpoint): ... this.
13594 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13595 (reinsert_raw_breakpoint): Change parameter type to
13597 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13599 (check_breakpoints): Adjust. Use release_breakpoint.
13600 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13601 (breakpoint_inserted_here): Ditto.
13602 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13603 Don't trust the breakpoint's shadow if it is not inserted.
13604 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13605 (delete_all_breakpoints): Adjust.
13606 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13607 use delete_breakpoint_1.
13609 * mem-break.h (breakpoints_supported): Delete declaration.
13610 (set_gdb_breakpoint_at): Declare.
13611 (gdb_breakpoint_here): Declare.
13612 (delete_breakpoint_at): Delete.
13613 (delete_gdb_breakpoint_at): Declare.
13615 * server.h (struct raw_breakpoint): Forward declare.
13616 (struct process_info): New field `raw_breakpoints'.
13618 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13621 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13623 * linux-low.c (status_pending_p_callback): Fix comment.
13624 (linux_wait_for_event_1): Move most of the internal breakpoint
13625 handling from here...
13626 (linux_wait_1): ... to here.
13627 (count_events_callback): New.
13628 (select_singlestep_lwp_callback): New.
13629 (select_event_lwp_callback): New.
13630 (cancel_breakpoints_callback): New.
13631 (select_event_lwp): New.
13632 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13633 priority to all LWPs that have had events that should be reported
13634 to the client. Cancel breakpoints when about to reporting the
13635 event to the client, not while stopping lwps. No longer cancel
13636 finished single-steps here.
13637 (cancel_finished_single_step): Delete.
13638 (cancel_finished_single_steps): Delete.
13640 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13642 * mem-break.c (enum bkpt_type): New.
13643 (struct breakpoint): New field `type'.
13644 (set_breakpoint_at): Change return type to struct breakpoint
13645 pointer. Set type to `other_breakpoint' by default.
13646 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13647 in the breakpoint list.
13648 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13649 (reinsert_breakpoint): Rename to ...
13650 (reinsert_raw_breakpoint): ... this.
13651 (reinsert_breakpoints_at): Adjust.
13652 * mem-break.h (struct breakpoint): Declare.
13653 (set_breakpoint_at): Change return type to struct breakpoint
13656 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13658 * server.c (handle_query): Assign, not compare.
13660 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13662 Teach linux gdbserver to step-over-breakpoints.
13664 * linux-low.c (can_hardware_single_step): New.
13665 (supports_breakpoints): New.
13666 (handle_extended_wait): If stopping threads, read the stop pc of
13667 the new cloned LWP.
13669 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13670 low target doesn't support retrieving the PC.
13671 (add_lwp): Set last_resume_kind to resume_continue.
13672 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13673 (linux_attach): Don't clear stop_expected. Set the lwp's
13674 last_resume_kind to resume_stop.
13675 (linux_detach_one_lwp): Don't check for removed breakpoints.
13676 (check_removed_breakpoint): Delete.
13677 (status_pending_p): Rename to ...
13678 (status_pending_p_callback): ... this. Don't check for removed
13679 breakpoints. Don't consider threads that are stopped from GDB's
13681 (linux_wait_for_lwp): Always read the stop_pc here.
13682 (cancel_breakpoint): New.
13683 (step_over_bkpt): New global.
13684 (linux_wait_for_event_1): Implement stepping over breakpoints.
13685 (gdb_wants_lwp_stopped): New.
13686 (gdb_wants_all_stopped): New.
13687 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13688 single-step traps here. Store the thread's last reported target
13690 (send_sigstop): Don't clear stop_expected. Always set it,
13692 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13693 (cancel_finished_single_step): New.
13694 (cancel_finished_single_steps): New.
13695 (wait_for_sigstop): Don't cancel finished single-step traps here.
13696 (linux_resume_one_lwp): Don't check for removed breakpoints.
13697 Don't set `step' on non-hardware step archs.
13698 (linux_set_resume_request): Ignore resume_stop requests if already
13699 stopping or stopped. Set the lwp's last_resume_kind.
13700 (resume_status_pending_p): Don't check for removed breakpoints.
13701 (need_step_over_p): New.
13702 (start_step_over): New.
13703 (finish_step_over): New.
13704 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13705 requests. Clear the thread's last reported target waitstatus.
13706 Don't use the `suspended' flag. Don't consider pending breakpoints.
13707 (linux_resume): Start a step-over if necessary.
13708 (proceed_one_lwp): New.
13709 (proceed_all_lwps): New.
13710 (unstop_all_lwps): New.
13711 * linux-low.h (struct lwp_info): Rewrite comment for the
13712 `suspended' flag. Add the `stop_pc' field. Delete the
13713 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13714 Add `'last_resume_kind' and `need_step_over' fields.
13715 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13716 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13717 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13718 (set_raw_breakpoint_at): New.
13719 (set_breakpoint_at): Rewrite to use it.
13720 (reinsert_breakpoint_handler): Delete.
13721 (set_reinsert_breakpoint): New.
13722 (reinsert_breakpoint_by_bp): Delete.
13723 (delete_reinsert_breakpoints): New.
13724 (uninsert_breakpoint): Rewrite.
13725 (uninsert_breakpoints_at): New.
13726 (reinsert_breakpoint): Rewrite.
13727 (reinsert_breakpoints_at): New.
13728 (check_breakpoints): Rewrite.
13729 (breakpoint_here): New.
13730 (breakpoint_inserted_here): New.
13731 (check_mem_read): Adjust.
13732 * mem-break.h (breakpoints_supported, breakpoint_here)
13733 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13734 (reinsert_breakpoint_by_bp): Delete declaration.
13735 (delete_reinsert_breakpoints): Declare.
13736 (reinsert_breakpoint): Delete declaration.
13737 (reinsert_breakpoints_at): Declare.
13738 (uninsert_breakpoint): Delete declaration.
13739 (uninsert_breakpoints_at): Declare.
13740 (check_breakpoints): Adjust prototype.
13741 * server.h: Adjust include order.
13742 (struct thread_info): Declare here. Add a `last_status' field.
13744 2010-03-23 Michael Snyder <msnyder@vmware.com>
13746 * server.c (crc32): New function.
13747 (handle_query): Add handling for 'qCRC:' request.
13749 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13751 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13752 lwp had been stopped by a watchpoint.
13754 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13756 * server.h (internal_error): Declare.
13757 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13758 * utils.c (internal_error): New function.
13760 2010-03-15 Andreas Schwab <schwab@redhat.com>
13762 * configure.srv: Fix typo setting srv_regobj.
13764 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13766 * linux-low.c (fetch_register): Avoid passing a non string literal
13768 (usr_store_inferior_registers): Ditto.
13770 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13772 * linux-low.c (linux_write_memory): Bail out early if peeking
13775 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13777 * linux-low.h (struct lwp_info): New fields
13778 `stopped_by_watchpoint' and `stopped_data_address'.
13779 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13780 here, and cache them in the lwp object.
13781 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13783 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13785 (linux_stopped_by_watchpoint): Rewrite.
13786 (linux_stopped_data_address): Rewrite.
13788 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13790 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13791 switching the current inferior, not before.
13793 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13795 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13796 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13797 i386-linux.c and amd64-linux.c.
13798 (reg-i386.o): Removed.
13799 (reg-i386.c): Likewise.
13800 (reg-i386-linux.o): Likewise.
13801 (reg-i386-linux.c): Likewise.
13802 (reg-x86-64.o): Likewise.
13803 (reg-x86-64.c): Likewise.
13804 (reg-x86-64-linux.o): Likewise.
13805 (reg-x86-64-linux.c): Likewise.
13807 (i386.c): Likewise.
13808 (i386-linux.o): Likewise.
13809 (i386-linux.c): Likewise.
13810 (amd64.o): Likewise.
13811 (amd64.c): Likewise.
13812 (amd64-linux.o): Likewise.
13813 (amd64-linux.c): Likewise.
13815 * configure.srv (srv_i386_regobj): New.
13816 (srv_i386_linux_regobj): Likewise.
13817 (srv_amd64_regobj): Likewise.
13818 (srv_amd64_linux_regobj): Likewise.
13819 (srv_i386_32bit_xmlfiles): Likewise.
13820 (srv_i386_64bit_xmlfiles): Likewise.
13821 (srv_i386_xmlfiles): Likewise.
13822 (srv_amd64_xmlfiles): Likewise.
13823 (srv_i386_linux_xmlfiles): Likewise.
13824 (srv_amd64_linux_xmlfiles): Likewise.
13825 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13826 srv_xmlfiles to $srv_i386_xmlfiles.
13827 (i[34567]86-*-mingw32ce*): Likewise.
13828 (i[34567]86-*-mingw*): Likewise.
13829 (i[34567]86-*-nto*): Likewise.
13830 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13831 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13832 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13833 (x86_64-*-linux*): Likewise.
13835 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13836 (init_registers_amd64_linux): New.
13837 (x86_arch_setup): Replace init_registers_x86_64_linux with
13838 init_registers_amd64_linux.
13840 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13842 * configure.ac: Check for libdl. If it is not available link against
13843 static libthread_db.
13844 * configure: Regenerate.
13846 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13850 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13851 handing a read watchpoint.
13852 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13854 2010-02-12 Doug Evans <dje@google.com>
13856 * linux-low.c (linux_supports_tracefork_flag): Document.
13857 (linux_look_up_symbols): Add comment.
13859 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13861 * regcache.c (supply_register): Clear regcache if buf is NULL.
13863 2010-02-02 Nicolas Roche <roche@sourceware.org>
13864 Joel Brobecker <brobecker@adacore.com>
13866 * inferiors.c (find_inferior): Add function documentation.
13867 (unloaded_dll): Handle the case where the unloaded dll has not
13868 been previously registered in the dll list.
13870 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13872 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13873 (thumb2_breakpoint): New.
13874 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13876 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13878 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13879 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13882 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13884 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13886 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13888 * linux-s390-low.c (s390_collect_ptrace_register)
13889 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13891 2010-01-21 Doug Evans <dje@google.com>
13893 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13894 (PTRACE_ARG4_TYPE): New macro.
13895 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13896 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13897 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13898 (usr_store_inferior_registers): Ditto.
13899 (linux_read_memory, linux_write_memory): Ditto.
13900 (linux_test_for_tracefork): Ditto.
13902 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13903 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13905 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13907 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13910 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13912 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13913 prototype to take a regcache. Adjust.
13915 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13917 * regcache.h (struct thread_info): Forward declare.
13918 (struct regcache): New.
13919 (new_register_cache): Adjust prototype.
13920 (get_thread_regcache): Declare.
13921 (free_register_cache): Adjust prototype.
13922 (registers_to_string, registers_from_string): Ditto.
13923 (supply_register, supply_register_by_name, collect_register)
13924 (collect_register_as_string, collect_register_by_name): Ditto.
13925 * regcache.c (struct inferior_regcache_data): Delete.
13926 (get_regcache): Rename to ...
13927 (get_thread_regcache): ... this. Adjust. Switch inferior before
13928 fetching registers.
13929 (regcache_invalidate_one): Adjust.
13930 (regcache_invalidate): Fix prototype.
13931 (new_register_cache): Return the new register cache.
13932 (free_register_cache): Change prototype.
13933 (realloc_register_cache): Adjust.
13934 (registers_to_string): Change prototype to take a regcache. Adjust.
13935 (registers_from_string): Ditto.
13936 (register_data): Ditto.
13937 (supply_register): Ditto.
13938 (supply_register_by_name): Ditto.
13939 (collect_register): Ditto.
13940 (collect_register_as_string): Ditto.
13941 (collect_register_by_name): Ditto.
13942 * server.c (process_serial_event): Adjust.
13943 * linux-low.h (regset_fill_func, regset_store_func): Change
13945 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13947 * linux-low.c (get_stop_pc): Adjust.
13948 (check_removed_breakpoint): Adjust.
13949 (linux_wait_for_event): Adjust.
13950 (linux_resume_one_lwp): Adjust.
13951 (fetch_register): Add regcache parameter. Adjust.
13952 (usr_store_inferior_registers): Ditto.
13953 (regsets_fetch_inferior_registers): Ditto.
13954 (regsets_store_inferior_registers): Ditto.
13955 (linux_fetch_registers, linux_store_registers): Ditto.
13956 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13958 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13960 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13961 prototype to take a regcache.
13962 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13963 * remote-utils.c (convert_ascii_to_int, outreg)
13964 (prepare_resume_reply): Change prototype to take a regcache.
13966 * target.h (struct target_ops) <fetch_registers, store_registers>:
13967 Change prototype to take a regcache.
13968 (fetch_inferior_registers, store_inferior_registers): Change
13969 prototype to take a regcache. Adjust.
13970 * proc-service.c (ps_lgetregs): Adjust.
13971 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13972 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13973 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13974 take a regcache. Adjust.
13975 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13976 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13977 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13978 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13979 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13980 (cris_cannot_fetch_register):
13981 (cris_breakpoint_at): Change prototype to take a regcache.
13983 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13984 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13985 to take a regcache. Adjust.
13986 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13988 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13989 take a regcache. Adjust.
13990 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13991 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13992 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13993 * linux-mips-low.c (mips_get_pc):
13994 (mips_set_pc): Change prototype to take a regcache. Adjust.
13995 (mips_reinsert_addr): Adjust.
13996 (mips_collect_register): Change prototype to take a regcache.
13998 (mips_supply_register):
13999 (mips_collect_register_32bit, mips_supply_register_32bit)
14000 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14001 (mips_store_fpregset): Ditto.
14002 * linux-ppc-low.c (ppc_supply_ptrace_register)
14003 (ppc_supply_ptrace_register): Ditto.
14004 (parse_spufs_run): Adjust.
14005 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14006 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14007 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14008 take a regcache. Adjust.
14009 * linux-s390-low.c (s390_collect_ptrace_register)
14010 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14011 (s390_set_pc): Change prototype to take a regcache. Adjust.
14012 (s390_arch_setup): Adjust.
14013 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14014 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14015 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14016 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14017 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14019 (sparc_breakpoint_at): Adjust.
14020 * linux-xtensa-low.c (xtensa_fill_gregset):
14021 (xtensa_store_gregset):
14022 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14023 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14024 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14025 prototype to take a regcache. Adjust.
14026 * win32-arm-low.c (arm_fetch_inferior_register)
14027 (arm_store_inferior_register): Change prototype to take a
14029 * win32-i386-low.c (i386_fetch_inferior_register)
14030 (i386_store_inferior_register): Change prototype to take a
14032 * win32-low.c (child_fetch_inferior_registers)
14033 (child_store_inferior_registers): Change prototype to take a
14035 (win32_wait): Adjust.
14036 (win32_fetch_inferior_registers): Change prototype to take a
14038 (win32_store_inferior_registers): Adjust.
14039 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14040 store_inferior_register>: Change prototype to take a regcache.
14042 2010-01-20 Doug Evans <dje@google.com>
14044 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14046 (linux_wait_for_event1, linux_init_signals): Ditto.
14047 (W_STOPCODE): Provide definition if missing.
14049 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14051 * linux-low.c (linux_core_of_thread): New.
14052 (compare_ints, show_process, list_threads): New.
14053 (linux_qxfer_osdata): Report threads and cores.
14054 (linux_target_op): Register linux_core_of_thread.
14055 * remote-utils.c (prepare_resume_reply): Report the core.
14056 (buffer_xml_printf): Support %d specifier.
14057 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14059 (handle_query): Handle qXfer:threads. Announce availability
14061 * target.h (struct target_ops): New field core_of_thread.
14063 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14065 * Makefile.in (clean): Remove new generated files.
14066 (reg-s390.o, reg-s390.c): Remove rules.
14067 (reg-s390x.o, reg-s390x.c): Likewise.
14068 (s390-linux32.o, s390-linux32.c): Add rules.
14069 (s390-linux64.o, s390-linux64.c): Likewise.
14070 (s390x-linux64.o, s390x-linux64.c): Likewise.
14071 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14072 * linux-s390-low.c: Include <elf.h>.
14073 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14074 (init_registers_s390): Remove prototype.
14075 (init_registers_s390x): Likewise.
14076 (init_registers_s390_linux32): Add prototype.
14077 (init_registers_s390_linux64): Likewise.
14078 (init_registers_s390x_linux64): Likewise.
14079 (s390_num_regs_3264): New define.
14080 (s390_regmap_3264): New global variable.
14081 (s390_cannot_fetch_register): Remove obsolete check.
14082 (s390_cannot_store_register): Likewise.
14083 (s390_collect_ptrace_register): Handle upper/lower register halves.
14084 (s390_supply_ptrace_register): Likewise.
14085 (s390_fill_gregset): Update to register number changes.
14086 (s390_get_hwcap): New routine.
14087 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14088 Install appropriate regmap and register set.
14090 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14092 * server.c (gdbserver_version): Update copyright year to 2010.
14093 * gdbreplay.c (gdbreplay_version): Likewise.
14095 2009-12-28 Doug Evans <dje@google.com>
14097 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14098 elf/external.h. Include <elf.h> instead but only if necessary.
14100 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14102 * linux-low.c (linux_remove_process): Remove `detaching'
14103 parameter. Don't release/detach from thread_db here.
14104 (linux_kill): Release/detach from thread_db here, ...
14105 (linux_detach): ... and here, before actually detaching.
14106 (linux_wait_1): ... and here, when a process exits.
14107 * thread-db.c (any_thread_of): New.
14108 (thread_db_free): Switch the current inferior to a thread of the
14111 2009-12-21 Doug Evans <dje@google.com>
14113 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14115 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14116 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14117 warning ifndef __NR_tkill. Move setting of errno there too.
14118 Delete unnecessary resetting of errno after syscall.
14119 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14121 * configure.ac: Check for dladdr.
14122 * config.in: Regenerate.
14123 * configure: Regenerate.
14124 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14125 (try_thread_db_load): Update.
14127 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14129 2009-12-18 Doug Evans <dje@google.com>
14131 * event-loop.c: Include unistd.h if it exists.
14133 * linux-low.c (my_waitpid): Move definition away from being in
14134 between linux_tracefork_child/linux_test_for_tracefork.
14136 * gdb_proc_service.h (psaddr_t): Fix type.
14137 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14138 signature to match glibc.
14140 2009-12-16 Doug Evans <dje@google.com>
14142 * linux-low.c (linux_read_memory): Fix argument to read.
14144 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14146 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14147 events, don't leave current_inferior pointing at null.
14149 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14151 * win32-low.c (LOG): Delete.
14152 (OUTMSG): Output to stderr.
14153 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14154 on compile time LOG macro.
14155 (win32_wait): Fix debug output.
14157 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14159 * win32-low.c (win32_add_one_solib): If the dll name is
14160 "ntdll.dll", prepend the system directory to the dll path.
14162 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14164 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14166 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14167 Vladimir Prus <vladimir@codesourcery.com>
14169 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14170 * configure.ac: Check for __mcoldfire__ and set
14171 gdb_cv_m68k_is_coldfire.
14172 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14173 reg-cf.o and reg-m68k.o.
14174 * configure: Regenerated.
14176 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14178 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14179 Pass it to thread_db_free.
14180 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14181 proper `detaching' argument to linux_remove_process.
14182 * linux-low.h (thread_db_free): Add `detaching' parameter.
14183 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14185 (thread_db_free): Add `detaching' parameter. Only
14186 call td_ta_clear_event if detaching from process.
14188 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14190 * thread-db.c (thread_db_free): Fix typo.
14192 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14195 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14197 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14199 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14200 with an i686 compiler.
14201 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14203 * configure: Rebuilt.
14205 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14209 * server.c (handle_search_memory_1): Correct read_addr initialization
14210 in loop for searching subsequent chunks.
14212 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14214 * configure.ac: New --with-libthread-db option.
14215 * thread-db.c: Allow direct dependence on libthread_db.
14216 (thread_db_free): Adjust.
14217 * config.in: Regenerate.
14218 * configure: Likewise.
14220 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14223 * thread-db.c (attach_thread): New function.
14224 (maybe_attach_thread): Return success/failure.
14225 (find_new_threads_callback): Adjust.
14226 (thread_db_find_new_threads): Loop until no new threads.
14228 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14230 * proc-service.c (ps_lgetregs): Formatting.
14232 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14234 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14235 * configure.ac: Adjust.
14236 * linux-low.h (struct process_info_private): Move members to struct
14238 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14239 * linux-low.c (linux_remove_process): Adjust.
14240 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14241 * server.c (handle_query): Move code ...
14242 (handle_monitor_command): ... here. New function.
14243 * target.h (struct target_ops): New member.
14244 * thread-db.c (struct thread_db): New.
14245 (libthread_db_search_path): New variable.
14246 (thread_db_create_event, thread_db_enable_reporting)
14247 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14248 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14249 (try_thread_db_load_1, dladdr_to_soname): New functions.
14250 (try_thread_db_load, thread_db_load_search): New functions.
14251 (thread_db_init): Search for libthread_db.
14252 (thread_db_free): New function.
14253 (thread_db_handle_monitor_command): Likewise.
14254 * config.in: Regenerate.
14255 * configure: Regenerate.
14257 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14259 * spu-low.c (spu_kill): Wait for inferior to terminate.
14260 Call clear_inferiors.
14261 (spu_detach): Call clear_inferiors.
14263 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14265 * aclocal.m4: Regenerate.
14266 * config.in: Likewise.
14267 * configure: Likewise.
14269 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14271 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14272 (parse_spufs_run): New function.
14273 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14274 (ppc_breakpoint_at): Handle SPU breakpoints.
14276 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14278 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14279 (SPUFS_MAGIC): Define.
14280 (spu_enumerate_spu_ids): New function.
14281 (linux_qxfer_spu): New function.
14282 (linux_target_ops): Install linux_qxfer_spu.
14284 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14286 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14287 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14288 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14289 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14290 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14291 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14292 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14293 (init_registers_powerpc_cell32l): Add prototype.
14294 (init_registers_powerpc_cell64l): Likewise.
14295 (ppc_arch_setup): Detect Cell/B.E. architecture.
14297 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14299 * Makefile.in (datarootdir): New variable.
14301 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14303 * linux-low.c (linux_write_memory): Update debugging output.
14304 * Makefile.in (clean): Add new descriptions.
14305 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14306 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14307 * configure.srv: Add new files for arm*-*-linux*.
14308 * linux-arm-low.c: Add new declarations.
14309 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14310 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14311 (HWCAP_VFPv3D16): New.
14312 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14313 instead of __IWMMXT__.
14314 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14315 (arm_arch_setup): New.
14316 (target_regsets): Remove #ifdef. Add VFP regset.
14317 (the_low_target): Use arm_arch_setup.
14319 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14321 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14322 the main thread again.
14324 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14326 Adding Neutrino gdbserver.
14327 * configure: Regenerated.
14328 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14329 * configure.srv (i[34567]86-*-nto*): New target.
14330 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14331 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14332 (nto_comctrl) [__QNX__]: New function.
14333 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14335 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14337 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14340 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14341 Pedro Alves <pedro@codesourcery.com>
14343 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14344 don't support CONTEXT_EXTENDED_REGISTERS.
14345 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14346 (the_low_target): Install them.
14347 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14348 failing with ERROR_PIPE_NOT_CONNECTED.
14350 2009-06-30 Doug Evans <dje@google.com>
14351 Pierre Muller <muller@ics.u-strasbg.fr>
14353 Add h/w watchpoint support to x86-linux, win32-i386.
14354 * Makefile.in (SFILES): Add i386-low.c
14355 (i386_low_h): Define.
14356 (i386-low.o): Add dependencies.
14357 (linux-x86-low.o): Add i386-low.h dependency.
14358 (win32-i386-low.o): Ditto.
14359 * i386-low.c: New file.
14360 * i386-low.h: New file.
14361 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14362 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14363 * linux-low.c (linux_add_process): Initialize arch_private.
14364 (linux_remove_process): Free arch_private.
14365 (add_lwp): Initialize arch_private.
14366 (delete_lwp): Free arch_private.
14367 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14369 * linux-low.h (process_info_private): New member arch_private.
14370 (lwp_info): New member arch_private.
14371 (linux_target_ops): New members new_process, new_thread,
14373 (ptid_of): New macro.
14374 * linux-x86-low.c: Include stddef.h, i386-low.h.
14375 (arch_process_info): New struct.
14376 (arch_lwp_info): New struct.
14377 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14378 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14379 (i386_dr_low_get_status): New function.
14380 (x86_insert_point, x86_remove_point): New functions.
14381 (x86_stopped_by_watchpoint): New function.
14382 (x86_stopped_data_address): New function.
14383 (x86_linux_new_process, x86_linux_new_thread): New functions.
14384 (x86_linux_prepare_to_resume): New function.
14385 (the_low_target): Add entries for insert_point, remove_point,
14386 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14388 * server.c (debug_hw_points): New global.
14389 (monitor_show_help): Document set debug-hw-points.
14390 (handle_query): Process "set debug-hw-points".
14391 * server.h (debug_hw_points): Declare.
14392 (paddress): Declare.
14393 * utils.c (NUMCELLS, CELLSIZE): New macros.
14394 (get_sell, xsnprintf, paddress): New functions.
14395 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14396 remove_point, stopped_by_watchpoint, stopped_data_address.
14397 * win32-i386-low.c: Include i386-low.h.
14398 (debug_reg_state): Replaces dr.
14399 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14400 (i386_dr_low_get_status): New function.
14401 (i386_insert_point, i386_remove_point): New functions.
14402 (i386_stopped_by_watchpoint): New function.
14403 (i386_stopped_data_address): New function.
14404 (i386_initial_stuff): Update.
14405 (get_thread_context,set_thread_context,i386_thread_added): Update.
14406 (the_low_target): Add entries for insert_point,
14407 remove_point, stopped_by_watchpoint, stopped_data_address.
14408 * win32-low.c (win32_insert_watchpoint): New function.
14409 (win32_remove_watchpoint): New function.
14410 (win32_stopped_by_watchpoint): New function.
14411 (win32_stopped_data_address): New function.
14412 (win32_target_ops): Add entries for insert_watchpoint,
14413 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14414 * win32-low.h (win32_target_ops): New members insert_point,
14415 remove_point, stopped_by_watchpoint, stopped_data_address.
14417 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14419 * server.c (process_serial_event): Re-return unsupported, not
14420 error, if the type isn't recognized. Re-allow supporting only
14421 insert or remove packets. Also call require_running for
14422 breakpoints. Add missing break statement to default case. Tidy.
14423 * target.h (struct target_ops): Rename insert_watchpoint to
14424 insert_point, and remove_watchpoint to remove_point.
14426 * linux-low.h (struct linux_target_ops): Likewise.
14427 * linux-low.c (linux_insert_watchpoint): Rename to ...
14428 (linux_insert_point): ... this. Adjust.
14429 (linux_remove_watchpoint): Rename to ...
14430 (linux_remove_point): ... this. Adjust.
14431 (linux_target_ops): Adjust.
14432 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14433 (cris_insert_point): ... this.
14434 (cris_remove_watchpoint): Rename to ...
14435 (cris_remove_point): ... this.
14436 (the_low_target): Adjust.
14438 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14440 * server.c (handle_v_kill): Pass signal_pid to
14441 kill_inferior if multi_process is zero.
14443 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14445 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14446 * target.h (target_ops): Comment for *_watchpoint to make it clear
14447 the functions can get types '0' and '1'.
14449 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14451 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14452 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14453 * regcache.c (get_regcache): Likewise.
14454 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14455 * win32-low.c (child_fetch_inferior_registers): Remove check for
14458 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14459 Pedro Alves <pedro@codesourcery.com>
14461 * target.h (struct target_ops) <supports_multi_process>: New
14463 (target_supports_multi_process): New.
14464 * server.c (handle_query): Even if GDB reports support, only
14465 enable multi-process if the target also supports it. Report
14466 multi-process support only if the target backend supports it.
14467 * linux-low.c (linux_supports_multi_process): New function.
14468 (linux_target_ops): Install it as target_supports_multi_process
14471 2009-05-24 Doug Evans <dje@google.com>
14473 Global renaming of find_thread_pid to find_thread_ptid.
14474 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14475 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14476 All callers updated.
14478 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14479 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14482 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14483 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14484 (linux_resume_one_lwp): Ditto.
14486 2009-05-23 Doug Evans <dje@google.com>
14488 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14489 from struct inferior_list_entry * to struct lwp_info *.
14490 All callers updated.
14492 2009-05-13 Doug Evans <dje@google.com>
14494 * linux-x86-low.c: Don't include assert.h.
14495 (x86_siginfo_fixup): Use fatal, not assert.
14496 (x86_arch_setup): Fix comment.
14498 2009-05-12 Doug Evans <dje@google.com>
14500 Biarch support for i386/amd64 gdbserver.
14501 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14502 Add linux-x86-low.c.
14503 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14504 (linux-x86-low.o): Add.
14505 * linux-x86-64-low.c: Delete.
14506 * linux-i386-low.c: Delete.
14507 * linux-x86-low.c: New file.
14508 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14510 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14512 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14513 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14514 (linux_child_pid_to_exec_file): New function.
14515 (elf_64_header_p, elf_64_file_p): New functions.
14516 (siginfo_fixup): New function.
14517 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14518 give target a chance to convert layout.
14519 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14520 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14522 2009-05-07 Doug Evans <dje@google.com>
14524 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14525 (regsets_store_inferior_registers): Ditto.
14527 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14531 * linux-low.c (must_set_ptrace_flags): Delete.
14532 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14534 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14535 `lwp->must_set_ptrace_flags' instead.
14536 (linux_wait_for_event_1): Set ptrace options here.
14537 (linux_wait_1): ... not here.
14539 2009-04-30 Doug Evans <dje@google.com>
14541 * inferiors.c (started_inferior_callback): New function.
14542 (attached_inferior_callback): New function.
14543 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14544 * server.c (print_started_pid, print_attached_pid): New functions.
14545 (detach_or_kill_for_exit): New function.
14546 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14547 * server.h (have_started_inferiors_p): Declare.
14548 (have_attached_inferiors_p): Declare.
14550 * inferiors.c (remove_process): Fix memory leak, free process.
14551 * linux-low.c (linux_remove_process): New function.
14552 (linux_kill): Call it instead of remove_process.
14553 (linux_detach, linux_wait_1): Ditto.
14555 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14557 * configure.srv: Add x86 Windows CE target.
14559 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14561 * inferiors.c (get_thread_process): Make global.
14562 * server.h (get_thread_process): Add prototype.
14563 * thread-db.c (find_one_thread): Use get_thread_process
14564 instead of current_process.
14565 (thread_db_get_tls_address): Do not crash if called when
14566 thread layer is not yet initialized.
14568 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14570 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14571 * spu-low.c (current_tid): Rename to ...
14572 (current_ptid): ... this.
14573 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14574 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14575 ptid_get_lwp (current_ptid) instead of current_tid.
14576 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14577 instead of current_tid. Use find_process_pid to verify pid
14578 argument is valid. Pass proper argument to remove_process.
14579 (spu_thread_alive): Compare current_ptid instead of current_tid.
14580 (spu_resume): Likewise.
14582 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14584 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14587 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14589 Implement the multiprocess extensions, and add linux multiprocess
14592 * server.h (ULONGEST): Declare.
14593 (struct ptid, ptid_t): New.
14594 (minus_one_ptid, null_ptid): Declare.
14595 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14596 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14597 (struct inferior_list_entry): Change `id' type from unsigned from
14599 (struct sym_cache, struct breakpoint, struct
14600 process_info_private): Forward declare.
14601 (struct process_info): Declare.
14602 (current_process): Declare.
14603 (all_processes): Declare.
14604 (initialize_inferiors): Declare.
14605 (add_thread): Adjust to use ptid_t.
14606 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14607 (add_process, remove_process, find_thread_pid): Declare.
14608 (find_inferior_id): Adjust to use ptid_t.
14609 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14610 (multi_process): Declare.
14611 (push_event): Adjust to use ptid_t.
14612 (read_ptid, write_ptid): Declare.
14613 (prepare_resume_reply): Adjust to use ptid_t.
14614 (clear_symbol_cache): Declare.
14615 * inferiors.c (all_processes): New.
14616 (null_ptid, minus_one_ptid): New.
14617 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14618 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14619 (add_thread): Change unsigned long to ptid. Remove gdb_id
14621 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14622 (gdb_id_to_thread): Rename to ...
14623 (find_thread_pid): ... this. Change unsigned long to ptid.
14624 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14625 (loaded_dll, pull_pid_from_list): Adjust.
14626 (add_process, remove_process, find_process_pid)
14627 (get_thread_process, current_process, initialize_inferiors): New.
14628 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14629 (struct target_waitstatus) <related_pid>: Ditto.
14630 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14631 return type to int.
14632 (struct target_ops) <join>: Add `pid' argument.
14633 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14634 (struct target_ops) <wait>: Add `ptid' field. Change return type
14636 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14637 (mywait): Add `ptid' argument. Change return type to ptid_t.
14638 (target_pid_to_str): Declare.
14639 * target.c (set_desired_inferior): Adjust to use ptids.
14640 (mywait): Add new `ptid' argument. Adjust.
14641 (target_pid_to_str): New.
14642 * mem-break.h (free_all_breakpoints): Declare.
14643 * mem-break.c (breakpoints): Delelete.
14644 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14645 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14646 to use per-process breakpoint list.
14647 (free_all_breakpoints): New.
14648 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14649 (symbol_cache, all_symbols_looked_up): Delete.
14651 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14653 (prepare_resume_reply): Change ptid argument's type from unsigned
14654 long to ptid_t. Adjust. Implement W;process and X;process.
14655 (free_sym_cache, clear_symbol_cache): New.
14656 (look_up_one_symbol): Adjust to per-process symbol cache. *
14657 * server.c (cont_thread, general_thread, step_thread): Change type
14659 (attached): Delete.
14660 (multi_process): New.
14661 (last_ptid): Change type to ptid_t.
14662 (struct vstop_notif) <ptid>: Change type to ptid_t.
14663 (queue_stop_reply, push_event): Change `ptid' argument's type to
14665 (discard_queued_stop_replies): Add `pid' argument.
14666 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14667 changes. Don't reference the `attached' global.
14668 (attach_inferior): Adjust to mywait interface changes.
14669 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14670 features. Handle and report "multiprocess+". Handle
14672 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14674 (handle_v_kill): New.
14675 (handle_v_stopped): Adjust to use target_pid_to_str.
14676 (handle_v_requests): Allow multiple attaches and runs when
14677 multiprocess extensions are in effect. Handle "vKill".
14678 (myresume): Adjust to use ptids.
14679 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14680 (handle_status): Adjust to discard_queued_stop_replies interface
14682 (first_thread_of, kill_inferior_callback)
14683 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14684 (main): Call initialize_inferiors. Adjust to use ptids, killing
14685 and detaching from all inferiors. Handle multiprocess packet
14687 * linux-low.h: Include gdb_proc_service.h.
14688 (struct process_info_private): New.
14689 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14690 <lwpid_of>: Use ptid_get_lwp.
14691 (get_lwp_thread): Adjust.
14692 (struct lwp_info): Add `dead' member.
14693 (find_lwp_pid): Declare.
14694 * linux-low.c (thread_db_active): Delete.
14695 (new_inferior): Adjust comment.
14696 (inferior_pid): Delete.
14697 (linux_add_process): New.
14698 (handle_extended_wait): Adjust.
14699 (add_lwp): Change unsigned long to ptid.
14700 (linux_create_inferior): Add process to processes table. Adjust
14701 to use ptids. Don't set new_inferior here.
14702 (linux_attach_lwp): Rename to ...
14703 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14704 it. Adjust to use ptids.
14705 (linux_attach_lwp): New.
14706 (linux_attach): Add process to processes table. Don't set
14708 (struct counter): New.
14709 (second_thread_of_pid_p, last_thread_of_process_p): New.
14710 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14711 multiple processes.
14712 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14713 processes. Remove process from process table.
14714 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14715 to multiple processes.
14716 (any_thread_of): New.
14717 (linux_detach): Add `pid' argument, and handle it. Remove process
14718 from processes table.
14719 (linux_join): Add `pid' argument. Handle it.
14720 (linux_thread_alive): Change unsighed long argument to ptid_t.
14721 Consider dead lwps as not being alive.
14722 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14723 threads we're not interested in.
14724 (same_lwp, find_lwp_pid): New.
14725 (linux_wait_for_lwp): Change `pid' argument's type from int to
14727 (linux_wait_for_event): Rename to ...
14728 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14729 from int to ptid_t. Adjust.
14730 (linux_wait_for_event): New.
14731 (linux_wait_1): Add `ptid' argument. Change return type to
14732 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14733 that exit from the process table.
14734 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14736 (mark_lwp_dead): New.
14737 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14738 stopping all threads, mark its main lwp as dead.
14739 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14741 (fetch_register, usr_store_inferior_registers)
14742 (regsets_fetch_inferior_registers)
14743 (regsets_store_inferior_registers, linux_read_memory)
14744 (linux_write_memory): Inline `inferior_pid'.
14745 (linux_look_up_symbols): Adjust to use per-process
14746 `thread_db_active'.
14747 (linux_request_interrupt): Adjust to use ptids.
14748 (linux_read_auxv): Inline `inferior_pid'.
14749 (initialize_low): Don't reference thread_db_active.
14750 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14751 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14752 (ps_getpid): Return the pid of the current inferior.
14753 * thread-db.c (proc_handle, thread_agent): Delete.
14754 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14756 (find_one_thread): Change argument type to ptid_t. Adjust to
14758 (maybe_attach_thread): Adjust to per-process data and ptids.
14759 (thread_db_find_new_threads): Ditto.
14760 (thread_db_init): Ditto.
14761 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14762 processes table. Adjust to use ptids.
14763 (spu_kill, spu_detach): Adjust interface. Remove process from
14765 (spu_join, spu_thread_alive): Adjust interface.
14766 (spu_wait): Adjust interface. Remove process from processes
14767 table. Adjust to use ptids.
14768 * win32-low.c (current_inferior_tid): Delete.
14769 (current_inferior_ptid): New.
14770 (debug_event_ptid): New.
14771 (thread_rec): Take a ptid. Adjust.
14772 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14773 (child_delete_thread): Ditto.
14774 (do_initial_child_stuff): Add `attached' argument. Add process to
14776 (child_fetch_inferior_registers, child_store_inferior_registers):
14778 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14779 (win32_attach): Pass 1 to do_initial_child_stuff.
14780 (win32_kill): Adjust interface. Remove process from processes
14782 (win32_detach): Ditto.
14783 (win32_join): Adjust interface.
14784 (win32_thread_alive): Take a ptid.
14785 (win32_resume): Adjust to use ptids.
14786 (get_child_debug_event): Ditto.
14787 (win32_wait): Adjust interface. Remove exiting process from
14790 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14792 Non-stop mode support.
14794 * server.h (non_stop): Declare.
14795 (gdb_client_data, handler_func): Declare.
14796 (delete_file_handler, add_file_handler, start_event_loop):
14798 (handle_serial_event, handle_target_event, push_event)
14799 (putpkt_notif): Declare.
14800 * target.h (enum resume_kind): New.
14801 (struct thread_resume): Replace `step' field by `kind' field.
14802 (TARGET_WNOHANG): Define.
14803 (struct target_ops) <wait>: Add `options' argument.
14804 <supports_non_stop, async, start_non_stop>: New fields.
14805 (target_supports_non_stop, target_async): New.
14806 (start_non_stop): Declare.
14807 (mywait): Add `options' argument.
14808 * target.c (mywait): Add `options' argument. Print child exit
14809 notifications here.
14810 (start_non_stop): New.
14811 * server.c (non_stop, own_buf, mem_buf): New globals.
14812 (struct vstop_notif): New.
14813 (notif_queue): New global.
14814 (queue_stop_reply, push_event, discard_queued_stop_replies)
14815 (send_next_stop_reply): New.
14816 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14818 (attach_inferior): In non-stop mode, don't wait for the target
14820 (handle_general_set): Handle QNonStop.
14821 (handle_query): When handling qC, return the current general
14822 thread, instead of the first thread of the list.
14823 (handle_query): If the backend supports non-stop mode, include
14824 QNonStop+ in the qSupported query response.
14825 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14827 (handle_v_attach, handle_v_run): Handle non-stop mode.
14828 (handle_v_stopped): New.
14829 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14830 (myresume): Adjust to use resume_kind. Handle non-stop.
14831 (queue_stop_reply_callback): New.
14832 (handle_status): Handle non-stop mode.
14833 (main): Clear non_stop flag on reconnection. Use the event-loop.
14834 Refactor serial protocol handling from here ...
14835 (process_serial_event): ... to this new function. When GDB
14836 selects any thread, select one here. In non-stop mode, wait until
14837 GDB acks all pending events before exiting.
14838 (handle_serial_event, handle_target_event): New.
14839 * remote-utils.c (remote_open): Install remote_desc in the event
14841 (remote_close): Remove remote_desc from the event loop.
14842 (putpkt_binary): Rename to...
14843 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14844 (putpkt_binary): New as wrapper around putpkt_binary_1.
14845 (putpkt_notif): New.
14846 (prepare_resume_reply): In non-stop mode, don't change the
14848 * event-loop.c: New.
14849 * Makefile.in (OBJ): Add event-loop.o.
14850 (event-loop.o): New rule.
14852 * linux-low.h (pid_of): Moved here.
14854 (get_lwp_thread): Use lwpid_of.
14855 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14856 * linux-low.c (pid_of): Delete.
14857 (inferior_pid): Use lwpid_of.
14858 (linux_event_pipe): New.
14859 (target_is_async_p): New.
14861 (handle_extended_wait): Use lwpid_of.
14862 (add_lwp): Don't set lwpid field.
14863 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14864 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14865 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14866 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14867 first. Adjust to linux_wait_for_event interface changes. Use
14869 (linux_detach): Don't delete the main lwp here.
14870 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14871 (status_pending_p): Don't consider explicitly suspended lwps.
14872 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14873 pointer. Add OPTIONS argument. Change return type to int. Use
14874 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14875 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14876 pointer. Add status pointer argument. Return a pid instead of a
14877 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14878 changes. In non-stop mode, don't switch to a random thread.
14879 (linux_wait): Rename to...
14880 (linux_wait_1): ... this. Add target_options argument, and handle
14881 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14882 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14883 clean exit and signal exit code. Don't stop all threads in
14884 non-stop mode. In all-stop mode, only stop all threads when
14885 reporting a stop to GDB. Handle explicit thread stop requests.
14886 (async_file_flush, async_file_mark): New.
14888 (send_sigstop): Use lwpid_of.
14889 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14890 interface changes. In non-stop mode, don't switch to a random
14892 (linux_resume_one_lwp): Use lwpid_of.
14893 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14894 (linux_resume_one_thread): ... this. Handle resume_stop. In
14895 non-stop mode, don't look for pending flag in all threads.
14896 (resume_status_pending_p): Don't consider explicitly suspended
14898 (my_waitpid): Reimplement. Emulate __WALL.
14899 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14901 (sigchld_handler, linux_supports_non_stop, linux_async)
14902 (linux_start_non_stop): New.
14903 (linux_target_ops): Register linux_supports_non_stop, linux_async
14904 and linux_start_non_stop.
14905 (initialize_low): Install SIGCHLD handler.
14906 * thread-db.c (thread_db_create_event, find_one_thread)
14907 (thread_db_get_tls_address): Use lwpid_of.
14908 * win32-low.c (win32_detach): Adjust to use resume_kind.
14909 (win32_wait): Add `options' argument.
14910 * spu-low.c (spu_resume): Adjust to use resume_kind.
14911 (spu_wait): Add `options' argument.
14913 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14915 Decouple target code from remote protocol.
14917 * target.h (enum target_waitkind): New.
14918 (struct target_waitstatus): New.
14919 (struct target_ops) <wait>: Return an unsigned long. Take a
14920 target_waitstatus pointer instead of a char pointer.
14921 (mywait): Likewise.
14922 * target.c (mywait): Change prototype to return an unsigned long.
14923 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14924 * server.h (thread_from_wait, old_thread_from_wait): Delete
14926 (prepare_resume_reply): Change prototype to take a
14928 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14929 (last_status, last_ptid): New.
14930 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14931 pid instead of a signal.
14932 (attach_inferior): Remove "status" and "signal" parameters.
14934 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14936 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14937 (handle_v_requests, myresume): Remove "status" and "signal"
14938 parameters. Adjust.
14939 (handle_status): New.
14940 (main): Delete local `status'. Adjust.
14941 * remote-utils.c: Include target.h.
14942 (prepare_resume_reply): Change prototype to take a
14943 target_waitstatus. Adjust.
14945 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14947 * spu-low.c (spu_wait): Adjust.
14948 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14950 (win32_wait): Adjust.
14952 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14954 * target.h (struct thread_resume): Delete leave_stopped member.
14955 (struct target_ops): Add a `n' argument to the `resume' callback.
14956 * server.c (start_inferior): Adjust.
14957 (handle_v_cont, myresume): Adjust.
14958 * linux-low.c (check_removed_breakpoint): Adjust to resume
14959 interface change, and to removed leave_stopped field.
14960 (resume_ptr): Delete.
14961 (struct thread_resume_array): New.
14962 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14963 resume interface change.
14964 (linux_continue_one_thread, linux_queue_one_thread)
14965 (resume_status_pending_p): Check if the resume field is NULL
14966 instead of checking the leave_stopped member.
14967 (linux_resume): Adjust to the target resume interface change.
14968 * spu-low.c (spu_resume): Adjust to the target resume interface
14970 * win32-low.c (win32_detach, win32_resume): Ditto.
14972 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14974 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14976 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14978 (linux_continue_one_thread): Only preserve the stepping flag if
14979 there's a pending breakpoint.
14981 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14983 * server.c (main): After the inferior having exited, call
14984 remote_close before exiting gdbserver.
14986 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14988 Fix size of FPSCR in Power 7 processors.
14989 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14990 (PPC_FEATURE_HAS_DFP): New #define.
14991 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14994 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14996 * server.c (handle_query) Whitespace and formatting.
14998 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15000 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15001 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15002 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15003 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15004 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15005 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15006 Makefile.in, configure.ac: Fix whitespace throughout.
15007 * configure: Regenerate.
15009 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15011 * inferiors.c (find_inferior): Make it safe for the callback
15012 function to delete the currently iterated inferior.
15014 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15016 * Makefile.in (linuw_low_h): Move higher.
15017 (thread-db.o): Depend on $(linux_low_h).
15019 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15021 Rename "process" to "lwp" throughout.
15023 * linux-low.c (all_processes): Rename to...
15024 (all_lwps): ... this.
15025 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15026 (add_process): Rename to ...
15027 (add_lwp): ... this. Adjust.
15028 (linux_create_inferior): Adjust.
15029 (linux_attach_lwp): Adjust.
15030 (linux_attach): Adjust.
15031 (linux_kill_one_process): Rename to ...
15032 (linux_kill_one_lwp): ... this. Adjust.
15033 (linux_kill): Adjust.
15034 (linux_detach_one_process): Rename to ...
15035 (linux_detach_one_lwp): ... this. Adjust.
15036 (linux_detach): Adjust.
15037 (check_removed_breakpoint): Adjust.
15038 (status_pending_p): Adjust.
15039 (linux_wait_for_process): Rename to ...
15040 (linux_wait_for_lwp): ... this. Adjust.
15041 (linux_wait_for_event): Adjust.
15042 (send_sigstop): Adjust.
15043 (wait_for_sigstop): Adjust.
15044 (stop_all_processes): Rename to ...
15045 (stop_all_lwps): ... this.
15046 (linux_resume_one_process): Rename to ...
15047 (linux_resume_one_lwp): ... this. Adjust.
15048 (linux_set_resume_request, linux_continue_one_thread)
15049 (linux_queue_one_thread, resume_status_pending_p)
15050 (usr_store_inferior_registers, regsets_store_inferior_registers)
15051 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15053 * linux-low.h (get_process): Rename to ...
15054 (get_lwp): ... this. Adjust.
15055 (get_thread_process): Rename to ...
15056 (get_thread_lwp): ... this. Adjust.
15057 (get_process_thread): Rename to ...
15058 (get_lwp_thread): ... this. Adjust.
15059 (struct process_info): Rename to ...
15060 (struct lwp_info): ... this.
15061 (all_processes): Rename to ...
15062 (all_lwps): ... this.
15063 * proc-service.c (ps_lgetregs): Adjust.
15064 * thread-db.c (thread_db_create_event, find_one_thread)
15065 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15067 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15069 * server.c (handle_query): Handle "qAttached".
15071 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15073 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15074 GPLv3, update license URL.
15076 2009-03-01 Doug Evans <dje@google.com>
15078 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15079 (server_h): Add gdb_signals.h.
15080 (signals.o): Update.
15081 * server.h (target_signal_from_host,target_signal_to_host_p)
15082 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15084 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15086 * remote-utils.c (getpkt): Also generate remote-debug
15087 information if noack_mode is set.
15089 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15091 * server.c (handle_query): Report qXfer:siginfo:read and
15092 qXfer:siginfo:write as supported and handle them.
15093 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15094 * linux-low.c (linux_xfer_siginfo): New.
15095 (linux_target_ops): Set it.
15097 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15099 * server.c (gdbserver_usage): Mention --remote-debug.
15100 (main): Accept '--remote-debug' switch.
15102 2009-01-18 Doug Evans <dje@google.com>
15104 * regcache.c (new_register_cache): No need to check result of xcalloc.
15105 * server.c (handle_search_memory): Back out calls to xmalloc,
15106 result is checked and error is returned to user upon failure.
15107 (handle_query): Ditto. Add more checks for result of malloc.
15108 (handle_v_cont): Check result of malloc, report error back to
15110 (handle_v_run): Ditto. Call freeargv.
15111 * server.h (freeargv): Declare.
15112 * utils.c (freeargv): New fn.
15114 2009-01-15 Doug Evans <dje@google.com>
15116 * gdbreplay.c (perror_with_name): Make arg const char *.
15117 * server.h (target_signal_to_name): Make return type const char *.
15118 * thread-db.c (thread_db_err_str): Make return type const char *.
15119 * utils.c (perror_with_name): Make arg const char *.
15121 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15123 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15124 when handling a EXIT_PROCESS_DEBUG_EVENT.
15126 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15128 * gdbreplay.c (gdbreplay_version): Update copyright year.
15129 * server.c (gdbserver_version): Likewise.
15131 2009-01-05 Doug Evans <dje@google.com>
15133 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15134 (handle_extended_wait): Improve comment.
15136 2008-12-13 Doug Evans <dje@google.com>
15138 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15139 * server.h (ATTR_MALLOC): New macro.
15140 (xmalloc,xcalloc,xstrdup): Declare.
15141 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15142 * inferiors.c: Ditto.
15143 * linux-low.c: Ditto.
15144 * mem-break.c: Ditto.
15145 * regcache.c: Ditto.
15146 * remote-utils.c: Ditto.
15149 * win32-low.c: Ditto.
15151 2008-12-12 Doug Evans <dje@google.com>
15153 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15154 in debugging printf.
15156 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15158 2008-12-09 Doug Evans <dje@google.com>
15160 * linux-low.h (struct process_info): Delete member tid, unused.
15161 * thread-db.c (find_one_thread): Update.
15162 (maybe_attach_thread): Update.
15164 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15166 * target.h (struct target_ops): Add qxfer_osdata member.
15167 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15169 (linux_qxfer_osdata): New functions.
15170 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15172 * server.c (handle_query): Handle "qXfer:osdata:read:".
15173 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15174 (buffer_xml_printf): New functions.
15175 * server.h (struct buffer): New.
15176 (buffer_grow_str, buffer_grow_str0): New macros.
15177 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15178 (buffer_xml_printf): Declare.
15180 2008-11-24 Doug Evans <dje@google.com>
15182 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15184 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15186 * server.c (handle_v_run): Always use the supplied argument list.
15188 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15190 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15191 (xtensa_regmap_table): Add entry for scompare1.
15193 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15195 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15196 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15197 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15198 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15199 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15200 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15201 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15202 XML target descriptions.
15203 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15204 when inferior is running on an ISA 2.05 or later processor. Add
15205 special case to return offset for full 64-bit slot of FPSCR when
15208 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15210 * Makefile.in (SFILES, clean): Added sparc64 files.
15211 (reg-sparc64.o, reg-sparc64.c): New.
15212 * configure.srv (sparc*-*-linux*): New configuration.
15213 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15214 syscall arguments for SPARC.
15215 (regsets_store_inferior_registers): Likewise.
15216 * linux-sparc-low.c: New file.
15218 2008-10-21 Doug Evans <dje@google.com>
15220 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15221 (READLINE_DIR,READLINE_DEP): Delete.
15222 (INTERNAL_CFLAGS): Update.
15223 (LINTFLAGS): Update.
15225 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15227 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15228 whole argv from the last run, not just argv[0].
15230 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15232 * regcache.c (new_register_cache): Return NULL if the register
15233 cache size isn't known yet.
15234 (free_register_cache): Avoid dereferencing a NULL regcache.
15236 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15238 * configure.srv: Merge MIPS and MIPS64.
15240 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15242 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15244 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15246 * Makefile.in: Add required vsx dependencies.
15248 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15249 Declare init_registers_powerpc_vsx32l.
15250 Declare init_registers_powerpc_vsx64l.
15251 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15252 (ppc_arch_setup): Check for VSX in hwcap.
15253 (ppc_fill_vsxregset): New function.
15254 (ppc_store_vsxregset): New function.
15255 Add new VSX entry in regset_info target_regsets.
15257 * configure.srv: Add new VSX dependencies.
15259 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15261 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15262 (remote_open): Set or clear transport_is_reliable.
15263 (putpkt_binary): Don't expect acks in noack mode.
15264 (getpkt): Don't send ack/nac in noack mode.
15265 * server.c (handle_general_set): Handle QStartNoAckMode.
15266 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15268 (main): Reset noack_mode on every connection.
15269 * server.h (noack_mode): Declare.
15271 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15273 * Makefile.in (GDBREPLAY_OBS): New variable.
15274 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15276 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15277 Daniel Jacobowitz <dan@codesourcery.com>
15279 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15280 (usr_store_inferior_registers): Likewise.
15281 (regsets_store_inferior_registers): Likewise.
15283 2008-07-31 Rolf Jansen <rj@surtec.com>
15284 Pedro Alves <pedro@codesourcery.com>
15286 * configure.ac: Check for memmem declaration.
15287 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15288 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15289 (disable_packet_qfThreadInfo): Unconditionally compile.
15290 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15291 * configure, config.in: Regenerate.
15293 2008-07-28 Doug Kwan <dougkwan@google.com>
15295 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15296 (linux_write_memory): Remove declaration of errno.
15298 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15300 * linux-low.c (handle_extended_wait): Do not use "status"
15301 variable uninitialized.
15303 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15305 * server.c (handle_v_attach): Inhibit reporting dll changes.
15307 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15309 * remote-utils.c (prepare_resume_reply): If requested, don't
15310 output "thread:TID" in the T stop reply.
15312 * server.c (disable_packet_vCont, disable_packet_Tthread)
15313 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15314 (handle_query): If requested, disable support for qC, qfThreadInfo
15316 (handle_v_requests): If requested, disable support for vCont.
15317 (gdbserver_show_disableable): New.
15318 (main): Handle --disable-packet and --disable-packet=LIST.
15320 * server.h (disable_packet_vCont, disable_packet_Tthread)
15321 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15323 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15325 * server.c (gdbserver_usage): Mention --version.
15327 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15329 * Makefile.in (gdbreplay.o): New rule.
15331 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15333 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15334 message, not gdbserver.
15336 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15337 Nathan Sidwell <nathan@codesourcery.com>
15338 Joseph Myers <joseph@codesourcery.com>
15340 * acinclude.m4: Include ../../config/acx.m4.
15341 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15342 * configure, config.in: Regenerate.
15343 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15344 * server.c (gdbserver_version): Print PKGVERSION.
15345 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15346 (main): Adjust gdbserver_usage calls.
15347 * gdbreplay.c (version, host_name): Add declarations.
15348 (gdbreplay_version, gdbreplay_usage): New.
15349 (main): Accept --version and --help options.
15351 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15353 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15354 (arm_breakpoint_at): Handle Thumb.
15355 (the_low_target): Add comment.
15357 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15359 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15361 2008-05-09 Doug Evans <dje@google.com>
15363 * server.h (decode_search_memory_packet): Declare.
15364 * remote-utils.c (decode_search_memory_packet): New fn.
15365 * server.c (handle_search_memory_1): New fn.
15366 (handle_search_memory): New fn.
15367 (handle_query): Process qSearch:memory packets.
15369 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15371 * regcache.c (registers_length): Remove.
15372 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15373 full register packet.
15374 * regcache.h (registers_length): Remove prototype.
15375 * server.h (PBUFSIZ): Define to 16384.
15377 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15379 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15380 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15381 powerpc-64l.o, and powerpc-altivec64l.o.
15382 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15383 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15384 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15385 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15386 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15389 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15390 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15391 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15392 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15393 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15394 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15395 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15396 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15397 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15398 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15401 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15402 (init_registers_powerpc_32l): ... this new prototype.
15403 (init_registers_powerpc_32): Remove, replace by ...
15404 (init_registers_powerpc_altivec32l): ... this new prototype.
15405 (init_registers_powerpc_e500): Remove, replace by ...
15406 (init_registers_powerpc_e500l): ... this new prototype.
15407 (init_registers_ppc64): Remove, replace by ...
15408 (init_registers_powerpc_64l): ... this new prototype.
15409 (init_registers_powerpc_64): Remove, replace by ...
15410 (init_registers_powerpc_altivec64l): ... this new prototype.
15411 (ppc_num_regs): Set to 73.
15412 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15413 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15414 (ppc_cannot_store_register): Handle orig_r3 and trap.
15415 (ppc_arch_setup): Update init_registers_... calls.
15416 (ppc_fill_gregset): Handle orig_r3 and trap.
15418 * inferiors.c (clear_inferiors): Reset current_inferior.
15420 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15422 * acinclude.m4: Add override.m4.
15423 * configure: Regenerate.
15425 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15427 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15428 initial call to init_register_ppc64.
15430 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15432 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15433 single powerpc*-*-linux* case.
15434 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15436 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15438 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15439 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15441 * linux-ppc-low.c: Include <elf.h>.
15442 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15443 (ppc_hwcap): New global variable.
15444 (ppc_regmap): Remove __SPE__ #ifdef sections.
15445 (ppc_regmap_e500): New global variable.
15446 (ppc_cannot_store_register): Update __SPE__ special case.
15447 (ppc_get_hwcap): New function.
15448 (ppc_arch_setup): Use it to determine whether inferior supports
15449 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15450 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15451 Do not access registers if target does not support AltiVec.
15452 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15453 Do not access registers if target does not support SPE.
15454 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15456 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15458 * linux-low.c (disabled_regsets, num_regsets): New.
15459 (use_regsets_p): Delete.
15460 (linux_wait_for_process): Clear disabled_regsets.
15461 (regsets_fetch_inferior_registers): Check and set it.
15462 (regsets_store_inferior_registers): Likewise.
15463 (linux_fetch_registers, linux_store_registers): Do not use
15465 (initialize_low): Allocate disabled_regsets.
15467 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15469 * Makefile.in (LIBOBJS): New.
15470 (OBS): Use LIBOBJS.
15471 (memmem.o): New rule.
15472 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15473 * configure: Regenerated.
15475 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15477 * server.c (handle_query): Never return "unsupported" for
15478 qXfer:features:read queries.
15480 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15482 * server.c (get_features_xml): Fix inverted condition.
15483 (handle_query): Always support qXfer:feature:read.
15485 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15487 * server.c (wrapper_argv): New.
15488 (start_inferior): Handle wrapper_argv. If set, expect an extra
15490 (gdbserver_usage): Document --wrapper.
15491 (main): Parse --wrapper.
15493 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15495 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15496 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15497 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15498 (ppc_set_pc): Likewise.
15499 (ppc_arch_setup): New function.
15500 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15501 of collect_register.
15502 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15504 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15506 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15507 instead of linux-ppc64-low.o.
15508 * linux-ppc64-low.c: Remove file.
15509 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15510 (linux-ppc64-low.o): Remove rule.
15512 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15513 (init_registers_powerpc_64): Likewise.
15514 (ppc_regmap): Conditionally define depending on __powerpc64__.
15515 (ppc_cannot_store_register): Do not special-case "fpscr" when
15516 compiled on __powerpc64__.
15517 (ppc_collect_ptrace_register): New function.
15518 (ppc_supply_ptrace_register): New function.
15519 (ppc_breakpoint): Change type to "unsigned int".
15520 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15521 (the_low_target): Conditionally provide initializers for the
15522 arch_setup member depending on __powerpc64__. Install
15523 collect_ptrace_register and supply_ptrace_register members.
15525 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15527 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15528 * server.c (gdbserver_xmltarget): Define.
15529 (get_features_xml): Use it to replace "target.xml" and arch_string.
15531 * configure.srv: Remove srv_xmltarget. Add XML files that were
15532 mentioned there to srv_xmlfiles instead. Remove conditional tests
15533 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15534 srv_xmlfiles and srv_regobj to include all possible choices.
15535 * configure.ac (srv_xmltarget): Remove.
15536 (srv_xmlfiles): Do not add "target.xml".
15537 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15538 checks for supplementary target information.
15539 * configure: Regenerate.
15540 * Makefile.in (XML_TARGET): Remove.
15541 (target.xml): Remove rule.
15542 (clean): Do not clean up target.xml.
15543 (.PRECIOUS): Do not mention target.xml.
15545 * target.h (struct target_ops): Remove arch_string member.
15546 * linux-low.c (linux_arch_string): Remove.
15547 (linux_target_ops): Remove arch_string initializer.
15548 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15549 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15550 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15551 * spu-low.c (spu_arch_string): Remove.
15552 (spu_target_ops): Remove arch_string initializer.
15553 * win32-low.c (win32_arch_string): Remove.
15554 (win32_target_ops): Remove arch_string initializer.
15555 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15556 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15557 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15559 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15561 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15562 by collect_ptrace_register and supply_ptrace_register hooks.
15563 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15564 instead of checking for the_low_target.left_pad_xfer.
15565 (usr_store_inferior_registers): Use collect_ptrace_register callback
15566 instead of checking for the_low_target.left_pad_xfer.
15568 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15569 (s390_supply_ptrace_register): Likewise.
15570 (s390_fill_gregset): Call s390_collect_ptrace_register.
15571 (the_low_target): Update.
15573 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15574 (ppc_supply_ptrace_register): Likewise.
15575 (the_low_target): Update.
15577 * linux-i386-low.c (the_low_target): Update.
15578 * linux-x86-64-low.c (the_low_target): Update.
15580 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15582 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15583 reg-s390.o and reg-s390x.o.
15585 * linux-low.c (new_inferior): New global variable.
15586 (linux_create_inferior, linux_attach): Set it.
15587 (linux_wait_for_process): Call the_low_target.arch_setup after the
15588 target has stopped for the first time.
15589 (initialize_low): Do not call the_low_target.arch_setup.
15591 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15592 (s390_set_pc): Likewise.
15593 (s390_arch_setup): New function.
15594 (the_low_target): Use s390_arch_setup as arch_setup routine.
15596 * regcache.c (realloc_register_cache): New function.
15597 (set_register_cache): Call it for each existing regcache.
15599 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15601 * server.h (init_registers): Remove prototype.
15603 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15604 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15605 instead of init_registers ().
15606 * linux-arm-low.c (init_registers_arm): Add prototype.
15607 (init_registers_arm_with_iwmmxt): Likewise.
15608 (the_low_target): Add initializer for arch_setup field.
15609 * linux-cris-low.c (init_registers_cris): Add prototype.
15610 (the_low_target): Add initializer for arch_setup field.
15611 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15612 (the_low_target): Add initializer for arch_setup field.
15613 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15614 (the_low_target): Add initializer for arch_setup field.
15615 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15616 (the_low_target): Add initializer for arch_setup field.
15617 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15618 (the_low_target): Add initializer for arch_setup field.
15619 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15620 (the_low_target): Add initializer for arch_setup field.
15621 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15622 (init_registers_mips64_linux): Likewise.
15623 (the_low_target): Add initializer for arch_setup field.
15624 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15625 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15626 (the_low_target): Add initializer for arch_setup field.
15627 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15628 (init_registers_powerpc_64): Likewise.
15629 (the_low_target): Add initializer for arch_setup field.
15630 * linux-s390-low.c (init_registers_s390): Add prototype.
15631 (init_registers_s390x): Likewise.
15632 (the_low_target): Add initializer for arch_setup field.
15633 * linux-sh-low.c (init_registers_sh): Add prototype.
15634 (the_low_target): Add initializer for arch_setup field.
15635 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15636 (the_low_target): Add initializer for arch_setup field.
15637 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15638 (the_low_target): Add initializer for arch_setup field.
15640 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15641 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15642 instead of init_registers ().
15643 * win32-arm-low.c (init_registers_arm): Add prototype.
15644 (the_low_target): Add initializer for arch_setup field.
15645 * win32-i386-low.c (init_registers_i386): Add prototype.
15646 (the_low_target): Add initializer for arch_setup field.
15648 * spu-low.c (init_registers_spu): Add prototype.
15649 (initialize_low): Call initialie_registers_spu () instead of
15650 initialize_registers ().
15652 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15654 * server.c (handle_v_requests): When handling the vRun and vAttach
15655 packets, if already debugging a process, don't kill it. Return an
15658 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15660 * server.c (handle_query): Correct length check.
15662 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15664 * win32-low.c (do_initial_child_stuff): Add process handle
15665 parameter. Set current_process_handle and current_process_id from the
15666 parameters. Clear globals.
15667 (win32_create_inferior): Don't set current_process_handle and
15668 current_process_id here. Instead pass them on the call to
15669 do_initial_child_stuff.
15670 (win32_attach): Likewise.
15671 (win32_clear_inferiors): New.
15672 (win32_kill): Don't close the current process handle or the
15673 current thread handle here. Instead call win32_clear_inferiors.
15674 (win32_detach): Don't open a new handle to the process. Call
15675 win32_clear_inferiors.
15676 (win32_join): Don't rely on current_process_handle; open a new
15677 handle using the process id.
15678 (win32_wait): Call win32_clear_inferiors when the inferior process
15681 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15683 * server.c (monitor_show_help): Add "exit".
15685 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15687 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15688 (clean): Add reg-xtensa.c.
15689 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15690 * configure.srv (xtensa*-*-linux*) New target.
15691 * linux-xtensa-low.c: New.
15692 * xtensa-xtregs.c: New.
15694 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15696 * hostio.c: Don't include errno.h.
15697 (errno_to_fileio_errno): Move to hostio-errno.
15698 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15699 error number outputting to the target->hostio_last_error callback.
15700 (hostio_packet_error): Use FILEIO_EINVAL directly.
15701 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15702 calls to hostio_error.
15703 * hostio-errno.c: New.
15704 * server.h (hostio_last_error_from_errno): Declare.
15705 * target.h (target_ops): Add hostio_last_error member.
15706 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15707 as hostio_last_error handler.
15708 * spu-low.c (spu_target_ops): Likewise.
15709 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15710 (wince_hostio_last_error): New functions.
15711 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15712 as hostio_last_error handler.
15713 (win32_target_ops) [!_WIN32_WCE]: Register
15714 hostio_last_error_from_errno as hostio_last_error handler.
15715 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15716 (hostio-errno.o): New rule.
15717 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15718 * configure.srv (srv_hostio_err_objs): New variable. Default to
15720 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15721 * configure: Regenerate.
15723 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15725 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15726 (linux_kill, linux_detach): Clean up the process list.
15727 * remote-utils.c (remote_open): Improve port number parsing.
15728 (putpkt_binary, input_interrupt): Only send interrupts if the target
15730 * server.c (extended_protocol): Make static.
15731 (attached): Define earlier.
15732 (exit_requested, response_needed, program_argv): New variables.
15733 (target_running): New.
15734 (start_inferior): Clear attached here.
15735 (attach_inferior): Set attached here.
15736 (require_running): Define.
15737 (handle_query): Use require_running and target_running. Implement
15739 (handle_v_attach, handle_v_run): New.
15740 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15741 (gdbserver_usage): Update.
15742 (main): Redo argument parsing. Handle --debug and --multi. Handle
15743 --attach along with other options or after the port. Save
15744 program_argv. Support no initial program. Resynchronize
15745 communication with GDB after an error. Handle "monitor exit".
15746 Use require_running and target_running. Always allow the extended
15747 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15748 restart in extended mode.
15749 * README: Refer to the GDB manual. Update --attach usage.
15751 2007-12-20 Andreas Schwab <schwab@suse.de>
15753 * linux-low.c (STACK_SIZE): Define.
15754 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15755 (linux_test_for_tracefork): Likewise.
15757 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15759 * linux-low.c (linux_wait_for_event): Update messages. Do not
15760 reinsert auto-delete breakpoints.
15761 * mem-break.c (struct breakpoint): Change return type of handler to
15763 (set_breakpoint_at): Update handler type.
15764 (reinsert_breakpoint_handler): Return 1 instead of calling
15766 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15768 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15769 * mem-break.h (set_breakpoint_at): Update handler type.
15770 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15771 * win32-low.c (auto_delete_breakpoint): New.
15772 (get_child_debug_event): Use it.
15774 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15776 * configure.ac: Check for pread and pwrite.
15777 * hostio.c (handle_pread): Fall back to lseek and read.
15778 (handle_pwrite): Fall back to lseek and write.
15779 * config.in, configure: Regenerated.
15781 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15783 * server.c (myresume): Add own_buf argument.
15784 (main): Update calls.
15786 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15788 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15789 * remote-utils.c (remote_open): Do not call disable_async_io.
15790 (block_async_io): Delete.
15791 (unblock_async_io): Make static.
15792 (initialize_async_io): New.
15793 * server.c (handle_v_cont): Handle async I/O here.
15794 (myresume): Likewise. Move other common resume tasks here...
15795 (main): ... from here. Call initialize_async_io. Disable async
15796 I/O before the main loop.
15797 * server.h (initialize_async_io): Declare.
15798 (block_async_io, unblock_async_io): Delete prototypes.
15799 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15801 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15803 * remote-utils.c (readchar): Allow binary data in received messages.
15805 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15807 * win32-low.c (attaching): New global.
15808 (win32_create_inferior): Clear the `attaching' global.
15809 (win32_attach): Set the `attaching' global.
15810 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15811 attaching. Only set a breakpoint at the entry point if not
15814 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15816 * server.c (main): Don't report dll events on the initial
15817 connection on attaches.
15819 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15821 * server.c (main): Relax numerical bases supported for the pid of
15822 the --attach command line argument.
15824 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15826 * win32-low.c (win32_attach): Call OpenProcess before
15827 DebugActiveProcess, not after. Add last error output to error
15830 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15832 * win32-low.c (win32_get_thread_context)
15833 (win32_set_thread_context): New functions.
15834 (thread_rec): Use win32_get_thread_context.
15835 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15836 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15839 2007-12-03 Leo Zayas
15840 Pedro Alves <pedro_alves@portugalmail.pt>
15842 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15844 (child_add_thread): Minor cleanup.
15845 (child_continue): Resume artificially suspended threads before
15846 calling ContinueDebugEvent.
15847 (suspend_one_thread): New.
15848 (fake_breakpoint_event): New.
15849 (get_child_debug_event): Change return type to int. Check here if
15850 gdb sent an interrupt request. If a soft interrupt was requested,
15851 fake a breakpoint event. Return 0 if there is no event to handle,
15853 (win32_wait): Don't check here if gdb sent an interrupt request.
15854 Ensure there is a valid event to handle.
15855 (win32_request_interrupt): Add soft interruption method as last
15858 2007-12-03 Leo Zayas
15859 Pedro Alves <pedro_alves@portugalmail.pt>
15861 * win32-low.h (win32_thread_info): Add descriptions to the
15862 structure members. Replace `suspend_count' counter by a
15864 * win32-low.c (thread_rec): Update condition of when to get the
15865 context from the inferior. Rely on ContextFlags being set if it
15866 has already been retrieved. Only suspend the inferior thread if
15867 we haven't already. Warn if that fails.
15868 (continue_one_thread): s/suspend_count/suspended/. Only call
15869 ResumeThread once. Warn if that fails.
15871 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15873 * win32-low.c (win32_wait): Don't read from the inferior when it
15874 has already exited.
15876 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15878 * Makefile.in (win32_low_h): New variable.
15879 (win32-low.o): Add dependency on $(win32_low_h).
15880 (win32-arm-low.o, win32-i386-low.o): New rules.
15882 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15884 * hostio.c: Correct copyright year.
15886 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15888 * Makefile.in (OBS): Add hostio.o.
15889 (hostio.o): New rule.
15890 * server.h (handle_vFile): Declare.
15891 * hostio.c: New file.
15892 * server.c (handle_v_requests): Take packet_len and new_packet_len
15893 for binary packets. Call handle_vFile.
15894 (main): Update call to handle_v_requests.
15896 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15898 * linux-low.c: Include <sched.h>.
15900 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15902 * linux-low.c (linux_tracefork_grandchild): New.
15903 (linux_tracefork_child): Use clone.
15904 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15906 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15908 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15910 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15912 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15914 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15916 * inferiors.c (change_inferior_id): Delete.
15917 (add_pid_to_list, pull_pid_from_list): New.
15918 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15919 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15920 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15921 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15922 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15923 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15924 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15925 (using_threads): Always set to 1.
15926 (handle_extended_wait): New.
15927 (add_process): Do not set TID.
15928 (linux_create_inferior): Set must_set_ptrace_flags.
15929 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15930 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15931 (linux_thread_alive): Rename TID argument to LWPID.
15932 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15933 (linux_wait_for_event): Do not use TID or check using_threads. Update
15934 call to dead_thread_notify. Call handle_extended_wait.
15935 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15936 (send_sigstop): Delete sigstop_sent.
15937 (wait_for_sigstop): Avoid TID.
15938 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15939 (linux_test_for_tracefork): New.
15940 (linux_lookup_signals): Use thread_db_active and
15941 linux_supports_tracefork_flag.
15942 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15943 * linux-low.h (get_process_thread): Avoid TID.
15944 (struct process_ifo): Move thread_known and tid to the end. Remove
15946 (linux_attach_lwp, thread_db_init): Update prototypes.
15947 * server.h (change_inferior_id): Delete prototype.
15948 (add_pid_to_list, pull_pid_from_list): New prototypes.
15949 * thread-db.c (thread_db_use_events): New.
15950 (find_first_thread): Rename to...
15951 (find_one_thread): ...this. Update callers and messages. Do not
15952 call fatal. Check thread_db_use_events. Do not call
15953 change_inferior_id or new_thread_notify.
15954 (maybe_attach_thread): Update. Do not call new_thread_notify.
15955 (thread_db_init): Set thread_db_use_events. Check use_events.
15956 * utils.c (fatal, warning): Correct message prefix.
15958 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15960 * Makefile.in (clean): Remove new files.
15961 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15962 (powerpc-64.o, powerpc-64.c): New rules.
15963 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15964 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15966 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15968 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15969 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15970 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15971 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15972 (target_regsets): Add AltiVec and SPE register sets.
15973 * configure.ac: Check for AltiVec and SPE.
15974 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15975 (ppc_fill_vrregset, ppc_store_vrregset): New.
15976 (target_regsets): Add AltiVec register set.
15977 * configure: Regenerated.
15979 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15981 * linux-low.c (O_LARGEFILE): Define.
15982 (linux_read_memory): Use /proc/PID/mem.
15983 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15984 * configure, config.in: Regenerated.
15986 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15988 * linux-low.c (linux_wait_for_event): Do not pass signals while
15991 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15993 * win32-low.c (create_process): New.
15994 (win32_create_inferior): Use create_process instead of
15995 CreateProcess. If create_process failed retry appending an ".exe"
15996 suffix. Store the GetLastError result immediatelly after
15997 create_process calls and use it on the call to error.
15999 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16001 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16003 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16005 * configure.ac: Switch license to GPLv3.
16007 2007-08-01 Michael Snyder <msnyder@access-company.com>
16009 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16011 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16013 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16015 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16016 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16017 CloseToolhelp32Snapshot.
16018 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16019 CloseToolhelp32Snapshot.
16021 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16023 * server.c (main): Check for inferior exit before main loop.
16025 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16027 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16028 instead of on tmp_desc.
16030 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16031 Daniel Jacobowitz <dan@codesourcery.com>
16033 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16034 (add_thread): Minor cleanups.
16035 (clear_inferiors): Move lower in the file. Clear the DLL
16037 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16038 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16039 (xml_escape_text): New.
16040 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16042 (handle_v_cont): Report errors.
16043 (gdbserver_version): Update.
16044 (main): Correct size of own_buf. Do not report initial DLL events.
16045 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16046 (unloaded_dll, xml_escape_text): New.
16047 * win32-low.c (enum target_waitkind): Update comments.
16048 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16049 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16050 (win32_EnumProcessModules, win32_GetModuleInformation)
16051 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16052 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16053 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16054 (win32_Module32First, win32_Module32Next, load_toolhelp)
16055 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16056 (get_child_debug_event): Handle DLL events.
16057 (win32_wait): Likewise.
16059 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16061 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16062 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16064 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16066 * win32-low.c (handle_output_debug_string): Ignore event if not
16069 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16071 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16073 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16075 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16077 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16079 * inferiors.c (change_inferior_id): Add comment.
16080 * linux-low.c (check_removed_breakpoint): Add an early
16081 prototype. Improve debug output.
16082 (linux_attach): Doc update.
16083 (linux_detach_one_process, linux_detach): Clean up before releasing
16085 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16086 * linux-low.h (struct process_info): Doc improvement.
16087 * mem-break.c (delete_all_breakpoints): New.
16088 * mem-break.h (delete_all_breakpoints): New prototype.
16089 * thread-db.c (find_first_thread): New.
16090 (thread_db_create_event): Call it instead of
16091 thread_db_find_new_threads. Clean up unused variables.
16092 (maybe_attach_thread): Remove first thread handling.
16093 (thread_db_find_new_threads): Use find_first_thread.
16094 (thread_db_get_tls_address): Likewise.
16096 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16098 * thread-db.c (thread_db_find_new_threads): Add prototype.
16099 (thread_db_create_event): Check for the main thread before adding
16101 (maybe_attach_thread): Only enable event reporting if TID == 0.
16102 (thread_db_get_tls_address): Check for new threads.
16104 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16106 * linux-low.c (linux_create_inferior): Try execv before execvp.
16107 * spu-low.c (spu_create_inferior): Likewise.
16109 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16111 * linux-low.c (linux_create_inferior): Change execv to execvp.
16112 * spu-low.c (spu_create_inferior): Likewies.
16114 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16116 * Makefile.in (clean): Clean new files instead of deleted ones.
16117 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16118 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16120 * configure.srv: Specify XML files and new regformats for MIPS and
16122 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16123 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16124 an entry for the restart register.
16125 (mips_cannot_fetch_register, mips_cannot_store_register)
16126 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16127 register names to match the XML descriptions.
16128 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16129 restart register instead of $0.
16131 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16132 Markus Deuling <deuling@de.ibm.com>
16134 * remote-utils.c (decode_xfer_write): New function.
16135 * server.h (decode_xfer_write): Add prototype.
16136 * server.c (handle_query): Add PACKET_LEN argument. Support
16137 qXfer:spu:read and qXfer:spu:write packets.
16138 (main): Pass packet_len to handle_query.
16139 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16140 * target.h (target_ops): Add qxfer_spu.
16142 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16144 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16145 accessing non-seekable spufs files.
16147 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16149 * server.c (handle_query): Add reply for qC packet.
16151 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16152 Leo Zayas <lerele@champenstudios@com>
16154 * server.h (check_remote_input_interrupt_request): New function.
16155 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16156 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16157 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16158 (check_remote_input_interrupt_request): New function.
16159 * server.h (check_remote_input_interrupt_request): Declare.
16160 * win32-low.c (winapi_DebugBreakProcess,
16161 winapi_GenerateConsoleCtrlEvent): New typedefs.
16162 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16164 (win32_wait): Check for remote interrupt request
16165 with check_remote_input_interrupt_request.
16166 (win32_request_interrupt): New function.
16167 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16169 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16171 * win32-low.c (debug_registers_changed,
16172 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16173 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16174 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16175 (thread_rec): Get context using the low target.
16176 (child_add_thread): Call thread_added on the low target,
16177 which does the same thing.
16179 (do_initial_child_stuff): Remove debug registers references.
16180 Set context using the low target. Resume threads after
16181 setting the contexts.
16182 (child_continue): Remove dead variable. Remove debug
16183 registers references.
16184 (child_fetch_inferior_registers): Go through the low target.
16185 (do_child_store_inferior_registers): Remove.
16186 (child_store_inferior_registers): Go through the low target.
16187 (win32_resume): Remove debug registers references.
16188 Set context using the low target.
16189 (handle_exception): Change return type to void. Don't record
16190 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16191 first chance exception.
16192 (get_child_debug_event): Change return type to void. Remove
16193 goto loop. Always return after waiting for debug event.
16194 (win32_wait): Convert to switch statement. Handle spurious
16197 * win32-i386-low.c (debug_registers_changed,
16198 debug_registers_used): New.
16199 (initial_stuff): Rename to ...
16200 (i386_initial_stuff): ... this. Clear debug registers
16202 (store_debug_registers): Delete.
16203 (i386_get_thread_context): New.
16204 (load_debug_registers): Delete.
16205 (i386_set_thread_context): New.
16206 (i386_thread_added): New.
16207 (single_step): Rename to ...
16208 (i386_single_step): ... this.
16209 (do_fetch_inferior_registers): Rename to ...
16210 (i386_fetch_inferior_register): ... this.
16211 (i386_store_inferior_register): New.
16212 (the_low_target): Adapt to new interface.
16214 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16215 (arm_get_thread_context): New.
16216 (arm_set_thread_context): New.
16218 (do_fetch_inferior_registers): Rename to ...
16219 (arm_fetch_inferior_register): ... this.
16220 (arm_store_inferior_register): New.
16221 (arm_wince_breakpoint): Reimplement as unsigned long.
16222 (arm_wince_breakpoint_len): Define.
16223 (the_low_target): Adapt to new interface.
16225 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16226 load_debug_registers. Add get_thread_context, set_thread_context,
16227 thread_added and store_inferior_register. Rename
16228 fetch_inferior_registers to fetch_inferior_register.
16229 (regptr): Remove declaration.
16231 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16233 * linux-low.c (linux_detach): Change return type to int. Return 0.
16234 * spu-low.c (spu_detach): Likewise.
16236 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16238 * target.h (target_ops): Change return type of detach to int.
16240 (join_inferior): New.
16241 * server.c (main): Don't skip detach support on mingw32.
16242 If the inferior doesn't support detaching return error.
16243 Call join_inferior instead of using waitpid.
16244 * linux-low.c (linux_join): New.
16245 (linux_target_op): Add linux_join.
16246 * spu-low.c (spu_join): New.
16247 (spu_target_ops): Add spu_join.
16248 * win32-low.c (win32_detach): Adapt to new interface.
16249 Reopen current_process_handle before detaching. Issue a child
16250 resume before detaching.
16252 (win32_target_op): Add win32_join.
16254 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16256 * win32-low.c (win32-attach): Fix return value.
16257 * target.h (target_ops): Describe ATTACH return values.
16259 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16261 * win32-low.c (GETPROCADDRESS): Define.
16262 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16263 (winapi_DebugSetProcessKillOnExit): Likewise.
16264 (win32_create_inferior): Force usage of ansi CreateProcessA.
16265 (win32_attach): Use GETPROCADDRESS.
16266 (win32_detach): Likewise.
16268 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16270 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16272 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16274 * win32-low.c: Commit leftover changes from 2007-03-29.
16276 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16278 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16279 fields short instead of int. Add explicit padding.
16280 (i387_cache_to_fsave): Remove unnecessary casts.
16281 (i387_fsave_to_cache): Doc fix.
16282 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16284 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16286 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16287 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16289 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16291 * configure.srv (arm*-*-mingw32ce*): Move near the other
16294 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16296 * configure.ac: Add errno checking.
16297 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16298 sys/file.h and malloc.h.
16299 (AC_CHECK_DECLS): Add perror.
16300 (srv_mingwce): Handle.
16301 * configure.srv (i[34567]86-*-cygwin*): Add
16302 win32-i386-low.o to srv_tgtobj.
16303 (i[34567]86-*-mingw*): Likewise.
16304 (arm*-*-mingw32ce*): Add case.
16305 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16306 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16307 [__MINGW32CE__] (strerror): New function.
16308 [__MINGW32CE__] (errno): Define to GetLastError.
16309 [__MINGW32CE__] (COUNTOF): New macro.
16310 (remote_open): Remove extra close call.
16311 * mem-break.c (delete_breakpoint_at): New function.
16312 * mem-break.h (delete_breakpoint_at): Declare.
16313 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16314 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16315 [USE_WIN32API] (read, write): Add char* casts.
16316 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16317 * server.h: Include wincecompat.h on Windows CE.
16318 [HAVE_ERRNO_H]: Check.
16319 (perror): Declare if not declared.
16320 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16321 (perror_with_name): Remove errno declaration.
16322 * wincecompat.h: New.
16323 * wincecompat.c: New.
16324 * win32-low.h: New.
16325 * win32-arm-low.c: New.
16326 * win32-i386-low.c: New.
16327 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16328 (OUTMSG2): Make it safe.
16330 (COUNTOF): New macro.
16331 (NUM_REGS): Get it from the low target.
16332 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16333 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16334 (thread_rec): Let low target handle debug registers.
16335 (child_add_thread): Likewise.
16336 (child_init_thread_list): Likewise.
16337 (continue_one_thread): Likewise.
16339 (do_child_fetch_inferior_registers): Move to ...
16340 * win32-i386-low.c: ... here, and rename to ...
16341 (do_fetch_inferior_registers): ... this.
16342 * win32-low.c (child_fetch_inferior_registers):
16343 Go through the low target.
16344 (do_child_store_inferior_registers): Use regptr.
16345 (strwinerror): New function.
16346 (win32_create_inferior): Handle Windows CE.
16347 Use strwinerror instead of strerror on Windows error
16348 codes. Add program to the error output.
16349 Don't close the main thread handle on Windows CE.
16350 (win32_attach): Use coredll.dll on Windows CE.
16351 (win32_kill): Close current process and current
16353 (win32_detach): Use coredll.dll on Windows CE.
16354 (win32_resume): Let low target handle debug registers, and
16356 (handle_exception): Add/Remove initial breakpoint. Avoid
16357 non-existant WSTOPSIG on Windows CE.
16358 (win32_read_inferior_memory): Cast to remove warning.
16359 (win32_arch_string): Go through the low target.
16360 (initialize_low): Call set_breakpoint_data with the low
16361 target's breakpoint.
16362 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16363 FOP_REGNUM, mappings): Move to ...
16364 * win32-i386-low.c: ... here.
16365 * win32-low.c (win32_thread_info): Move to ...
16366 * win32-low.h: ... here.
16367 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16368 win32-arm-low.c and wincecompat.c.
16369 (all:): Add $EXEEXT.
16370 (install-only:): Likewise.
16371 (gdbserver:): Likewise.
16372 (gdbreplay:): Likewise.
16373 * config.in: Regenerate.
16374 * configure: Regenerate.
16376 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16378 * win32-low.c: Rename typedef thread_info to
16379 win32_thread_info throughout.
16381 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16383 * win32-i386-low.c: Rename to ...
16384 * win32-low.c: ... this.
16385 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16386 * Makefile.in: Likewise.
16388 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16390 * remote-utils.c (monitor_output): Constify msg parameter.
16391 * server.h (monitor_output): Likewise.
16392 * win32-i386-low.c (handle_output_debug_string): New.
16393 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16394 handle_output_debug_string.
16395 (get_child_debug_event): Likewise.
16397 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16399 * server.c (main): Correct strtoul check.
16401 2007-03-27 Jon Ringle <jon@ringle.org>
16403 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16405 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16407 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16409 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16411 * terminal.h: Check HAVE_SGTTY_H.
16413 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16415 * remote-utils.c (remote_open): Print out the assigned port number.
16417 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16419 * remote-utils.c (monitor_output): New function.
16420 * server.c (debug_threads): Define here.
16421 (monitor_show_help): New function.
16422 (handle_query): Handle qRcmd.
16423 (main): Do not handle 'd' packet.
16424 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16425 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16428 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16430 * Makefile.in (EXEEXT): New.
16431 (clean): Use $(EXEEXT).
16433 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16435 * target.h (target_ops): Rename send_signal to request_interrupt,
16436 and remove enum target_signal parameter.
16437 * linux-low.c (linux_request_interrupt): Rename from
16438 linux_send_signal, and always send SIGINT.
16439 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16440 and always send SIGINT.
16441 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16443 (input_interrupt): Likewise.
16445 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16447 * server.c (get_features_xml): Check if target implemented
16449 * win32-i386-low.c (win32_arch_string): New.
16450 (win32_target_ops): Add win32_arch_string as arch_string member.
16452 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16454 * spu-low.c (spu_arch_string): New.
16455 (spu_target_ops): Add spu_arch_string.
16457 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16459 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16460 * configure.ac: Do not check for terminal.h.
16461 * configure, config.in: Regenerated.
16463 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16465 * Makefile.in (OBS): Add $(XML_BUILTIN).
16466 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16468 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16469 (arm-with-iwmmxt.c): New.
16470 * config.in, configure: Regenerate.
16471 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16472 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16473 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16474 (arm*-*-linux*): Add iWMMXt and regset support.
16475 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16476 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16477 (arm_store_wmmxregset, target_regsets): New.
16478 * server.c (get_features_xml): Take annex argument. Check builtin
16480 (handle_query): Handle multiple annexes.
16482 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16484 * remote-utils.c [USE_WIN32API] (read, write): Define.
16485 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16488 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16490 * linux-i386-low.c (the_low_target): Set arch_string.
16491 * linux-x86-64-low.c (the_low_target): Likewise.
16492 * linux-low.c (linux_arch_string): New.
16493 (linux_target_ops): Add it.
16494 * linux-low.h (struct linux_target_ops): Add arch_string.
16495 * server.c (write_qxfer_response): Use const void * for DATA.
16496 (get_features_xml): New.
16497 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16498 * target.h (struct target_ops): Add arch_string method.
16500 2007-01-03 Denis Pilat <denis.pilat@st.com>
16501 Daniel Jacobowitz <dan@codesourcery.com>
16503 * linux-low.c (linux_kill): Handle being called with no threads.
16504 * win32-i386-low.c (win32_kill): Likewise.
16505 (get_child_debug_event): Clear current_process_handle.
16507 2006-12-30 Denis PILAT <denis.pilat@st.com>
16508 Daniel Jacobowitz <dan@codesourcery.com>
16510 * remote-utils.c (remote_open): Check the type of specified
16511 serial port devices before opening them.
16512 * server.c (main): Kill the inferior if an error occurs during
16513 the first remote_open.
16515 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16517 * README: Update supported targets.
16519 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16521 * Makefile.in (clean): Remove reg-mips64.c.
16522 (reg-mips64.c, reg-mips64.o): New rules.
16523 * configure.srv: Handle mips64. Include regset support for mips.
16524 * linux-mips-low.c (union mips_register): New.
16525 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16526 (mips_breakpoint, mips_breakpoint_at): Use int.
16527 (mips_collect_register, mips_supply_register)
16528 (mips_collect_register_32bit, mips_supply_register_32bit)
16529 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16530 (mips_store_fpregset, target_regsets): New.
16531 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16533 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16535 * configure.srv: Add target "spu*-*-*".
16536 * Makefile.in (clean): Remove reg-spu.c.
16537 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16538 * spu-low.c: New file.
16540 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16542 * configure.ac: Correct td_thr_tls_get_addr test.
16543 * configure: Regenerated.
16545 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16547 * linux-low.c (linux_wait_for_event): Reformat. Use the
16548 pass_signals array.
16549 * remote-utils.c (decode_address_to_semicolon): New.
16550 * server.c (pass_signals, handle_general_set): New.
16551 (handle_query): Mention QPassSignals for qSupported.
16552 (main): Call handle_general_set.
16553 * server.h (pass_signals, decode_address_to_semicolon): New.
16555 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16557 * server.c (handle_query): Correct error handling for read_auxv.
16559 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16561 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16562 and srv_linux_thread_db to yes.
16563 * linux-s390-low.c (s390_fill_gregset): New function.
16564 (target_regsets): Define data structure.
16566 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16568 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16569 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16570 * config.in, configure: Regenerated.
16571 * inferiors.c (gdb_id_to_thread): New function.
16572 (gdb_id_to_thread_id): Use it.
16573 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16574 * linux-low.h (struct process_info): Add th member.
16575 (thread_db_get_tls_address): New prototype.
16576 * remote-utils.c (decode_address): Make non-static.
16577 * server.c (handle_query): Handle qGetTLSAddr.
16578 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16579 * target.h (struct target_ops): Add get_tls_address.
16580 * thread-db.c (maybe_attach_thread): Save the thread handle.
16581 (thread_db_get_tls_address): New.
16583 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16585 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16586 (linux_resume_one_process): Take a siginfo_t *. Update all
16587 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16588 (struct pending_signals): Add a siginfo_t.
16589 (linux_wait_for_process): Always set last_status.
16590 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16591 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16592 * linux-low.h (struct process_info): Add last_status.
16594 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16596 * remote-utils.c (try_rle): New function.
16597 (putpkt_binary): Use it.
16599 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16601 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16602 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16603 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16604 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16605 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16608 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16610 * server.c (terminal_fd): New variable.
16611 (old_foreground_pgrp): Likewise.
16612 (restore_old_foreground_pgrp): New function.
16613 (start_inferior): Record the terminal file descriptor in terminal_fd
16614 and its original foreground group in old_foreground_pgrp. Register
16615 restore_old_foreground_pgrp with atexit().
16617 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16619 * server.c (handle_query): Correct qPart to qXfer.
16621 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16623 * configure.ac: Check for more headers which are missing on
16624 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16625 * configure.srv: Add Cygwin and mingw32.
16626 * remote-utils.c: Don't include headers unconditionally which
16627 are missing on mingw32. Include <winsock.h> for mingw32.
16628 (remote_open): Adjust for mingw32 support. Flush
16629 standard error after writing to it.
16630 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16631 (unblock_async_io, enable_async_io, disable_async_io)
16632 (readchar, getpkt): Update for Winsock support.
16633 (prepare_resume_reply): Expect a protocol signal number.
16634 * server.c: Disable <sys/wait.h> on mingw32.
16635 (start_inferior): Adjust for mingw32 support. Flush
16636 standard error after writing to it.
16637 (attach_inferior): Likewise. Use protocol signal
16639 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16641 * win32-i386-low.c: New file.
16642 * Makefile.in (XM_CLIBS): Set.
16643 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16644 (win32-i386-low.o): New dependency rule.
16645 * linux-low.c (linux_wait): Use target signal numbers.
16646 * target.h (struct target_ops): Doc fix.
16647 * server.h (target_signal_to_name): New prototype.
16648 * gdbreplay.c: Don't include headers unconditionally which
16649 are missing on mingw32. Include <winsock.h> for mingw32.
16650 (remote_close, remote_open): Adjust for Winsock support.
16651 * configure, config.in: Regenerated.
16653 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16655 * server.c (decode_xfer_read, write_qxfer_response): New.
16656 (handle_query): Take a packet length argument. Handle
16657 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16658 the qSupported response.
16659 (main): Update call to handle_query.
16661 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16663 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16664 (putpkt_binary): Renamed from putpkt and adjusted for binary
16666 (putpkt): New wrapper for putpkt_binary.
16667 (readchar): Don't mask off the high bit.
16668 (decode_X_packet): New function.
16669 * server.c (main): Call putpkt_binary if a handler sets the packet
16670 length. Save the length of the incoming packet. Handle 'X'.
16671 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16673 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16675 * server.c (handle_query): Handle qSupported.
16677 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16679 * remote-utils.c (all_symbols_looked_up): New variable.
16680 (look_up_one_symbol): Check it.
16681 * server.h (look_up_one_symbol): New declaration.
16682 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16684 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16686 * Makefile.in (linux-arm-low.o): Update dependencies.
16687 * linux-arm-low.c: Include "gdb_proc_service.h".
16688 (PTRACE_GET_THREAD_AREA): Define.
16689 (ps_get_thread_area): New function.
16691 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16693 * configure.srv (m68k*-*-uclinux*): New target.
16694 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16695 (linux_resume_one_process): Remove extraneous cast.
16696 (linux_read_offsets): New.
16697 (linux_target_op): Add linux_read_offsets on mmuless systems.
16698 * server.c (handle_query): Add qOffsets logic.
16699 * target.h (struct target_ops): Add read_offsets.
16701 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16703 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16704 (PTRACE_GET_THREAD_AREA): Define.
16705 (ps_get_thread_area): New function.
16706 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16707 (linux-x86-64-low.o): Update.
16709 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16711 * configure.ac: Remove checks for prfpregset_t.
16712 * gdb_proc_service.h: New file.
16713 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16714 new "gdb_proc_service.h".
16715 * proc-service.c: Likewise.
16716 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16717 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16718 * Makefile.in (gdb_proc_service_h): Updated.
16719 * configure, config.in: Regenerated.
16721 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16723 * remote-utils.c (prepare_resume_reply): Move declaration
16724 of gdb_id_from_wait to the top of the block.
16726 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16728 * linux-low.c (regsets_store_inferior_registers): Read the regset
16729 from the target before filling it.
16731 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16733 * server.c (attach_inferior): Return SIGTRAP for a successful
16736 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16738 * Makefile.in (OBS): Add version.o.
16739 (STAGESTUFF): Delete.
16740 (version.o): Add dependencies.
16741 (version.c): Replace rule.
16742 (clean): Remove version.c.
16743 * server.c (gdbserver_version): New.
16744 (gdbserver_usage): Use printf.
16745 (main): Handle --version and --help.
16746 * server.h (version, host_name): Add declarations.
16748 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16760 * linux-x86-64-low.c:
16762 * linux-s390-low.c:
16763 * linux-ppc64-low.c:
16765 * linux-mips-low.c:
16766 * linux-m68k-low.c:
16767 * linux-m32r-low.c:
16770 * linux-ia64-low.c:
16771 * linux-i386-low.c:
16772 * linux-crisv32-low.c:
16784 * gdbserver.1: Add (C) after Copyright. Update the FSF
16787 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16789 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16790 (arm_breakpoint_at): Recognize both breakpoints.
16791 (the_low_target): Use the correct breakpoint instruction.
16793 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16795 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16796 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16797 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16798 (the_low_target): Update.
16800 2005-10-25 Andreas Schwab <schwab@suse.de>
16802 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16804 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16805 (ia64_num_regs): Reduce to 462.
16807 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16809 * acinclude.m4: Correct quoting.
16810 * aclocal.m4: Regenerated.
16812 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16813 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16814 (thread_db_init): Call thread_db_err_str.
16815 * configure.ac: Check for TD_VERSION.
16816 * config.in, configure: Regenerated.
16818 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16820 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16822 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16824 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16825 is not available. Define HAVE_PTRACE_GETREGS if it is.
16826 * config.in, configure: Regenerated.
16827 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16828 * linux-i386-low.c, linux-m68k-low.c: Update to use
16829 HAVE_PTRACE_GETREGS.
16830 * linux-low.c (regsets_fetch_inferior_registers)
16831 (regsets_store_inferior_registers): Only return 0 if we processed
16833 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16834 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16836 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16838 * inferiors.c (struct thread_info): Add gdb_id.
16839 (add_thread): Add gdb_id argument.
16840 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16841 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16842 calls to add_thread.
16843 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16844 * server.c (handle_query): Use thread_to_gdb_id.
16845 (handle_v_cont, main): Use gdb_id_to_thread_id.
16846 * server.h (add_thread): Update prototype.
16847 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16850 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16852 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16853 left-padded registers.
16854 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16855 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16857 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16859 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16860 * configure: Regenerate.
16861 * config.in: Regenerate.
16862 * server.h (NEED_DECLARATION_STRERROR):
16863 Replace with !HAVE_DECL_STRERROR.
16865 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16867 * linux-low.c (linux_wait, linux_send_signal): Don't test
16868 an unsigned long variable for > 0 if it could be MAX_ULONG.
16869 * server.c (myresume): Likewise.
16870 * target.c (set_desired_inferior): Likewise.
16872 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16874 * configure.ac: Simplify and improve check for socklen_t.
16875 * configure, config.in: Regenerate.
16877 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16879 * acconfig.h: Remove.
16880 * configure.ac: Add a test for socklen_t. Use three-argument
16881 AC_DEFINE throughout.
16882 * config.in: Regenerated using autoheader 2.59.
16883 * configure: Regenerated.
16885 * gdbreplay.c (socklen_t): Provide a default.
16886 (remote_open): Use socklen_t.
16887 * remote-utils.c (socklen_t): Provide a default.
16888 (remote_open): Use socklen_t.
16889 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16892 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16894 * linux-low.c (linux_read_memory, linux_write_memory)
16895 (linux_read_auxv): Likewise.
16896 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16897 (check_mem_write): Likewise.
16898 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16900 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16901 (registers_from_string, register_data): Likewise.
16902 * server.c (handle_query, main): Likewise.
16903 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16904 (decode_M_packet): Likewise.
16905 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16906 * target.h (struct target_ops): Update read_memory, write_memory,
16908 (read_inferior_memory, write_inferior_memory): Update.
16909 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16910 to unsigned char *.
16911 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16912 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16913 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16914 linux-s390-low.c, linux-sh-low.c: Update for changes in
16915 read_inferior_memory and the_low_target->breakpoint.
16917 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16919 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16920 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16921 * configure.srv: Add powerpc64-*-linux*.
16922 * linux-ppc64-low.c: New file.
16924 2005-05-23 Orjan Friberg <orjanf@axis.com>
16926 * linux-cris-low.c: New file with support for CRIS.
16927 * linux-crisv32-low.c: Ditto for CRISv32.
16928 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16929 (clean): Add reg-cris.c and reg-crisv32.c.
16930 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16931 reg-crisv32.o, and reg-crisv32.c to make rules.
16932 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16933 recognized targets.
16935 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16937 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16938 of sizeof (PTRACE_XFER_TYPE).
16939 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16941 2005-05-12 Orjan Friberg <orjanf@axis.com>
16943 * target.h (struct target_ops): Add insert_watchpoint,
16944 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16945 pointers for hardware watchpoint support.
16946 * linux-low.h (struct linux_target_ops): Ditto.
16947 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16948 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16949 to linux_target_ops.
16950 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16952 * server.c (main): Recognize 'Z' and 'z' packets.
16954 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16956 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16957 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16958 (the_low_target): Add new members.
16960 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16962 * proc-service.c (ps_lgetregs): Search all_processes instead of
16965 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16967 * server.c (start_inferior): Change return type to int.
16968 (attach_inferior): Change sigptr to int *.
16969 (handle_v_cont, handle_v_requests): Change signal to int *.
16970 (main): Change signal to int.
16972 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16974 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16975 * configure.srv: Add m32r*-*-linux*.
16976 * linux-m32r-low.c: New file.
16978 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16980 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16982 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16984 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16985 Take unsigned long arguments for PIDs.
16986 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16987 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16988 (wait_for_sigstop, linux_resume_one_process)
16989 (regsets_fetch_inferior_registers, linux_send_signal)
16990 (linux_read_auxv): Likewise. Update the types of variables holding
16991 PIDs. Update format string specifiers.
16992 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16993 * remote-utils.c (prepare_resume_reply): Likewise.
16994 * server.c (cont_thread, general_thread, step_thread)
16995 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16997 (handle_query): Update format specifiers.
16998 (handle_v_cont, main): Use strtoul for thread IDs.
16999 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17000 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17001 (general_thread, step_thread, thread_from_wait)
17002 (old_thread_from_wait): Update.
17003 * target.h (struct thread_resume): Use unsigned long for THREAD.
17004 (struct target_ops): Use unsigned long for arguments to attach and
17007 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17009 * acinclude.m4: Include bfd/bfd.m4 directly.
17010 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17011 <agriffis@toolchain.org>.
17012 * aclocal.m4, configure: Regenerated.
17014 2005-01-07 Andrew Cagney <cagney@gnu.org>
17016 * configure.ac: Rename configure.in, require autoconf 2.59.
17017 * configure: Re-generate.
17019 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17021 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17022 LIBS when finished.
17023 * aclocal.m4: Regenerated.
17024 * configure: Regenerated.
17026 2004-11-21 Andreas Schwab <schwab@suse.de>
17028 * linux-m68k-low.c (m68k_num_gregs): Define.
17029 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17030 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17031 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17032 (m68k_breakpoint_at): New. Add to the_low_target.
17034 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17035 srv_linux_thread_db to yes.
17037 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17039 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17040 (ARCH_SET_FS): Likewise.
17041 (ARCH_GET_FS): Likewise.
17042 (ARCH_GET_GS): Likewise.
17044 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17046 * linux-i386-low.c (ps_get_thread_area): New.
17047 * linux-x86-64-low.c (ps_get_thread_area): New.
17048 * linux-low.c: Include <sys/syscall.h>.
17049 (linux_kill_one_process): Don't kill the first thread here.
17050 (linux_kill): Kill the first thread here.
17051 (kill_lwp): New function.
17052 (send_sigstop, linux_send_signal): Use it.
17053 * proc-service.c: Clean up #ifdefs.
17054 (fpregset_info): Delete.
17055 (ps_lgetregs): Update and enable implementation.
17056 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17058 * remote-utils.c (struct sym_cache, symbol_cache): New.
17059 (input_interrupt): Print a clearer message.
17060 (async_io_enabled): New variable.
17061 (enable_async_io, disable_async_io): Use it. Update comments.
17062 (look_up_one_symbol): Use the symbol cache.
17063 * thread-db.c (thread_db_look_up_symbols): New function.
17064 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17066 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17068 * configure.in: Test for -rdynamic.
17069 * configure: Regenerated.
17070 * Makefile (INTERNAL_LDFLAGS): New.
17071 (gdbserver, gdbreplay): Use it.
17073 2004-09-02 Andrew Cagney <cagney@gnu.org>
17075 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17077 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17079 * linux-low.c (linux_wait): Clear all_processes list also.
17081 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17083 * linux-low.c: Include <errno.h>. Remove extern declaration of
17086 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17088 * gdbreplay.c, server.h, utils.c: Update copyright years.
17090 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17092 * server.c (main): Print child status or termination signal from
17093 variable 'signal', not 'sig'.
17095 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17097 * linux-low.c (linux_read_memory): Change return type to
17098 int. Check for and return error from ptrace().
17099 * target.c (read_inferior_memory): Change return type to int. Pass
17100 back return status from the_target->read_memory().
17101 * target.h (struct target_ops): Adapt *read_memory() prototype.
17103 (read_inferior_memory): Adapt prototype.
17104 * server.c (main): Return an error packet if
17105 read_inferior_memory() returns an error.
17107 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17109 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17110 Unify with other clean targets.
17112 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17114 * server.c (handle_v_cont): Call set_desired_inferior.
17116 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17118 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17120 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17122 * linux-low.c (linux_wait): Unblock async I/O.
17123 (linux_resume): Block and enable async I/O.
17124 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17125 * server.h (block_async_io, unblock_async_io): Add prototypes.
17127 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17129 * remote-utils.c (remote_open): Print a status notice after
17130 opening a TCP port.
17131 * server.c (attach_inferior): Print a status notice after
17134 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17136 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17138 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17140 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17142 * server.c, target.h: Update copyright years.
17144 2004-02-25 Roland McGrath <roland@redhat.com>
17146 * target.h (struct target_ops): New member `read_auxv'.
17147 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17148 * linux-low.c (linux_read_auxv): New function.
17149 (linux_target_ops): Initialize `read_auxv' member to that.
17151 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17153 Committed by Jim Blandy <jimb@redhat.com>.
17155 * linux-s390-low.c (s390_num_regs): Update.
17156 (s390_regmap): Remove control registers. Use __s390x__ predefine
17157 instead of GPR_SIZE to distiguish s390 and s390x targets.
17159 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17161 * linux-low.c: Update copyright year.
17162 (check_removed_breakpoint): Clear pending_is_breakpoint.
17163 (linux_set_resume_request, linux_queue_one_thread)
17164 (resume_status_pending_p): New functions.
17165 (linux_continue_one_thread): Use process->resume.
17166 (linux_resume): Only resume threads if there are no pending events.
17167 * linux-low.h (struct process_info): Add resume request
17170 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17172 * regcache.c (new_register_cache): Clear the allocated register
17173 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17175 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17177 * linux-low.c (linux_resume): Take a struct thread_resume *
17179 (linux_wait): Update call.
17180 (resume_ptr): New static variable.
17181 (linux_continue_one_thread): Renamed from
17182 linux_continue_one_process. Use resume_ptr.
17183 (linux_resume): Use linux_continue_one_thread.
17184 * server.c (handle_v_cont, handle_v_requests): New functions.
17185 (myresume): New function.
17186 (main): Handle 'v' case.
17187 * target.h (struct thread_resume): New type.
17188 (struct target_ops): Change argument of "resume" to struct
17190 (myresume): Delete macro.
17192 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17194 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17195 (uninstall): Support DESTDIR.
17197 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17199 * configure.srv: Add xscale*linux copy of arm*linux entry.
17201 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17203 * linux-arm-low.c (arm_reinsert_addr): New function.
17204 (the_low_target): Add arm_reinsert_addr.
17206 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17208 * mem-break.c: Remove whitespace at end of file.
17210 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17212 * configure.in: Check whether we need to prototype strerror.
17213 * server.h: Optionally prototype strerror.
17214 * gdbreplay.c (perror_with_name): Use strerror.
17215 * linux-low.c (linux_attach_lwp): Use strerror.
17216 * utils.c (perror_with_name): Use strerror.
17217 * config.in, configure: Regenerated.
17219 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17221 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17222 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17224 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17226 * Makefile.in (SFILES): Update.
17227 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17228 low-sun3.c: Remove files.
17230 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17232 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17233 (linux_detach_one_process, linux_detach): New functions.
17234 (linux_target_ops): Add linux_detach.
17235 * server.c (main): Handle 'D' packet.
17236 * target.h (struct target_ops): Add "detach" member.
17237 (detach_inferior): Define.
17239 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17241 From Kelley Cook <kelleycook@wideopenwest.com>:
17242 * configure.srv: Accept i[34567]86 variants.
17244 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17246 * linux-low.c (linux_wait_for_event): Correct comment typos.
17247 (linux_resume_one_process): Call check_removed_breakpoint.
17248 (linux_send_signal): New function.
17249 (linux_target_ops): Add linux_send_signal.
17250 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17252 * target.h (struct target_ops): Add send_signal.
17254 2003-05-29 Jim Blandy <jimb@redhat.com>
17256 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17257 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17258 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17259 away part of the register's value.
17261 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17263 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17264 (linux_wait_for_event, linux_init_signals): Likewise.
17266 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17268 * configure.in: Check for stdlib.h.
17269 * configure: Regenerated.
17270 * config.in: Regenerated.
17272 2003-01-04 Andreas Schwab <schwab@suse.de>
17274 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17276 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17278 * Makefile.in: Remove obsolete code.
17280 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17282 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17283 defined(PT_FPR0_HI).
17285 2002-11-17 Stuart Hughes <seh@zee2.com>
17287 * linux-arm-low.c (arm_num_regs): Increase.
17288 (arm_regmap): Include status register.
17290 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17292 * linux-low.c (register_addr): Remove incorrect -1 check.
17294 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17296 * linux-low.c (linux_create_inferior): Call setpgid. Return
17298 (unstopped_p, linux_signal_pid): Remove.
17299 (linux_target_ops): Remove linux_signal_pid.
17300 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17301 global instead of target method.
17302 * target.h (struct target_ops): Remove signal_pid. Update comment
17303 for create_inferior.
17304 * server.c (signal_pid): New variable.
17305 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17306 gdbserver. Set the child to be the foreground process group.
17307 (attach_inferior): Set signal_pid.
17309 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17311 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17313 2002-08-20 Jim Blandy <jimb@redhat.com>
17315 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17318 2002-08-01 Andrew Cagney <cagney@redhat.com>
17320 * Makefile.in: Make chill references obsolete.
17322 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17324 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17325 * configure: Regenerate.
17326 * config.in: Regenerate.
17328 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17330 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17331 (perror_with_name, remote_close, remote_open, expect, play): Static.
17333 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17335 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17336 byte offsets instead of an array of indexes.
17337 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17339 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17341 * regcache.c: Add comment.
17343 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17345 * thread-db.c: New file.
17346 * proc-service.c: New file.
17347 * acinclude.m4: New file.
17348 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17349 proc-service.o, and thread-db.o.
17350 (linux-low.o): Add USE_THREAD_DB.
17351 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17352 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17353 * aclocal.m4: Regenerated.
17354 * config.in: Regenerated.
17355 * configure: Regenerated.
17356 * configure.in: Check for proc_service.h, sys/procfs.h,
17357 thread_db.h, and linux/elf.h headrs.
17358 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17359 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17360 Check for -lthread_db and thread support.
17361 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17362 PowerPC, and SuperH.
17363 * i387-fp.c: Constify arguments.
17364 * i387-fp.h: Likewise.
17365 * inferiors.c: (struct thread_info): Renamed from
17366 `struct inferior_info'. Remove PID member. Use generic inferior
17367 list header. All uses updated.
17368 (inferiors, signal_pid): Removed.
17369 (all_threads): New variable.
17370 (get_thread): Define.
17371 (add_inferior_to_list): New function.
17372 (for_each_inferior): New function.
17373 (change_inferior_id): New function.
17374 (add_inferior): Removed.
17375 (remove_inferior): New function.
17376 (add_thread): New function.
17377 (free_one_thread): New function.
17378 (remove_thread): New function.
17379 (clear_inferiors): Use for_each_inferior and free_one_thread.
17380 (find_inferior): New function.
17381 (find_inferior_id): New function.
17382 (inferior_target_data): Update argument type.
17383 (set_inferior_target_data): Likewise.
17384 (inferior_regcache_data): Likewise.
17385 (set_inferior_regcache_data): Likewise.
17386 * linux-low.c (linux_bp_reinsert): Remove.
17387 (all_processes, stopping_threads, using_thrads)
17388 (struct pending_signals, debug_threads, pid_of): New.
17389 (inferior_pid): Replace with macro.
17390 (struct inferior_linux_data): Remove.
17391 (get_stop_pc, add_process): New functions.
17392 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17393 Use add_process and add_thread.
17394 (linux_attach_lwp): New function, based on old linux_attach. Use
17395 add_process and add_thread. Set stop_expected for new threads.
17396 (linux_attach): New function.
17397 (linux_kill_one_process): New function.
17398 (linux_kill): Kill all LWPs.
17399 (linux_thread_alive): Use find_inferior_id.
17400 (check_removed_breakpoints, status_pending_p): New functions.
17401 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17402 Update. Use WNOHANG. Wait for cloned processes also. Update process
17403 struct for the found process.
17404 (linux_wait_for_event): New function.
17405 (linux_wait): Use it. Support LWPs.
17406 (send_sigstop, wait_for_sigstop, stop_all_processes)
17407 (linux_resume_one_process, linux_continue_one_process): New functions.
17408 (linux_resume): Support LWPs.
17409 (REGISTER_RAW_SIZE): Remove.
17410 (fetch_register): Use register_size instead. Call supply_register.
17411 (usr_store_inferior_registers): Likewise. Call collect_register.
17412 Fix recursive case.
17413 (regsets_fetch_inferior_registers): Improve error message.
17414 (regsets_store_inferior_registers): Add debugging.
17415 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17416 (unstopped_p, linux_signal_pid): New functions.
17417 (linux_target_ops): Add linux_signal_pid.
17418 (linux_init_signals): New function.
17419 (initialize_low): Call it. Initialize using_threads.
17420 * regcache.c (inferior_regcache_data): Add valid
17422 (get_regcache): Fetch registers lazily. Add fetch argument
17423 and update all callers.
17424 (regcache_invalidate_one, regcache_invalidate): New
17426 (new_register_cache): Renamed from create_register_cache.
17427 Return the new regcache.
17428 (free_register_cache): Change argument to a void *.
17429 (registers_to_string, registers_from_string): Call get_regcache
17430 with fetch flag set.
17431 (register_data): Make static. Pass fetch flag to get_regcache.
17432 (supply_register): Call get_regcache with fetch flag clear.
17433 (collect_register): Call get_regcache with fetch flag set.
17434 (collect_register_as_string): New function.
17435 * regcache.h: Update.
17436 * remote-utils.c (putpkt): Flush after debug output and use
17438 Handle input interrupts while waiting for an ACK.
17439 (input_interrupt): Use signal_pid method.
17440 (getpkt): Flush after debug output and use stderr.
17441 (outreg): Use collect_register_as_string.
17442 (new_thread_notify, dead_thread_notify): New functions.
17443 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17444 and general_thread.
17445 (look_up_one_symbol): Flush after debug output.
17446 * server.c (step_thread, server_waiting): New variables.
17447 (start_inferior): Don't use signal_pid. Update call to mywait.
17448 (attach_inferior): Update call to mywait.
17449 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17450 (main): Don't fetch/store registers explicitly. Use
17451 set_desired_inferior. Support proposed ``Hs'' packet. Update
17453 * server.h: Update.
17454 (struct inferior_list, struct_inferior_list_entry): New.
17455 * target.c (set_desired_inferior): New.
17456 (write_inferior_memory): Constify.
17457 (mywait): New function.
17458 * target.h: Update.
17459 (struct target_ops): New signal_pid method.
17460 (mywait): Removed macro, added prototype.
17462 * linux-low.h (regset_func): Removed.
17463 (regset_fill_func, regset_store_func): New.
17464 (enum regset_type): New.
17465 (struct regset_info): Add type field. Use new operation types.
17466 (struct linux_target_ops): stop_pc renamed to get_pc.
17467 Add decr_pc_after_break and breakpoint_at.
17468 (get_process, get_thread_proess, get_process_thread)
17469 (strut process_info, all_processes, linux_attach_lwp)
17470 (thread_db_init): New.
17472 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17473 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17474 (the_low_target): Add new members.
17475 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17476 (i386_store_fpxregset): Constify.
17477 (target_regsets): Add new kind identifier.
17478 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17479 (i386_set_pc): Add debugging.
17480 (i386_breakpoint_at): New function.
17481 (the_low_target): Add new members.
17482 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17483 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17484 (mips_breakpoint_at): New.
17485 (the_low_target): Add new members.
17486 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17487 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17488 (the_low_target): Add new members.
17489 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17490 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17491 (the_low_target): Add new members.
17492 * linux-x86-64-low.c (target_regsets): Add new kind
17495 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17497 From Martin Pool <mbp@samba.org>:
17498 * server.c (gdbserver_usage): New function.
17501 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17503 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17504 stop_at -> stop_pc.
17506 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17508 * Makefile.in: Remove obsolete code.
17510 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17512 * linux-low.c (regsets_fetch_inferior_registers),
17513 (regsets_store_inferior_registers): Removed cast to int from
17515 * regcache.h: Added declaration of struct inferior_info.
17517 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17519 * inferiors.c (struct inferior_info): Add regcache_data.
17520 (add_inferior): Call create_register_cache.
17521 (clear_inferiors): Call free_register_cache.
17522 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17523 * regcache.c (struct inferior_regcache_data): New.
17524 (registers): Remove.
17525 (get_regcache): New function.
17526 (create_register_cache, free_register_cache): New functions.
17527 (set_register_cache): Don't initialize the register cache here.
17528 (registers_to_string, registers_from_string, register_data): Call
17530 * regcache.h: Add prototypes.
17531 * server.h: Likewise.
17533 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17535 * mem-break.c: New file.
17536 * mem-break.h: New file.
17537 * Makefile.in: Add mem-break.o rule; update server.h
17539 * inferiors.c (struct inferior_info): Add target_data
17541 (clear_inferiors): Free target_data member if set.
17542 (inferior_target_data, set_inferior_target_data): New functions.
17543 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17544 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17545 * linux-low.c (linux_bp_reinsert): New variable.
17546 (struct inferior_linux_data): New.
17547 (linux_create_inferior): Use set_inferior_target_data.
17548 (linux_attach): Likewise. Call add_inferior.
17549 (linux_wait_for_one_inferior): New function.
17550 (linux_wait): Call it.
17551 (linux_write_memory): Add const.
17552 (initialize_low): Call set_breakpoint_data.
17553 * linux-low.h (struct linux_target_ops): Add breakpoint
17555 * server.c (attach_inferior): Remove extra add_inferior
17557 * server.h: Include mem-break.h. Update inferior.c
17559 * target.c (read_inferior_memory)
17560 (write_inferior_memory): New functions.
17561 * target.h (read_inferior_memory)
17562 (write_inferior_memory): Change macros to prototypes.
17563 (struct target_ops): Update comments. Add const to write_memory
17566 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17568 * linux-low.c (usr_store_inferior_registers): Support
17569 registers which are allowed to fail to store.
17570 * linux-low.h (linux_target_ops): Likewise.
17571 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17572 (ppc_cannot_store_register): FPSCR may not be storable.
17574 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17576 * server.h: Include <string.h> if HAVE_STRING_H.
17577 * ChangeLog: Correct paths in last ChangeLog entry.
17579 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17581 * linux-low.h: Remove obsolete prototypes.
17582 (struct linux_target_ops): New.
17583 (extern the_low_target): New.
17584 * linux-low.c (num_regs, regmap): Remove declarations.
17585 (register_addr): Use the_low_target explicitly.
17586 (fetch_register): Likewise.
17587 (usr_fetch_inferior_registers): Likewise.
17588 (usr_store_inferior_registers): Likewise.
17589 * linux-arm-low.c (num_regs): Remove.
17590 (arm_num_regs): Define.
17591 (arm_regmap): Renamed from regmap, made static.
17592 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17594 (arm_cannot_store_register): Renamed from cannot_store_register,
17596 (the_low_target): New.
17597 * linux-i386-low.c (num_regs): Remove.
17598 (i386_num_regs): Define.
17599 (i386_regmap): Renamed from regmap, made static.
17600 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17602 (i386_cannot_store_register): Renamed from cannot_store_register,
17604 (the_low_target): New.
17605 * linux-ia64-low.c (num_regs): Remove.
17606 (ia64_num_regs): Define.
17607 (ia64_regmap): Renamed from regmap, made static.
17608 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17610 (ia64_cannot_store_register): Renamed from cannot_store_register,
17612 (the_low_target): New.
17613 * linux-m68k-low.c (num_regs): Remove.
17614 (m68k_num_regs): Define.
17615 (m68k_regmap): Renamed from regmap, made static.
17616 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17618 (m68k_cannot_store_register): Renamed from cannot_store_register,
17620 (the_low_target): New.
17621 * linux-mips-low.c (num_regs): Remove.
17622 (mips_num_regs): Define.
17623 (mips_regmap): Renamed from regmap, made static.
17624 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17626 (mips_cannot_store_register): Renamed from cannot_store_register,
17628 (the_low_target): New.
17629 * linux-ppc-low.c (num_regs): Remove.
17630 (ppc_num_regs): Define.
17631 (ppc_regmap): Renamed from regmap, made static.
17632 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17634 (ppc_cannot_store_register): Renamed from cannot_store_register,
17636 (the_low_target): New.
17637 * linux-s390-low.c (num_regs): Remove.
17638 (s390_num_regs): Define.
17639 (s390_regmap): Renamed from regmap, made static.
17640 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17642 (s390_cannot_store_register): Renamed from cannot_store_register,
17644 (the_low_target): New.
17645 * linux-sh-low.c (num_regs): Remove.
17646 (sh_num_regs): Define.
17647 (sh_regmap): Renamed from regmap, made static.
17648 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17650 (sh_cannot_store_register): Renamed from cannot_store_register,
17652 (the_low_target): New.
17653 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17654 (the_low_target): New.
17656 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17658 * Makefile.in: Add stamp-h target.
17659 * configure.in: Create stamp-h.
17660 * configure: Regenerated.
17662 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17664 * inferiors.c: New file.
17665 * target.c: New file.
17666 * target.h: New file.
17667 * Makefile.in: Add target.o and inferiors.o. Update
17669 * linux-low.c (inferior_pid): New static variable,
17670 moved from server.c.
17671 (linux_create_inferior): Renamed from create_inferior.
17672 Call add_inferior. Return 0 on success instead of a PID.
17673 (linux_attach): Renamed from myattach.
17674 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17675 (linux_thread_alive): Renamed from mythread_alive.
17676 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17678 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17679 (regsets_store_inferior_registers): Correct error message.
17680 Add missing ``return 0''.
17681 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17682 (linux_store_registers): Renamed from store_inferior_registers.
17683 (linux_read_memory): Renamed from read_inferior_memory.
17684 (linux_write_memory): Renamed from write_inferior_memory.
17685 (linux_target_ops): New structure.
17686 (initialize_low): Call set_target_ops ().
17687 * remote-utils.c (unhexify): New function.
17688 (hexify): New function.
17689 (input_interrupt): Send signals to ``signal_pid''.
17690 * server.c (inferior_pid): Remove.
17691 (start_inferior): Update create_inferior call.
17692 (attach_inferior): Call add_inferior.
17693 (handle_query): New function.
17694 (main): Call handle_query for `q' packets.
17695 * server.h: Include "target.h". Remove obsolete prototypes.
17696 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17698 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17700 * Makefile.in: Add WARN_CFLAGS. Update configury
17702 * configure.in: Check for <string.h>
17703 * configure: Regenerate.
17704 * config.in: Regenerate.
17705 * gdbreplay.c: Include needed system headers.
17706 (remote_open): Remove strchr prototype.
17707 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17708 * regcache.c (supply_register): Change buf argument to const void *.
17709 (supply_register_by_name): Likewise.
17710 (collect_register): Change buf argument to void *.
17711 (collect_register_by_name): Likewise.
17712 * regcache.h: Add missing prototypes.
17713 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17714 * server.c (handle_query): New function.
17715 (attached): New static variable, moved out of main.
17716 (main): Quiet longjmp clobber warnings.
17717 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17718 * utils.c (error): Remove NORETURN.