1 2019-10-25 Tom Tromey <tromey@adacore.com>
3 * utils.c (xstrdup): Remove.
5 2019-10-23 Tom Tromey <tom@tromey.com>
7 * configure, config.in: Rebuild.
9 2019-10-23 Tom Tromey <tom@tromey.com>
12 * acinclude.m4: Use m4_include, not sinclude.
14 2019-10-17 Tom Tromey <tromey@adacore.com>
17 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
18 in AC_CONFIG_FILES invocation.
19 * Makefile.in (stamp-h, Makefile): Use new-style config.status
22 2019-10-16 Christian Biesinger <cbiesinger@google.com>
24 * server.c: Include xml-builtin.h.
25 (get_xml_features): Don't declare xml_builtins here.
27 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
29 * Makefile.in: Remove references to vec-ipa.o.
31 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
33 * Makefile.in: Remove references to vec.c.
35 2019-10-02 Christian Biesinger <cbiesinger@google.com>
37 * server.c (server_waiting): Change to bool.
38 (extended_protocol): Likewise.
39 (response_needed): Likewise.
40 (exit_requested): Likewise.
42 (report_no_resumed): Likewise.
44 (disable_packet_vCont): Likewise.
45 (disable_packet_Tthread): Likewise.
46 (disable_packet_qC): Likewise.
47 (disable_packet_qfThreadInfo): Likewise.
48 (handle_general_set): Update.
49 (handle_detach): Update.
50 (handle_monitor_command): Update.
51 (handle_query): Update.
52 (captured_main): Update.
53 (process_serial_event): Update.
54 * server.h (server_waiting): Change to bool.
55 (disable_packet_vCont): Likewise.
56 (disable_packet_Tthread): Likewise.
57 (disable_packet_qC): Likewise.
58 (disable_packet_qfThreadInfo): Likewise.
61 * target.c (target_stop_and_wait): Update.
63 2019-10-02 Tom Tromey <tromey@adacore.com>
65 * Makefile.in (SFILES): Add common-inferior.c.
66 (OBS): Add common-inferior.o.
67 * server.c (startup_with_shell): Don't define.
69 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
71 * linux-low.c (linux_low_read_btrace): Update for change to
74 2019-09-20 Christian Biesinger <cbiesinger@google.com>
76 * debug.c (debug_threads): Remove comment in favor of the header.
77 * debug.h (using_threads): Add declaration.
78 (debug_threads): Add comment.
79 * linux-aarch64-low.c: Include debug.h and remove declaration of
81 * nto-low.c: Likewise.
82 * remote-utils.c: Likewise.
83 * thread-db.c: Likewise.
85 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
87 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
88 and powerpc-cell64l-ipa.o.
89 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
90 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
91 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
94 * spu-low.c: Remove file.
96 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
97 (parse_spufs_run): Remove.
98 (ppc_get_pc): Remove Cell/B.E. support.
99 (ppc_set_pc): Likewise.
100 (ppc_breakpoint_at): Likewise.
101 (ppc_arch_setup): Likewise.
102 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
103 tdesc_powerpc_cell32l.
104 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
105 or init_registers_powerpc_cell32l.
106 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
107 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
108 or init_registers_powerpc_cell32l.
109 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
110 (init_registers_powerpc_cell32l): Remove prototype.
111 (init_registers_powerpc_cell64l): Likewise.
113 * target.h (struct target_ops): Remove qxfer_spu member.
114 * server.c (handle_qxfer_spu): Remove.
115 (qxfer_packets): Remove entry for "spu".
116 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
117 * linux-low.c (SPUFS_MAGIC): Remove.
118 (spu_enumerate_spu_ids): Remove.
119 (linux_qxfer_spu): Remove.
120 (linux_target_ops): Remove qxfer_spu member.
121 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
122 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
123 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
125 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
127 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
128 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
129 * config.in: Regenerate.
130 * configure: Regenerate.
132 2019-08-15 Tom Tromey <tromey@adacore.com>
134 * target.c (target_write_memory): Use gdb::byte_vector.
136 2019-08-15 Tom Tromey <tromey@adacore.com>
138 * tracepoint.c (write_inferior_data_pointer)
139 (write_inferior_integer, write_inferior_int8)
140 (write_inferior_uinteger, m_tracepoint_action_download)
141 (r_tracepoint_action_download, x_tracepoint_action_download)
142 (l_tracepoint_action_download, clear_inferior_trace_buffer)
143 (download_agent_expr, download_tracepoint_1)
144 (download_trace_state_variables, upload_fast_traceframes): Update.
145 * server.c (gdb_write_memory): Update.
146 * remote-utils.c (relocate_instruction): Update.
147 * proc-service.c (ps_pdwrite): Update.
148 * mem-break.c (remove_memory_breakpoint)
149 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
150 (uninsert_fast_tracepoint_jumps_at)
151 (reinsert_fast_tracepoint_jumps_at): Update.
152 * linux-x86-low.c (append_insns)
153 (i386_install_fast_tracepoint_jump_pad)
154 (amd64_write_goto_address, i386_write_goto_address): Update.
155 * linux-s390-low.c (append_insns, s390_write_goto_address):
157 * linux-ppc-low.c (ppc_relocate_instruction)
158 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
159 (ppc_write_goto_address): Update.
160 * linux-aarch64-low.c (append_insns): Update.
161 * target.h (struct target_ops): Update.
162 (write_inferior_memory): Don't declare.
163 * target.c (target_write_memory): Rename from
164 write_inferior_memory. Remove old target_write_memory.
166 2019-08-15 Tom Tromey <tromey@adacore.com>
168 * target.c (write_inferior_memory): Use std::vector.
170 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
173 * configure.ac: Drop enable-libmcheck support.
174 * configure, config.in: Rebuild.
175 * acinclude.m4: Don't include it.
177 2019-07-19 Alan Hayward <alan.hayward@arm.com>
179 * configure.srv: Remove Arm xml files.
181 2019-07-19 Alan Hayward <alan.hayward@arm.com>
183 * configure.srv: Add new files. Remove xml generated files.
184 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
186 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
187 * linux-aarch32-tdesc.c: New file.
188 * linux-aarch32-tdesc.h: New file.
189 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
190 * linux-arm-low.c (init_registers_arm, tdesc_arm)
191 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
192 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
193 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
194 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
195 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
196 (arm_read_description): Call arm_linux_read_description.
197 (initialize_low_arch): Don't init registers.
198 * linux-arm-tdesc.c: New file.
199 * linux-arm-tdesc.h: New file.
201 2019-07-10 Alan Hayward <alan.hayward@arm.com>
203 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
204 Move counter inside for.
205 (arm_read_description): Check ptrace earlier.
206 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
208 2019-07-09 Tom Tromey <tom@tromey.com>
210 * configure: Rebuild.
211 * configure.ac: Change common to gdbsupport.
212 * acinclude.m4: Change common to gdbsupport.
213 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
214 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
215 common to gdbsupport.
216 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
217 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
218 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
219 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
220 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
221 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
222 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
223 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
224 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
225 common to gdbsupport.
227 2019-07-04 Alan Hayward <alan.hayward@arm.com>
229 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
231 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
233 2019-07-04 Alan Hayward <alan.hayward@arm.com>
235 * configure.srv: Remove legacy xml.
236 * linux-aarch64-low.c (initialize_low_arch): Remove
237 initialize_low_tdesc call.
238 * linux-aarch64-tdesc-selftest.c: Remove file.
239 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
240 * linux-x86-low.c (initialize_low_arch): Remove
241 initialize_low_tdesc call.
242 * linux-x86-tdesc-selftest.c: Remove file.
243 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
245 2019-06-20 Tom de Vries <tdevries@suse.de>
247 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
248 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
250 2019-06-19 Tom de Vries <tdevries@suse.de>
252 * debug.h (debug_write): Change return type to ssize_t.
253 * debug.c (debug_write): Same.
255 2019-06-14 Tom Tromey <tom@tromey.com>
257 * configure.ac: Use new path to gnulib.
258 * configure: Rebuild.
259 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
262 2019-06-11 Tom Tromey <tom@tromey.com>
264 * Makefile.in (SFILES): Add alloc.c.
266 (IPA_OBJS): Add alloc-ipa.o.
267 (alloc-ipa.o): New target.
268 (%.o: ../%.c): New pattern rule.
270 2019-06-10 Tom Tromey <tromey@adacore.com>
272 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
273 end warning with a newline.
274 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
276 * thread-db.c (attach_thread): Don't end warning with a newline.
277 (thread_db_notice_clone): Likewise.
278 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
280 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
281 end warning with a newline.
283 2019-06-04 Pedro Alves <palves@redhat.com>
285 * server.c (captured_main): Use make_unique_xstrdup.
287 2019-06-02 Tom Tromey <tom@tromey.com>
289 * gdbreplay.c (fromhex): Remove.
290 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
292 2019-05-29 Tom Tromey <tromey@adacore.com>
294 * configure: Rebuild.
296 2019-05-06 Kevin Buettner <kevinb@redhat.com>
298 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
299 sign extension code on 32-bit builds.
301 2019-05-03 Eli Zaretskii <eliz@gnu.org>
304 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
306 2019-04-19 Tom Tromey <tom@tromey.com>
308 * server.c (struct vstop_notif): Derive from notif_event.
310 (queue_stop_reply): Update.
311 (remove_all_on_match_ptid): Change type. Rewrite.
312 (discard_queued_stop_replies): Rewrite.
313 (in_queued_stop_replies_ptid): Change type.
314 (in_queued_stop_replies): Rewrite.
315 (notif_stop): Update.
316 (queue_stop_reply_callback): Update.
317 (captured_main): Don't call initialize_notif.
318 (push_stop_notification): Update.
319 * notif.c (notif_write_event, handle_notif_ack)
320 (notif_event_enque, notif_push): Update.
321 (notif_event_xfree, initialize_notif): Remove.
322 * notif.h (struct notif_event): Include <list>, not
324 (struct notif_server) <queue>: Now a std::list.
325 (notif_event_p): Remove typedef.
326 (initialize_notif): Don't declare.
327 (struct notif_event): Add virtual destructor.
329 2019-04-17 Alan Hayward <alan.hayward@arm.com>
331 * ax.c (ax_vdebug): Call debug_printf.
332 * debug.c (debug_write): New function.
333 * debug.h (debug_write): New declaration.
334 * linux-low.c (sigchld_handler): Call debug_write.
336 2019-04-17 Alan Hayward <alan.hayward@arm.com>
338 * debug.c (debug_set_output): New function.
339 (debug_vprintf): Send output to debug_file.
340 (debug_flush): Likewise.
341 * debug.h (debug_set_output): New declaration.
342 * server.c (handle_monitor_command): Add debug-file option.
343 (captured_main): Likewise.
345 2019-04-17 Alan Hayward <alan.hayward@arm.com>
347 * debug.c (remote_debug): Add definition.
348 * debug.h (remote_debug): Add declaration.
349 * hostio.c (remote_debug): Remove declaration.
350 * remote-utils.c (struct ui_file): Likewise.
351 (remote_debug): Likewise.
352 * remote-utils.h (remote_debug): Likewise,
353 * server.c (remote_debug): Remove definition.
355 2019-04-10 Kevin Buettner <kevinb@redhat.com>
357 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
358 when using a 64-bit gdbserver.
360 2019-04-09 Tom Tromey <tromey@adacore.com>
362 * linux-low.c (select_event_lwp): Use find_thread_in_random.
364 2019-04-08 Tom Tromey <tom@tromey.com>
366 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
368 (linux_resume_one_lwp): Likewise.
370 2019-04-08 Tom Tromey <tom@tromey.com>
372 * gdbreplay.c: Update.
373 * linux-low.c: Update.
376 2019-04-08 Tom Tromey <tom@tromey.com>
378 * server.c: Use C++ exception handling.
379 * linux-low.c: Use C++ exception handling.
380 * gdbreplay.c: Use C++ exception handling.
382 2019-04-08 Tom Tromey <tom@tromey.com>
384 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
385 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
386 (captured_main, main): Update.
387 * gdbreplay.c (main): Update.
389 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
391 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
392 value in argument pointer, return 1 if the entry is found and 0
393 otherwise. Move comment.
394 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
395 * linux-low.h (linux_get_auxv): Declare.
396 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
398 2019-04-05 Tom Tromey <tromey@adacore.com>
400 * server.c (gdbserver_usage): Use upper-case for metasyntactic
403 2019-03-28 Alan Hayward <alan.hayward@arm.com>
405 * linux-low.c (AT_HWCAP2): Add define if not already included.
407 2019-03-26 Alan Hayward <alan.hayward@arm.com>
409 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
410 (aarch64_arch_setup): Call linux_get_hwcap.
411 * linux-arm-low.c (arm_get_hwcap): Remove function.
412 (arm_read_description): Call linux_get_hwcap.
413 * linux-low.c (linux_get_auxv): New function.
414 (linux_get_hwcap): Likewise.
415 (linux_get_hwcap2): Likewise.
416 * linux-low.h (linux_get_hwcap): New declaration.
417 (linux_get_hwcap2): Likewise.
418 * linux-ppc-low.c (ppc_get_auxv): Remove function.
419 (ppc_arch_setup): Call linux_get_hwcap.
420 * linux-s390-low.c (s390_get_hwcap): Remove function.
421 (s390_arch_setup): Call linux_get_hwcap.
423 2019-03-22 Alan Hayward <alan.hayward@arm.com>
424 Jiong Wang <jiong.wang@arm.com>
426 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
427 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
429 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
431 2019-03-22 Alan Hayward <alan.hayward@arm.com>
432 Jiong Wang <jiong.wang@arm.com>
434 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
435 (aarch64_get_hwcap): New function.
436 (aarch64_arch_setup): Read APIA hwcap.
438 2019-03-22 Alan Hayward <alan.hayward@arm.com>
439 Jiong Wang <jiong.wang@arm.com>
441 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
442 (initialize_low_tracepoint): Likewise.
443 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
444 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
445 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
446 (aarch64_linux_read_description): Likewise.
447 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
449 2019-03-12 John Baldwin <jhb@FreeBSD.org>
451 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
452 i386_create_target_description for 'segments' parameter.
453 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
454 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
455 * win32-i386-low.c (i386_arch_setup): Likewise.
457 2019-03-12 Tom Tromey <tromey@adacore.com>
459 * linux-low.c (iterate_over_lwps): Update.
461 2019-03-06 Tom Tromey <tom@tromey.com>
463 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
464 (captured_main): Use SCOPE_EXIT.
466 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
468 * configure.srv: Use '$enable_unittest' instead of '$development'
469 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
472 2019-02-27 Tom Tromey <tromey@adacore.com>
474 * gdbreplay.c (logchar): Handle \r\n.
476 2019-02-07 Alan Hayward <alan.hayward@arm.com>
478 * linux-low.c (linux_attach): Add process before lwp.
479 * server.c (attach_inferior): Check if already attached.
481 2019-02-07 Tom Tromey <tom@tromey.com>
483 * x86-tdesc.h: Rename include guard.
484 * x86-low.h: Add include guard.
485 * wincecompat.h: Rename include guard.
486 * win32-low.h: Add include guard.
487 * utils.h: Rename include guard.
488 * tracepoint.h: Rename include guard.
489 * tdesc.h: Rename include guard.
490 * target.h: Rename include guard.
491 * server.h: Rename include guard.
492 * remote-utils.h: Rename include guard.
493 * regcache.h: Rename include guard.
494 * nto-low.h: Rename include guard.
495 * notif.h: Add include guard.
496 * mem-break.h: Rename include guard.
497 * lynx-low.h: Add include guard.
498 * linux-x86-tdesc.h: Add include guard.
499 * linux-s390-tdesc.h: Add include guard.
500 * linux-ppc-tdesc-init.h: Add include guard.
501 * linux-low.h: Add include guard.
502 * linux-aarch64-tdesc.h: Add include guard.
503 * linux-aarch32-low.h: Add include guard.
504 * inferiors.h: Rename include guard.
505 * i387-fp.h: Rename include guard.
506 * hostio.h: Rename include guard.
507 * gdbthread.h: Rename include guard.
508 * gdb_proc_service.h: Rename include guard.
509 * event-loop.h: Rename include guard.
510 * dll.h: Rename include guard.
511 * debug.h: Rename include guard.
512 * ax.h: Rename include guard.
514 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
517 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
518 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
520 2019-01-25 Tom Tromey <tom@tromey.com>
522 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
524 2019-01-25 Tom Tromey <tom@tromey.com>
526 * win32-low.c: Fix common/ includes.
527 * win32-i386-low.c: Fix common/ includes.
528 * tracepoint.c: Fix common/ includes.
529 * thread-db.c: Fix common/ includes.
530 * target.h: Fix common/ includes.
531 * symbol.c: Fix common/ includes.
532 * spu-low.c: Fix common/ includes.
533 * server.h: Fix common/ includes.
534 * server.c: Fix common/ includes.
535 * remote-utils.c: Fix common/ includes.
536 * regcache.h: Fix common/ includes.
537 * regcache.c: Fix common/ includes.
538 * nto-x86-low.c: Fix common/ includes.
539 * notif.h: Fix common/ includes.
540 * mem-break.h: Fix common/ includes.
541 * lynx-low.c: Fix common/ includes.
542 * lynx-i386-low.c: Fix common/ includes.
543 * linux-x86-tdesc-selftest.c: Fix common/ includes.
544 * linux-x86-low.c: Fix common/ includes.
545 * linux-low.c: Fix common/ includes.
546 * inferiors.h: Fix common/ includes.
547 * i387-fp.c: Fix common/ includes.
548 * hostio.c: Fix common/ includes.
549 * hostio-errno.c: Fix common/ includes.
550 * gdbthread.h: Fix common/ includes.
551 * gdbreplay.c: Fix common/ includes.
552 * fork-child.c: Fix common/ includes.
553 * event-loop.c: Fix common/ includes.
555 (enum gdb_agent_op): Fix common/ includes.
557 2019-01-21 Tom Tromey <tom@tromey.com>
559 * tracepoint.c: Fix includes.
560 * remote-utils.c: Fix includes.
561 * linux-x86-low.c: Fix includes.
563 2019-01-01 Joel Brobecker <brobecker@adacore.com>
565 * gdbreplay.c (gdbreplay_version): Update copyright year in
567 * server.c (gdbserver_version): Likewise.
569 2018-12-05 Alan Hayward <alan.hayward@arm.com>
571 * linux-low.c (add_lwp): Switch ordering.
573 2018-11-29 Tom Tromey <tom@tromey.com>
575 * win32-low.c (win32_join): Take pid, not process.
576 * target.h (struct target_ops) <join>: Change argument type.
577 (join_inferior): Change argument name.
578 * spu-low.c (spu_join): Take pid, not process.
579 * server.c (handle_detach): Preserve pid before destroying
581 * lynx-low.c (lynx_join): Take pid, not process.
582 * linux-low.c (linux_join): Take pid, not process.
584 2018-11-23 Alan Hayward <alan.hayward@arm.com>
586 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
587 (aarch64_cannot_fetch_register): Likewise.
588 (struct linux_target_ops): Update references.
590 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
592 * linux-ppc-low.c: Include nat/linux-ptrace.h.
594 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
596 * configure.srv (ipa_ppc_linux_regobj): Add
597 powerpc-isa207-htm-vsx32l-ipa.o and
598 powerpc-isa207-htm-vsx64l-ipa.o.
599 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
600 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
601 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
602 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
603 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
604 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
605 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
606 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
607 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
608 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
609 (init_registers_powerpc_isa207_htm_vsx32l)
610 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
611 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
612 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
613 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
614 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
615 (ppc_store_tm_ctarregset): New functions.
616 (ppc_regsets): Add entries for HTM regsets.
617 (ppc_arch_setup): Set htm in features struct when needed. Set
618 sizes for the HTM regsets.
619 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
620 (initialize_low_arch): Call
621 init_registers_powerpc_isa207_htm_vsx32l and
622 init_registers_powerpc_isa207_htm_vsx64l.
623 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
624 PPC_TDESC_ISA207_HTM_VSX.
625 (initialize_low_tracepoint): Call
626 init_registers_powerpc_isa207_htm_vsx32l and
627 init_registers_powerpc_isa207_htm_vsx64l.
629 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
631 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
632 rs6000/power-linux-pmu.xml to srv_xmlfiles.
633 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
634 (ppc_store_pmuregset): New functions.
635 (ppc_regsets): Add entries for ebb and pmu regsets.
636 (ppc_arch_setup): Set isa207 in features struct if the ebb and
637 pmu regsets are available. Set sizes for these regsets.
639 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
641 * configure.srv (ipa_ppc_linux_regobj): Add
642 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
643 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
644 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
645 rs6000/powerpc-isa207-vsx32l.xml, and
646 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
647 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
648 <PPC_TDESC_ISA207_VSX>: New enum value.
649 (init_registers_powerpc_isa207_vsx32l): Declare.
650 (init_registers_powerpc_isa207_vsx64l): Declare.
651 * linux-ppc-low.c (ppc_fill_tarregset): New function.
652 (ppc_store_tarregset): New function.
653 (ppc_regsets): Add entry for the TAR regset.
654 (ppc_arch_setup): Set isa207 in features struct when needed. Set
655 size for the TAR regsets.
656 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
657 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
658 and init_registers_powerpc_isa207_vsx64l.
659 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
660 (initialize_low_tracepoint): Call
661 init_registers_powerpc_isa207_vsx32l and
662 init_registers_powerpc_isa207_vsx64l.
664 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
665 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
667 * configure.srv (ipa_ppc_linux_regobj): Add
668 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
669 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
670 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
671 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
672 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
673 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
674 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
675 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
676 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
677 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
678 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
679 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
680 (ppc_hwcap): Add comment.
681 (ppc_hwcap2): New global.
682 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
683 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
684 (ppc_regsets): Add entries for the DSCR and PPR regsets.
685 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
686 when needed. Set sizes for the the DSCR and PPR regsets.
687 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
688 (initialize_low_arch): Call
689 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
690 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
691 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
692 PPC_TDESC_ISA205_PPR_DSCR_VSX.
693 (initialize_low_tracepoint): Call
694 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
695 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
697 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
699 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
701 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
702 Simon Marchi <simark@simark.ca>
704 * acinclude.m4: Include "../selftest.m4".
705 * configure: Regenerate.
706 * configure.ac: Use "GDB_AC_SELFTEST".
707 * configure.srv: Use "$enable_unittests" instead of
708 "$development" when checking whether unit tests have been
710 * server.c (captured_main): Update message informing that
711 selftests have been disabled.
713 2018-10-04 Tom Tromey <tom@tromey.com>
715 * configure: Rebuild.
717 2018-10-04 Tom Tromey <tom@tromey.com>
719 * server.c (handle_status): Rename inner "thread".
720 (process_serial_event): Declare "res" in 'm' case.
721 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
722 (iterate_over_lwps): Rename inner "thread".
723 (linux_qxfer_libraries_svr4): Rename inner "len".
724 * gdbthread.h (find_thread_in_random): Rename inner "thread".
726 2018-10-01 Gary Benson <gbenson@redhat.com>
728 * gdb_proc_service.h: Moved common code to
729 common/gdb_proc_service.h.
731 2018-10-01 Gary Benson <gbenson@redhat.com>
733 * gdb_proc_service.h: Synchronize comments and whitespace with
734 GDB's version of this file.
736 2018-09-25 Tom Tromey <tom@tromey.com>
738 * configure: Rebuild.
739 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
741 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
743 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
744 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
745 ($(IPA_LIB)): Sort IPA_OBJS.
747 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
749 * Makefile.in: Remove references to $(ADD_DEPS).
751 2018-09-16 Tom Tromey <tom@tromey.com>
753 * remote-utils.c (remote_open): Use GNU style for metasyntactic
755 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
758 2018-09-05 Tom Tromey <tom@tromey.com>
760 * configure: Rebuild.
762 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
765 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
767 2018-08-27 Tom Tromey <tom@tromey.com>
770 * configure: Rebuild.
772 2018-08-27 Tom Tromey <tom@tromey.com>
774 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
775 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
776 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
777 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
778 (s390x_emit_stack_adjust): Add casts to unsigned char.
780 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
784 * server.h (struct client_state) <disable_randomization>:
787 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
789 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
791 (mips_supply_ptrace_register): Likewise.
793 2018-07-22 Tom Tromey <tom@tromey.com>
795 * configure: Rebuild.
797 2018-07-22 Tom Tromey <tom@tromey.com>
799 * win32-low.c (win32_create_inferior): Remove unused variables.
800 * gdbreplay.c (remote_open): Remove unused variable.
801 * remote-utils.c (remote_prepare): Remove unused variable.
802 * x86-tdesc.h (X86_TDESC_H): Define.
803 (amd64_expedite_regs): Define conditionally.
804 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
805 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
806 * remote-utils.c (readchar): Remove unused variable.
808 2018-07-13 Pedro Alves <palves@redhat.com>
810 * linux-low.c (linux_kill): Change parameter to process_info
811 pointer instead of pid. Adjust.
812 * lynx-low.c (lynx_kill): Likewise.
813 * nto-low.c (nto_kill): Likewise.
814 * spu-low.c (spu_kill): Likewise.
815 * win32-low.c (win32_kill): Likewise.
816 * server.c (handle_v_kill, kill_inferior_callback)
817 (detach_or_kill_for_exit): Adjust.
818 * target.c (kill_inferior): Change parameter to process_info
819 pointer instead of pid. Adjust.
820 * target.h (struct target_ops) <kill>: Change parameter to
821 process_info pointer instead of pid. Adjust all implementations
823 (kill_inferior): Likewise.
825 2018-07-13 Pedro Alves <palves@redhat.com>
827 * linux-low.c (linux_detach, linux_join): Change parameter to
828 process_info pointer instead of pid. Adjust.
829 * lynx-low.c (lynx_detach, lynx_join): Likewise.
830 * nto-low.c (nto_detach): Likewise.
831 * spu-low.c (spu_detach, spu_join): Likewise.
832 * win32-low.c (win32_detach, win32_join): Likewise.
833 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
834 * target.h (struct target_ops) <detach, join>: Change parameter to
835 process_info pointer instead of pid. Adjust all implementations
837 (detach_inferior, join_inferior): Rename 'pid' parameter to
840 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
841 Jan Kratochvil <jan.kratochvil@redhat.com>
842 Paul Fertser <fercerpav@gmail.com>
843 Tsutomu Seki <sekiriki@gmail.com>
845 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
846 (OBS): Add 'common/netstuff.o'.
847 (GDBREPLAY_OBS): Likewise.
848 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
849 (remote_open): Implement support for IPv6
851 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
853 (handle_accept_event): Accept connections from IPv6 sources.
854 (remote_prepare): Handle IPv6-style hostnames; implement
855 support for IPv6 connections.
856 (remote_open): Implement support for printing connections from
859 2018-07-11 Pedro Alves <palves@redhat.com>
862 * mem-break.c (any_persistent_commands): Add process_info
863 parameter and use it instead of relying on the current process.
864 Change return type to bool.
865 * mem-break.h (any_persistent_commands): Add process_info
866 parameter and change return type to bool.
867 * server.c (handle_detach): Remove require_running_or_return call.
868 Look up the process_info for the process we're about to detach.
869 If not found, return back error to GDB. Adjust
870 any_persistent_commands call to pass down a process pointer.
872 2018-07-11 Pedro Alves <palves@redhat.com>
874 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
875 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
876 instead of collect_register_by_name.
877 * regcache.c (regcache_raw_get_unsigned_by_name): New.
878 * regcache.h (regcache_raw_get_unsigned_by_name): New.
880 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
881 Pedro Alves <palves@redhat.com>
883 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
885 2018-07-03 Tom Tromey <tom@tromey.com>
887 * linux-low.c: Update.
888 * lynx-low.c: Update.
889 * mem-break.c: Update.
891 * remote-utils.c: Update.
895 * win32-low.c: Update.
897 2018-07-03 Tom Tromey <tom@tromey.com>
901 2018-07-03 Tom Tromey <tom@tromey.com>
903 * linux-low.c: Update.
905 2018-07-03 Tom Tromey <tom@tromey.com>
909 2018-07-03 Tom Tromey <tom@tromey.com>
911 * linux-low.c: Update.
912 * linux-mips-low.c: Update.
913 * lynx-low.c: Update.
915 * remote-utils.c: Update.
919 * thread-db.c: Update.
921 2018-07-03 Tom Tromey <tom@tromey.com>
923 * linux-low.c: Update.
924 * linux-mips-low.c: Update.
925 * lynx-low.c: Update.
926 * mem-break.c: Update.
928 * remote-utils.c: Update.
932 * tracepoint.c: Update.
934 2018-07-03 Tom Tromey <tom@tromey.com>
936 * linux-low.c: Update.
937 * linux-ppc-low.c: Update.
938 * linux-x86-low.c: Update.
939 * proc-service.c: Update.
942 * thread-db.c: Update.
943 * win32-low.c: Update.
945 2018-07-03 Tom Tromey <tom@tromey.com>
947 * linux-low.c: Update.
948 * lynx-low.c: Update.
950 * remote-utils.c: Update.
952 * thread-db.c: Update.
953 * win32-low.c: Update.
955 2018-06-29 Joel Brobecker <brobecker@adacore.com>
957 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
958 parameter in call to 'amd64_create_target_description'.
960 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
962 * x86-tdesc.h: Remove executable permission flag.
964 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
966 * configure.ac: Remove AC_PREREQ, add missing quoting.
967 * configure: Re-generate.
968 * config.in: Re-generate.
969 * aclocal.m4: Re-generate.
971 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
973 * tracepoint.h (current_traceframe): Remove declaration.
975 2018-06-18 Alan Hayward <alan.hayward@arm.com>
977 * linux-aarch64-low.c (is_sve_tdesc): New function.
978 (aarch64_sve_regs_copy_to_regcache): Likewise.
979 (aarch64_sve_regs_copy_from_regcache): Likewise.
980 (aarch64_regs_info): Add SVE checks.
981 (initialize_low_arch): Initialize SVE.
983 2018-06-18 Alan Hayward <alan.hayward@arm.com>
985 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
987 2018-06-11 Alan Hayward <alan.hayward@arm.com>
989 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
990 (initialize_low_tracepoint): Likewise
991 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
992 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
994 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
996 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
998 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1000 * server.h (PBUFSIZ): Increase size
1002 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1004 * regcache.c (regcache::raw_compare): New function.
1005 * regcache.h (regcache::raw_compare): New declaration.
1007 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1009 * regcache.c (new_register_cache): Use new.
1010 (free_register_cache): Use delete.
1011 (register_data): Use const.
1012 (supply_register): Move body inside regcache.
1013 (regcache::raw_supply): New override function.
1014 (collect_register): Move body inside regcache.
1015 (regcache::raw_collect): New override function.
1016 (regcache::get_register_status): New override function.
1017 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1019 2018-06-09 Tom Tromey <tom@tromey.com>
1021 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1023 (event_queue): Use std::queue.
1024 (gdb_event_xfree): Remove.
1025 (initialize_event_loop, process_event, wait_for_event): Update.
1027 2018-06-08 Stan Cox <scox@redhat.com>
1029 * win32-low.c (win32_create_inferior): last_ptid and last_status
1030 moved to client_state.
1032 2018-06-08 Pedro Alves <palves@redhat.com>
1034 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1035 common/common-exceptions.o, common/common-utils.o,
1036 common/errors.o, common/print-utils.o and utils.o.
1037 * gdbreplay.c: Include "common-defs.h" instead of the two
1038 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1039 string.h or alloca.h.
1040 (perror_with_name): Delete.
1041 (remote_open): Use xstrdup instead of strdup.
1042 (main): Rename to ...
1043 (captured_main): ... this.
1046 2018-06-08 Tom Tromey <tom@tromey.com>
1048 * linux-low.c (linux_low_read_btrace): Update.
1050 2018-06-04 Stan Cox <scox@redhat.com>
1052 * server.h (struct client_state): New.
1053 * server.c (cont_thread, general_thread, multi_process)
1054 (report_fork_events, report_vfork_events, report_exec_events)
1055 (report_thread_events, swbreak_feature, hwbreak_feature)
1056 (vCont_supported, disable_randomization, pass_signals)
1057 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1058 Moved to client_state.
1059 * remote-utils.c (remote_debug, noack_mode)
1060 (transport_is_reliable): Moved to client_state.
1061 * tracepoint.c (current_traceframe): Moved to client_state.
1064 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1065 linux-low.c, remote-utils.h, target.c: Use client_state.
1067 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1069 * configure.srv: Add new c/h file.
1071 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1073 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1076 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1078 * gdb.arch/mips-fpregset-core.exp: New test.
1079 * gdb.arch/mips-fpregset-core.c: New test source.
1081 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1084 * hostio.c (require_int): Do not report overflow for integers
1085 between 0xfffffff and 0x7fffffff.
1087 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1089 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1090 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1091 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1093 (the_low_target): Wire them.
1095 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1097 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1098 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1099 mode. Call collect_register_by_name with vscr using
1100 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1101 (ppc_store_vrregset): Add and set vscr_offset variable as in
1102 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1105 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1107 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1108 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1109 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1111 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1113 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1114 (ppc_store_vsxregset): Likewise.
1115 (ppc_fill_vrregset): Likewise.
1116 (ppc_store_vrregset): Likewise.
1117 (ppc_fill_evrregset): Likewise.
1118 (ppc_store_evrregset): Likewise.
1119 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1120 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1123 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1125 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1126 wordsize of the inferior. Call ppc_linux_target_wordsize.
1128 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1130 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1131 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1132 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1133 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1134 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1135 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1136 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1137 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1138 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1139 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1140 (tdesc_powerpc_e500l): Remove.
1141 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1142 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1143 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1144 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1146 (ppc_arch_setup): Remove target description matching code. Fill a
1147 ppc_linux_features struct and call ppc_linux_match_description
1150 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1152 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1153 width of the requested register exceeds the width of the
1155 (mips_cannot_store_register): Likewise.
1157 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1159 * linux-mips-low.c (mips_fetch_register): New function. Update
1161 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1162 (the_low_target): Wire `mips_fetch_register'.
1164 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1166 * lynx-i386-low.c (LYNXOS_178): New macro.
1167 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1168 the layout on LynxOS-178.
1169 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1170 handle floating point registers that are not supported by
1173 2018-05-10 Tom Tromey <tom@tromey.com>
1175 * configure: Rebuild.
1177 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1180 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1181 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1182 Use it to set the expedite_regs field in the given tdesc.
1183 * x86-tdesc.h: New file.
1184 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1185 Adjust following the addition of the new expedite_regs parameter
1186 to init_target_desc.
1187 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1188 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1189 (i386_linux_read_description, amd64_linux_read_description):
1190 Adjust following the addition of the new expedite_regs parameter
1191 to init_target_desc.
1192 * lynx-i386-low.c: #include "x86-tdesc.h".
1193 (lynx_i386_arch_setup): Adjust following the addition of the new
1194 expedite_regs parameter to init_target_desc.
1195 * nto-x86-low.c: #include "x86-tdesc.h".
1196 (nto_x86_arch_setup): Adjust following the addition of the new
1197 expedite_regs parameter to init_target_desc.
1198 * win32-i386-low.c: #include "x86-tdesc.h".
1199 (i386_arch_setup): Adjust following the addition of the new
1200 expedite_regs parameter to init_target_desc.
1202 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1205 * win32-low.c (win32_create_inferior): Add call to my_wait
1206 setting last_status global.
1208 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1211 * win32-low.c (create_process): Only call gdb_tilde_expand if
1212 inferior_cwd is not NULL.
1214 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1216 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1217 registers to the cache if their values have changed.
1218 (i387_xsave_to_cache): Provide default values for x87 control
1219 registers when these features are available, but disabled.
1220 * regcache.c (supply_register_by_name_zeroed): New function.
1221 * regcache.h (supply_register_by_name_zeroed): Declare new
1224 2018-05-07 Tom Tromey <tom@tromey.com>
1226 * configure: Rebuild.
1228 2018-05-04 Tom Tromey <tom@tromey.com>
1230 * configure: Rebuild.
1232 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1233 Pedro Alves <palves@redhat.com>
1235 * linux-aarch64-low.c (aarch64_stopped_data_address):
1238 2018-04-27 Tom Tromey <tom@tromey.com>
1240 * configure: Rebuild.
1242 2018-04-23 Tom Tromey <tom@tromey.com>
1244 * configure: Rebuild.
1246 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1248 * Makefile.in (depcomp): Add "..".
1249 (all_deps_files): New and use it.
1251 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1253 * configure.srv (aarch64*-*-linux*): Don't include xml.
1254 (i[34567]86-*-cygwin*): Likewise.
1255 (i[34567]86-*-linux*): Likewise.
1256 (i[34567]86-*-lynxos*): Likewise.
1257 (i[34567]86-*-mingw32ce*): Likewise.
1258 (i[34567]86-*-mingw*): Likewise.
1259 (i[34567]86-*-nto*): Likewise.
1260 (tic6x-*-uclinux): Likewise.
1261 (x86_64-*-linux*): Likewise.
1262 (x86_64-*-mingw*): Likewise.
1263 (x86_64-*-cygwin*): Likewise.
1265 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1267 * tdesc.c: Remove xml parameter.
1269 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1271 * server.c (get_features_xml): Remove cast.
1272 * tdesc.c (void target_desc::accept): Fill in function.
1273 (tdesc_get_features_xml): Remove old xml creation.
1274 (print_xml_feature::visit_pre): Add xml vistor.
1275 * tdesc.h (struct target_desc): Make xmltarget mutable.
1276 (tdesc_get_features_xml): Remove declaration.
1278 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1280 * tdesc.c (tdesc_architecture_name): Add new function.
1281 (tdesc_osabi_name): Likewise.
1282 (tdesc_get_features_xml): Use new functions.
1284 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1286 * tdesc.c (tdesc_create_flags): Remove.
1287 (tdesc_add_flag): Likewise.
1288 (tdesc_named_type): Likewise.
1289 (tdesc_create_union): Likewise.
1290 (tdesc_create_struct): Likewise.
1291 (tdesc_create_vector): Likewise.
1292 (tdesc_add_bitfield): Likewise.
1293 (tdesc_add_field): Likewise.
1294 (tdesc_set_struct_size): Likewise.
1296 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1298 * tdesc.c (~target_desc): Remove implictly deleted items.
1299 (init_target_desc): Iterate all features.
1300 (tdesc_get_features_xml): Use vector.
1301 (tdesc_create_feature): Create feature.
1302 * tdesc.h (tdesc_feature) Remove
1303 (target_desc): Add features.
1305 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1307 * Makefile.in: Add common/tdesc.c
1308 * tdesc.c (init_target_desc): init all reg_defs from register
1310 (tdesc_create_reg): Create tdesc_reg.
1311 * tdesc.h (tdesc_feature): Add register vector.
1313 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1315 * tdesc.h (struct target_desc) <features>: Change type to
1316 std::vector<std::string>.
1317 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1319 (tdesc_get_features_xml): Likewise.
1320 (tdesc_create_feature): Likewise.
1322 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1324 * regcache.c (find_register_by_number): Return a ref.
1325 (find_regno): Use references.
1326 (register_size): Likewise.
1327 (register_data): Likewise.
1328 * tdesc.c (target_desc::~target_desc): Remove free calls.
1329 (target_desc::operator==): Use std::vector compare.
1330 (init_target_desc): Use reference.
1331 (tdesc_create_reg): Use reg constructors.
1332 * tdesc.h (struct target_desc): Replace pointer with object.
1334 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1336 * regcache.c (find_register_by_number): Make static.
1337 (find_regno): Use find_register_by_number
1338 * regcache.h (struct reg): Remove declaration.
1340 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1342 * tdesc.c (target_desc::~target_desc): Move to here.
1343 (target_desc::operator==): Likewise.
1344 * tdesc.h (target_desc::~target_desc): Move from here.
1345 (target_desc::operator==): Likewise.
1347 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1349 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1351 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1353 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1355 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1356 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1357 and init_registers_s390_gs_linux64.
1359 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1361 * linux-s390-low.c (s390_fill_gs): Remove function.
1362 (s390_fill_gsbc): Remove function.
1363 (s390_regsets): Set fill functions for the guarded storage regsets
1366 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1368 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1369 the word size. Add comment.
1370 (s390_get_wordsize): New function.
1371 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1372 pswm with it. Instead, use s390_get_wordsize to determine the
1373 word size first and derive the correct tdesc from that directly.
1375 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1377 * Makefile.in: Include silent-rules.mk.
1378 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1379 (COMPILE): Add ECHO_CXX.
1380 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1381 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1382 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1383 (version-generated.c): Add ECHO_GEN.
1384 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1385 (IPAGENT_COMPILE): Add ECHO_CXX.
1386 (%-generated.c): Add ECHO_REGDAT.
1388 2018-03-14 Tom Tromey <tom@tromey.com>
1391 * ax.c (ax_printf): Special case for NULL.
1393 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1395 * linux-low.c (linux_qxfer_libraries_svr4): Use
1396 xml_escape_text_append.
1398 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1400 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1402 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1404 * server.c (handle_general_set): Remove unnecessary xstrdup.
1406 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1408 * server.c (parse_debug_format_options): Adjust to
1409 delim_string_to_char_ptr_vec changes.
1410 * thread-db.c (thread_db_load_search): Adjust to
1411 dirnames_to_char_ptr_vec changes.
1413 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1415 * target.h (target_enable_btrace, target_disable_btrace)
1416 (target_read_btrace, target_read_btrace_conf): Turn macro into
1417 inline function. Throw error if target method is not defined.
1418 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1419 check for btrace target method. Be prepared to handle exceptions
1420 from btrace target methods.
1422 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1424 * server.c (captured_main): Change order of error message printed
1425 when the current working directory cannot be found.
1427 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1429 * server.c: Include "filenames.h" and "pathstuff.h".
1430 (program_name): Delete variable.
1431 (program_path): New anonymous class.
1432 (get_exec_wrapper): Use "program_path" instead of
1434 (handle_v_run): Likewise.
1435 (captured_main): Likewise.
1436 (process_serial_event): Likewise.
1438 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1440 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1441 (OBJS): Add "pathstuff.o".
1442 * server.c (current_directory): New global variable.
1443 (captured_main): Initialize "current_directory".
1445 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1447 * tdesc.c: Use common/tdesc.h.
1448 * tdesc.h: Likewise.
1450 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1451 Simon Marchi <simon.marchi@ericsson.com>
1453 * Makefile.in: Switch order of make rules.
1455 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1457 * Makefile.in: Add common directory in build.
1458 * configure.ac: Add common reference.
1459 * configure: Regenerate.
1461 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1463 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1464 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1465 * spu-low.c (spu_target_ops): Likewise.
1466 * win32-low.c (win32_target_ops): Likewise.
1467 * server.c (supported_btrace_packets): Report packets unconditionally.
1468 * target.h (target_ops) <supports_btrace>: Remove.
1469 (target_supports_btrace): Remove.
1471 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1473 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1474 (handle_btrace_disable): Change return type to void. Use exceptions
1476 (handle_btrace_general_set): Catch exception and copy message to
1479 2018-02-08 Tom Tromey <tom@tromey.com>
1481 * linux-low.c (install_software_single_step_breakpoints): Use
1482 make_scoped_restore.
1483 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1484 (do_restore_current_thread_cleanup): Remove.
1485 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1488 2018-02-08 Tom Tromey <tom@tromey.com>
1490 * mem-break.c (set_raw_breakpoint_at): Use
1491 gdb::unique_xmalloc_ptr.
1493 2018-01-30 Pedro Alves <palves@redhat.com>
1496 * target.c (target_terminal::terminal_state): Rename to ...
1497 (target_terminal::m_terminal_state): ... this.
1499 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1501 * linux-low.c (handle_extended_wait): Surround call to
1502 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1504 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1506 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1507 linux_ptrace_attach_fail_reason_string now returning an
1509 (linux_attach): Likewise.
1510 * thread-db.c (attach_thread): Likewise.
1512 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1515 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1516 checking for fs_base/gs_base fields in struct user_regs_struct.
1517 * configure: Regenerate.
1519 2018-01-16 Yao Qi <yao.qi@linaro.org>
1522 * linux-low.c (fetch_register): Call supply_register instead of
1525 2018-01-08 Yao Qi <yao.qi@linaro.org>
1526 Simon Marchi <simon.marchi@ericsson.com>
1528 * Makefile.in (OBS): Remove selftest.o.
1529 * configure.ac: Set srv_selftest_objs if $development is true.
1530 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1531 * configure: Re-generated.
1532 * server.c (captured_main): Wrap variable selftest_filter with
1535 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1537 * server.c (parse_debug_format_options): Return std::string.
1538 (handle_monitor_command, captured_main): Adjust.
1540 2018-01-05 Pedro Alves <palves@redhat.com>
1543 * server.c (captured_main): Pass quiet=false to
1544 save_original_signals_state.
1546 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1548 * gdbreplay.c (gdbreplay_version): Update copyright year in
1550 * server.c (gdbserver_version): Likewise.
1552 2017-12-08 Tom Tromey <tom@tromey.com>
1554 * ax.c (ax_printf): Update.
1556 2017-12-07 Yao Qi <yao.qi@linaro.org>
1558 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1559 aarch64_linux_read_description.
1560 * linux-amd64-ipa.c (idx2mask): New array.
1561 (get_ipa_tdesc): Move idx2mask out.
1562 (initialize_low_tracepoint): Initialize target descriptions.
1563 * linux-i386-ipa.c (idx2mask): New array.
1564 (get_ipa_tdesc): Move idx2mask out.
1565 (initialize_low_tracepoint): Initialize target descriptions.
1567 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1569 * tdesc.c (struct tdesc_type): Change return type.
1570 (tdesc_add_flag): Change parameter type.
1571 (tdesc_add_bitfield): Likewise.
1572 (tdesc_add_field): Likewise.
1573 (tdesc_set_struct_size): Likewise.
1575 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1577 * regcache.c (registers_to_string): Remove unused variable.
1579 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1581 * inferiors.c (for_each_inferior_with_data): Remove.
1582 * inferiors.h (for_each_inferior_with_data): Remove.
1583 * server.c (handle_qxfer_threads_worker): Change parameter type.
1584 (handle_qxfer_threads_proper): Use for_each_thread.
1586 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1588 * inferiors.c (for_each_inferior): Remove.
1589 (clear_inferiors): Use for_each_thread.
1590 * inferiors.h (for_each_inferior): Remove.
1591 * linux-low.c (linux_wait_for_event_filtered): Use
1593 (linux_stabilize_threads): Likewise.
1594 * regcache.c (regcache_release): Likewise.
1595 * server.c (gdb_wants_all_threads_stopped): Likewise.
1596 (clear_pending_status_callback): Remove.
1597 (handle_status): Use for_each_thread.
1598 (captured_main): Likewise.
1599 * win32-low.c (child_init_thread_list): Likewise.
1600 (win32_clear_inferiors): Likewise.
1601 (fake_breakpoint_event): Likewise.
1603 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1605 * inferiors.h (find_inferior): Remove.
1606 * inferiors.c (find_inferior): Remove.
1608 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1610 * linux-low.c (resume_status_pending_p): Update comment.
1611 (need_step_over_p): Update comment.
1613 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1615 * linux-low.c (proceed_one_lwp): Return void, change parameter
1617 (unsuspend_and_proceed_one_lwp): Likewise.
1618 (proceed_all_lwps): Use for_each_thread.
1619 (unstop_all_lwps): Likewise.
1621 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1623 * linux-low.c (linux_resume_one_thread): Return void, take
1625 (linux_resume): Use for_each_thread.
1627 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1629 * linux-low.c (send_sigstop_callback): Return void, change
1630 parameter type. Rename to...
1631 (send_sigstop): ... this.
1632 (suspend_and_send_sigstop_callback): Return void, change parameter
1634 (suspend_and_send_sigstop): ... this.
1635 (stop_all_lwps): Use for_each_thread.
1637 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1639 * linux-low.c (lwp_running): Return bool, remove unused
1641 (linux_stabilize_threads): Use find_thread.
1643 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1645 * linux-low.c (select_singlestep_lwp_callback): Remove.
1646 (count_events_callback): Remove.
1647 (select_event_lwp_callback): Remove.
1648 (select_event_lwp): Use find_thread/for_each_thread.
1650 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1652 * linux-low.c (not_stopped_callback): Return bool, take filter
1654 (linux_wait_for_event_filtered): Use find_thread.
1655 (linux_wait_1): Likewise.
1657 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1659 * linux-low.c (same_lwp): Remove.
1660 (find_lwp_pid): Use find_thread.
1662 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1664 * linux-low.c (delete_lwp_callback): Remove.
1665 (linux_mourn): Use for_each_thread.
1667 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1669 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1670 args parameter, don't check for pid.
1671 (linux_detach): Use for_each_thread.
1673 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1675 * linux-low.c (struct counter): Remove.
1676 (second_thread_of_pid_p): Remove.
1677 (last_thread_of_process_p): Use find_thread.
1679 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1681 * inferiors.c (find_inferior_in_random): Remove.
1682 * inferiors.h (find_inferior_in_random): Remove.
1683 * linux-low.c (status_pending_p_callback): Return bool, accept
1684 parameter ptid directly.
1685 (linux_wait_for_event_filtered): Use find_thread_in_random.
1686 (linux_wait_1): Likewise.
1688 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1690 * inferiors.c (find_inferior_id): Remove.
1691 (find_thread_ptid): Move implemention from find_inferior_id to
1693 * inferiors.h (find_inferior_id): Remove.
1694 * server.c (handle_status): Use find_thread_ptid.
1695 (process_serial_event): Likewise.
1696 * thread-db.c (find_one_thread): Likewise.
1697 (thread_db_thread_handle): Likewise.
1698 * win32-low.c (thread_rec): Likewise.
1699 (child_delete_thread): Likewise.
1700 (win32_thread_alive): Likewise.
1701 (get_child_debug_event): Likewise.
1703 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1705 * linux-mips-low.c (update_watch_registers_callback): Return
1706 void, remove pid_p parameter, don't check for pid.
1707 (mips_insert_point, mips_remove_point): Use for_each_thread.
1709 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1711 * lynx.low (lynx_delete_thread_callback): Remove.
1712 (lynx_mourn): Use for_each_thread.
1714 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1716 * regcache.c (regcache_invalidate_one): Remove.
1717 (regcache_invalidate_pid): use for_each_thread.
1719 2017-11-26 Tom Tromey <tom@tromey.com>
1721 * linux-low.c (linux_create_inferior): Update.
1723 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1725 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1727 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1729 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1730 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1731 * linux-aarch64-tdesc-selftest.c: New file.
1732 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1734 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1736 * configure.srv: Add new file.
1737 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1738 * linux-aarch64-tdesc-selftest.c: New file.
1739 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1741 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1743 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1744 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1745 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1747 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1749 * configure.srv: Add new files.
1750 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1751 aarch64_linux_read_description.
1752 * linux-aarch64-low.c (aarch64_linux_read_description):
1753 Merge with aarch64_arch_setup.
1754 (aarch64_arch_setup): Call aarch64_linux_read_description.
1755 * linux-aarch64-tdesc.c: New file.
1756 * linux-aarch64-tdesc.h: New file.
1758 2017-11-24 Yao Qi <yao.qi@linaro.org>
1760 * configure.srv: Set $srv_regobj for tic6x-linux.
1761 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1762 (tic6x_read_description): Move some code to tic6x_arch_setup.
1763 (tic6x_tdesc_test): New function.
1764 (initialize_low_arch): Call selftests::register_test.
1766 2017-11-22 Yao Qi <yao.qi@linaro.org>
1768 * remote-utils.c (prepare_resume_reply): Use memcpy.
1770 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1772 * linux-low.c (kill_one_lwp_callback): Return void, take
1773 argument directly, don't filter on pid.
1774 (linux_kill): Use for_each_thread.
1776 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1778 * linux-low.c (need_step_over_p): Return bool, remove dummy
1780 (linux_resume, proceed_all_lwps): Use find_thread.
1782 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1784 * linux-low.c (resume_status_pending_p): Return bool, remove
1786 (linux_resume): Use find_thread.
1788 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1790 * linux-low.c (struct thread_resume_array): Remove.
1791 (linux_set_resume_request): Return void, take arguments
1793 (linux_resume): Use for_each_thread.
1795 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1797 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1798 return bool, remove data argument.
1799 (linux_stabilize_threads): Use find_thread.
1801 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1803 * linux-low.c (unsuspend_one_lwp): Remove.
1804 (unsuspend_all_lwps): Use for_each_thread, inline code from
1807 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1809 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1810 * linux-low.c (struct iterate_over_lwps_args): Remove.
1811 (iterate_over_lwps_filter): Remove.
1812 (iterate_over_lwps): Use find_thread.
1814 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1816 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1817 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1818 code from reset_lwp_ptrace_options_callback.
1820 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1822 * linux-arm-low.c (struct update_registers_data): Remove.
1823 (update_registers_callback): Return void, take arguments
1824 directly, don't check thread's pid.
1825 (arm_insert_point, arm_remove_point): Use for_each_thread.
1827 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1829 * win32-low.c (continue_one_thread): Return void, take argument
1831 (child_continue): Use for_each_thread.
1833 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1835 * win32-i386-low.c (update_debug_registers_callback): Rename
1837 (update_debug_registers): ... this, return void, remove pid_p arg.
1838 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1840 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1842 * inferiors.h (struct process_info): Add constructor, initialize
1844 <syscalls_to_catch>: Change type to std::vector<int>.
1845 * inferiors.c (add_process): Allocate process_info with new.
1846 (remove_process): Free process_info with delete.
1847 * linux-low.c (handle_extended_wait): Adjust.
1848 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1849 * server.c (handle_general_set): Adjust.
1851 2017-11-16 Pedro Alves <palves@redhat.com>
1853 * remote-utils.c (remote_close): Block SIGIO signals instead of
1854 uninstalling the SIGIO handler.
1856 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1858 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1860 2017-11-16 Yao Qi <yao.qi@linaro.org>
1862 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1863 (tic6x_store_gregset): Likewise.
1864 (tic6x_usrregs_info): Move it up.
1866 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1868 * Makefile.in: Update arch rules.
1869 * configure.srv: Explicitly mark arch/ files.
1871 2017-11-13 Andreas Schwab <schwab@suse.de>
1873 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1875 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1877 2017-11-06 Pedro Alves <palves@redhat.com>
1879 * config.in, configure: Regenerate.
1881 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1883 * target.c (struct thread_search): Remove.
1884 (thread_search_callback): Remove.
1885 (prepare_to_access_memory): Use for_each_thread instead of
1886 find_inferior. Inline code from thread_search_callback.
1888 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1890 * server.c (struct visit_actioned_threads_data): Remove.
1891 (visit_actioned_threads): Change prototype to take arguments
1893 (resume): Use find_thread instead of find_inferior.
1895 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1897 * server.c (queue_stop_reply_callback): Change prototype, return
1899 (find_status_pending_thread_callback): Remove.
1900 (handle_status): Replace find_inferior with find_thread and
1903 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1905 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1907 (aarch64_store_gregset): Likewise.
1908 (aarch64_fill_fpregset): Likewise.
1909 (aarch64_store_fpregset): Likewise.
1911 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1913 * gdbthread.h (find_thread, for_each_thread): New functions.
1914 * inferiors.c (thread_of_pid): Remove.
1915 (find_any_thread_of_pid): Use find_thread.
1916 * linux-low.c (num_lwps): Use for_each_thread.
1918 2017-10-17 Yao Qi <yao.qi@linaro.org>
1920 * Makefile.in: Remove one rule.
1921 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1923 2017-10-17 Yao Qi <yao.qi@linaro.org>
1925 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1926 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1928 2017-10-17 Yao Qi <yao.qi@linaro.org>
1930 * configure.srv: Rename arm.o with arch/arm.o.
1932 2017-10-17 Yao Qi <yao.qi@linaro.org>
1934 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1935 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1936 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1937 (arch-i386.o, arch-amd64.o): Remove rules.
1938 (arch/%.o): New rule.
1939 Update POSTCOMPILE and COMPILE.pre.
1940 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1941 * configure: Re-generated.
1942 * configure.srv: Replace arch-i386.o with arch/i386.o.
1943 Replace arch-amd64.o with arch/amd64.o.
1945 2017-10-16 Yao Qi <yao.qi@linaro.org>
1947 * configure: Regenerated.
1949 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1951 * inferiors.h: (struct inferior_list): Remove.
1952 (struct inferior_list_entry); Remove.
1953 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1954 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1955 get_first_inferior): Remove.
1956 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1957 find_inferior_id, find_inferior_in_random): Change signature.
1958 * inferiors.c (all_threads): Change type to
1959 std::list<thread_info *>.
1960 (get_thread): Remove macro.
1961 (find_inferior, find_inferior_id): Change signature, implement
1963 (find_inferior_in_random): Change signature, implement using
1964 find_thread_in_random.
1965 (for_each_inferior, for_each_inferior_with_data): Change
1966 signature, implement using for_each_thread.
1967 (add_inferior_to_list, remove_inferior): Remove.
1968 (add_thread, get_first_thread, thread_of_pid,
1969 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1970 (get_first_inferior, one_inferior_p, clear_inferior_list):
1972 (clear_inferiors, get_thread_process): Update.
1973 * gdbthread.h: Include <list>.
1974 (struct thread_info) <entry>: Remove field.
1976 (all_threads): Change type to std::list<thread_info *>.
1977 (get_first_inferior): Add doc.
1978 (find_thread, for_each_thread, find_thread_in_random): New
1980 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1981 * linux-arm-low.c (update_registers_callback): Update.
1982 * linux-low.c (second_thread_of_pid_p): Update.
1983 (kill_one_lwp_callback, linux_detach_lwp_callback,
1984 delete_lwp_callback, status_pending_p_callback, same_lwp,
1985 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1986 iterate_over_lwps, not_stopped_callback,
1987 resume_stopped_resumed_lwps, count_events_callback,
1988 select_singlestep_lwp_callback, select_event_lwp_callback,
1989 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1990 suspend_and_send_sigstop_callback, wait_for_sigstop,
1991 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1992 lwp_running, linux_set_resume_request, resume_status_pending_p,
1993 need_step_over_p, start_step_over, linux_resume_one_thread,
1994 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1995 reset_lwp_ptrace_options_callback): Update.
1996 * linux-mips-low.c (update_watch_registers_callback): Update.
1997 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1999 (free_register_cache_thread_one): Remove.
2000 (regcache_release): Update.
2001 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2002 handle_qxfer_threads_worker): Update.
2003 (handle_query): Update, use list iterator.
2004 (visit_actioned_threads, handle_pending_status,
2005 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2006 clear_pending_status_callback, set_pending_status_callback,
2007 find_status_pending_thread_callback, handle_status,
2008 process_serial_event): Update.
2009 * target.c (thread_search_callback): Update.
2010 * thread-db.c (thread_db_get_tls_address): Update.
2011 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2013 * win32-i386-low.c (update_debug_registers_callback): Update.
2014 * win32-low.c (delete_thread_info, child_delete_thread,
2015 continue_one_thread, suspend_one_thread,
2016 get_child_debug_event): Adjust.
2018 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2020 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2021 * inferiors.h: Include <list>.
2022 (struct process_info) <entry>: Remove field.
2024 (pid_of): Change macro to function.
2025 (ptid_of, lwpid_of): Remove macro.
2026 (all_processes): Change type to std::list<process_info *>.
2027 (ALL_PROCESSES): Remove macro.
2028 (for_each_process, find_process): New function.
2029 * inferiors.c (all_processes): Change type to
2030 std::list<process_info *>.
2031 (find_thread_process): Adjust.
2032 (add_process): Likewise.
2033 (remove_process): Likewise.
2034 (find_process_pid): Likewise.
2035 (get_first_process): Likewise.
2036 (started_inferior_callback): Remove.
2037 (have_started_inferiors_p): Adjust.
2038 (attached_inferior_callback): Remove.
2039 (have_attached_inferiors_p): Adjust.
2040 * linux-low.c (check_zombie_leaders): Likewise.
2041 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2042 (x86_linux_update_xmltarget): Adjust.
2043 * server.c (handle_query): Likewise.
2044 (gdb_reattached_process): Remove.
2045 (handle_status): Adjust.
2046 (kill_inferior_callback): Likewise.
2047 (detach_or_kill_inferior): Remove.
2048 (print_started_pid): Likewise.
2049 (print_attached_pid): Likewise.
2050 (detach_or_kill_for_exit): Update.
2051 (process_serial_event): Likewise.
2052 * linux-arm-low.c (arm_new_fork): Likewise.
2054 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2056 * dll.h: Include <list>.
2057 (struct dll_info): Add constructor.
2058 <entry>: Remove field.
2059 (all_dlls): Change type to std::list<dll_info>.
2060 * dll.c: Include <algorithm>.
2061 (get_dll): Remove macro.
2062 (all_dlls): Change type to std::list<dll_info *>.
2063 (free_one_dll): Remove.
2064 (match_dll): Likewise.
2065 (loaded_dll): Adjust.
2066 (unloaded_dll): Adjust to all_dlls type change, use
2067 std::find_if. Inline code from match_dll.
2068 (clear_dlls): Adjust to all_dlls type change.
2069 * server.c (emit_dll_description): Remove.
2070 (handle_qxfer_libraries): Adjust to all_dlls type change,
2071 integrate emit_dll_description's functionality.
2073 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2075 * linux-low.h (struct linux_target_ops) <delete_process>: New
2077 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2078 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2079 (struct linux_target_ops): Add delete_process callback.
2080 * linux-arm-low.c (arm_delete_process): New.
2081 (struct linux_target_ops): Add delete_process callback.
2082 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2083 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2084 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2085 * linux-mips-low.c (mips_linux_delete_process): New.
2086 (struct linux_target_ops): Add delete_process callback.
2087 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2088 * linux-s390-low.c (struct linux_target_ops): Likewise.
2089 * linux-sh-low.c (struct linux_target_ops): Likewise.
2090 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2091 * linux-tile-low.c (struct linux_target_ops): Likewise.
2092 * linux-x86-low.c (x86_linux_delete_process): New.
2093 (struct linux_target_ops): Add delete_process callback.
2094 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2096 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2098 * linux-aarch64-low.c (the_low_target): Add thread delete
2100 * linux-arm-low.c (arm_delete_thread): New function.
2101 (the_low_target): Add thread delete callback.
2102 * linux-bfin-low.c (the_low_target): Likewise.
2103 * linux-crisv32-low.c (the_low_target): Likewise.
2104 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2106 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2108 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2109 * linux-mips-low.c (mips_linux_delete_thread): New function.
2110 (the_low_target): Add thread delete callback.
2111 * linux-ppc-low.c (the_low_target): Likewise.
2112 * linux-s390-low.c (the_low_target): Likewise.
2113 * linux-sh-low.c (the_low_target): Likewise.
2114 * linux-tic6x-low.c (the_low_target): Likewise.
2115 * linux-tile-low.c (the_low_target): Likewise.
2116 * linux-x86-low.c (the_low_target): Likewise.
2117 * linux-xtensa-low.c (the_low_target): Likewise.
2119 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2121 * win32-low.c: Include "common-inferior.h".
2123 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2125 * inferiors.c (set_inferior_cwd): New function.
2126 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2127 (handle_query): Inform that QSetWorkingDir is supported.
2128 * win32-low.c (create_process): Pass the inferior's cwd to
2131 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2133 * inferiors.c (current_inferior_cwd): New global variable.
2134 (get_inferior_cwd): New function.
2135 * inferiors.h (struct process_info) <cwd>: New field.
2137 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2139 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2140 (OBS): Add gdb_tilde_expand.o.
2142 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2144 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2145 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2147 2017-09-29 Pedro Alves <palves@redhat.com>
2149 * ax.c (gdb_parse_agent_expr): Constify.
2150 * ax.h (gdb_parse_agent_expr): Constify.
2151 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2153 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2154 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2155 * remote-utils.h (read_ptid): Constify.
2156 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2157 (process_point_options, process_serial_event): Constify.
2158 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2159 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2160 (cmd_qtbuffer): Constify.
2162 2017-09-29 Pedro Alves <palves@redhat.com>
2164 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2167 2017-09-29 Pedro Alves <palves@redhat.com>
2169 * linux-low.c (handle_extended_wait): Pass parent thread instead
2170 of process to thread_db_notice_clone.
2171 * linux-low.h (thread_db_notice_clone): Replace parent process
2172 parameter with parent thread parameter.
2173 * thread-db.c (find_one_thread): Add comment.
2174 (thread_db_notice_clone): Replace parent process parameter with
2175 parent thread parameter. Temporarily switch to the parent thread.
2177 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2179 * gdbthread.h: Include "common-gdbthread.h".
2180 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2181 "if" when validating the ptid.
2182 * remote-utils.c: Include "gdbthread.h".
2183 (prepare_resume_reply): Use "switch_to_thread".
2184 * target.c (done_accessing_memory): Likewise.
2186 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2188 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2189 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2190 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2191 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2192 s390x-gs-linux64-ipa.o to ipa_obj.
2193 * linux-s390-low.c (HWCAP_S390_GS): New define.
2194 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2196 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2197 (s390_arch_setup): Check for guarded-storage support and choose
2199 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2200 init_registers_s390x_gs_linux64.
2201 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2203 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2204 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2206 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2208 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2210 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2212 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2213 (thread_db_thread_handle): Declare.
2214 * linux-low.c (linux_target_ops): Initialize thread_handle.
2215 * server.c (handle_qxfer_threads_worker): Add support for
2217 * target.h (struct target_ops): Add new function pointer,
2219 (target_thread_handle): Define.
2220 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2222 (thread_db_thread_handle): New function.
2224 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2226 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2227 * linux-low.h (thread_db_notice_clone): Declare.
2228 * thread-db.c (thread_db_notice_clone): New function.
2230 2017-09-21 Pedro Alves <palves@redhat.com>
2232 * server.c (gdb_read_memory, handle_status, process_serial_event)
2233 (handle_serial_event, handle_target_event): Adjust to
2234 set_desired_thread prototype change.
2235 * target.c (set_desired_thread): Remove 'use_general' parameter
2237 * target.h (set_desired_thread): Remove 'use_general' parameter.
2239 2017-09-20 Tom Tromey <tom@tromey.com>
2241 * target.c (target_terminal::terminal_state): Define.
2242 (target_terminal::init): Rename from target_terminal_init.
2243 (target_terminal::inferior): Rename from
2244 target_terminal_inferior.
2245 (target_terminal::ours): Rename from target_terminal_ours.
2246 (target_terminal::ours_for_output, target_terminal::info): New.
2248 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2250 * server.c (accumulate_file_name_length): Remove.
2251 (emit_dll_description): Adjust to std::string change.
2252 (handle_qxfer_libraries): Use std::string to hold document.
2254 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2256 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2257 return type of xml_escape_text.
2258 * server.c (emit_dll_description): Likewise.
2260 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2262 * server.c (captured_main): Accept argument for --selftest.
2263 Update run_tests call.
2264 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2265 when registering selftests.
2267 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2269 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2270 instead of "VEC" for "target_desc.reg_defs".
2271 (regcache_cpy): Likewise.
2272 (registers_to_string): Likewise.
2273 (registers_from_string): Likewise.
2274 (find_regno): Likewise.
2275 (supply_regblock): Likewise.
2276 (regcache_raw_read_unsigned): Likewise.
2277 * tdesc.c (init_target_desc): Likewise.
2278 (tdesc_create_reg): Likewise.
2279 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2280 (struct target_desc) <reg_defs>: Convert to "std::vector".
2281 (target_desc): Do not initialize "reg_defs".
2282 (~target_desc): Update code to use "std::vector" instead of "VEC"
2283 for "target_desc.reg_defs".
2284 (operator==): Likewise.
2286 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2288 * inferiors.h (thread_to_gdb_id): Remove.
2289 * inferiors.c (thread_to_gdb_id): Remove.
2290 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2291 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2292 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2294 * nto-low.c (nto_fetch_registers, nto_store_registers,
2295 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2297 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2299 * inferiors.h (gdb_id_to_thread_id): Remove.
2300 * inferiors.c (gdb_id_to_thread_id): Remove.
2301 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2302 removal. Move pid declaration closer to where it's used.
2304 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2306 * server.c (handle_detach): New function.
2307 (process_serial_event): Move code out, call handle_detach.
2309 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2311 * server.c (require_running): Rename to ...
2312 (require_running_or_return): ... this ...
2313 (require_running_or_break): ... and this.
2314 (handle_query, process_serial_event): Adjust.
2316 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2318 * linux-low.c (linux_set_resume_request): Remove unused
2321 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2323 * server.c (first_thread_of): Remove.
2324 (process_serial_event): Replace usage of first_thread_of with
2325 find_any_thread_of_pid.
2326 * tracepoint.c (same_process_p): Remove.
2327 (gdb_agent_about_to_close): Replace usage of same_process_p with
2328 find_any_thread_of_pid.
2329 * linux-x86-low.c (same_process_callback): Remove.
2330 (x86_arch_setup_process_callback): Replace usage of
2331 same_process_callback with find_any_thread_of_pid.
2332 * thread-db.c (any_thread_of): Remove.
2333 (switch_to_process): Replace usage of any_thread_of with
2334 find_any_thread_of_pid.
2335 * inferiors.c (thread_pid_matches_callback): Remove.
2336 (find_thread_process): Adjust to use find_any_thread_of_pid.
2338 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2340 * regcache.c (get_thread_regcache): Guard calls to "memset"
2343 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2345 * linux-low.c (handle_extended_wait): Use
2346 "allocate_target_description" instead of "XNEW".
2347 * linux-x86-low.c (initialize_low_arch): Likewise.
2349 2017-09-05 Yao Qi <yao.qi@linaro.org>
2351 * configure.srv (srv_i386_regobj): Remove.
2352 (srv_amd64_regobj): Remove.
2353 (srv_regobj): Set it to "" for x86 non-linux targets.
2354 * linux-x86-tdesc.c (i386_linux_read_description):
2355 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2356 (init_registers_i386): Remove the declaration.
2357 (tdesc_i386): Remove the declaration.
2358 (lynx_i386_arch_setup): Call i386_create_target_description.
2359 * nto-x86-low.c: Likewise.
2360 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2361 [!__x86_64__]: include arch/i386.h.
2362 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2364 2017-09-05 Yao Qi <yao.qi@linaro.org>
2366 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2367 i386/amd64-XXX-linux from it.
2369 2017-09-05 Yao Qi <yao.qi@linaro.org>
2371 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2373 (ipa_amd64_linux_regobj): Remove.
2374 (ipa_x32_linux_regobj): Remove.
2376 2017-09-05 Yao Qi <yao.qi@linaro.org>
2378 * Makefile.in (arch-amd64.o): New rule.
2379 * configure.srv: Append arch-amd64.o.
2380 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2381 (get_ipa_tdesc): Call amd64_linux_read_description.
2382 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2383 and init_registers_amd64_XXX.
2384 * linux-x86-low.c (x86_linux_read_description): Call
2385 amd64_linux_read_description.
2386 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2387 (initialize_low_arch): Don't call init_registers_x32_XXX and
2388 init_registers_amd64_XXX.
2389 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2390 and tdesc_amd64_XXX.
2391 [__x86_64__] (amd64_tdesc_test): New function.
2392 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2393 and init_registers_amd64_XXX.
2394 * linux-x86-tdesc.c: Include arch/amd64.h.
2395 (xcr0_to_tdesc_idx): New function.
2396 (i386_linux_read_description): New function.
2397 (amd64_get_ipa_tdesc_idx): New function.
2398 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2399 (amd64_get_ipa_tdesc): Declare.
2401 2017-09-05 Yao Qi <yao.qi@linaro.org>
2403 * configure.srv (srv_i386_linux_xmlfiles): Remove
2404 i386/i386-XXX-linux.xml from it.
2406 2017-09-05 Yao Qi <yao.qi@linaro.org>
2408 * configure.srv: Set srv_i386_linux_regobj empty if $development
2410 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2411 initialize_low_tdesc.
2412 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2413 with #if initialize_low_tdesc.
2414 * linux-x86-tdesc-selftest.c: New file.
2415 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2417 2017-09-05 Yao Qi <yao.qi@linaro.org>
2419 * Makefile.in (arch-i386.o): New rule.
2420 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2421 (x86_64-*-linux*): Likewise.
2422 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2423 include arch/i386.h.
2424 (i386_linux_read_description): Remove code and call
2425 i386_create_target_description.
2426 * tdesc.c (allocate_target_description): New function.
2427 * tdesc.h (set_tdesc_architecture): Remove declaration.
2428 (set_tdesc_osabi): Likewise.
2430 2017-09-05 Yao Qi <yao.qi@linaro.org>
2432 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2433 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2434 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2436 * server.c (get_features_xml): Call tdesc_get_features_xml.
2437 * tdesc.c (set_tdesc_architecture): New function.
2438 (set_tdesc_osabi): New function.
2439 (tdesc_get_features_xml): New function.
2440 (tdesc_create_feature): Add an argument.
2441 * tdesc.h (struct target_desc) <features>: New field.
2442 <arch, osabi>: New field.
2443 (~target_desc): xfree features, arch, and osabi.
2444 (target_desc::oerator==): Don't compare .xmltarget.
2445 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2446 (set_tdesc_osabi): Likewise.
2447 (tdesc_get_features_xml): Likewise.
2449 2017-09-05 Yao Qi <yao.qi@linaro.org>
2451 * linux-x86-tdesc.c: Include selftest.h.
2452 (i386_tdesc_test): New function.
2453 (initialize_low_tdesc): Call selftests::register_test.
2454 * tdesc.h: Include regdef.h.
2455 (target_desc): Override operator == and !=.
2457 2017-09-05 Yao Qi <yao.qi@linaro.org>
2459 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2460 (ipa_obj): Likewise.
2461 * linux-i386-ipa.c: Include common/x86-xstate.h
2462 (get_ipa_tdesc): Call i386_linux_read_description.
2463 (initialize_low_tracepoint): Don't call init_registers_XXX
2464 functions, call initialize_low_tdesc instead.
2465 * linux-x86-low.c (x86_linux_read_description): Call
2466 i386_linux_read_description.
2467 (initialize_low_arch): Don't call init_registers_i386_XXX
2468 functions, call initialize_low_tdesc.
2469 * linux-x86-tdesc.c: New file.
2470 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2471 (i386_get_ipa_tdesc_idx): Declare.
2472 (i386_get_ipa_tdesc): Declare.
2473 (initialize_low_tdesc): Declare.
2475 2017-09-05 Yao Qi <yao.qi@linaro.org>
2477 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2480 2017-09-05 Yao Qi <yao.qi@linaro.org>
2482 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2483 * regcache.c (get_thread_regcache): Use VEC_length.
2484 (init_register_cache): Likewise.
2485 (regcache_cpy): Likewise.
2486 (registers_to_string): Iterate reg_defs via VEC_iterate.
2487 (find_regno): Likewise.
2488 (find_register_by_number): Use VEC_index.
2489 (register_size): Call find_register_by_number.
2490 (register_data): Call find_register_by_number.
2491 (supply_regblock): Use VEC_length.
2492 (regcache_raw_read_unsigned): Likewise.
2493 * tdesc.c (init_target_desc): Iterate reg_defs via
2495 (default_description): Update initializer.
2496 (copy_target_description): Don't update field num_registers.
2497 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2498 <num_registers>: Remove.
2500 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2502 * Makefile.in (.SECONDARY): Define target.
2504 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2506 * linux-low.c (linux_wait_1): Adjust.
2507 * server.c (queue_stop_reply_callback): Adjust.
2509 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2511 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2512 QEnvironmentUnset and QEnvironmentReset packets.
2513 (handle_query): Inform remote that QEnvironmentHexEncoded,
2514 QEnvironmentUnset and QEnvironmentReset are supported.
2516 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2518 * inferiors.h (inferior_target_data): Rename to ...
2519 (thread_target_data): ... this.
2520 (inferior_regcache_data): Rename to ...
2521 (thread_regcache_data): ... this.
2522 (set_inferior_regcache_data): Rename to ...
2523 (set_thread_regcache_data): ... this.
2524 * inferiors.c (inferior_target_data): Rename to ...
2525 (thread_target_data): ... this.
2526 (inferior_regcache_data): Rename to ...
2527 (thread_regcache_data): ... this.
2528 (set_inferior_regcache_data): Rename to ...
2529 (set_thread_regcache_data): ... this.
2530 (free_one_thread): Update.
2531 * linux-low.h (get_thread_lwp): Update.
2532 * regcache.c (get_thread_regcache): Update.
2533 (regcache_invalidate_thread): Update.
2534 (free_register_cache_thread): Update.
2535 * win32-i386-low.c (update_debug_registers_callback): Update.
2536 (win32_get_current_dr): Update.
2537 * win32-low.c (thread_rec): Update.
2538 (delete_thread_info): Update.
2539 (continue_one_thread): Update.
2540 (suspend_one_thread): Update.
2542 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2544 * inferiors.c (set_inferior_target_data): Remove.
2545 * inferiors.h (set_inferior_target_data): Remove.
2547 2017-08-18 Yao Qi <yao.qi@linaro.org>
2549 * Makefile.in (OBS): Add selftest.o.
2550 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2551 * configure, config.in: Re-generated.
2552 * server.c: Include common/sefltest.h.
2553 (captured_main): Handle option --selftest.
2555 2017-08-09 Yao Qi <yao.qi@linaro.org>
2557 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2558 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2559 i386-avx-mpx.o and i386-mmx.o.
2560 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2561 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2562 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2563 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2564 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2565 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2566 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2567 i386/amd64-avx-mpx.xml.
2569 2017-08-09 Yao Qi <yao.qi@linaro.org>
2571 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2572 and x32-avx-avx512.o.
2573 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2574 i386/x32-avx-avx512.xml.
2576 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2578 * tracepoint.h (enum class fast_tpoint_collect_result): New
2580 (fast_tracepoint_collecting): Change return type to
2581 fast_tpoint_collect_result.
2582 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2583 * linux-low.h: Include tracepoint.h.
2584 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2585 fast_tpoint_collect_result.
2586 * linux-low.c (handle_tracepoints): Adjust.
2587 (linux_fast_tracepoint_collecting): Change return type to
2588 fast_tpoint_collect_result.
2589 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2590 linux_wait_1, stuck_in_jump_pad_callback,
2591 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2592 proceed_one_lwp): Adjust to type change.
2594 2017-07-10 Yao Qi <yao.qi@linaro.org>
2596 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2598 2017-06-29 Yao Qi <yao.qi@linaro.org>
2600 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2602 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2604 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2606 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2608 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2610 * linux-low.c (linux_create_inferior): Adjust code to access the
2611 environment information via 'gdb_environ' class.
2612 * lynx-low.c (lynx_create_inferior): Likewise.
2613 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2614 (get_environ): Return a pointer to 'our_environ'.
2615 (captured_main): Initialize 'our_environ'.
2616 * server.h (get_environ): Adjust prototype.
2617 * spu-low.c (spu_create_inferior): Adjust code to access the
2618 environment information via 'gdb_environ' class.
2620 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2622 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2623 usage of "register" keyword.
2625 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2627 * configure: Re-generate.
2629 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2631 * configure: Re-generate.
2633 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2635 * Makefile.in (COMPILE.pre): Add "-x c++".
2637 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2639 * fork-child.c: Conditionally include <signal.h>.
2641 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2643 * server.c (handle_general_set): Handle new packet
2644 "QStartupWithShell".
2645 (handle_query): Add "QStartupWithShell" to the list of supported
2647 (gdbserver_usage): Add help text explaining the
2648 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2650 (captured_main): Recognize and act upon the presence of the new
2653 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2654 Pedro Alves <palves@redhat.com>
2656 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2657 * configure: Regenerate.
2658 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2660 (i[34567]86-*-lynxos*): Likewise.
2661 (spu*-*-*): Likewise.
2662 * fork-child.c: New file.
2663 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2665 (linux_ptrace_fun): New function.
2666 (linux_create_inferior): Adjust function prototype to reflect
2667 change on "target.h". Adjust function code to use
2669 (linux_request_interrupt): Delete "signal_pid".
2670 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2671 (lynx_ptrace_fun): New function.
2672 (lynx_create_inferior): Adjust function prototype to reflect
2673 change on "target.h". Adjust function code to use
2675 * nto-low.c (nto_create_inferior): Adjust function prototype and
2676 code to reflect change on "target.h". Update comments.
2677 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2678 "common-terminal.h" and "environ.h".
2679 (terminal_fd): Moved to fork-child.c.
2680 (old_foreground_pgrp): Likewise.
2681 (restore_old_foreground_pgrp): Likewise.
2682 (last_status): Make it global.
2683 (last_ptid): Likewise.
2684 (our_environ): New variable.
2685 (startup_with_shell): Likewise.
2686 (program_name): Likewise.
2687 (program_argv): Rename to...
2688 (program_args): ...this.
2689 (wrapper_argv): New variable.
2690 (start_inferior): Delete function.
2691 (get_exec_wrapper): New function.
2692 (get_exec_file): Likewise.
2693 (get_environ): Likewise.
2694 (prefork_hook): Likewise.
2695 (post_fork_inferior): Likewise.
2696 (postfork_hook): Likewise.
2697 (postfork_child_hook): Likewise.
2698 (handle_v_run): Update code to deal with arguments coming from the
2699 remote host. Update calls from "start_inferior" to
2701 (captured_main): Likewise. Initialize environment variable. Call
2703 * server.h (post_fork_inferior): New prototype.
2704 (get_environ): Likewise.
2705 (last_status): Declare.
2706 (last_ptid): Likewise.
2707 (signal_pid): Likewise.
2708 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2709 (spu_ptrace_fun): New function.
2710 (spu_create_inferior): Adjust function prototype to reflect change
2711 on "target.h". Adjust function code to use "fork_inferior".
2712 * target.c (target_terminal_init): New function.
2713 (target_terminal_inferior): Likewise.
2714 (target_terminal_ours): Likewise.
2715 * target.h: Include <vector>.
2716 (struct target_ops) <create_inferior>: Update prototype.
2717 (create_inferior): Update macro.
2718 * utils.c (gdb_flush_out_err): New function.
2719 * win32-low.c (win32_create_inferior): Adjust function prototype
2720 and code to reflect change on "target.h".
2722 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2724 * inferiors.c (switch_to_thread): New function.
2726 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2728 * Makefile.in (SFILE): Add "common/job-control.c".
2729 (OBS): Add "job-control.o".
2731 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2733 * Makefile: Remove "@host_makefile_frag@".
2735 2017-05-05 Pedro Alves <palves@redhat.com>
2737 * configure: Regenerate.
2739 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2741 * configure: Regenerate.
2743 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2745 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2746 software_single_step change of return type to
2747 std::vector<CORE_ADDR>.
2748 * linux-low.c (install_software_single_step_breakpoints):
2750 * linux-low.h (install_software_single_step_breakpoints):
2753 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2755 * remote-utils.c: Include "gdb_termios.h" instead of
2757 * terminal.h: Delete file.
2759 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2761 * server.c: Include <vector>.
2762 <program_argv, wrapper_argv>: Convert to std::vector.
2763 (start_inferior): Rewrite function to use C++.
2764 (handle_v_run): Likewise. Update code that calculates the argv
2765 based on the vRun packet; use C++.
2766 (captured_main): Likewise.
2768 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2770 * server.c (handle_v_cont): Initialize thread_resume::thread
2773 2017-04-05 Pedro Alves <palves@redhat.com>
2775 * configure: Regenerate.
2777 2017-04-05 Pedro Alves <palves@redhat.com>
2779 * gdbreplay.c (sync_error): Constify.
2780 * linux-x86-low.c (push_opcode): Constify.
2782 2017-04-05 Pedro Alves <palves@redhat.com>
2784 * win32-low.c (get_child_debug_event)
2785 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2786 Report TARGET_WAITKIND_SPURIOUS instead.
2788 2017-04-05 Pedro Alves <palves@redhat.com>
2790 * remote-utils.c (remote_prepare, remote_open): Constify.
2791 * remote-utils.h (remote_prepare, remote_open): Constify.
2792 * server.c (captured_main): Constify 'port' handling.
2794 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2796 * Makefile.in (clean): Clear .deps.
2798 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2800 * .gitignore: Remove generated files, replace with wildcard.
2801 * (clean): Replace removal of generated files with wildcard.
2802 (version.c): Replace with...
2803 (version-generated.c): ...this.
2804 (xml-builtin.c): Replace with...
2805 (xml-builtin-generated.c): ...this.
2806 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2807 (%.c: *regformats*): Replace with...
2808 (%-generated.c: *regformats*): ...this.
2810 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2812 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2813 (xtensa_fill_gregset): Call collect_register_by_name for
2815 (xtensa_store_gregset): Call supply_register_by_name for
2818 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2820 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2821 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2822 (xtensa_store_gregset): Call supply_register for all registers in
2823 a0_regnum..a0_regnum + C0_NREGS range.
2825 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2827 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2828 (ax-ipa.o: ax.c): Remove.
2829 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2830 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2831 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2832 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2833 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2835 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2837 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2838 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2839 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2840 (errors-ipa.o: ../common/errors.c): Remove.
2841 (format-ipa.o: ../common/format.c): Remove.
2842 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2844 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2846 * Makefile.in (%-ipa.o: %.c): New rule.
2847 (tracepoint-ipa.o: tracepoint.c): Remove.
2848 (utils-ipa.o: utils.c): Remove.
2849 (remote-utils-ipa.o: remote-utils.c): Remove.
2850 (regcache-ipa.o: regcache.c): Remove.
2851 (i386-linux-ipa.o: i386-linux.c): Remove.
2852 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2853 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2854 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2855 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2856 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2857 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2858 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2859 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2860 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2861 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2862 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2863 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2864 (aarch64-ipa.o: aarch64.c): Remove.
2865 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2866 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2867 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2868 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2869 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2870 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2871 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2872 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2873 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2874 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2875 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2876 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2877 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2878 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2879 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2880 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2881 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2882 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2883 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2884 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2885 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2886 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2887 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2888 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2889 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2890 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2891 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2892 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2893 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2894 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2895 (tdesc-ipa.o: tdesc.c): Remove.
2896 (x32-linux-ipa.o: x32-linux.c): Remove.
2897 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2898 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2900 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2902 * Makefile.in (%.o: ../arch/%.c): New rule.
2903 (arm.o: ../arch/arm.c): Remove.
2904 (arm-linux.o: ../arch/arm-linux.c): Remove.
2905 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2906 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2908 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2910 * Makefile.in (%.o: ../nat/%.c): New rule.
2911 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2912 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2913 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2914 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2915 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2916 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2917 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2918 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2919 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2920 (linux-personality.o: ../nat/linux-personality.c): Remove.
2921 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2922 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2923 (x86-linux.o: ../nat/x86-linux.c): Remove.
2924 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2925 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2927 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2929 * Makefile.in (%.o: ../common/%.c): New rule.
2930 (signals.o: ../common/signals.c): Remove.
2931 (print-utils.o: ../common/print-utils.c): Remove.
2932 (rsp-low.o: ../common/rsp-low.c): Remove.
2933 (common-utils.o: ../common/common-utils.c): Remove.
2934 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2935 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2936 (vec.o: ../common/vec.c): Remove.
2937 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2938 (xml-utils.o: ../common/xml-utils.c): Remove.
2939 (ptid.o: ../common/ptid.c): Remove.
2940 (buffer.o: ../common/buffer.c): Remove.
2941 (format.o: ../common/format.c): Remove.
2942 (filestuff.o: ../common/filestuff.c): Remove.
2943 (agent.o: ../common/agent.c): Remove.
2944 (errors.o: ../common/errors.c): Remove.
2945 (environ.o: ../common/environ.c): Remove.
2946 (common-debug.o: ../common/common-debug.c): Remove.
2947 (cleanups.o: ../common/cleanups.c): Remove.
2948 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2949 (fileio.o: ../common/fileio.c): Remove.
2950 (common-regcache.o: ../common/common-regcache.c): Remove.
2951 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2952 (new-op.o: ../common/new-op.c): Remove.
2953 (btrace-common.o: ../common/btrace-common.c): Remove.
2955 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2957 * Makefile.in (%.o: ../target/%.c): New rule.
2958 (waitstatus.o: ../target/waitstatus.c): Remove.
2960 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2963 (%.c: ../regformats/%.dat,
2964 (%.c: ../regformats/arm/%.dat,
2965 (%.c: ../regformats/i386/%.dat,
2966 (%.c: ../regformats/rs6000/%.dat): New rules.
2967 (aarch64.c): Remove.
2968 (reg-arm.c): Remove.
2969 (arm-with-iwmmxt.c): Remove.
2970 (arm-with-vfpv2.c): Remove.
2971 (arm-with-vfpv3.c): Remove.
2972 (arm-with-neon.c): Remove.
2973 (reg-bfin.c): Remove.
2974 (reg-cris.c): Remove.
2975 (reg-crisv32.c): Remove.
2977 (i386-linux.c): Remove.
2978 (i386-avx.c): Remove.
2979 (i386-avx-linux.c): Remove.
2980 (i386-avx-avx512.c): Remove.
2981 (i386-avx-avx512-linux.c): Remove.
2982 (i386-mpx.c): Remove.
2983 (i386-mpx-linux.c): Remove.
2984 (i386-avx-mpx-avx512-pku.c): Remove.
2985 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2986 (i386-avx-mpx.c): Remove.
2987 (i386-avx-mpx-linux.c): Remove.
2988 (i386-mmx.c): Remove.
2989 (i386-mmx-linux.c): Remove.
2990 (reg-ia64.c): Remove.
2991 (reg-m32r.c): Remove.
2992 (reg-m68k.c): Remove.
2994 (mips-linux.c): Remove.
2995 (mips-dsp-linux.c): Remove.
2996 (mips64-linux.c): Remove.
2997 (mips64-dsp-linux.c): Remove.
2998 (nios2-linux.c): Remove.
2999 (powerpc-32.c): Remove.
3000 (powerpc-32l.c): Remove.
3001 (powerpc-altivec32l.c): Remove.
3002 (powerpc-cell32l.c): Remove.
3003 (powerpc-vsx32l.c): Remove.
3004 (powerpc-isa205-32l.c): Remove.
3005 (powerpc-isa205-altivec32l.c): Remove.
3006 (powerpc-isa205-vsx32l.c): Remove.
3007 (powerpc-e500l.c): Remove.
3008 (powerpc-64l.c): Remove.
3009 (powerpc-altivec64l.c): Remove.
3010 (powerpc-cell64l.c): Remove.
3011 (powerpc-vsx64l.c): Remove.
3012 (powerpc-isa205-64l.c): Remove.
3013 (powerpc-isa205-altivec64l.c): Remove.
3014 (powerpc-isa205-vsx64l.c): Remove.
3015 (s390-linux32.c): Remove.
3016 (s390-linux32v1.c): Remove.
3017 (s390-linux32v2.c): Remove.
3018 (s390-linux64.c): Remove.
3019 (s390-linux64v1.c): Remove.
3020 (s390-linux64v2.c): Remove.
3021 (s390-te-linux64.c): Remove.
3022 (s390-vx-linux64.c): Remove.
3023 (s390-tevx-linux64.c): Remove.
3024 (s390x-linux64.c): Remove.
3025 (s390x-linux64v1.c): Remove.
3026 (s390x-linux64v2.c): Remove.
3027 (s390x-te-linux64.c): Remove.
3028 (s390x-vx-linux64.c): Remove.
3029 (s390x-tevx-linux64.c): Remove.
3030 (tic6x-c64xp-linux.c): Remove.
3031 (tic6x-c64x-linux.c): Remove.
3032 (tic6x-c62x-linux.c): Remove.
3034 (reg-sparc64.c): Remove.
3035 (reg-spu.c): Remove.
3037 (amd64-linux.c): Remove.
3038 (amd64-avx.c): Remove.
3039 (amd64-avx-linux.c): Remove.
3040 (amd64-avx-avx512.c): Remove.
3041 (amd64-avx-avx512-linux.c): Remove.
3042 (amd64-mpx.c): Remove.
3043 (amd64-mpx-linux.c): Remove.
3044 (amd64-avx-mpx-avx512-pku.c): Remove.
3045 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3046 (amd64-avx-mpx.c): Remove.
3047 (amd64-avx-mpx-linux.c): Remove.
3049 (x32-linux.c): Remove.
3050 (x32-avx.c): Remove.
3051 (x32-avx-linux.c): Remove.
3052 (x32-avx-avx512.c): Remove.
3053 (x32-avx-avx512-linux.c): Remove.
3054 (reg-xtensa.c): Remove.
3055 (reg-tilegx.c): Remove.
3056 (reg-tilegx32.c): Remove.
3058 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3060 * Makefile.in (SFILES): Add "common/environ.c".
3061 (OBJS): Add "common/environ.h".
3063 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3065 * configure.ac: Check if the fs_base and gs_base members of
3066 `struct user_regs_struct' exist.
3067 * config.in: Regenerated.
3068 * configure: Likewise.
3070 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3072 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3074 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3075 (get_next_pcs_syscall_next_pc): Likewise.
3077 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3079 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3080 * nto-x86-low.c: Likewise.
3082 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3084 * Makefile.in: Include disable-implicit-rules.mk.
3086 2016-11-23 Pedro Alves <palves@redhat.com>
3088 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3089 (debug_vprintf): Use std::chrono::steady_clock instead of
3090 gettimeofday. Use '.' instead of ':'.
3091 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3092 (get_timestamp): Use std::chrono::steady_clock instead of
3095 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3097 * Makefile.in: Fix whitespace formatting.
3099 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3101 * Makefile.in (SFILES, OBS): Flatten list and order
3104 2016-11-23 Pedro Alves <palves@redhat.com>
3106 * event-loop.c (handle_file_event): Use warning.
3107 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3108 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3111 2016-11-23 Pedro Alves <palves@redhat.com>
3113 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3115 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3116 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3117 debug_printf and debug_flush for debug output.
3118 * server.c (handle_general_set): Likewise.
3119 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3122 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3124 * Makefile.in (.c.o): Replace rule with ...
3125 (%.o: %.c): ... this one.
3127 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3129 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3130 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3132 * configure.ac: Remove checks for the make program.
3133 * configure: Re-generate.
3135 2016-10-28 Pedro Alves <palves@redhat.com>
3137 * Makefile.in (CXX_DIALECT): Get from configure.
3138 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3139 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3140 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3141 * config.in: Regenerate.
3142 * configure: Regenerate.
3144 2016-10-27 Yao Qi <yao.qi@linaro.org>
3146 * linux-low.c (linux_supports_range_stepping): Return true if
3147 can_software_single_step return true.
3149 2016-10-27 Yao Qi <yao.qi@linaro.org>
3151 * inferiors.c (find_inferior_in_random): New function.
3152 * inferiors.h (find_inferior_in_random): Declare.
3153 * linux-low.c (linux_wait_for_event_filtered): Call
3154 find_inferior_in_random instead of find_inferior.
3156 2016-10-27 Yao Qi <yao.qi@linaro.org>
3158 * linux-low.c (linux_wait_1): If single-step breakpoints are
3159 inserted, remove them.
3161 2016-10-26 Pedro Alves <palves@redhat.com>
3163 * linux-low.c (handle_extended_wait): Link parent/child fork
3165 (linux_wait_1): Unlink them.
3166 (linux_set_resume_request): Ignore resume requests for
3167 already-resumed and unhandled fork child threads.
3168 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3169 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3171 (handle_v_requests) <vCont>: Don't call require_running.
3172 * server.h (in_queued_stop_replies): New declaration.
3174 2016-10-24 Yao Qi <yao.qi@linaro.org>
3177 * linux-aarch64-low.c (append_insns): Cast the return value to
3180 2016-10-10 Yao Qi <yao.qi@linaro.org>
3182 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3184 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3186 * target.c (target_supports_multi_process): New function, moved
3188 * target.h (target_supports_multi_process): ... here. Remove
3191 2016-10-05 Tom Tromey <tom@tromey.com>
3194 * tracepoint.c (handle_tracepoint_bkpts): Check
3195 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3197 2016-10-05 Yao Qi <yao.qi@linaro.org>
3199 * configure.srv: Update the path of arm-*.xml files.
3201 2016-10-05 Terry Guo <terry.guo@arm.com>
3202 Yao Qi <yao.qi@linaro.org>
3204 * Makefile.in: Adjust the path of rules.
3205 * configure.srv: Update the path of xml files.
3206 * regformats/arm-with-iwmmxt.dat: Regenerated.
3207 * regformats/arm-with-neon.dat: Likewise.
3208 * regformats/arm-with-vfpv2.dat: Likewise.
3209 * regformats/arm-with-vfpv3.dat Likewise.
3211 2016-09-30 Yao Qi <yao.qi@linaro.org>
3214 * target.c (target_stop_and_wait): Don't call
3215 target_continue_no_signal, use resume_stop instead.
3217 2016-09-26 Yao Qi <yao.qi@linaro.org>
3219 * linux-low.c (linux_wait_1): Call debug_exit.
3221 2016-09-23 Pedro Alves <palves@redhat.com>
3223 * Makefile.in (SFILES): Add common/new-op.c.
3224 (OBS): Add common/new-op.o.
3225 (new-op.o): New rule.
3227 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3229 * .gitinore: Ignore more files.
3231 2016-09-21 Yao Qi <yao.qi@linaro.org>
3233 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3236 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3238 * server.c (start_inferior): Call target_mourn_inferior instead of
3239 mourn_inferior; pass ptid_t argument to it.
3241 (handle_target_event): Likewise.
3242 * target.c (target_mourn_inferior): New function.
3243 * target.h (mourn_inferior): Delete macro.
3245 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3247 * linux-low.c (lwp_is_stepping): New function.
3249 2016-09-06 Carl Love <cel@us.ibm.com>
3251 * server.c (start_inferior): Fixed comment, requested comment change
3252 didn't get updated correctly. Removed reference to ptrace () call as
3253 it is only true on Linux systems.
3255 2016-09-06 Carl Love <cel@us.ibm.com>
3257 * server.c (start_inferior): Do not call
3258 function target_post_create_inferior () if the
3259 inferior process has already exited.
3261 2016-09-05 Pedro Alves <palves@redhat.com>
3263 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3264 (COMPILE.pre, CC_LD): Use CXX directly.
3265 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3266 * acinclude.m4: Don't include build-with-cxx.m4.
3267 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3268 * configure: Regenerate.
3270 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3273 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3274 call writing data to own_buf.
3276 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3278 * target.c (mywait): Call target_wait instead of
3280 (target_wait): New function.
3282 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3284 * server.c (start_inferior): New variable 'ptid'. Replace calls
3285 to the_target->resume by target_continue{,_no_signal}, depending
3287 * target.c (target_stop_and_wait): Call target_continue_no_signal
3288 instead of the_target->resume.
3289 (target_continue): New function.
3291 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3293 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3295 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3298 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3300 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3301 * linux-arm-low.c (ps_get_thread_area): Likewise.
3302 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3303 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3304 * linux-mips-low.c (ps_get_thread_area): Likewise.
3305 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3306 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3307 * linux-x86-low.c (ps_get_thread_area): Likewise.
3308 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3310 2016-08-19 Pedro Alves <palves@redhat.com>
3312 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3314 2016-08-19 Pedro Alves <palves@redhat.com>
3316 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3317 comment. Use memcpy instead of casting through unsigned long.
3319 2016-08-19 Pedro Alves <palves@redhat.com>
3321 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3322 allocating around 0x80000000.
3324 2016-08-19 Pedro Alves <palves@redhat.com>
3327 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3328 (x32-avx512-linux-ipa.o): New rules.
3329 * configure.ac (x86_64-*-linux*): New x32 check.
3330 * configure.srv (ipa_x32_linux_regobj): New.
3331 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3332 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3334 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3336 * configure: Regenerate.
3338 2016-08-09 Pedro Alves <palves@redhat.com>
3341 * Makefile.in (OBS): Add signals-state-save-restore.o.
3342 (signals-state-save-restore.o): New rule.
3343 * config.in: Regenerate.
3344 * configure: Regenerate.
3345 * linux-low.c: Include "signals-state-save-restore.h".
3346 (linux_create_inferior): Call
3347 restore_original_signals_state.
3348 * server.c: Include "dispositions-save-restore.h".
3349 (captured_main): Call save_original_signals_state.
3351 2016-08-05 Pedro Alves <palves@redhat.com>
3353 * configure: Regenerate.
3355 2016-08-04 Yao Qi <yao.qi@linaro.org>
3357 * linux-low.c (regsets_fetch_inferior_registers): Check
3358 errno is ESRCH or not.
3360 2016-08-02 Yao Qi <yao.qi@linaro.org>
3362 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3363 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3364 (thread_db_load_search): Update.
3365 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3366 td_ta_set_event and td_ta_event_getmsg.
3368 2016-07-26 Pedro Alves <palves@redhat.com>
3371 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3372 of unsigned long for 64-bit registers and use uint32_t instead of
3373 unsigned int for 32-bit registers.
3375 2016-07-26 Pedro Alves <palves@redhat.com>
3377 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3380 2016-07-21 Tom Tromey <tom@tromey.com>
3382 * configure: Rebuild.
3384 2016-07-21 Yao Qi <yao.qi@linaro.org>
3386 * mem-break.c (find_gdb_breakpoint): Cast bp to
3387 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3389 2016-07-21 Yao Qi <yao.qi@linaro.org>
3391 * server.c (handle_v_requests): Support s and S actions
3392 if target_supports_software_single_step return true.
3394 2016-07-21 Yao Qi <yao.qi@linaro.org>
3396 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3397 is resume_step, call maybe_hw_step.
3398 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3400 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3402 (proceed_one_lwp): If resume request is resume_step, install
3403 reinsert breakpoints and call maybe_hw_step.
3405 2016-07-21 Yao Qi <yao.qi@linaro.org>
3407 * linux-low.c (proceed_one_lwp): Declare.
3408 (linux_resume_one_thread): Remove local variable 'step'.
3409 Lift code enqueue signal. Call proceed_one_lwp instead of
3410 linux_resume_one_lwp.
3412 2016-07-21 Yao Qi <yao.qi@linaro.org>
3414 * linux-low.c (linux_resume_one_thread): Call
3415 enqueue_pending_signal.
3417 2016-07-21 Yao Qi <yao.qi@linaro.org>
3419 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3420 * inferiors.c (do_restore_current_thread_cleanup): New function.
3421 (make_cleanup_restore_current_thread): Likewise.
3422 * linux-low.c (install_software_single_step_breakpoints): Call
3423 make_cleanup_restore_current_thread. Switch current_thread to
3426 2016-07-21 Yao Qi <yao.qi@linaro.org>
3428 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3429 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3430 (clone_one_breakpoint): Likewise.
3431 (delete_reinsert_breakpoints): Change parameter to thread.
3433 (has_reinsert_breakpoints): Likewise.
3434 (uninsert_reinsert_breakpoints): Likewise.
3435 (reinsert_reinsert_breakpoints): Likewise.
3436 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3437 (delete_reinsert_breakpoints): Likewise.
3438 (reinsert_reinsert_breakpoints): Likewise.
3439 (uninsert_reinsert_breakpoints): Likewise.
3440 (has_reinsert_breakpoints): Likewise.
3442 2016-07-21 Yao Qi <yao.qi@linaro.org>
3444 * inferiors.c (get_thread_process): Make parameter const.
3445 * inferiors.h (get_thread_process): Update declaration.
3446 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3447 Add new parameters child_thread and parent_thread. Callers
3449 * mem-break.h (clone_all_breakpoints): Update declaration.
3451 2016-07-21 Yao Qi <yao.qi@linaro.org>
3453 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3454 <command_list, handler>: Remove.
3455 (struct gdb_breakpoint): New.
3456 (struct other_breakpoint): New.
3457 (struct reinsert_breakpoint): New.
3458 (is_gdb_breakpoint): New function.
3459 (any_persistent_commands): Update command_list if
3460 is_gdb_breakpoint returns true.
3461 (set_breakpoint): Create breakpoints according to their types.
3462 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3463 (set_gdb_breakpoint_1): Likewise.
3464 (set_gdb_breakpoint): Likewise.
3465 (clear_breakpoint_conditions): Change parameter type to
3466 'struct gdb_breakpoint *'.
3467 (clear_breakpoint_commands): Likewise.
3468 (clear_breakpoint_conditions_and_commands): Likewise.
3469 (add_condition_to_breakpoint): Likewise.
3470 (add_breakpoint_condition): Likewise.
3471 (add_commands_to_breakpoint): Likewise.
3472 (check_breakpoints): Check other_breakpoint.
3473 (clone_one_breakpoint): Clone breakpopint according to its type.
3474 * mem-break.h (struct gdb_breakpoint): Declare.
3475 (set_gdb_breakpoint): Update declaration.
3476 (clear_breakpoint_conditions_and_commands): Likewise.
3477 (add_breakpoint_condition): Likewise.
3478 (add_breakpoint_commands): Likewise.
3479 * server.c (process_point_options): Change parameter type to
3480 'struct gdb_breakpoint *'.
3482 2016-07-21 Yao Qi <yao.qi@linaro.org>
3484 * mem-break.c (set_breakpoint_at): Rename it to ...
3485 (set_breakpoint_type_at): ... it.
3486 (set_breakpoint_at): Call set_breakpoint_type_at.
3487 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3488 * mem-break.h (set_breakpoint_at): Update comments.
3490 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3492 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3494 (nios2_store_gregset): Likewise.
3496 2016-07-01 Pedro Alves <palves@redhat.com>
3497 Antoine Tremblay <antoine.tremblay@ericsson.com>
3499 * linux-low.c: Change interface to take the target lwp_info
3500 pointer directly and return void. Handle detaching from a zombie
3502 (linux_detach_lwp_callback): New function.
3503 (linux_detach): Detach from the leader thread after detaching from
3506 2016-06-28 Yao Qi <yao.qi@linaro.org>
3508 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3509 for variable new_offset.
3510 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3511 (aarch64_ftrace_insn_reloc_cb): Likewise.
3512 (aarch64_ftrace_insn_reloc_tb): Likewise.
3513 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3514 PRIx64 instead of PRIx32.
3516 2016-06-28 Yao Qi <yao.qi@linaro.org>
3518 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3519 (the_low_target): Install arm_get_syscall_trapinfo.
3521 2016-06-28 Yao Qi <yao.qi@linaro.org>
3523 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3525 (the_low_target): Install aarch64_get_syscall_trapinfo.
3527 2016-06-28 Yao Qi <yao.qi@linaro.org>
3529 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3531 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3532 Remove parameter sysno.
3533 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3536 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3538 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3539 (s390_emit_ne_goto): Likewise.
3540 (s390_emit_lt_goto): Likewise.
3541 (s390_emit_le_goto): Likewise.
3542 (s390_emit_gt_goto): Likewise.
3543 (s390_emit_ge_goto): Likewise.
3544 (s390x_emit_eq_goto): Likewise.
3545 (s390x_emit_ne_goto): Likewise.
3546 (s390x_emit_lt_goto): Likewise.
3547 (s390x_emit_le_goto): Likewise.
3548 (s390x_emit_gt_goto): Likewise.
3549 (s390x_emit_ge_goto): Likewise.
3550 (s390_emit_ops_impl): Mark variable static.
3551 (s390x_emit_ops): Likewise.
3553 2016-06-17 Yao Qi <yao.qi@linaro.org>
3555 * linux-low.c (handle_extended_wait): Call
3556 uninsert_reinsert_breakpoints for the parent process. Remove
3557 reinsert breakpoints from the child process. Reinsert them to
3558 the parent process when vfork is done.
3559 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3560 (reinsert_reinsert_breakpoints): New function.
3561 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3562 (reinsert_reinsert_breakpoints): Declare.
3564 2016-06-17 Yao Qi <yao.qi@linaro.org>
3566 * linux-low.c (handle_extended_wait): If the parent is doing
3567 step-over, remove the reinsert breakpoints from the forked child.
3569 2016-06-17 Yao Qi <yao.qi@linaro.org>
3571 * linux-low.c (unsuspend_all_lwps): Declare.
3572 (linux_low_filter_event): If thread exited, call finish_step_over.
3573 If step-over is finished, unsuspend other threads.
3575 2016-06-17 Yao Qi <yao.qi@linaro.org>
3577 * linux-low.c (linux_resume_one_lwp_throw): Assert
3578 has_reinsert_breakpoints returns false.
3579 * mem-break.c (delete_disabled_breakpoints): Assert
3580 bp type isn't reinsert_breakpoint.
3582 2016-06-17 Yao Qi <yao.qi@linaro.org>
3584 * linux-low.c (maybe_hw_step): New function.
3585 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3586 (finish_step_over): Switch current_thread to lwp temporarily,
3587 and assert has_reinsert_breakpoints returns true.
3588 (proceed_one_lwp): Call maybe_hw_step.
3589 * mem-break.c (has_reinsert_breakpoints): New function.
3590 * mem-break.h (has_reinsert_breakpoints): Declare.
3592 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3594 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3596 2016-05-17 Yao Qi <yao.qi@linaro.org>
3598 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3599 instead of find_inferior.
3601 2016-05-05 Yao Qi <yao.qi@linaro.org>
3603 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3604 Initialize res to zero.
3606 2016-05-05 Yao Qi <yao.qi@linaro.org>
3608 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3611 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3613 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3614 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3615 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3617 2016-04-28 Par Olsson <par.olsson@windriver.com>
3618 Simon Marchi <simon.marchi@ericsson.com>
3620 * tracepoint.c (write_inferior_int8): New function.
3621 (cmd_qtenable_disable): Write enable flag using
3622 write_inferior_int8.
3624 2016-04-25 Yao Qi <yao.qi@linaro.org>
3626 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3627 (need_step_over_p): Return zero if the LWP has pending signals
3628 can be delivered on software single step target.
3630 2016-04-25 Yao Qi <yao.qi@linaro.org>
3632 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3633 return instead of error.
3635 2016-04-22 Yao Qi <yao.qi@linaro.org>
3637 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3640 2016-04-22 Yao Qi <yao.qi@linaro.org>
3642 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3643 signal when stepping over breakpoint with software single
3646 2016-04-21 Pedro Alves <palves@redhat.com>
3648 * linux-s390-low.c (s390_collect_ptrace_register)
3649 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3651 (s390_check_regset): Use void * instead of gdb_byte *.
3653 2016-04-20 Pedro Alves <palves@redhat.com>
3655 * configure: Renegerate.
3657 2016-04-20 Yao Qi <yao.qi@linaro.org>
3659 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3660 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3662 (arm_store_gregset): Likewise.
3664 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3666 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3667 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3668 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3669 (amd64-avx-mpx-linux.c): New rules.
3670 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3671 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3672 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3673 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3674 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3675 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3676 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3677 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3678 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3679 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3680 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3681 * linux-x86-low.c (x86_linux_read_description): Add case for
3682 X86_XSTATE_AVX_MPX_MASK.
3683 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3684 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3685 init_registers_i386_avx_mpx_linux.
3686 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3687 (initialize_low_tracepoint): Call
3688 init_registers_i386_avx_mpx_linux.
3689 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3690 (initialize_low_tracepoint): Call
3691 init_registers_amd64_avx_mpx_linux.
3692 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3693 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3694 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3697 2016-04-18 Pedro Alves <palves@redhat.com>
3699 * configure: Regenerate.
3701 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3703 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3704 (aarch64_emit_sub): Likewise.
3706 2016-04-12 Pedro Alves <palves@redhat.com>
3708 * utils.c (prepare_to_throw_exception): Delete.
3710 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3712 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3714 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3716 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3718 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3720 * linux-aarch64-ipa.c: Add <elf.h> include.
3721 * linux-ppc-ipa.c: Add <elf.h> include.
3722 * linux-s390-ipa.c: Add <elf.h> include.
3724 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3726 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3727 (get_raw_reg_ptr): Likewise.
3728 (get_trace_state_variable_value_ptr): Likewise.
3729 (set_trace_state_variable_value_ptr): Likewise.
3730 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3733 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3734 Marcin Kościelnicki <koriakin@0x04.net>
3737 * linux-ppc-low.c (emit_insns): New function.
3738 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3739 (ppc_emit_prologue): New function.
3740 (ppc_emit_epilogue): New function.
3741 (ppc_emit_add): New function.
3742 (ppc_emit_sub): New function.
3743 (ppc_emit_mul): New function.
3744 (ppc_emit_lsh): New function.
3745 (ppc_emit_rsh_signed): New function.
3746 (ppc_emit_rsh_unsigned): New function.
3747 (ppc_emit_ext): New function.
3748 (ppc_emit_zero_ext): New function.
3749 (ppc_emit_log_not): New function.
3750 (ppc_emit_bit_and): New function.
3751 (ppc_emit_bit_or): New function.
3752 (ppc_emit_bit_xor): New function.
3753 (ppc_emit_bit_not): New function.
3754 (ppc_emit_equal): New function.
3755 (ppc_emit_less_signed): New function.
3756 (ppc_emit_less_unsigned): New function.
3757 (ppc_emit_ref): New function.
3758 (ppc_emit_const): New function.
3759 (ppc_emit_reg): New function.
3760 (ppc_emit_pop): New function.
3761 (ppc_emit_stack_flush): New function.
3762 (ppc_emit_swap): New function.
3763 (ppc_emit_stack_adjust): New function.
3764 (ppc_emit_call): New function.
3765 (ppc_emit_int_call_1): New function.
3766 (ppc_emit_void_call_2): New function.
3767 (ppc_emit_if_goto): New function.
3768 (ppc_emit_goto): New function.
3769 (ppc_emit_eq_goto): New function.
3770 (ppc_emit_ne_goto): New function.
3771 (ppc_emit_lt_goto): New function.
3772 (ppc_emit_le_goto): New function.
3773 (ppc_emit_gt_goto): New function.
3774 (ppc_emit_ge_goto): New function.
3775 (ppc_write_goto_address): New function.
3776 (ppc_emit_ops_impl): New static variable.
3777 (ppc64v1_emit_prologue): New function.
3778 (ppc64v2_emit_prologue): New function.
3779 (ppc64_emit_epilogue): New function.
3780 (ppc64_emit_add): New function.
3781 (ppc64_emit_sub): New function.
3782 (ppc64_emit_mul): New function.
3783 (ppc64_emit_lsh): New function.
3784 (ppc64_emit_rsh_signed): New function.
3785 (ppc64_emit_rsh_unsigned): New function.
3786 (ppc64_emit_ext): New function.
3787 (ppc64_emit_zero_ext): New function.
3788 (ppc64_emit_log_not): New function.
3789 (ppc64_emit_bit_and): New function.
3790 (ppc64_emit_bit_or): New function.
3791 (ppc64_emit_bit_xor): New function.
3792 (ppc64_emit_bit_not): New function.
3793 (ppc64_emit_equal): New function.
3794 (ppc64_emit_less_signed): New function.
3795 (ppc64_emit_less_unsigned): New function.
3796 (ppc64_emit_ref): New function.
3797 (ppc64_emit_const): New function.
3798 (ppc64v1_emit_reg): New function.
3799 (ppc64v2_emit_reg): New function.
3800 (ppc64_emit_pop): New function.
3801 (ppc64_emit_stack_flush): New function.
3802 (ppc64_emit_swap): New function.
3803 (ppc64v1_emit_call): New function.
3804 (ppc64v2_emit_call): New function.
3805 (ppc64v1_emit_int_call_1): New function.
3806 (ppc64v2_emit_int_call_1): New function.
3807 (ppc64v1_emit_void_call_2): New function.
3808 (ppc64v2_emit_void_call_2): New function.
3809 (ppc64_emit_if_goto): New function.
3810 (ppc64_emit_eq_goto): New function.
3811 (ppc64_emit_ne_goto): New function.
3812 (ppc64_emit_lt_goto): New function.
3813 (ppc64_emit_le_goto): New function.
3814 (ppc64_emit_gt_goto): New function.
3815 (ppc64_emit_ge_goto): New function.
3816 (ppc64v1_emit_ops_impl): New static variable.
3817 (ppc64v2_emit_ops_impl): New static variable.
3818 (ppc_emit_ops): New function.
3819 (linux_low_target): Wire in ppc_emit_ops.
3821 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3822 Marcin Kościelnicki <koriakin@0x04.net>
3825 * Makefile.in: Add powerpc-*-ipa.o
3826 * configure.srv: Add ipa_obj for powerpc*-linux.
3827 * linux-ppc-ipa.c: New file.
3828 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3830 (PPC_FIELD): New macro.
3831 (PPC_SEXT): New macro.
3832 (PPC_OP6): New macro.
3833 (PPC_BO): New macro.
3834 (PPC_LI): New macro.
3835 (PPC_BD): New macro.
3836 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3837 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3838 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3839 (ppc_get_thread_area): New function.
3840 (is_elfv2_inferior): New function.
3841 (gen_ds_form): New function.
3842 (GEN_STD): New macro.
3843 (GEN_STDU): New macro.
3844 (GEN_LD): New macro.
3845 (GEN_LDU): New macro.
3846 (gen_d_form): New function.
3847 (GEN_ADDI): New macro.
3848 (GEN_ADDIS): New macro.
3849 (GEN_LI): New macro.
3850 (GEN_LIS): New macro.
3851 (GEN_ORI): New macro.
3852 (GEN_ORIS): New macro.
3853 (GEN_LWZ): New macro.
3854 (GEN_STW): New macro.
3855 (GEN_STWU): New macro.
3856 (gen_xfx_form): New function.
3857 (GEN_MFSPR): New macro.
3858 (GEN_MTSPR): New macro.
3859 (GEN_MFCR): New macro.
3860 (GEN_MTCR): New macro.
3861 (GEN_SYNC): New macro.
3862 (GEN_LWSYNC): New macro.
3863 (gen_x_form): New function.
3864 (GEN_OR): New macro.
3865 (GEN_MR): New macro.
3866 (GEN_LWARX): New macro.
3867 (GEN_STWCX): New macro.
3868 (GEN_CMPW): New macro.
3869 (gen_md_form): New function.
3870 (GEN_RLDICL): New macro.
3871 (GEN_RLDICR): New macro.
3872 (gen_i_form): New function.
3874 (GEN_BL): New macro.
3875 (gen_b_form): New function.
3876 (GEN_BNE): New macro.
3877 (GEN_LOAD): New macro.
3878 (GEN_STORE): New macro.
3879 (gen_limm): New function.
3880 (gen_atomic_xchg): New function.
3881 (gen_call): New function.
3882 (ppc_relocate_instruction): New function.
3883 (ppc_install_fast_tracepoint_jump_pad): New function.
3884 (ppc_get_min_fast_tracepoint_insn_len): New function.
3885 (ppc_get_ipa_tdesc_idx): New function.
3886 (the_low_target): Wire in the new functions.
3887 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3889 * linux-ppc-tdesc.h: New file.
3891 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3893 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3894 (alloc_jump_pad_buffer): New function.
3895 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3896 (alloc_jump_pad_buffer): New function.
3897 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3898 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3899 (alloc_jump_pad_buffer): New function.
3900 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3901 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3902 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3903 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3905 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3907 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3908 * linux-amd64-ipa.c: Likewise.
3909 * linux-i386-ipa.c: Likewise.
3910 * linux-s390-ipa.c: Likewise.
3911 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3912 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3913 set_trace_state_variable_value_ptr.
3914 (struct ipa_sym_addresses): Likewise.
3915 (symbol_list): Likewise.
3916 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3917 accessing gdb_collect directly.
3918 (gdb_collect_ptr_type): New typedef.
3919 (get_raw_reg_ptr_type): New typedef.
3920 (get_trace_state_variable_value_ptr_type): New typedef.
3921 (set_trace_state_variable_value_ptr_type): New typedef.
3922 (gdb_collect_ptr): New global.
3923 (get_raw_reg_ptr): New global.
3924 (get_trace_state_variable_value_ptr): New global.
3925 (set_trace_state_variable_value_ptr): New global.
3926 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3927 accessing get_raw_reg directly.
3928 (get_get_tsv_func_addr): Likewise for
3929 get_trace_state_variable_value_ptr.
3930 (get_set_tsv_func_addr): Likewise for
3931 set_trace_state_variable_value_ptr.
3932 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3934 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3936 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3938 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3940 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3942 (relocate_instruction): Remove own_buf.
3943 * server.c (own_buf): Make global.
3944 (handle_v_requests): Make global.
3945 * server.h (own_buf): New declaration.
3946 (handle_v_requests): New prototype.
3948 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3951 * linux-s390-low.c (add_insns): New function.
3952 (s390_emit_prologue): New function.
3953 (s390_emit_epilogue): New function.
3954 (s390_emit_add): New function.
3955 (s390_emit_sub): New function.
3956 (s390_emit_mul): New function.
3957 (s390_emit_lsh): New function.
3958 (s390_emit_rsh_signed): New function.
3959 (s390_emit_rsh_unsigned): New function.
3960 (s390_emit_ext): New function.
3961 (s390_emit_log_not): New function.
3962 (s390_emit_bit_and): New function.
3963 (s390_emit_bit_or): New function.
3964 (s390_emit_bit_xor): New function.
3965 (s390_emit_bit_not): New function.
3966 (s390_emit_equal): New function.
3967 (s390_emit_less_signed): New function.
3968 (s390_emit_less_unsigned): New function.
3969 (s390_emit_ref): New function.
3970 (s390_emit_if_goto): New function.
3971 (s390_emit_goto): New function.
3972 (s390_write_goto_address): New function.
3973 (s390_emit_litpool): New function.
3974 (s390_emit_const): New function.
3975 (s390_emit_call): New function.
3976 (s390_emit_reg): New function.
3977 (s390_emit_pop): New function.
3978 (s390_emit_stack_flush): New function.
3979 (s390_emit_zero_ext): New function.
3980 (s390_emit_swap): New function.
3981 (s390_emit_stack_adjust): New function.
3982 (s390_emit_set_r2): New function.
3983 (s390_emit_int_call_1): New function.
3984 (s390_emit_void_call_2): New function.
3985 (s390_emit_eq_goto): New function.
3986 (s390_emit_ne_goto): New function.
3987 (s390_emit_lt_goto): New function.
3988 (s390_emit_le_goto): New function.
3989 (s390_emit_gt_goto): New function.
3990 (s390_emit_ge_goto): New function.
3991 (s390x_emit_prologue): New function.
3992 (s390x_emit_epilogue): New function.
3993 (s390x_emit_add): New function.
3994 (s390x_emit_sub): New function.
3995 (s390x_emit_mul): New function.
3996 (s390x_emit_lsh): New function.
3997 (s390x_emit_rsh_signed): New function.
3998 (s390x_emit_rsh_unsigned): New function.
3999 (s390x_emit_ext): New function.
4000 (s390x_emit_log_not): New function.
4001 (s390x_emit_bit_and): New function.
4002 (s390x_emit_bit_or): New function.
4003 (s390x_emit_bit_xor): New function.
4004 (s390x_emit_bit_not): New function.
4005 (s390x_emit_equal): New function.
4006 (s390x_emit_less_signed): New function.
4007 (s390x_emit_less_unsigned): New function.
4008 (s390x_emit_ref): New function.
4009 (s390x_emit_if_goto): New function.
4010 (s390x_emit_const): New function.
4011 (s390x_emit_call): New function.
4012 (s390x_emit_reg): New function.
4013 (s390x_emit_pop): New function.
4014 (s390x_emit_stack_flush): New function.
4015 (s390x_emit_zero_ext): New function.
4016 (s390x_emit_swap): New function.
4017 (s390x_emit_stack_adjust): New function.
4018 (s390x_emit_int_call_1): New function.
4019 (s390x_emit_void_call_2): New function.
4020 (s390x_emit_eq_goto): New function.
4021 (s390x_emit_ne_goto): New function.
4022 (s390x_emit_lt_goto): New function.
4023 (s390x_emit_le_goto): New function.
4024 (s390x_emit_gt_goto): New function.
4025 (s390x_emit_ge_goto): New function.
4026 (s390_emit_ops): New function.
4027 (struct linux_target_ops): Fill in emit_ops hook.
4029 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4032 * Makefile.in: Add s390 IPA files.
4033 * configure.srv: Build IPA for s390.
4034 * linux-s390-ipa.c: New file.
4035 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4036 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4037 (tdesc_s390_linux32): Likewise.
4038 (init_registers_s390_linux32v1): Likewise.
4039 (tdesc_s390_linux32v1): Likewise.
4040 (init_registers_s390_linux32v2): Likewise.
4041 (tdesc_s390_linux32v2): Likewise.
4042 (init_registers_s390_linux64): Likewise.
4043 (tdesc_s390_linux64): Likewise.
4044 (init_registers_s390_linux64v1): Likewise.
4045 (tdesc_s390_linux64v1): Likewise.
4046 (init_registers_s390_linux64v2): Likewise.
4047 (tdesc_s390_linux64v2): Likewise.
4048 (init_registers_s390_te_linux64): Likewise.
4049 (tdesc_s390_te_linux64): Likewise.
4050 (init_registers_s390_vx_linux64): Likewise.
4051 (tdesc_s390_vx_linux64): Likewise.
4052 (init_registers_s390_tevx_linux64): Likewise.
4053 (tdesc_s390_tevx_linux64): Likewise.
4054 (init_registers_s390x_linux64): Likewise.
4055 (tdesc_s390x_linux64): Likewise.
4056 (init_registers_s390x_linux64v1): Likewise.
4057 (tdesc_s390x_linux64v1): Likewise.
4058 (init_registers_s390x_linux64v2): Likewise.
4059 (tdesc_s390x_linux64v2): Likewise.
4060 (init_registers_s390x_te_linux64): Likewise.
4061 (tdesc_s390x_te_linux64): Likewise.
4062 (init_registers_s390x_vx_linux64): Likewise.
4063 (tdesc_s390x_vx_linux64): Likewise.
4064 (init_registers_s390x_tevx_linux64): Likewise.
4065 (tdesc_s390x_tevx_linux64): Likewise.
4066 (have_hwcap_s390_vx): New static variable.
4067 (s390_arch_setup): Fill have_hwcap_s390_vx.
4068 (s390_get_thread_area): New function.
4069 (s390_ft_entry_gpr_esa): New const.
4070 (s390_ft_entry_gpr_zarch): New const.
4071 (s390_ft_entry_misc): New const.
4072 (s390_ft_entry_fr): New const.
4073 (s390_ft_entry_vr): New const.
4074 (s390_ft_main_31): New const.
4075 (s390_ft_main_64): New const.
4076 (s390_ft_exit_fr): New const.
4077 (s390_ft_exit_vr): New const.
4078 (s390_ft_exit_misc): New const.
4079 (s390_ft_exit_gpr_esa): New const.
4080 (s390_ft_exit_gpr_zarch): New const.
4081 (append_insns): New function.
4082 (s390_relocate_instruction): New function.
4083 (s390_install_fast_tracepoint_jump_pad): New function.
4084 (s390_get_min_fast_tracepoint_insn_len): New function.
4085 (s390_get_ipa_tdesc_idx): New function.
4086 (struct linux_target_ops): Wire in the above functions.
4087 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4088 * linux-s390-tdesc.h: New file.
4090 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4092 * linux-s390-low.c (s390_supports_tracepoints): New function.
4093 (struct linux_target_ops): Fill supports_tracepoints hook.
4095 2016-03-18 Yao Qi <yao.qi@linaro.org>
4097 * linux-low.c (lwp_signal_can_be_delivered): New function.
4098 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4100 2016-03-18 Yao Qi <yao.qi@linaro.org>
4102 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4103 0 if signal is enqueued. Remove 'signal' from one debugging
4104 message. Move one debugging message to some lines below.
4105 Remove code setting 'signal' to 0.
4107 2016-03-18 Yao Qi <yao.qi@linaro.org>
4109 * linux-low.c (linux_low_filter_event): Remove redundant
4110 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4112 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4114 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4115 (struct linux_target_ops): Wire in the above.
4117 2016-03-03 Yao Qi <yao.qi@linaro.org>
4119 * linux-low.c: Update comments to start_step_over.
4121 2016-03-03 Yao Qi <yao.qi@linaro.org>
4124 * linux-low.c (handle_extended_wait): Set child suspended
4125 if event_lwp->bp_reinsert isn't zero.
4127 2016-03-02 Yao Qi <yao.qi@linaro.org>
4129 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4130 enqueue_pending_signal.
4132 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4134 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4137 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4139 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4140 (s390_regmap_3264) [!__s390x__]: New global.
4141 (s390_collect_ptrace_register): Skip map entries containing -1.
4142 (s390_supply_ptrace_register): Ditto.
4143 (s390_fill_gprs_high): New function.
4144 (s390_store_gprs_high): New function.
4145 (s390_regsets): Add NT_S390_HIGH_GPRS.
4146 (s390_get_hwcap): Enable on 31-bit.
4147 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4148 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4149 Detect NT_S390_HIGH_GPRS.
4150 (s390_usrregs_info_3264): Enable on 31-bit.
4151 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4152 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4154 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4157 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4158 * configure.srv: Ditto.
4159 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4160 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4161 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4162 (init_registers_amd64_linux): Remove prototype.
4163 (tdesc_amd64_linux): Remove declaration.
4164 (get_ipa_tdesc): New function.
4165 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4166 initialize remaining tdescs.
4167 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4168 (init_registers_i386_linux): Remove prototype.
4169 (tdesc_i386_linux): Remove declaration.
4170 (get_ipa_tdesc): New function.
4171 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4172 initialize remaining tdescs.
4173 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4174 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4175 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4176 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4177 (x86_get_ipa_tdesc_idx): New function.
4178 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4179 * linux-x86-tdesc.h: New file.
4180 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4181 (target_get_ipa_tdesc_idx): New macro.
4182 * tracepoint.c (ipa_tdesc_idx): New macro.
4183 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4184 (symbol_list): Add ipa_tdesc_idx.
4185 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4186 (ipa_tdesc): Remove.
4187 (ipa_tdesc_idx): New variable.
4188 (get_context_regcache): Use get_ipa_tdesc.
4189 (gdb_collect): Ditto.
4191 * tracepoint.h (get_ipa_tdesc): New prototype.
4192 (ipa_tdesc): Remove.
4194 2016-02-24 Pedro Alves <palves@redhat.com>
4196 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4197 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4198 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4199 Factor out common code between the USE_SIGTRAP_SIGINFO and
4200 !USE_SIGTRAP_SIGINFO blocks.
4201 (linux_low_filter_event): Call save_stop_reason instead of
4202 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4204 (linux_wait_1): Update comments.
4206 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4208 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4209 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4210 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4211 ppc_insert_point, ppc_remove_point.
4213 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4215 * linux-s390-low.c (s390_supports_z_point_type): New function.
4216 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4218 2016-02-16 Yao Qi <yao.qi@linaro.org>
4220 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4221 PC. Get pc from regcache_read_pc.
4223 2016-02-12 Yao Qi <yao.qi@linaro.org>
4225 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4226 or linux_get_pc_32bit.
4227 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4229 2016-02-12 Yao Qi <yao.qi@linaro.org>
4231 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4232 arm_linux_get_next_pcs_fixup.
4234 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4236 * tracepoint.c (x_tracepoint_action_download): Change
4237 write_inferior_data_ptr to write_inferior_data_pointer.
4238 (cmd_qtstart): Likewise.
4239 (write_inferior_data_ptr): Remove.
4240 (download_agent_expr): Change write_inferior_data_ptr to
4241 write_inferior_data_pointer.
4242 (download_tracepoint_1): Likewise.
4243 (download_tracepoint): Likewise.
4244 (download_trace_state_variables): Likewise.
4246 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4247 Marcin Kościelnicki <koriakin@0x04.net>
4249 * tracepoint.c (struct tracepoint_action_ops): Remove.
4250 (struct tracepoint_action): Remove ops.
4251 (m_tracepoint_action_download, r_tracepoint_action_download)
4252 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4253 size and offset accordingly.
4254 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4255 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4256 (tracepoint_action_send, tracepoint_action_download): New functions.
4257 Helpers for trace action handlers.
4258 (add_tracepoint_action): Remove setup actions ops.
4259 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4261 2016-02-10 Yao Qi <yao.qi@linaro.org>
4263 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4265 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4267 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4269 * configure: Regenerate.
4271 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4273 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4274 void * to gdb_byte *.
4275 * linux-low.c (siginfo_fixup): Likewise.
4276 (linux_xfer_siginfo): Likewise.
4277 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4279 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4281 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4283 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4285 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4287 * linux-x86-low.c [__x86_64__]: Include
4288 "nat/amd64-linux-siginfo.h".
4289 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4290 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4291 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4292 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4293 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4294 (cpt_si_fd, si_timerid, si_overrun): Move from
4295 nat/amd64-linux-siginfo.c.
4296 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4298 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4300 * server.c (skip_to_semicolon): Remove.
4301 (process_point_options): Use strchrnul instead of
4304 2016-01-26 Yao Qi <yao.qi@linaro.org>
4306 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4307 * linux-low.c (install_software_single_step_breakpoints): Don't
4308 call regcache_read_pc.
4309 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4312 2016-01-26 Yao Qi <yao.qi@linaro.org>
4314 * linux-low.c (install_software_single_step_breakpoints): Call
4315 regcache_read_pc instead of get_pc.
4317 2016-01-26 Yao Qi <yao.qi@linaro.org>
4319 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4320 (unblock_async_io): Rename to ...
4321 (block_unblock_async_io): ... it. New function.
4322 (enable_async_io): Don't install SIGIO handler. Unblock it
4324 (disable_async_io): Don't ignore SIGIO. Block it instead.
4325 (initialize_async_io): Install SIGIO handler. Don't call
4328 2016-01-26 Yao Qi <yao.qi@linaro.org>
4330 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4331 first character is '\003', call *the_target->request_interrupt.
4333 2016-01-25 Yao Qi <yao.qi@linaro.org>
4335 * remote-utils.c (new_thread_notify): Remove.
4336 (dead_thread_notify): Likewise.
4337 * remote-utils.h (new_thread_notify): Remove declaration.
4338 (dead_thread_notify): Likewise.
4340 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4342 * gdb.trace/pending.exp: Fix expected message on continue.
4344 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4346 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4347 it works properly on big-endian machines where sizeof (CORE_ADDR)
4350 2016-01-21 Pedro Alves <palves@redhat.com>
4352 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4353 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4354 * configure: Regenerate.
4356 2016-01-21 Yao Qi <yao.qi@linaro.org>
4358 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4359 is_thumb and set it according to CPSR saved on the stack.
4360 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4361 arm_sigreturn_next_pc.
4363 2016-01-18 Yao Qi <yao.qi@linaro.org>
4365 * linux-low.c (linux_set_pc_64bit): New function.
4366 (linux_get_pc_64bit): New function.
4367 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4369 * linux-sparc-low.c (debug_threads): Remove declaration.
4370 (sparc_get_pc): Remove.
4371 (the_low_target): Use linux_get_pc_64bit instead of
4373 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4374 (the_low_target): Use linux_get_pc_64bit and
4377 2016-01-18 Yao Qi <yao.qi@linaro.org>
4379 * linux-arm-low.c (debug_threads): Remove declaration.
4380 (arm_get_pc, arm_set_pc): Remove.
4381 (the_low_target): Use linux_get_pc_32bit and
4383 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4384 (the_low_target): Use linux_get_pc_32bit and
4386 * linux-cris-low.c (debug_threads): Remove declaration.
4387 (cris_get_pc, cris_set_pc,): Remove.
4388 (the_low_target): Use linux_get_pc_32bit and
4390 * linux-crisv32-low.c (debug_threads): Remove declaration.
4391 (cris_get_pc, cris_set_pc): Remove.
4392 (the_low_target): Use linux_get_pc_32bit and
4394 * linux-low.c: Include inttypes.h.
4395 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4396 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4397 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4398 (the_low_target): Use linux_get_pc_32bit and
4400 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4401 (the_low_target): Use linux_get_pc_32bit and
4403 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4404 (the_low_target): Use linux_get_pc_32bit and
4406 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4407 (the_low_target): Use linux_get_pc_32bit and
4409 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4410 (the_low_target): Use linux_get_pc_32bit and
4413 2016-01-18 Gary Benson <gbenson@redhat.com>
4415 * configure.ac (AC_FUNC_FORK): New check.
4416 * config.in: Regenerate.
4417 * configure: Likewise.
4419 2016-01-14 Yao Qi <yao.qi@linaro.org>
4421 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4422 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4423 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4424 arm_get_next_pcs_ctor.
4426 2016-01-12 Josh Stone <jistone@redhat.com>
4427 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4429 * inferiors.h: Include "gdb_vecs.h".
4430 (struct process_info): Add syscalls_to_catch.
4431 * inferiors.c (remove_process): Free syscalls_to_catch.
4432 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4433 syscall_return stops.
4434 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4435 * server.c (handle_general_set): Handle QCatchSyscalls.
4436 (handle_query): Report support for QCatchSyscalls.
4437 * target.h (struct target_ops): Add supports_catch_syscall.
4438 (target_supports_catch_syscall): New macro.
4439 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4440 (struct lwp_info): Add syscall_state.
4441 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4442 Maintain syscall_state and syscalls_to_catch across exec.
4443 (get_syscall_trapinfo): New function, proxy to the_low_target.
4444 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4445 (linux_low_filter_event): Toggle syscall_state entry/return for
4446 syscall traps, and set it ignored for all others.
4447 (gdb_catching_syscalls_p): New function.
4448 (gdb_catch_this_syscall_p): New function.
4449 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4450 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4451 (linux_supports_catch_syscall): New function.
4452 (linux_target_ops): Install it.
4453 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4454 (the_low_target): Install it.
4456 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4458 * acinclude.m4: Include new ../warning.m4 file.
4459 * configure: Regenerated.
4460 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4462 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4464 * ax.c (is_goto_target): Mark static.
4465 * linux-low.c (register_addr): Likewise.
4466 (linux_fetch_registers, linux_store_registers): Likewise.
4467 * mem-break.c (any_persistent_commands): Fix old prototype.
4468 (add_commands_to_breakpoint): Mark static.
4469 * regcache.c (find_register_by_name): Delete unused func.
4470 * remote-utils.c (hex_or_minus_one): Mark static.
4471 * server.c (monitor_show_help): Mark static.
4472 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4473 handle_v_requests): Likewise.
4475 2016-01-12 Pedro Alves <palves@redhat.com>
4477 Remove use of the registered trademark symbol throughout.
4479 2016-01-08 Yao Qi <yao.qi@linaro.org>
4481 * remote-utils.c (getpkt): If c is '\003', call target hook
4484 2016-01-06 Yao Qi <yao.qi@linaro.org>
4486 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4487 linux-aarch32-low.c.
4488 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4489 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4490 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4491 (thumb2_breakpoint): Declare.
4492 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4493 linux-aarch32-low.h.
4494 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4495 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4496 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4498 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4500 * gdbreplay.c (gdbreplay_version): Change copyright year in
4502 * server.c (gdbserver_version): Likewise.
4504 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4506 * server.c (crc32_table): Delete.
4507 (crc32): Use libiberty's xcrc32 function.
4509 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4511 * lynx-low.c (lynx_delete_thread_callback): New function.
4512 (lynx_mourn): Properly delete our process and all of its
4513 threads. Remove call to clear_inferiors.
4515 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4517 * target.c (thread_search_callback): Add check that
4518 the thread_stopped target callback is not NULL before
4521 2015-12-21 Yao Qi <yao.qi@linaro.org>
4523 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4526 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4528 * server.c (handle_query): Call target_supports_software_single_step.
4530 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4532 * linux-low.c (single_step): New function.
4533 (linux_resume_one_lwp_throw): Call single_step.
4534 (start_step_over): Likewise.
4536 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4538 * Makefile.in (SFILES): Append arch/arm-linux.c,
4539 arch/arm-get-next-pcs.c.
4540 (arm-linux.o): New rule.
4541 (arm-get-next-pcs.o): New rule.
4542 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4544 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4545 to linux-aarch32-low.c.
4546 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4547 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4548 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4549 (thumb2_breakpoint_len): Likewise.
4550 (arm_is_thumb_mode): Make non-static.
4551 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4552 from linux-aarch32-low.c.
4553 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4554 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4555 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4556 (thumb2_breakpoint_len): Likewise.
4557 (arm_is_thumb_mode): New declaration.
4558 * linux-arm-low.c: Include arch/arm-linux.h
4559 aarch/arm-get-next-pcs.h, sys/syscall.h.
4560 (get_next_pcs_ops): New struct.
4561 (get_next_pcs_addr_bits_remove): New function.
4562 (get_next_pcs_is_thumb): New function.
4563 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4564 (arm_sigreturn_next_pc): Likewise.
4565 (get_next_pcs_syscall_next_pc): Likewise.
4566 (arm_gdbserver_get_next_pcs): Likewise.
4567 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4569 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4570 * server.h: Include gdb_vecs.h.
4572 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4574 * Makefile.in (SFILES): Append common/common-regcache.c.
4575 (OBS): Append common-regcache.o.
4576 (common-regcache.o): New rule.
4577 * regcache.c (init_register_cache): Initialize cache to
4579 (regcache_raw_read_unsigned): New function.
4580 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4581 register_status enum.
4583 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4585 * linux-aarch64-low.c (the_low_targets): Rename
4586 breakpoint_reinsert_addr to get_next_pcs.
4587 * linux-arm-low.c (the_low_targets): Likewise.
4588 * linux-bfin-low.c (the_low_targets): Likewise.
4589 * linux-cris-low.c (the_low_targets): Likewise.
4590 * linux-crisv32-low.c (the_low_targets): Likewise.
4591 * linux-low.c (can_software_single_step): Likewise.
4592 (install_software_single_step_breakpoints): New function.
4593 (start_step_over): Use install_software_single_step_breakpoints.
4594 * linux-low.h: New CORE_ADDR vector.
4595 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4597 * linux-mips-low.c (the_low_targets): Likewise.
4598 * linux-nios2-low.c (the_low_targets): Likewise.
4599 * linux-sparc-low.c (the_low_targets): Likewise.
4601 2015-12-17 Pedro Alves <palves@redhat.com>
4603 * linux-low.c (linux_kill_one_lwp): Remove references to
4605 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4607 (linux_init_signals): Delete.
4608 (initialize_low): Adjust.
4609 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4611 2015-12-16 Pedro Alves <palves@redhat.com>
4613 * configure.ac (compiler warning flags): When testing a
4614 -Wno-foo option, check whether -Wfoo works instead.
4615 * configure: Regenerate.
4617 2015-12-11 Don Breazeal <donb@codesourcery.com>
4619 * server.c (process_serial_event): Don't exit from gdbserver
4620 in remote mode if there are still active inferiors.
4622 2015-12-11 Yao Qi <yao.qi@linaro.org>
4624 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4625 arm_breakpoint_at if the process is 32-bit.
4627 2015-12-11 Yao Qi <yao.qi@linaro.org>
4629 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4632 2015-12-07 Yao Qi <yao.qi@linaro.org>
4634 * configure.srv: Append arm.o to srv_tgtobj for
4635 aarch64*-*-linux* target.
4636 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4637 from linux-arm-low.c.
4638 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4639 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4640 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4641 (thumb2_breakpoint_len): Likewise.
4642 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4643 (arm_breakpoint_kinds): Likewise.
4644 (arm_breakpoint_kind_from_pc): Likewise.
4645 (arm_sw_breakpoint_from_kind): Likewise.
4646 (arm_breakpoint_kind_from_current_state): Likewise.
4647 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4648 (arm_sw_breakpoint_from_kind): Declare.
4649 (arm_breakpoint_kind_from_current_state): Declare.
4650 (arm_breakpoint_at): Declare.
4651 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4652 arm_sw_breakpoint_from_kind if process is 32-bit.
4653 (aarch64_breakpoint_kind_from_pc): New function.
4654 (aarch64_breakpoint_kind_from_current_state): New function.
4655 (the_low_target): Initialize fields breakpoint_kind_from_pc
4656 and breakpoint_kind_from_current_state.
4657 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4658 linux-aarch32-low.c.
4659 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4660 (arm_breakpoint, arm_breakpoint_len): Likewise.
4661 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4662 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4663 (arm_is_thumb_mode): Likewise.
4664 (arm_breakpoint_at): Likewise.
4665 (arm_breakpoint_kind_from_pc): Likewise.
4666 (arm_sw_breakpoint_from_kind): Likewise.
4667 (arm_breakpoint_kind_from_current_state): Likewise.
4670 2015-08-04 Yao Qi <yao.qi@linaro.org>
4672 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4673 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4674 * server.c (extended_protocol): Remove "static".
4675 * server.h (extended_protocol): Declare it.
4677 2015-12-04 Josh Stone <jistone@redhat.com>
4679 * target.h (struct target_ops) <arch_setup>: Rename to ...
4680 (struct target_ops) <post_create_inferior>: ... this.
4681 (target_arch_setup): Rename to ...
4682 (target_post_create_inferior): ... this, calling post_create_inferior.
4683 * server.c (start_inferior): Update target_arch_setup calls to
4684 target_post_create_inferior.
4685 * linux-low.c (linux_low_ptrace_options): Forward declare.
4686 (linux_arch_setup): Update its comment for general use.
4687 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4688 (struct linux_target_ops): Use linux_post_create_inferior.
4689 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4690 to post_create_inferior.
4691 * nto-low.c (struct nto_target_ops): Likewise.
4692 * spu-low.c (struct spu_target_ops): Likewise.
4693 * win32-low.c (struct win32_target_ops): Likewise.
4695 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4697 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4699 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4701 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4702 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4703 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4704 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4705 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4706 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4707 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4708 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4709 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4710 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4711 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4712 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4714 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4716 * linux-low.c (linux_look_up_symbols): Don't call
4717 linux_supports_traceclone.
4718 * linux-low.h (thread_db_init): Remove use_events argument.
4719 * thread-db.c (thread_db_use_event): Remove global variable.
4720 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4721 (struct thread_db) <td_create_bp>: Remove field.
4722 (thread_db_create_event): Remove function.
4723 (thread_db_enable_reporting): Likewise.
4724 (find_one_thread): Don't check for thread_db_use_events.
4725 (attach_thread): Likewise.
4726 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4727 (try_thread_db_load_1): Don't check for thread_db_use_events.
4728 (thread_db_init): Remove use_events argument and thread events
4730 (remove_thread_event_breakpoints): Remove function.
4731 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4733 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4735 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4737 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4738 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4739 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4740 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4741 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4743 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4745 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4746 * linux-low.c (can_hardware_single_step): Use
4747 supports_hardware_single_step.
4748 (can_software_single_step): New function.
4749 (start_step_over): Call can_software_single_step.
4750 (linux_supports_hardware_single_step): New function.
4751 (struct target_ops) <supports_software_single_step>: Initialize.
4752 * linux-low.h (struct linux_target_ops)
4753 <supports_hardware_single_step>: Initialize.
4754 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4755 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4756 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4757 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4758 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4759 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4760 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4761 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4762 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4763 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4765 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4766 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4768 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4769 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4770 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4772 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4773 * target.h (struct target_ops): <supports_software_single_step>:
4775 (target_supports_software_single_step): New macro.
4777 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4779 * linux-low.c (linux_wait_1): Fix pc advance condition.
4780 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4781 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4783 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4785 * linux-arm-low.c (arm_is_thumb_mode): New function.
4786 (arm_breakpoint_at): Use arm_is_thumb_mode.
4787 (arm_breakpoint_kind_from_current_state): New function.
4788 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4790 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4791 (linux_breakpoint_kind_from_current_state): New function.
4792 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4793 * linux-low.h (struct linux_target_ops)
4794 <breakpoint_kind_from_current_state>: New field.
4795 * target.h (struct target_ops): Likewise.
4796 (target_breakpoint_kind_from_current_state): New macro.
4798 2015-11-30 Pedro Alves <palves@redhat.com>
4800 * linux-low.c (linux_resume): Wake up the event loop before
4803 2015-11-30 Pedro Alves <palves@redhat.com>
4805 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4807 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4809 * target.c (struct thread_search): New structure.
4810 (thread_search_callback): New function.
4811 (prev_general_thread): New global.
4812 (prepare_to_access_memory, done_accessing_memory): New functions.
4813 * target.h (prepare_to_access_memory, done_accessing_memory):
4814 Replace macros with function declarations.
4816 2015-11-30 Pedro Alves <palves@redhat.com>
4819 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4820 report TARGET_WAITKIND_NO_RESUMED.
4821 * remote-utils.c (prepare_resume_reply): Handle
4822 TARGET_WAITKIND_NO_RESUMED.
4823 * server.c (report_no_resumed): New global.
4824 (handle_query) <qSupported>: Handle "no-resumed+". Report
4825 "no-resumed+" support.
4826 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4827 return error if the client doesn't support no-resumed events.
4828 (push_stop_notification): New function.
4829 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4830 events if the client supports them.
4832 2015-11-30 Pedro Alves <palves@redhat.com>
4834 * linux-low.c (thread_still_has_status_pending_p): Don't check
4836 (lwp_resumed): New function.
4837 (status_pending_p_callback): Return early if the LWP is not
4838 supposed to be resumed.
4840 2015-11-30 Pedro Alves <palves@redhat.com>
4842 * linux-low.c (handle_extended_wait): Assert that the LWP's
4843 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4844 thread create events, leave the new child's status pending.
4845 (linux_low_filter_event): If GDB wants to hear about thread exit
4846 events, leave the LWP marked dead and don't delete it.
4847 (linux_wait_for_event_filtered): Don't check for thread exit.
4848 (filter_exit_event): New function.
4849 (linux_wait_1): Use it, when returning an exit event.
4850 (linux_resume_one_lwp_throw): Assert that the LWP's
4851 waitstatus is TARGET_WAITKIND_IGNORE.
4852 * remote-utils.c (prepare_resume_reply): Handle
4853 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4854 * server.c (report_thread_events): New global.
4855 (handle_general_set): Handle QThreadEvents.
4856 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4857 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4858 TARGET_WAITKIND_THREAD_EXITED.
4859 * server.h (report_thread_events): Declare.
4861 2015-11-30 Pedro Alves <palves@redhat.com>
4863 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4864 the thread's last_resume_kind was resume_stop.
4866 2015-11-30 Pedro Alves <palves@redhat.com>
4868 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4871 2015-11-30 Pedro Alves <palves@redhat.com>
4873 * server.c (handle_v_requests): Handle vCtrlC.
4875 2015-11-30 Pedro Alves <palves@redhat.com>
4877 * gdbthread.h (find_any_thread_of_pid): Declare.
4878 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4880 * server.c (handle_query): If current_thread is NULL, look for
4881 another thread of the selected process.
4883 2015-11-26 Daniel Colascione <dancol@dancol.org>
4884 Simon Marchi <simon.marchi@ericsson.com>
4886 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4887 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4889 * target.h (struct target_ops) <thread_name>: New field.
4890 (target_thread_name): New macro.
4892 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4894 * regcache.h (regcache_invalidate_pid): Add declaration.
4895 * regcache.c (regcache_invalidate_pid): New function, extracted
4896 from regcache_invalidate.
4897 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4898 Add trivial documentation comment.
4899 * lynx-low.c: Use regcache_invalidate_pid instead of
4900 regcache_invalidate.
4902 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4904 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4905 and Elf64_auxv_t if the target is Android.
4907 2015-11-22 Doug Evans <xdje42@gmail.com>
4909 * target.h: #include <sys/types.h>.
4911 2015-11-19 Pedro Alves <palves@redhat.com>
4913 * linux-low.c (linux_process_qsupported): Change prototype.
4915 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4917 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4918 and adjust to loop over all features.
4919 * server.c (handle_query) <qSupported>: Adjust to call
4920 target_process_qsupported once, passing it a vector of unprocessed
4922 * target.h (struct target_ops) <process_qsupported>: Change
4924 (target_process_qsupported): Adjust.
4926 2015-11-19 Pedro Alves <palves@redhat.com>
4928 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4930 * configure: Regenerate.
4932 2015-11-19 Pedro Alves <palves@redhat.com>
4934 * configure: Regenerate.
4936 2015-11-19 Yao Qi <yao.qi@linaro.org>
4938 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4941 2015-11-19 Yao Qi <yao.qi@linaro.org>
4943 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4944 (struct aarch64_operand): Move enum out.
4946 2015-11-19 Yao Qi <yao.qi@linaro.org>
4948 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4949 struct user_fpsimd_state *.
4950 (aarch64_store_fpregset): Likewise.
4952 2015-11-19 Yao Qi <yao.qi@linaro.org>
4954 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4955 struct user_pt_regs *.
4956 (aarch64_store_gregset): Likewise.
4958 2015-11-18 Pedro Alves <palves@redhat.com>
4960 * Makefile.in (all_object_files): Add $IPA_OBJS.
4962 2015-11-17 Pedro Alves <palves@redhat.com>
4964 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4965 GDB_SIGNAL_0 and gdb_signal_to_string.
4967 2015-11-17 Pedro Alves <palves@redhat.com>
4969 * win32-low.c (handle_output_debug_string): Remove parameter.
4970 (win32_kill): Remove our_status local and adjust call to
4971 handle_output_debug_string.
4972 (get_child_debug_event): Adjust call to
4973 handle_output_debug_string.
4975 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4977 * linux-mips-low.c (mips_fill_gregset): Add cast.
4978 (mips_store_gregset): Likewise.
4979 (mips_fill_fpregset): Likewise.
4980 (mips_store_fpregset): Likewise.
4982 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4984 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4987 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4989 * linux-mips-low.c (mips_linux_new_thread): Change type of
4990 watch_type to enum target_hw_bp_type.
4992 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4994 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4995 Change return type to arm_hwbp_type.
4997 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4999 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5000 (arm_store_gregset): Likewise.
5001 * linux-arm-low.c (arm_get_hwcap): Likewise.
5002 (arm_read_description): Likewise.
5004 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5006 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5008 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5010 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5011 (ppc_fill_vsxregset): Likewise.
5012 (ppc_store_vsxregset): Likewise.
5013 (ppc_fill_vrregset): Likewise.
5014 (ppc_store_vrregset): Likewise.
5015 (ppc_fill_evrregset): Likewise.
5016 (ppc_store_evrregset): Likewise.
5018 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5020 * linux-ppc-low.c (ppc_usrregs_info): Remove
5021 forward-declaration.
5022 (ppc_arch_setup): Move lower in file.
5024 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5026 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5027 (ps_pdwrite): Likewise.
5029 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5031 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5032 to after assert checks.
5034 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5036 * proc-service.c (ps_pdread): Add/adjust casts.
5037 (ps_pdwrite): Add/adjust casts.
5039 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5041 * server.c (handle_search_memory_1): Cast return value of
5044 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5046 * server.c (write_qxfer_response): Change type of data to
5049 2015-10-29 Pedro Alves <palves@redhat.com>
5051 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5053 2015-10-29 Pedro Alves <palves@redhat.com>
5055 * tracepoint.c (clear_installed_tracepoints): Add casts.
5057 2015-10-29 Pedro Alves <palves@redhat.com>
5059 * server.c (handle_v_cont, process_serial_event): Add enum
5060 gdb_signal casts to signal parsing code.
5062 2015-10-29 Pedro Alves <palves@redhat.com>
5064 * linux-low.h (NULL_REGSET): Define.
5065 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5066 * linux-arm-low.c (arm_regsets): Likewise.
5067 * linux-crisv32-low.c (cris_regsets): Likewise.
5068 * linux-m68k-low.c (m68k_regsets): Likewise.
5069 * linux-mips-low.c (mips_regsets): Likewise.
5070 * linux-nios2-low.c (nios2_regsets): Likewise.
5071 * linux-ppc-low.c (ppc_regsets): Likewise.
5072 * linux-s390-low.c (s390_regsets): Likewise.
5073 * linux-sh-low.c (sh_regsets): Likewise.
5074 * linux-sparc-low.c (sparc_regsets): Likewise.
5075 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5076 * linux-tile-low.c (tile_regsets): Likewise.
5077 * linux-x86-low.c (x86_regsets): Likewise.
5078 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5080 2015-10-29 Pedro Alves <palves@redhat.com>
5082 * linux-low.h (NULL_REGSET): Define.
5083 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5084 * linux-arm-low.c (arm_regsets): Likewise.
5085 * linux-crisv32-low.c (cris_regsets): Likewise.
5086 * linux-m68k-low.c (m68k_regsets): Likewise.
5087 * linux-mips-low.c (mips_regsets): Likewise.
5088 * linux-nios2-low.c (nios2_regsets): Likewise.
5089 * linux-ppc-low.c (ppc_regsets): Likewise.
5090 * linux-s390-low.c (s390_regsets): Likewise.
5091 * linux-sh-low.c (sh_regsets): Likewise.
5092 * linux-sparc-low.c (sparc_regsets): Likewise.
5093 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5094 * linux-tile-low.c (tile_regsets): Likewise.
5095 * linux-x86-low.c (x86_regsets): Likewise.
5096 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5098 2015-10-26 Doug Evans <dje@google.com>
5100 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5102 2015-10-26 Doug Evans <dje@google.com>
5104 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5106 2015-10-26 Doug Evans <dje@google.com>
5108 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5110 (attach_thread, find_new_threads_callback): Ditto.
5112 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5114 * mem-break.h (set_breakpoint_data): Remove.
5116 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5118 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5119 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5120 (initialize_low): Remove set_breakpoint_data call.
5121 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5122 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5123 (initialize_low): Remove set_breakpoint_data call.
5124 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5125 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5126 (initialize_low): Remove set_breakpoint_data call.
5128 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5130 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5131 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5132 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5133 * target.h (target_breakpoint_kind_from_pc): New macro.
5135 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5137 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5138 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5139 the default breakpoint kind.
5141 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5143 * linux-arm-low.c (arm_supports_z_point_type): Add software
5146 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5148 * linux-arm-low.c: Refactor breakpoint definitions.
5149 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5150 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5152 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5154 * Makefile.in: Add arm.c/o.
5155 * configure.srv: Likewise.
5156 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5157 (arm_breakpoint_kind_from_pc): New function.
5158 (arm_sw_breakpoint_from_kind): Return proper kind.
5159 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5161 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5163 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5165 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5166 (struct raw_breakpoint) <size>: Remove.
5167 (struct raw_breakpoint) <kind>: Add.
5168 (bp_size): New function.
5169 (bp_opcode): Likewise.
5170 (find_raw_breakpoint_at): Adjust for kind.
5171 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5172 (remove_memory_breakpoint): Adjust for kind call bp_size.
5173 (set_raw_breakpoint_at): Adjust for kind.
5174 (set_breakpoint): Likewise.
5175 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5176 (delete_raw_breakpoint): Adjust for kind.
5177 (delete_breakpoint): Likewise.
5178 (find_gdb_breakpoint): Likewise.
5179 (set_gdb_breakpoint_1): Likewise.
5180 (set_gdb_breakpoint): Likewise.
5181 (delete_gdb_breakpoint_1): Likewise.
5182 (delete_gdb_breakpoint): Likewise.
5183 (uninsert_raw_breakpoint): Likewise.
5184 (reinsert_raw_breakpoint): Likewise.
5185 (set_breakpoint_data): Remove.
5186 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5187 (check_mem_read): Adjust for kind call bp_size.
5188 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5189 (clone_one_breakpoint): Adjust for kind.
5190 * mem-break.h (set_gdb_breakpoint): Likewise.
5191 (delete_gdb_breakpoint): Likewise.
5192 * server.c (process_serial_event): Likewise.
5194 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5196 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5197 (struct linux_target_ops) <breakpoint>: Remove.
5198 (struct linux_target_ops) <breakpoint_len>: Remove.
5199 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5200 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5201 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5202 (arm_sw_breakpoint_from_kind): New function.
5203 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5204 (struct linux_target_ops) <breakpoint>: Remove.
5205 (struct linux_target_ops) <breakpoint_len>: Remove.
5206 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5207 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5208 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5209 (struct linux_target_ops) <breakpoint>: Remove.
5210 (struct linux_target_ops) <breakpoint_len>: Remove.
5211 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5212 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5213 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5214 (struct linux_target_ops) <breakpoint>: Remove.
5215 (struct linux_target_ops) <breakpoint_len>: Remove.
5216 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5217 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5218 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5219 and sw_breakpoint_from_kind to increment the pc.
5220 (linux_breakpoint_kind_from_pc): New function.
5221 (linux_sw_breakpoint_from_kind): New function.
5222 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5223 (initialize_low): Call breakpoint_kind_from_pc and
5224 sw_breakpoint_from_kind to replace breakpoint_data/len.
5225 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5227 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5228 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5229 (struct linux_target_ops) <breakpoint>: Remove.
5230 (struct linux_target_ops) <breakpoint_len>: Remove.
5231 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5232 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5233 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5234 (struct linux_target_ops) <breakpoint>: Remove.
5235 (struct linux_target_ops) <breakpoint_len>: Remove.
5236 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5237 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5238 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5239 (struct linux_target_ops) <breakpoint>: Remove.
5240 (struct linux_target_ops) <breakpoint_len>: Remove.
5241 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5242 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5243 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5244 (struct linux_target_ops) <breakpoint>: Remove.
5245 (struct linux_target_ops) <breakpoint_len>: Remove.
5246 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5247 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5248 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5249 (struct linux_target_ops) <breakpoint>: Remove.
5250 (struct linux_target_ops) <breakpoint_len>: Remove.
5251 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5252 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5253 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5254 (struct linux_target_ops) <breakpoint>: Remove.
5255 (struct linux_target_ops) <breakpoint_len>: Remove.
5256 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5257 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5258 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5259 (struct linux_target_ops) <breakpoint>: Remove.
5260 (struct linux_target_ops) <breakpoint_len>: Remove.
5261 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5262 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5263 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5264 (struct linux_target_ops) <breakpoint>: Remove.
5265 (struct linux_target_ops) <breakpoint_len>: Remove.
5266 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5267 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5268 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5269 (struct linux_target_ops) <breakpoint>: Remove.
5270 (struct linux_target_ops) <breakpoint_len>: Remove.
5271 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5272 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5273 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5274 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5275 (struct linux_target_ops) <breakpoint>: Remove.
5276 (struct linux_target_ops) <breakpoint_len>: Remove.
5277 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5278 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5279 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5280 (struct linux_target_ops) <breakpoint>: Remove.
5281 (struct linux_target_ops) <breakpoint_len>: Remove.
5282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5285 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5287 * linux-cris-low.c (cris_get_pc): Remove void arg.
5289 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5291 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5294 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5296 * inferiors.c (thread_pid_matches_callback): New function.
5297 (find_thread_process): New function.
5298 (remove_thread): Reset current_thread.
5299 (remove_process): Assert threads have been removed first.
5301 2015-10-15 Yao Qi <yao.qi@linaro.org>
5303 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5305 (aarch64_remove_point): Likewise.
5306 * regcache.c (regcache_register_size): New function.
5308 2015-10-12 Yao Qi <yao.qi@linaro.org>
5310 * linux-aarch64-low.c: Update all callers as emit_load_store
5311 is renamed to aarch64_emit_load_store.
5313 2015-10-12 Yao Qi <yao.qi@linaro.org>
5315 * linux-aarch64-low.c: Update all callers of function renaming
5316 from emit_insn to aarch64_emit_insn.
5318 2015-10-12 Yao Qi <yao.qi@linaro.org>
5320 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5321 arch/aarch64-insn.h.
5322 (struct aarch64_memory_operand): Likewise.
5324 (emit_insn): Move to arch/aarch64-insn.c.
5325 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5326 (emit_load_store): Move to arch/aarch64-insn.c.
5327 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5328 (can_encode_int32): Remove.
5330 2015-10-12 Yao Qi <yao.qi@linaro.org>
5332 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5333 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5334 (aarch64_relocate_instruction): Likewise.
5335 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5336 (struct aarch64_insn_visitor): Likewise.
5338 2015-10-12 Yao Qi <yao.qi@linaro.org>
5340 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5341 (struct aarch64_insn_visitor): New.
5342 (struct aarch64_insn_relocation_data): New.
5343 (aarch64_ftrace_insn_reloc_b): New function.
5344 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5345 (aarch64_ftrace_insn_reloc_cb): Likewise.
5346 (aarch64_ftrace_insn_reloc_tb): Likewise.
5347 (aarch64_ftrace_insn_reloc_adr): Likewise.
5348 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5349 (aarch64_ftrace_insn_reloc_others): Likewise.
5351 (aarch64_relocate_instruction): Use visitor.
5353 2015-10-12 Yao Qi <yao.qi@linaro.org>
5355 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5356 int. Add argument buf.
5357 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5358 aarch64_relocate_instruction.
5360 2015-10-12 Yao Qi <yao.qi@linaro.org>
5362 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5363 argument insn. Remove local variable insn. Don't call
5365 (aarch64_install_fast_tracepoint_jump_pad): Call
5368 2015-09-30 Yao Qi <yao.qi@linaro.org>
5370 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5371 (emit_load_store_pair): Likewise.
5373 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5375 * dll.c (match_dll): Add cast(s).
5376 (unloaded_dll): Likewise.
5377 * linux-low.c (second_thread_of_pid_p): Likewise.
5378 (delete_lwp_callback): Likewise.
5379 (count_events_callback): Likewise.
5380 (select_event_lwp_callback): Likewise.
5381 (linux_set_resume_request): Likewise.
5382 * server.c (accumulate_file_name_length): Likewise.
5383 (emit_dll_description): Likewise.
5384 (handle_qxfer_threads_worker): Likewise.
5385 (visit_actioned_threads): Likewise.
5386 * thread-db.c (any_thread_of): Likewise.
5387 * tracepoint.c (same_process_p): Likewise.
5388 (match_blocktype): Likewise.
5389 (build_traceframe_info_xml): Likewise.
5391 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5393 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5395 (gdb_unparse_agent_expr): Likewise.
5396 * hostio.c (require_data): Likewise.
5397 (handle_pread): Likewise.
5398 * linux-low.c (disable_regset): Likewise.
5399 (fetch_register): Likewise.
5400 (store_register): Likewise.
5401 (get_dynamic): Likewise.
5402 (linux_qxfer_libraries_svr4): Likewise.
5403 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5404 (set_fast_tracepoint_jump): Likewise.
5405 (uninsert_fast_tracepoint_jumps_at): Likewise.
5406 (reinsert_fast_tracepoint_jumps_at): Likewise.
5407 (validate_inserted_breakpoint): Likewise.
5408 (clone_agent_expr): Likewise.
5409 * regcache.c (init_register_cache): Likewise.
5410 * remote-utils.c (putpkt_binary_1): Likewise.
5411 (decode_M_packet): Likewise.
5412 (decode_X_packet): Likewise.
5413 (look_up_one_symbol): Likewise.
5414 (relocate_instruction): Likewise.
5415 (monitor_output): Likewise.
5416 * server.c (handle_search_memory): Likewise.
5417 (handle_qxfer_exec_file): Likewise.
5418 (handle_qxfer_libraries): Likewise.
5419 (handle_qxfer): Likewise.
5420 (handle_query): Likewise.
5421 (handle_v_cont): Likewise.
5422 (handle_v_run): Likewise.
5423 (captured_main): Likewise.
5424 * target.c (write_inferior_memory): Likewise.
5425 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5426 * tracepoint.c (init_trace_buffer): Likewise.
5427 (add_tracepoint_action): Likewise.
5428 (add_traceframe): Likewise.
5429 (add_traceframe_block): Likewise.
5430 (cmd_qtdpsrc): Likewise.
5431 (cmd_qtdv): Likewise.
5432 (cmd_qtstatus): Likewise.
5433 (response_source): Likewise.
5434 (response_tsv): Likewise.
5435 (cmd_qtnotes): Likewise.
5436 (gdb_collect): Likewise.
5437 (initialize_tracepoint): Likewise.
5439 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5441 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5442 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5443 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5445 (enum aarch64_condition_codes): New enum.
5446 (w0): New static global.
5449 (struct aarch64_memory_operand) <type>: New
5450 MEMORY_OPERAND_POSTINDEX type.
5451 (postindex_memory_operand): New helper function.
5452 (emit_ret): New function.
5453 (emit_load_store_pair): New function, factored out of emit_stp
5454 with support for MEMORY_OPERAND_POSTINDEX.
5455 (emit_stp): Rewrite using emit_load_store_pair.
5456 (emit_ldp): New function.
5457 (emit_load_store): Likewise.
5458 (emit_ldr): Mention post-index instruction in comment.
5459 (emit_ldrh): New function.
5460 (emit_ldrb): New function.
5461 (emit_ldrsw): Mention post-index instruction in comment.
5462 (emit_str): Likewise.
5463 (emit_subs): New function.
5464 (emit_cmp): Likewise.
5465 (emit_and): Likewise.
5466 (emit_orr): Likewise.
5467 (emit_orn): Likewise.
5468 (emit_eor): Likewise.
5469 (emit_mvn): Likewise.
5470 (emit_lslv): Likewise.
5471 (emit_lsrv): Likewise.
5472 (emit_asrv): Likewise.
5473 (emit_mul): Likewise.
5474 (emit_sbfm): Likewise.
5475 (emit_sbfx): Likewise.
5476 (emit_ubfm): Likewise.
5477 (emit_ubfx): Likewise.
5478 (emit_csinc): Likewise.
5479 (emit_cset): Likewise.
5480 (emit_nop): Likewise.
5481 (emit_ops_insns): New helper function.
5482 (emit_pop): Likewise.
5483 (emit_push): Likewise.
5484 (aarch64_emit_prologue): New function.
5485 (aarch64_emit_epilogue): Likewise.
5486 (aarch64_emit_add): Likewise.
5487 (aarch64_emit_sub): Likewise.
5488 (aarch64_emit_mul): Likewise.
5489 (aarch64_emit_lsh): Likewise.
5490 (aarch64_emit_rsh_signed): Likewise.
5491 (aarch64_emit_rsh_unsigned): Likewise.
5492 (aarch64_emit_ext): Likewise.
5493 (aarch64_emit_log_not): Likewise.
5494 (aarch64_emit_bit_and): Likewise.
5495 (aarch64_emit_bit_or): Likewise.
5496 (aarch64_emit_bit_xor): Likewise.
5497 (aarch64_emit_bit_not): Likewise.
5498 (aarch64_emit_equal): Likewise.
5499 (aarch64_emit_less_signed): Likewise.
5500 (aarch64_emit_less_unsigned): Likewise.
5501 (aarch64_emit_ref): Likewise.
5502 (aarch64_emit_if_goto): Likewise.
5503 (aarch64_emit_goto): Likewise.
5504 (aarch64_write_goto_address): Likewise.
5505 (aarch64_emit_const): Likewise.
5506 (aarch64_emit_call): Likewise.
5507 (aarch64_emit_reg): Likewise.
5508 (aarch64_emit_pop): Likewise.
5509 (aarch64_emit_stack_flush): Likewise.
5510 (aarch64_emit_zero_ext): Likewise.
5511 (aarch64_emit_swap): Likewise.
5512 (aarch64_emit_stack_adjust): Likewise.
5513 (aarch64_emit_int_call_1): Likewise.
5514 (aarch64_emit_void_call_2): Likewise.
5515 (aarch64_emit_eq_goto): Likewise.
5516 (aarch64_emit_ne_goto): Likewise.
5517 (aarch64_emit_lt_goto): Likewise.
5518 (aarch64_emit_le_goto): Likewise.
5519 (aarch64_emit_gt_goto): Likewise.
5520 (aarch64_emit_ge_got): Likewise.
5521 (aarch64_emit_ops_impl): New static global variable.
5522 (aarch64_emit_ops): New target function, return
5523 &aarch64_emit_ops_impl.
5524 (struct linux_target_ops): Install it.
5526 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5528 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5529 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5531 * linux-aarch64-ipa.c: New file.
5532 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5534 (aarch64_get_thread_area): New target method.
5535 (extract_signed_bitfield): New helper function.
5536 (aarch64_decode_ldr_literal): New function.
5537 (enum aarch64_opcodes): New enum.
5538 (struct aarch64_register): New struct.
5539 (struct aarch64_operand): New struct.
5540 (x0): New static global.
5549 (aarch64_register): New helper function.
5550 (register_operand): Likewise.
5551 (immediate_operand): Likewise.
5552 (struct aarch64_memory_operand): New struct.
5553 (offset_memory_operand): New helper function.
5554 (preindex_memory_operand): Likewise.
5555 (enum aarch64_system_control_registers): New enum.
5556 (ENCODE): New macro.
5557 (emit_insn): New helper function.
5558 (emit_b): New function.
5559 (emit_bcond): Likewise.
5560 (emit_cb): Likewise.
5561 (emit_tb): Likewise.
5562 (emit_blr): Likewise.
5563 (emit_stp): Likewise.
5564 (emit_ldp_q_offset): Likewise.
5565 (emit_stp_q_offset): Likewise.
5566 (emit_load_store): Likewise.
5567 (emit_ldr): Likewise.
5568 (emit_ldrsw): Likewise.
5569 (emit_str): Likewise.
5570 (emit_ldaxr): Likewise.
5571 (emit_stxr): Likewise.
5572 (emit_stlr): Likewise.
5573 (emit_data_processing_reg): Likewise.
5574 (emit_data_processing): Likewise.
5575 (emit_add): Likewise.
5576 (emit_sub): Likewise.
5577 (emit_mov): Likewise.
5578 (emit_movk): Likewise.
5579 (emit_mov_addr): Likewise.
5580 (emit_mrs): Likewise.
5581 (emit_msr): Likewise.
5582 (emit_sevl): Likewise.
5583 (emit_wfe): Likewise.
5584 (append_insns): Likewise.
5585 (can_encode_int32_in): New helper function.
5586 (aarch64_relocate_instruction): New function.
5587 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5588 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5589 (struct linux_target_ops): Install aarch64_get_thread_area,
5590 aarch64_install_fast_tracepoint_jump_pad and
5591 aarch64_get_min_fast_tracepoint_insn_len.
5593 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5595 * Makefile.in (aarch64-insn.o): New rule.
5596 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5598 2015-09-21 Yao Qi <yao.qi@linaro.org>
5600 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5602 2015-09-21 Yao Qi <yao.qi@linaro.org>
5604 * tracepoint.c (max_jump_pad_size): Remove.
5606 2015-09-18 Yao Qi <yao.qi@linaro.org>
5608 * linux-aarch64-low.c: Don't include sys/uio.h.
5609 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5611 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5613 * tracepoint.c (eval_result_type): Change prototype.
5614 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5616 2015-09-15 Pedro Alves <palves@redhat.com>
5618 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5619 Check whether to report exec events instead of checking whether
5620 multiprocess is enabled.
5622 2015-09-15 Pedro Alves <palves@redhat.com>
5625 * remote-utils.c (prepare_resume_reply): Merge
5626 TARGET_WAITKIND_VFORK_DONE switch case with the
5627 TARGET_WAITKIND_FORKED case.
5629 2015-09-15 Yao Qi <yao.qi@linaro.org>
5631 * server.c (handle_query): Check string comparison using
5632 "else if" instead of "if".
5634 2015-09-15 Yao Qi <yao.qi@linaro.org>
5636 * server.c (vCont_supported): New global variable.
5637 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5638 matches. Append ";vContSupported+" to own_buf.
5639 (handle_v_requests): Append ";s;S" to own_buf if target supports
5640 hardware single step or vCont_supported is false.
5641 (capture_main): Set vCont_supported to zero.
5643 2015-09-15 Yao Qi <yao.qi@linaro.org>
5645 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5647 (linux_supports_hardware_single_step): ... New function.
5648 (linux_target_ops): Update.
5649 * lynx-low.c (lynx_target_ops): Set field
5650 supports_hardware_single_step to target_can_do_hardware_single_step.
5651 * nto-low.c (nto_target_ops): Likewise.
5652 * spu-low.c (spu_target_ops): Likewise.
5653 * win32-low.c (win32_target_ops): Likewise.
5654 * target.c (target_can_do_hardware_single_step): New function.
5655 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5656 Remove. <supports_hardware_single_step>: New field.
5657 (target_supports_conditional_breakpoints): Remove.
5658 (target_supports_hardware_single_step): New macro.
5659 (target_can_do_hardware_single_step): Declare.
5660 * server.c (handle_query): Use target_supports_hardware_single_step
5661 instead of target_supports_conditional_breakpoints.
5663 2015-09-15 Yao Qi <yao.qi@linaro.org>
5665 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5667 (struct linux_target_ops the_low_target): Install
5668 aarch64_linux_siginfo_fixup.
5670 2015-09-11 Don Breazeal <donb@codesourcery.com>
5671 Luis Machado <lgustavo@codesourcery.com>
5673 * linux-low.c (linux_mourn): Static declaration.
5674 (linux_arch_setup): Move in front of
5675 handle_extended_wait.
5676 (linux_arch_setup_thread): New function.
5677 (handle_extended_wait): Handle exec events. Call
5678 linux_arch_setup_thread. Make event_lwp argument a
5679 pointer-to-a-pointer.
5680 (check_zombie_leaders): Do not check stopped threads.
5681 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5682 (linux_low_filter_event): Add lwp and thread for exec'ing
5683 non-leader thread if leader thread has been deleted.
5684 Refactor code into linux_arch_setup_thread and call it.
5685 Pass child lwp pointer by reference to handle_extended_wait.
5686 (linux_wait_for_event_filtered): Update comment.
5687 (linux_wait_1): Prevent clobbering exec event status.
5688 (linux_supports_exec_events): New function.
5689 (linux_target_ops) <supports_exec_events>: Initialize new member.
5690 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5692 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5693 * server.c (report_exec_events): New global variable.
5694 (handle_query): Handle qSupported query for exec-events feature.
5695 (captured_main): Initialize report_exec_events.
5696 * server.h (report_exec_events): Declare new global variable.
5697 * target.h (struct target_ops) <supports_exec_events>: New
5699 (target_supports_exec_events): New macro.
5700 * win32-low.c (win32_target_ops) <supports_exec_events>:
5701 Initialize new member.
5703 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5705 * linux-low.c (linux_low_enable_btrace): Remove.
5706 (linux_target_ops): Replace linux_low_enable_btrace with
5707 linux_enable_btrace.
5709 2015-09-03 Yao Qi <yao.qi@linaro.org>
5711 * linux-aarch64-low.c (aarch64_insert_point): Call
5712 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5715 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5717 * linux-low.c (check_stopped_by_breakpoint): Use
5718 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5720 2015-08-27 Pedro Alves <palves@redhat.com>
5722 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5724 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5726 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5727 the XNEW-family equivalent.
5728 (compile_bytecodes): Likewise.
5729 * dll.c (loaded_dll): Likewise.
5730 * event-loop.c (append_callback_event): Likewise.
5731 (create_file_handler): Likewise.
5732 (create_file_event): Likewise.
5733 * hostio.c (handle_open): Likewise.
5734 * inferiors.c (add_thread): Likewise.
5735 (add_process): Likewise.
5736 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5737 * linux-arm-low.c (arm_new_process): Likewise.
5738 (arm_new_thread): Likewise.
5739 * linux-low.c (add_to_pid_list): Likewise.
5740 (linux_add_process): Likewise.
5741 (handle_extended_wait): Likewise.
5742 (add_lwp): Likewise.
5743 (enqueue_one_deferred_signal): Likewise.
5744 (enqueue_pending_signal): Likewise.
5745 (linux_resume_one_lwp_throw): Likewise.
5746 (linux_resume_one_thread): Likewise.
5747 (linux_read_memory): Likewise.
5748 (linux_write_memory): Likewise.
5749 * linux-mips-low.c (mips_linux_new_process): Likewise.
5750 (mips_linux_new_thread): Likewise.
5751 (mips_add_watchpoint): Likewise.
5752 * linux-x86-low.c (initialize_low_arch): Likewise.
5753 * lynx-low.c (lynx_add_process): Likewise.
5754 * mem-break.c (set_raw_breakpoint_at): Likewise.
5755 (set_breakpoint): Likewise.
5756 (add_condition_to_breakpoint): Likewise.
5757 (add_commands_to_breakpoint): Likewise.
5758 (clone_agent_expr): Likewise.
5759 (clone_one_breakpoint): Likewise.
5760 * regcache.c (new_register_cache): Likewise.
5761 * remote-utils.c (look_up_one_symbol): Likewise.
5762 * server.c (queue_stop_reply): Likewise.
5763 (start_inferior): Likewise.
5764 (queue_stop_reply_callback): Likewise.
5765 (handle_target_event): Likewise.
5766 * spu-low.c (fetch_ppc_memory): Likewise.
5767 (store_ppc_memory): Likewise.
5768 * target.c (set_target_ops): Likewise.
5769 * thread-db.c (thread_db_load_search): Likewise.
5770 (try_thread_db_load_1): Likewise.
5771 * tracepoint.c (add_tracepoint): Likewise.
5772 (add_tracepoint_action): Likewise.
5773 (create_trace_state_variable): Likewise.
5774 (cmd_qtdpsrc): Likewise.
5775 (cmd_qtro): Likewise.
5776 (add_while_stepping_state): Likewise.
5777 * win32-low.c (child_add_thread): Likewise.
5778 (get_image_name): Likewise.
5780 2015-08-25 Yao Qi <yao.qi@linaro.org>
5782 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5784 2015-08-25 Yao Qi <yao.qi@linaro.org>
5786 * Makefile.in (aarch64-linux.o): New rule.
5787 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5789 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5790 (aarch64_init_debug_reg_state): Make it extern.
5791 (aarch64_linux_prepare_to_resume): Remove.
5793 2015-08-25 Yao Qi <yao.qi@linaro.org>
5795 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5796 lwp_arch_private_info and ptid_of_lwp.
5798 2015-08-25 Yao Qi <yao.qi@linaro.org>
5800 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5801 Find proc_info by find_process_pid. All callers updated.
5803 2015-08-25 Yao Qi <yao.qi@linaro.org>
5805 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5807 (debug_reg_change_callback): Remove.
5808 (aarch64_notify_debug_reg_change): Remove.
5810 2015-08-25 Yao Qi <yao.qi@linaro.org>
5812 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5813 Call current_lwp_ptid.
5815 2015-08-25 Yao Qi <yao.qi@linaro.org>
5817 * linux-aarch64-low.c (debug_reg_change_callback): Use
5820 2015-08-25 Yao Qi <yao.qi@linaro.org>
5822 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5824 2015-08-25 Yao Qi <yao.qi@linaro.org>
5826 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5828 2015-08-25 Yao Qi <yao.qi@linaro.org>
5830 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5833 2015-08-25 Yao Qi <yao.qi@linaro.org>
5835 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5837 (debug_reg_change_callback): Remove argument entry and add argument
5838 lwp. Remove local variable thread. Don't print thread id in the
5839 debugging output. Don't check whether pid of thread equals to pid.
5840 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5841 iterate_over_lwps instead find_inferior.
5843 2015-08-24 Pedro Alves <palves@redhat.com>
5845 * inferiors.c (get_first_process): New function.
5846 * inferiors.h (get_first_process): New declaration.
5847 * remote-utils.c (read_ptid): Default to the first process in the
5848 list, instead of to the current thread's process.
5850 2015-08-24 Pedro Alves <palves@redhat.com>
5852 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5853 * event-loop.c: Likewise.
5854 * remote-utils.c: Likewise.
5855 * tracepoint.c: Likewise.
5857 2015-08-24 Pedro Alves <palves@redhat.com>
5859 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5862 2015-08-21 Pedro Alves <palves@redhat.com>
5864 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5865 instead of literal 1.
5867 2015-08-21 Pedro Alves <palves@redhat.com>
5869 * tdesc.c (default_description): Explicitly zero-initialize.
5871 2015-08-21 Pedro Alves <palves@redhat.com>
5874 * inferiors.c (remove_thread): Discard any pending stop reply for
5876 * server.c (remove_all_on_match_pid): Rename to ...
5877 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5879 (discard_queued_stop_replies): Change parameter to a ptid. Now
5881 (handle_v_kill, kill_inferior_callback, captured_main)
5882 (process_serial_event): Adjust.
5883 * server.h (discard_queued_stop_replies): Declare.
5885 2015-08-21 Pedro Alves <palves@redhat.com>
5887 * linux-low.c (wait_for_sigstop): Always switch to no thread
5888 selected if the previously current thread dies.
5889 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5890 process instead of the current thread's.
5891 * remote-utils.c (input_interrupt): Don't check if there's no
5893 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5894 current thread to the general thread fails, error out.
5895 (handle_qxfer_auxv, handle_qxfer_libraries)
5896 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5897 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5898 (handle_query): Check if there's a thread selected instead of
5899 checking whether there's any thread in the thread list.
5900 (handle_qxfer_threads, handle_qxfer_btrace)
5901 (handle_qxfer_btrace_conf): Don't error out early if there's no
5902 thread in the thread list.
5903 (handle_v_cont, myresume): Don't set the current thread to the
5905 (process_serial_event) <Hg handling>: Also set thread_id if the
5906 previous general thread is still alive.
5907 (process_serial_event) <g/G handling>: If setting the current
5908 thread to the general thread fails, error out.
5909 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5910 thread's lwp instead of the current thread's.
5911 * target.c (set_desired_thread): If the desired thread was not
5912 found, leave the current thread pointing to NULL. Return an int
5913 (boolean) indicating success.
5914 * target.h (set_desired_thread): Change return type to int.
5916 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5918 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5919 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5921 (ps_get_thread_area): New function.
5923 2015-08-19 Gary Benson <gbenson@redhat.com>
5925 * hostio.c (handle_pread): Do not attempt to read more data
5926 than hostio_reply_with_data can fit in a packet.
5928 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5930 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5932 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5934 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5936 2015-08-06 Pedro Alves <palves@redhat.com>
5938 * tracepoint.c (expr_eval_result): Now an int.
5940 2015-08-06 Pedro Alves <palves@redhat.com>
5942 * gdbthread.h (struct regcache): Forward declare.
5943 (struct thread_info) <regcache_data>: Now a struct regcache
5945 * inferiors.c (inferior_regcache_data)
5946 (set_inferior_regcache_data): Now work with struct regcache
5948 * inferiors.h (struct regcache): Forward declare.
5949 (inferior_regcache_data, set_inferior_regcache_data): Now work
5950 with struct regcache pointers.
5951 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5952 (free_register_cache_thread): Remove struct regcache pointer
5955 2015-08-06 Pedro Alves <palves@redhat.com>
5957 * server.c (captured_main): On error, print the exception message
5958 to stderr, and if run_once is set, throw a quit.
5960 2015-08-06 Pedro Alves <palves@redhat.com>
5962 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5965 2015-08-06 Pedro Alves <palves@redhat.com>
5967 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5968 reading beyond the passed in buffer length.
5970 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5972 * tracepoint.c (symbol_list) <required>: Remove.
5974 2015-08-06 Pedro Alves <palves@redhat.com>
5976 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5977 count if stopping and suspending threads.
5978 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5979 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5980 (linux_detach): Complete an ongoing step-over.
5981 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5983 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5984 (linux_wait_1): If passing a signal to the inferior after
5985 finishing a step-over, unsuspend and re-resume all lwps. If we
5986 see a single-step event but the thread should be continuing, don't
5987 pass the trap to gdb.
5988 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5989 internal_error instead of gdb_assert.
5990 (enqueue_pending_signal): New function.
5991 (check_ptrace_stopped_lwp_gone): Add debug output.
5992 (start_step_over): Use internal_error instead of gdb_assert.
5993 (complete_ongoing_step_over): New function.
5994 (linux_resume_one_thread): Don't resume a suspended thread.
5995 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5998 2015-08-06 Pedro Alves <palves@redhat.com>
6000 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6001 (linux_thread_alive): Use lwp_is_marked_dead.
6002 (extended_event_reported): Delete.
6003 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6004 instead of extended_event_reported.
6005 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6007 (lwp_is_marked_dead): New function.
6008 (lwp_running): Use lwp_is_marked_dead.
6009 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6012 2015-08-06 Pedro Alves <palves@redhat.com>
6014 * linux-low.c (linux_wait_1): Move fork event output out of the
6015 !report_to_gdb check. Pass event_child->waitstatus to
6016 target_waitstatus_to_string instead of ourstatus.
6018 2015-08-04 Yao Qi <yao.qi@linaro.org>
6020 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6021 if current_thread is 32 bit.
6023 2015-08-04 Yao Qi <yao.qi@linaro.org>
6025 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6026 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6027 * server.c (extended_protocol): Remove "static".
6028 * server.h (extended_protocol): Declare it.
6030 2015-08-04 Yao Qi <yao.qi@linaro.org>
6032 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6033 both aarch64 and aarch32.
6034 (aarch64_set_pc): Likewise.
6036 2015-08-04 Yao Qi <yao.qi@linaro.org>
6038 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6039 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6040 arm-with-neon.xml to srv_xmlfiles.
6041 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6042 (is_64bit_tdesc): New function.
6043 (aarch64_linux_read_description): New function.
6044 (aarch64_arch_setup): Call aarch64_linux_read_description.
6045 (regs_info): Rename to regs_info_aarch64.
6046 (aarch64_regs_info): Return right regs_info.
6047 (initialize_low_arch): Call initialize_low_arch_aarch32.
6049 2015-08-04 Yao Qi <yao.qi@linaro.org>
6051 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6052 * linux-aarch32-low.c: New file.
6053 * linux-aarch32-low.h: New file.
6054 * linux-arm-low.c (arm_fill_gregset): Move it to
6055 linux-aarch32-low.c.
6056 (arm_store_gregset): Likewise.
6057 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6058 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6059 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6060 (regs_info): Rename to regs_info_arm.
6061 (arm_regs_info): Return regs_info_aarch32 if
6062 have_ptrace_getregset is 1 and target description is
6063 arm_with_neon or arm_with_vfpv3.
6064 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6065 Call initialize_low_arch_aarch32 instead.
6067 2015-08-04 Yao Qi <yao.qi@linaro.org>
6069 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6070 * linux-low.c: ... here.
6071 * linux-low.h (have_ptrace_getregset): Declare it.
6073 2015-08-04 Pedro Alves <palves@redhat.com>
6075 * thread-db.c (struct thread_db): Use new typedefs.
6076 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6078 (disable_thread_event_reporting): Cast result of dlsym to
6079 destination function pointer type.
6080 (thread_db_mourn): Use td_ta_delete_ftype.
6082 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6084 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6086 (CDX_BREAKPOINT): Define for R2.
6087 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6088 (the_low_target): Add comments.
6090 2015-07-30 Yao Qi <yao.qi@linaro.org>
6092 * linux-arm-low.c (arm_hwcap): Remove it.
6093 (arm_read_description): New local variable arm_hwcap. Don't
6094 set arm_hwcap to zero.
6096 2015-07-30 Yao Qi <yao.qi@linaro.org>
6098 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6099 Use regcache->tdesc instead.
6100 (arm_store_wmmxregset): Likewise.
6101 (arm_fill_vfpregset): Likewise.
6102 (arm_store_vfpregset): Likewise.
6104 2015-07-30 Yao Qi <yao.qi@linaro.org>
6106 * linux-arm-low.c: Include arch/arm.h.
6107 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6108 (arm_store_gregset): Likewise.
6110 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6112 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6113 ptrace's 4th parameter.
6115 2015-07-27 Yao Qi <yao.qi@linaro.org>
6117 * configure.srv (case aarch64*-*-linux*): Don't set
6120 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6122 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6124 * linux-arm-low.c: Likewise.
6125 * linux-cris-low.c: Likewise.
6126 * linux-crisv32-low.c: Likewise.
6127 * linux-low.c: Likewise.
6128 * linux-m68k-low.c: Likewise.
6129 * linux-mips-low.c: Likewise.
6130 * linux-nios2-low.c: Likewise.
6131 * linux-s390-low.c: Likewise.
6132 * linux-sparc-low.c: Likewise.
6133 * linux-tic6x-low.c: Likewise.
6134 * linux-tile-low.c: Likewise.
6135 * linux-x86-low.c: Likewise.
6137 2015-07-24 Pedro Alves <palves@redhat.com>
6139 * config.in: Regenerate.
6140 * configure: Regenerate.
6142 2015-07-24 Pedro Alves <palves@redhat.com>
6144 * acinclude.m4: Include ../ptrace.m4.
6145 * configure.ac: Call GDB_AC_PTRACE.
6146 * config.in, configure: Regenerate.
6148 2015-07-24 Yao Qi <yao.qi@linaro.org>
6150 * linux-low.c (linux_create_inferior): Remove setting to
6151 proc->priv->new_inferior.
6152 (linux_attach): Likewise.
6153 (linux_low_filter_event): Likewise.
6154 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6156 2015-07-24 Yao Qi <yao.qi@linaro.org>
6158 * linux-low.c (linux_arch_setup): New function.
6159 (linux_low_filter_event): If proc->tdesc is NULL and
6160 proc->attached is true, call the_low_target.arch_setup.
6161 Otherwise, keep status pending, and return.
6162 (linux_resume_one_lwp_throw): Don't call get_pc if
6163 thread->while_stepping isn't NULL. Don't call
6164 get_thread_regcache if proc->tdesc is NULL.
6165 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6166 (linux_target_ops): Install arch_setup.
6167 * server.c (start_inferior): Call the_target->arch_setup.
6168 * target.h (struct target_ops) <arch_setup>: New field.
6169 (target_arch_setup): New marco.
6170 * lynx-low.c (lynx_target_ops): Update.
6171 * nto-low.c (nto_target_ops): Update.
6172 * spu-low.c (spu_target_ops): Update.
6173 * win32-low.c (win32_target_ops): Update.
6175 2015-07-24 Yao Qi <yao.qi@linaro.org>
6177 * linux-low.c (linux_add_process): Don't set
6178 proc->priv->new_inferior.
6179 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6180 (linux_attach): Likewise.
6182 2015-07-24 Yao Qi <yao.qi@linaro.org>
6184 * server.c (start_inferior): Code refactor.
6186 2015-07-24 Yao Qi <yao.qi@linaro.org>
6188 * server.c (process_serial_event): Set general_thread.
6190 2015-07-21 Yao Qi <yao.qi@linaro.org>
6192 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6193 aarch64_linux_get_debug_reg_capacity.
6195 2015-07-17 Yao Qi <yao.qi@linaro.org>
6197 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6198 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6199 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6200 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6201 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6202 (AARCH64_HWP_ALIGNMENT): Likewise.
6203 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6204 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6205 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6206 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6207 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6208 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6209 (struct aarch64_debug_reg_state): Likewise.
6210 (struct arch_lwp_info): Likewise.
6211 (aarch64_align_watchpoint): Likewise.
6212 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6213 (aarch64_watchpoint_length): Likewise.
6214 (aarch64_point_encode_ctrl_reg): Likewise
6215 (aarch64_point_is_aligned): Likewise.
6216 (aarch64_align_watchpoint): Likewise.
6217 (aarch64_linux_set_debug_regs):
6218 (aarch64_dr_state_insert_one_point): Likewise.
6219 (aarch64_dr_state_remove_one_point): Likewise.
6220 (aarch64_handle_breakpoint): Likewise.
6221 (aarch64_handle_aligned_watchpoint): Likewise.
6222 (aarch64_handle_unaligned_watchpoint): Likewise.
6223 (aarch64_handle_watchpoint): Likewise.
6225 2015-07-17 Yao Qi <yao.qi@linaro.org>
6227 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6228 and don't aarch64_get_debug_reg_state. All callers update.
6229 (aarch64_handle_aligned_watchpoint): Likewise.
6230 (aarch64_handle_unaligned_watchpoint): Likewise.
6231 (aarch64_handle_watchpoint): Likewise.
6232 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6233 (aarch64_remove_point): Likewise.
6235 2015-07-17 Yao Qi <yao.qi@linaro.org>
6237 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6239 (aarch64_handle_unaligned_watchpoint): Likewise.
6241 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6243 Revert the previous 3 commits:
6244 Move gdb_regex* to common/
6245 Move linux_find_memory_regions_full & co.
6246 gdbserver build-id attribute generator
6248 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6249 Jan Kratochvil <jan.kratochvil@redhat.com>
6251 gdbserver build-id attribute generator.
6252 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6253 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6254 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6256 (get_dynamic): Use find_pdhr to traverse program headers.
6257 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6258 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6259 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6260 (get_hex_build_id): New.
6261 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6262 to reply XML document.
6264 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6265 Jan Kratochvil <jan.kratochvil@redhat.com>
6267 * target.c: Include target/target-utils.h and fcntl.h.
6268 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6269 (target_fileio_read_stralloc): New functions.
6271 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6273 * Makefile.in (OBS): Add gdb_regex.o.
6275 * config.in: Rebuilt.
6276 * configure: Rebuilt.
6278 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6279 Jan Kratochvil <jan.kratochvil@redhat.com>
6281 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6282 * Makefile.in (OBS): Add target-utils.o.
6283 (linux-maps.o, target-utils.o): New.
6284 * configure.srv (srv_linux_obj): Add linux-maps.o.
6286 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6288 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6290 (the_low_target): Install it.
6292 2015-07-14 Pedro Alves <palves@redhat.com>
6294 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6295 Instead, ignore ECHILD, and throw an error for other errnos.
6297 2015-07-10 Pedro Alves <palves@redhat.com>
6299 * event-loop.c (struct callback_event) <data>: Change type to
6300 gdb_client_data instance instead of gdb_client_data pointer.
6301 (append_callback_event): Adjust.
6303 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6305 * linux-aarch64-low.c: Add comments for each linux_target_ops
6306 method. Remove comments already covered in target_ops and
6307 linux_target_ops definitions.
6308 (the_low_target): Add comments for each unimplemented method.
6310 2015-07-09 Yao Qi <yao.qi@linaro.org>
6312 * linux-aarch64-low.c (aarch64_regmap): Remove.
6313 (aarch64_usrregs_info): Remove.
6314 (regs_info): Set field usrregs to NULL.
6316 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6318 * linux-low.c: Include "rsp-low.h"
6319 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6320 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6321 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6322 (handle_btrace_enable_pt): New.
6323 (handle_btrace_general_set): Support "pt".
6324 (handle_btrace_conf_general_set): Support "pt:size".
6326 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6328 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6331 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6333 * linux-aarch64-low.c: Remove comment about endianness.
6334 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6335 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6338 2015-06-24 Gary Benson <gbenson@redhat.com>
6340 * linux-i386-ipa.c (stdint.h): Do not include.
6341 * lynx-i386-low.c (stdint.h): Likewise.
6342 * lynx-ppc-low.c (stdint.h): Likewise.
6343 * mem-break.c (stdint.h): Likewise.
6344 * thread-db.c (stdint.h): Likewise.
6345 * tracepoint.c (stdint.h): Likewise.
6346 * win32-low.c (stdint.h): Likewise.
6348 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6350 * server.c (write_qxfer_response): Update call to
6351 remote_escape_output.
6353 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6354 Jan Kratochvil <jan.kratochvil@redhat.com>
6356 Merge multiple hex conversions.
6357 * gdbreplay.c (tohex): Rename to 'fromhex'.
6358 (logchar): Use fromhex.
6360 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6362 * server.c (handle_qxfer_libraries): Set `version' attribute for
6365 2015-06-10 Gary Benson <gbenson@redhat.com>
6367 * target.h (struct target_ops) <multifs_open>: New field.
6368 <multifs_unlink>: Likewise.
6369 <multifs_readlink>: Likewise.
6370 * linux-low.c (nat/linux-namespaces.h): New include.
6371 (linux_target_ops): Initialize the_target->multifs_open,
6372 the_target->multifs_unlink and the_target->multifs_readlink.
6373 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6374 * hostio.c (hostio_fs_pid): New static variable.
6375 (hostio_handle_new_gdb_connection): New function.
6376 (handle_setfs): Likewise.
6377 (handle_open): Use the_target->multifs_open as appropriate.
6378 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6379 (handle_readlink): Use the_target->multifs_readlink as
6381 (handle_vFile): Handle vFile:setfs packets.
6382 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6383 after target_handle_new_gdb_connection.
6385 2015-06-10 Gary Benson <gbenson@redhat.com>
6387 * configure.ac (AC_CHECK_FUNCS): Add setns.
6388 * config.in: Regenerate.
6389 * configure: Likewise.
6390 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6391 (linux-namespaces.o): New rule.
6392 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6394 2015-06-09 Gary Benson <gbenson@redhat.com>
6396 * hostio.c (handle_open): Process mode argument with
6397 fileio_to_host_mode.
6399 2015-06-01 Yao Qi <yao.qi@linaro.org>
6401 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6402 * linux-x86-low.c: Likewise.
6404 2015-05-28 Don Breazeal <donb@codesourcery.com>
6406 * linux-low.c (handle_extended_wait): Initialize
6407 thread_info.last_resume_kind for new fork children.
6409 2015-05-15 Pedro Alves <palves@redhat.com>
6411 * target.h (target_handle_new_gdb_connection): Rewrite using if
6412 wrapped in do/while.
6414 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6416 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6417 * configure, config.in: Regenerate.
6418 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6421 2015-05-12 Don Breazeal <donb@codesourcery.com>
6423 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6424 PTRACE_EVENT_VFORK_DONE.
6425 (linux_low_ptrace_options, extended_event_reported): Add vfork
6427 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6428 and "vforkdone" for RSP 'T' Stop Reply Packet.
6429 * server.h (report_vfork_events): Declare
6432 2015-05-12 Don Breazeal <donb@codesourcery.com>
6434 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6435 (the_low_target) <new_fork>: Initialize new member.
6436 * linux-arm-low.c (arm_new_fork): New function.
6437 (the_low_target) <new_fork>: Initialize new member.
6438 * linux-low.c (handle_extended_wait): Call new target function
6440 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6441 * linux-mips-low.c (mips_add_watchpoint): New function
6442 extracted from mips_insert_point.
6443 (the_low_target) <new_fork>: Initialize new member.
6444 (mips_linux_new_fork): New function.
6445 (mips_insert_point): Call mips_add_watchpoint.
6446 * linux-x86-low.c (x86_linux_new_fork): New function.
6447 (the_low_target) <new_fork>: Initialize new member.
6449 2015-05-12 Don Breazeal <donb@codesourcery.com>
6451 * linux-low.c (handle_extended_wait): Implement return value,
6452 rename argument 'event_child' to 'event_lwp', handle
6453 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6454 (linux_low_ptrace_options): New function.
6455 (linux_low_filter_event): Call linux_low_ptrace_options,
6456 use different argument fo linux_enable_event_reporting,
6457 use return value from handle_extended_wait.
6458 (extended_event_reported): New function.
6459 (linux_wait_1): Call extended_event_reported and set
6460 status to report fork events.
6461 (linux_write_memory): Add pid to debug message.
6462 (reset_lwp_ptrace_options_callback): New function.
6463 (linux_handle_new_gdb_connection): New function.
6464 (linux_target_ops): Initialize new structure member.
6465 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6466 * lynx-low.c: Initialize new structure member.
6467 * remote-utils.c (prepare_resume_reply): Implement stop reason
6468 "fork" for "T" stop message.
6469 * server.c (handle_query): Call handle_new_gdb_connection.
6470 * server.h (report_fork_events): Declare global flag.
6471 * target.h (struct target_ops) <handle_new_gdb_connection>:
6473 (target_handle_new_gdb_connection): New macro.
6474 * win32-low.c: Initialize new structure member.
6476 2015-05-12 Don Breazeal <donb@codesourcery.com>
6478 * mem-break.c (APPEND_TO_LIST): Define macro.
6479 (clone_agent_expr): New function.
6480 (clone_one_breakpoint): New function.
6481 (clone_all_breakpoints): New function.
6482 * mem-break.h: Declare new functions.
6484 2015-05-12 Don Breazeal <donb@codesourcery.com>
6486 * linux-low.c (linux_supports_fork_events): New function.
6487 (linux_supports_vfork_events): New function.
6488 (linux_target_ops): Initialize new structure members.
6489 (initialize_low): Call linux_check_ptrace_features.
6490 * lynx-low.c (lynx_target_ops): Initialize new structure
6492 * server.c (report_fork_events, report_vfork_events):
6494 (handle_query): Add new features to qSupported packet and
6496 (captured_main): Initialize new global variables.
6497 * target.h (struct target_ops) <supports_fork_events>:
6499 <supports_vfork_events>: New member.
6500 (target_supports_fork_events): New macro.
6501 (target_supports_vfork_events): New macro.
6502 * win32-low.c (win32_target_ops): Initialize new structure
6505 2015-05-12 Gary Benson <gbenson@redhat.com>
6507 * server.c (handle_qxfer_exec_file): Use current process
6510 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6512 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6513 Remove HAVE_PTRACE_GETREGS conditionals.
6514 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6515 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6517 2015-05-08 Yao Qi <yao.qi@linaro.org>
6519 * linux-low.c (linux_supports_conditional_breakpoints): New
6521 (linux_target_ops): Install new target method.
6522 * lynx-low.c (lynx_target_ops): Install NULL hook for
6523 supports_conditional_breakpoints.
6524 * nto-low.c (nto_target_ops): Likewise.
6525 * spu-low.c (spu_target_ops): Likewise.
6526 * win32-low.c (win32_target_ops): Likewise.
6527 * server.c (handle_query): Check
6528 target_supports_conditional_breakpoints.
6529 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6531 (target_supports_conditional_breakpoints): New macro.
6533 2015-05-06 Pedro Alves <palves@redhat.com>
6536 * server.c (start_inferior): If the process exits, mourn it.
6538 2015-04-21 Gary Benson <gbenson@redhat.com>
6540 * hostio.c (fileio_open_flags_to_host): Factored out to
6541 fileio_to_host_openflags in common/fileio.c. Single use
6544 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6546 * linux-xtensa-low.c (xtensa_fill_gregset)
6547 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6550 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6552 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6553 (regs_info): Replace usrregs pointer with NULL.
6555 2015-04-17 Gary Benson <gbenson@redhat.com>
6557 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6558 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6559 * server.c (handle_qxfer_exec_file): New function.
6560 (qxfer_packets): Add exec-file entry.
6561 (handle_query): Report qXfer:exec-file:read as supported packet.
6563 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6565 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6567 2015-04-09 Gary Benson <gbenson@redhat.com>
6569 * hostio-errno.c (errno_to_fileio_error): Remove function.
6570 Update caller to use remote_fileio_to_fio_error.
6572 2015-04-09 Yao Qi <yao.qi@linaro.org>
6574 * linux-low.c (linux_insert_point): Call
6575 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6576 (linux_remove_point): Call remove_memory_breakpoint if type is
6578 * linux-x86-low.c (x86_insert_point): Don't call
6579 insert_memory_breakpoint.
6580 (x86_remove_point): Don't call remove_memory_breakpoint.
6582 2015-04-01 Pedro Alves <palves@redhat.com>
6583 Cleber Rosa <crosa@redhat.com>
6585 * server.c (gdbserver_usage): Reorganize and extend the usage
6588 2015-03-24 Pedro Alves <palves@redhat.com>
6590 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6591 output. Also dump TRAP_TRACE.
6592 (linux_low_filter_event): In debug output, distinguish a
6593 resume_stop SIGSTOP from a delayed SIGSTOP.
6595 2015-03-24 Gary Benson <gbenson@redhat.com>
6597 * linux-x86-low.c (x86_linux_new_thread): Moved to
6599 (x86_linux_prepare_to_resume): Likewise.
6601 2015-03-24 Gary Benson <gbenson@redhat.com>
6603 * Makefile.in (x86-linux-dregs.o): New rule.
6604 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6605 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6606 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6607 (x86_linux_dr_get): Likewise.
6608 (x86_linux_dr_set): Likewise.
6609 (update_debug_registers_callback): Likewise.
6610 (x86_linux_dr_set_addr): Likewise.
6611 (x86_linux_dr_get_addr): Likewise.
6612 (x86_linux_dr_set_control): Likewise.
6613 (x86_linux_dr_get_control): Likewise.
6614 (x86_linux_dr_get_status): Likewise.
6615 (x86_linux_update_debug_registers): Likewise.
6617 2015-03-24 Gary Benson <gbenson@redhat.com>
6619 * linux-x86-low.c (x86_linux_update_debug_registers):
6620 New function, factored out from...
6621 (x86_linux_prepare_to_resume): ...this.
6623 2015-03-24 Gary Benson <gbenson@redhat.com>
6625 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6626 (x86_linux_dr_set): Likewise.
6627 (update_debug_registers_callback): Likewise.
6628 (x86_linux_dr_set_addr): Likewise.
6629 (x86_linux_dr_get_addr): Likewise.
6630 (x86_linux_dr_set_control): Likewise.
6631 (x86_linux_dr_get_control): Likewise.
6632 (x86_linux_dr_get_status): Likewise.
6633 (x86_linux_prepare_to_resume): Likewise.
6635 2015-03-24 Gary Benson <gbenson@redhat.com>
6637 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6638 Use perror_with_name. Pass string through gettext.
6639 (x86_linux_dr_set): Likewise.
6641 2015-03-24 Gary Benson <gbenson@redhat.com>
6643 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6644 (x86_linux_dr_set_addr): ...this.
6645 (x86_dr_low_get_addr): Rename to...
6646 (x86_linux_dr_get_addr): ...this.
6647 (x86_dr_low_set_control): Rename to...
6648 (x86_linux_dr_set_control): ...this.
6649 (x86_dr_low_get_control): Rename to...
6650 (x86_linux_dr_get_control): ...this.
6651 (x86_dr_low_get_status): Rename to...
6652 (x86_linux_dr_get_status): ...this.
6653 (x86_dr_low): Update with new function names.
6655 2015-03-24 Gary Benson <gbenson@redhat.com>
6657 * Makefile.in (x86-linux.o): New rule.
6658 * configure.srv: Add x86-linux.o to relevant targets.
6659 * linux-low.c (lwp_set_arch_private_info): New function.
6660 (lwp_arch_private_info): Likewise.
6661 * linux-x86-low.c: Include nat/x86-linux.h.
6662 (arch_lwp_info): Removed structure.
6663 (update_debug_registers_callback):
6664 Use lwp_set_debug_registers_changed.
6665 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6666 and lwp_set_debug_registers_changed.
6667 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6669 2015-03-24 Gary Benson <gbenson@redhat.com>
6671 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6672 * linux-arm-low.c (arm_new_thread): Likewise.
6673 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6674 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6675 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6676 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6678 2015-03-24 Gary Benson <gbenson@redhat.com>
6680 * linux-low.c (ptid_of_lwp): New function.
6681 (lwp_is_stopped): Likewise.
6682 (lwp_stop_reason): Likewise.
6683 * linux-x86-low.c (update_debug_registers_callback):
6685 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6688 2015-03-24 Gary Benson <gbenson@redhat.com>
6690 * linux-low.h (linux_stop_lwp): Remove declaration.
6692 2015-03-24 Gary Benson <gbenson@redhat.com>
6694 * linux-low.h: Include nat/linux-nat.h.
6695 * linux-low.c (iterate_over_lwps_args): New structure.
6696 (iterate_over_lwps_filter): New function.
6697 (iterate_over_lwps): Likewise.
6698 * linux-x86-low.c (update_debug_registers_callback):
6699 Update signature to what iterate_over_lwps expects.
6700 Remove PID check that iterate_over_lwps now performs.
6701 (x86_dr_low_set_addr): Use iterate_over_lwps.
6702 (x86_dr_low_set_control): Likewise.
6704 2015-03-24 Gary Benson <gbenson@redhat.com>
6706 * linux-x86-low.c (x86_debug_reg_state): New function.
6707 (x86_linux_prepare_to_resume): Use the above.
6709 2015-03-24 Gary Benson <gbenson@redhat.com>
6711 * linux-low.c (current_lwp_ptid): New function.
6712 * linux-x86-low.c: Include nat/linux-nat.h.
6713 (x86_dr_low_get_addr): Use current_lwp_ptid.
6714 (x86_dr_low_get_control): Likewise.
6715 (x86_dr_low_get_status): Likewise.
6717 2015-03-20 Pedro Alves <palves@redhat.com>
6719 * tracepoint.c (cmd_qtstatus): Make "str" const.
6721 2015-03-20 Pedro Alves <palves@redhat.com>
6723 * server.c (handle_general_set): Make "req_str" const.
6725 2015-03-19 Pedro Alves <palves@redhat.com>
6727 * linux-low.c (linux_resume_one_lwp): Rename to ...
6728 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6729 instead call perror_with_name.
6730 (check_ptrace_stopped_lwp_gone): New function.
6731 (linux_resume_one_lwp): Reimplement as wrapper around
6732 linux_resume_one_lwp_throw that swallows errors if the LWP is
6735 2015-03-19 Pedro Alves <palves@redhat.com>
6737 * linux-low.c (count_events_callback, select_event_lwp_callback):
6738 No longer check whether the thread has resume_stop as last resume
6741 2015-03-19 Pedro Alves <palves@redhat.com>
6743 * linux-low.c (count_events_callback, select_event_lwp_callback):
6744 Use the lwp's status_pending_p field, not the thread's.
6746 2015-03-19 Pedro Alves <palves@redhat.com>
6748 * linux-low.c (select_event_lwp_callback): Update comments to
6749 no longer mention SIGTRAP.
6751 2015-03-18 Gary Benson <gbenson@redhat.com>
6753 * server.c (handle_query): Do not report vFile:fstat as supported.
6755 2015-03-11 Gary Benson <gbenson@redhat.com>
6757 * hostio.c (sys/types.h): New include.
6758 (sys/stat.h): Likewise.
6759 (common-remote-fileio.h): Likewise.
6760 (handle_fstat): New function.
6761 (handle_vFile): Handle vFile:fstat packets.
6763 2015-03-11 Gary Benson <gbenson@redhat.com>
6765 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6766 struct stat.st_blocks and struct stat.st_blksize.
6767 * configure: Regenerate.
6768 * config.in: Likewise.
6769 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6770 (OBS): Add common-remote-fileio.o.
6771 (common-remote-fileio.o): New rule.
6773 2015-03-09 Pedro Alves <palves@redhat.com>
6775 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6776 'struct sockaddr' pointer in 'accept' call.
6778 2015-03-09 Pedro Alves <palves@redhat.com>
6781 2015-03-07 Pedro Alves <palves@redhat.com>
6782 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6783 or <winsock2.h> here. Instead include "gdb_socket.h".
6784 (remote_open): Use union gdb_sockaddr_u.
6785 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6786 or <winsock2.h> here. Instead include "gdb_socket.h".
6787 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6788 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6790 (init_named_socket, gdb_agent_helper_thread): Use union
6793 2015-03-07 Pedro Alves <palves@redhat.com>
6795 * configure.ac (build_warnings): Move
6796 -Wdeclaration-after-statement to the C-specific set.
6797 * configure: Regenerate.
6799 2015-03-07 Pedro Alves <palves@redhat.com>
6801 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6802 or <winsock2.h> here. Instead include "gdb_socket.h".
6803 (remote_open): Use union gdb_sockaddr_u.
6804 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6805 or <winsock2.h> here. Instead include "gdb_socket.h".
6806 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6807 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6809 (init_named_socket, gdb_agent_helper_thread): Use union
6812 2015-03-07 Pedro Alves <palves@redhat.com>
6814 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6817 2015-03-06 Yao Qi <yao.qi@linaro.org>
6819 * linux-aarch64-low.c (aarch64_insert_point): Use
6820 show_debug_regs as a boolean.
6821 (aarch64_remove_point): Likewise.
6823 2015-03-05 Pedro Alves <palves@redhat.com>
6825 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6826 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6827 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6828 * nto-low.c (nto_target_ops): Likewise.
6829 * spu-low.c (spu_target_ops): Likewise.
6830 * win32-low.c (win32_target_ops): Likewise.
6832 2015-03-04 Pedro Alves <palves@redhat.com>
6834 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6835 Decide whether a breakpoint triggered based on the SIGTRAP's
6837 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6838 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6839 (linux_low_filter_event): Check for breakpoints before checking
6841 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6843 (linux_stopped_by_sw_breakpoint)
6844 (linux_supports_stopped_by_sw_breakpoint)
6845 (linux_stopped_by_hw_breakpoint)
6846 (linux_supports_stopped_by_hw_breakpoint): New functions.
6847 (linux_target_ops): Install new target methods.
6849 2015-03-04 Pedro Alves <palves@redhat.com>
6851 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6852 * server.c (swbreak_feature, hwbreak_feature): New globals.
6853 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6854 (captured_main): Clear swbreak_feature and hwbreak_feature.
6855 * server.h (swbreak_feature, hwbreak_feature): Declare.
6856 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6857 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6858 supports_stopped_by_hw_breakpoint>: New fields.
6859 (target_supports_stopped_by_sw_breakpoint)
6860 (target_stopped_by_sw_breakpoint)
6861 (target_supports_stopped_by_hw_breakpoint)
6862 (target_stopped_by_hw_breakpoint): Declare.
6864 2015-03-04 Pedro Alves <palves@redhat.com>
6866 enum lwp_stop_reason -> enum target_stop_reason
6867 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6868 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6869 (linux_wait_1, stuck_in_jump_pad_callback)
6870 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6871 (linux_stopped_by_watchpoint):
6872 * linux-low.h (enum lwp_stop_reason): Delete.
6873 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6874 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6876 2015-03-04 Yao Qi <yao.qi@linaro.org>
6878 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6880 2015-03-03 Gary Benson <gbenson@redhat.com>
6882 * hostio.c (handle_vFile): Fix prefix lengths.
6884 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6886 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6889 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6891 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6892 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6893 (clean): Add "rm -f" for above C files.
6894 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6895 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6896 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6897 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6898 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6899 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6900 (init_registers_s390x_vx_linux64)
6901 (init_registers_s390x_tevx_linux64)
6902 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6903 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6905 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6906 (s390_store_vxrs_high): New functions.
6907 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6909 (s390_arch_setup): Add logic for selecting one of the new target
6910 descriptions. Activate the new vector regsets if applicable.
6911 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6912 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6913 and init_registers_s390x_tevx_linux64.
6915 2015-03-01 Pedro Alves <palves@redhat.com>
6917 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6920 2015-02-27 Pedro Alves <palves@redhat.com>
6922 * linux-x86-low.c (u_debugreg_offset): New function.
6923 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6925 2015-02-27 Pedro Alves <palves@redhat.com>
6927 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6928 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6929 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6930 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6931 (ps_lsetfpregs, ps_getpid)
6932 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6933 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6934 (ps_lsetxregs, ps_plog): Declare.
6936 2015-02-27 Pedro Alves <palves@redhat.com>
6938 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6939 IP_AGENT_EXPORT_FUNC.
6940 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6941 IP_AGENT_EXPORT_FUNC.
6942 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6943 (IP_AGENT_EXPORT): Delete.
6944 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6945 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6946 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6947 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6948 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6949 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6950 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6951 (traceframe_read_count, traceframe_write_count)
6952 (traceframes_created, trace_state_variables, get_raw_reg)
6953 (get_trace_state_variable_value, set_trace_state_variable_value)
6954 (ust_loaded, helper_thread_id, cmd_buf): Use
6955 IPA_SYM_EXPORTED_NAME.
6956 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6957 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6958 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6959 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6960 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6961 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6962 EXTERN_C_PUSH/EXTERN_C_POP.
6963 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6964 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6965 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6966 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6967 (traceframe_write_count, traceframe_read_count)
6968 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6969 (about_to_request_buffer_space, get_trace_state_variable_value)
6970 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6971 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6972 EXTERN_C_PUSH/EXTERN_C_POP.
6973 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6974 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6975 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6976 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6977 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6978 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6979 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6980 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6982 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6983 (IP_AGENT_EXPORT_VAR_DECL): Define.
6985 (gdb_agent_get_raw_reg): Declare.
6987 2015-02-27 Tom Tromey <tromey@redhat.com>
6988 Pedro Alves <palves@redhat.com>
6990 Rename symbols whose names are reserved C++ keywords throughout.
6992 2015-02-27 Pedro Alves <palves@redhat.com>
6994 * Makefile.in (COMPILER): New, get it from autoconf.
6995 (CXX): Get from autoconf instead.
6996 (COMPILE.pre): Use COMPILER.
6997 (CC-LD): Rename to ...
6998 (CC_LD): ... this. Use COMPILER.
6999 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7000 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7001 * acinclude.m4: Include build-with-cxx.m4.
7002 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7003 Disable -Werror by default if building in C++ mode.
7004 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7005 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7006 the C++ compiler. Save/restore CXXFLAGS too.
7007 * configure: Regenerate.
7009 2015-02-27 Pedro Alves <palves@redhat.com>
7011 * acinclude.m4: Include libiberty.m4.
7012 * configure.ac: Call libiberty_INIT.
7013 * config.in, configure: Regenerate.
7015 2015-02-26 Pedro Alves <palves@redhat.com>
7017 * linux-low.c (linux_wait_1): When incrementing the PC past a
7018 program breakpoint always use the_low_target.breakpoint_len as
7019 increment, rather than the maximum between that and
7020 the_low_target.decr_pc_after_break.
7022 2015-02-23 Pedro Alves <palves@redhat.com>
7024 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7025 thread was doing a step-over; always adjust the PC if
7026 we stepped over a permanent breakpoint.
7027 (linux_wait_1): If we stepped over breakpoint that was on top of a
7028 permanent breakpoint, manually advance the PC past it.
7030 2015-02-23 Pedro Alves <palves@redhat.com>
7032 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7034 (x86_fill_gregset, x86_store_gregset): Use it when handling
7037 2015-02-20 Pedro Alves <palves@redhat.com>
7039 * thread-db.c: Include "nat/linux-procfs.h".
7040 (thread_db_init): Skip listing new threads if the kernel supports
7041 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7043 2015-02-20 Pedro Alves <palves@redhat.com>
7045 * linux-low.c (status_pending_p_callback): Use ptid_match.
7047 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7049 PR breakpoints/16812
7050 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7051 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7052 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7054 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7056 PR breakpoints/15956
7057 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7059 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7061 * linux-low.c (linux_low_btrace_conf): Print size.
7062 * server.c (handle_btrace_conf_general_set): New.
7063 (hanle_general_set): Call handle_btrace_conf_general_set.
7064 (handle_query): Report Qbtrace-conf:bts:size as supported.
7066 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7068 * linux-low.c (linux_low_enable_btrace): Update parameters.
7069 (linux_low_btrace_conf): New.
7070 (linux_target_ops)<to_btrace_conf>: Initialize.
7071 * server.c (current_btrace_conf): New.
7072 (handle_btrace_enable): Rename to ...
7073 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7074 to target_enable_btrace. Update comment. Update users.
7075 (handle_qxfer_btrace_conf): New.
7076 (qxfer_packets): Add btrace-conf entry.
7077 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7078 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7079 (target_ops)<read_btrace_conf>: New.
7080 (target_enable_btrace): Update parameters.
7081 (target_read_btrace_conf): New.
7083 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7085 * server.c (handle_btrace_general_set): Remove call to
7086 target_supports_btrace.
7087 (supported_btrace_packets): New.
7088 (handle_query): Call supported_btrace_packets.
7089 * target.h: include btrace-common.h.
7090 (btrace_target_info): Removed.
7091 (supports_btrace, target_supports_btrace): Update parameters.
7093 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7095 * Makefile.in (SFILES): Add common/btrace-common.c.
7096 (OBS): Add common/btrace-common.o.
7097 (btrace-common.o): Add build rules.
7098 * linux-low: Include btrace-common.h.
7099 (linux_low_read_btrace): Use struct btrace_data. Call
7100 btrace_data_init and btrace_data_fini.
7102 2015-02-06 Pedro Alves <palves@redhat.com>
7104 * thread-db.c (find_new_threads_callback): Add debug output.
7106 2015-02-04 Pedro Alves <palves@redhat.com>
7108 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7109 (resume_stopped_resumed_lwps): New function.
7110 (linux_wait_for_event_filtered): Use it.
7112 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7114 * Makefile.in (SFILES): Add linux-personality.c.
7115 (linux-personality.o): New rule.
7116 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7117 list of objects to be built.
7118 * linux-low.c: Include nat/linux-personality.h.
7119 (linux_create_inferior): Remove code to disable address space
7120 randomization (moved to ../nat/linux-personality.c). Create
7121 cleanup to disable address space randomization.
7123 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7125 * Makefile.in (posix-strerror.o): New rule.
7126 (mingw-strerror.o): Likewise.
7127 * configure: Regenerated.
7128 * configure.ac: Source file ../common/common.host. Initialize new
7129 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7131 2015-01-14 Yao Qi <yao@codesourcery.com>
7133 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7134 (ppc-linux.o): New rule.
7135 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7136 * configure.ac: AC_CHECK_FUNCS(getauxval).
7137 * config.in: Re-generated.
7138 * configure: Re-generated.
7139 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7140 ppc64_64bit_inferior_p
7142 2015-01-14 Yao Qi <yao@codesourcery.com>
7144 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7145 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7146 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7147 (PT_ORIG_R3, PT_TRAP): Likewise.
7148 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7149 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7150 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7152 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7154 * i387-fp.c (i387_cache_to_xsave): In look over
7155 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7156 zmmh_low_space field by use of zmmh_high_space.
7158 2015-01-09 Pedro Alves <palves@redhat.com>
7160 * linux-low.c (step_over_bkpt): Move higher up in the file.
7161 (handle_extended_wait): Don't store the stop_pc here.
7162 (get_stop_pc): Adjust comments and rename to ...
7163 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7164 stopped for a software breakpoint or hardware breakpoint.
7165 (thread_still_has_status_pending_p): New function.
7166 (status_pending_p_callback): Use
7167 thread_still_has_status_pending_p. If the event is no longer
7168 interesting, resume the LWP.
7169 (handle_tracepoints): Add assert.
7170 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7171 (wstatus_maybe_breakpoint): New function.
7172 (cancel_breakpoint): Delete function.
7173 (check_stopped_by_watchpoint): New function, factored out from
7174 linux_low_filter_event.
7175 (lp_status_maybe_breakpoint): Delete function.
7176 (linux_low_filter_event): Remove filter_ptid argument.
7177 Leave thread group exits pending here. Store the LWP's stop PC.
7178 Always leave events pending.
7179 (linux_wait_for_event_filtered): Pull all events out of the
7180 kernel, and leave them all pending.
7181 (count_events_callback, select_event_lwp_callback): Consider all
7183 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7184 (select_event_lwp): Only give preference to the stepping LWP in
7185 all-stop mode. Adjust comments.
7186 (ignore_event): New function.
7187 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7188 references to cancel_breakpoints. Adjust to renames. Also give
7189 equal priority to all LWPs that have had events in non-stop mode.
7190 If reporting a software breakpoint event, unadjust the LWP's PC.
7191 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7192 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7194 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7195 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7196 (linux_stopped_by_watchpoint): Adjust.
7197 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7198 * linux-low.h (enum lwp_stop_reason): New.
7199 (struct lwp_info) <stop_pc>: Adjust comment.
7200 <stopped_by_watchpoint>: Delete field.
7201 <stop_reason>: New field.
7202 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7203 * mem-break.c (software_breakpoint_inserted_here)
7204 (hardware_breakpoint_inserted_here): New function.
7205 * mem-break.h (software_breakpoint_inserted_here)
7206 (hardware_breakpoint_inserted_here): Declare.
7207 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7208 (cancel_breakpoints): Delete.
7209 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7210 (upload_fast_traceframes): Remove references to
7213 2015-01-09 Pedro Alves <palves@redhat.com>
7215 * thread-db.c (find_new_threads_callback): Ignore thread if the
7216 kernel thread ID is -1.
7218 2015-01-09 Pedro Alves <palves@redhat.com>
7220 * linux-low.c (linux_attach_fail_reason_string): Move to
7221 nat/linux-ptrace.c, and rename.
7222 (linux_attach_lwp): Update comment.
7223 (attach_proc_task_lwp_callback): New function.
7224 (linux_attach): Adjust to rename and use
7225 linux_proc_attach_tgid_threads.
7226 (linux_attach_fail_reason_string): Delete declaration.
7228 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7230 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7231 * server.c (gdbserver_version): Likewise.
7233 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7235 * remote-utils.c: Include ctype.h.
7236 (input_interrupt): Explicitly handle the case when the char
7237 received is the NUL byte. Improve the printing of non-ASCII
7240 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7242 * linux-low.c (linux_low_filter_event): Update call to
7243 linux_enable_event_reporting following the addition of
7244 a new parameter to that function.
7246 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7249 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7250 (AARCH64_FPCR_REGNO): Likewise.
7251 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7252 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7253 (aarch64_store_fpregset): Likewise.
7255 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7257 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7258 Remove FIXME comment about assumption about N.
7260 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7262 * configure.ac: If large-file support is disabled in GDBserver,
7263 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7264 * configure: Regenerate.
7266 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7268 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7269 warning upon ENODATA from ptrace.
7270 * linux-s390-low.c (s390_store_tdb): New.
7271 (s390_regsets): Add regset for NT_S390_TDB.
7273 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7275 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7276 without a fill_function.
7277 * linux-s390-low.c (s390_fill_last_break): Remove.
7278 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7279 (s390_arch_setup): Use regset's size instead of fill_function for
7282 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7284 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7285 the regset's store function when ptrace returned an error.
7286 * regcache.c (get_thread_regcache): Invalidate register cache
7287 before fetching inferior's registers.
7289 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7291 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7292 while-loop as for-loop.
7293 (regsets_store_inferior_registers): Likewise.
7295 2014-11-28 Yao Qi <yao@codesourcery.com>
7297 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7298 * config.in, configure: Re-generate.
7299 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7302 2014-11-21 Yao Qi <yao@codesourcery.com>
7304 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7305 (AC_CHECK_HEADERS): Remove malloc.h.
7306 * configure: Re-generated.
7307 * config.in: Re-generated.
7308 * server.h: Don't include alloca.h and malloc.h.
7309 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7310 Don't include malloc.h.
7312 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7314 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7315 corresponding ERRNO check in same block.
7317 2014-11-12 Pedro Alves <palves@redhat.com>
7319 * server.c (cont_thread): Update comment.
7320 (start_inferior, attach_inferior): No longer clear cont_thread.
7321 (handle_v_cont): No longer set cont_thread.
7322 (captured_main): Clear cont_thread each time a GDB connects.
7324 2014-11-12 Pedro Alves <palves@redhat.com>
7326 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7327 thread, and don't resume all threads if the Hc thread has exited.
7329 2014-11-12 Pedro Alves <palves@redhat.com>
7331 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7332 the process group instead of to a specific LWP.
7334 2014-10-15 Pedro Alves <palves@redhat.com>
7337 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7339 (arm_set_thread_context): Delete.
7340 (the_low_target): Adjust.
7341 * win32-i386-low.c (debug_registers_changed)
7342 (debug_registers_used): Delete.
7343 (update_debug_registers_callback): New function.
7344 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7345 needing to update their debug registers.
7346 (win32_get_current_dr): New function.
7347 (x86_dr_low_get_addr, x86_dr_low_get_control)
7348 (x86_dr_low_get_status): Fetch the debug register from the thread
7350 (i386_initial_stuff): Adjust.
7351 (i386_get_thread_context): Remove current_event parameter. Don't
7352 clear debug_registers_changed nor copy DR values to
7354 (i386_set_thread_context): Delete.
7355 (i386_prepare_to_resume): New function.
7356 (i386_thread_added): Mark the thread as needing to update irs
7358 (the_low_target): Remove i386_set_thread_context and install
7359 i386_prepare_to_resume.
7360 * win32-low.c (win32_get_thread_context): Adjust.
7361 (win32_set_thread_context): Use SetThreadContext
7363 (win32_prepare_to_resume): New function.
7364 (win32_require_context): New function, factored out from ...
7365 (thread_rec): ... this.
7366 (continue_one_thread): Call win32_prepare_to_resume on each thread
7367 we're about to continue.
7368 (win32_resume): Call win32_prepare_to_resume on the event thread.
7369 * win32-low.h (struct win32_thread_info)
7370 <debug_registers_changed>: New field.
7371 (struct win32_target_ops): Change prototype of set_thread_context,
7372 delete set_thread_context and add prepare_to_resume.
7373 (win32_require_context): New declaration.
7375 2014-10-08 Gary Benson <gbenson@redhat.com>
7377 * server.h: Do not include common-exceptions.h.
7379 2014-10-08 Gary Benson <gbenson@redhat.com>
7381 * server.h: Do not include cleanups.h.
7383 2014-09-30 James Hogan <james.hogan@imgtec.com>
7385 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7388 2014-09-23 Yao Qi <yao@codesourcery.com>
7390 * linux-low.c (lp_status_maybe_breakpoint): New function.
7391 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7392 (count_events_callback): Likewise.
7393 (select_event_lwp_callback): Likewise.
7394 (cancel_breakpoints_callback): Likewise.
7396 2014-09-19 Don Breazeal <donb@codesourcery.com>
7398 * linux-low.c (handle_extended_wait): Call
7399 linux_ptrace_get_extended_event.
7400 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7401 linux_is_extended_waitstatus.
7403 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7405 * Makefile.in (CPPFLAGS): Define.
7406 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7407 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7409 2014-09-16 Gary Benson <gbenson@redhat.com>
7411 * inferiors.h (current_inferior): Renamed as...
7412 (current_thread): New variable. All uses updated.
7413 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7414 (maybe_move_out_of_jump_pad): Likewise.
7415 (cancel_breakpoint): Likewise.
7416 (linux_low_filter_event): Likewise.
7417 (wait_for_sigstop): Likewise.
7418 (linux_resume_one_lwp): Likewise.
7419 (need_step_over_p): Likewise.
7420 (start_step_over): Likewise.
7421 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7422 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7423 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7424 and save_inferior as saved_thread.
7425 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7427 (regcache_invalidate_thread): Likewise.
7428 * remote-utils.c (prepare_resume_reply): Likewise.
7429 * thread-db.c (thread_db_get_tls_address): Likewise.
7430 (disable_thread_event_reporting): Likewise.
7431 (remove_thread_event_breakpoints): Likewise.
7432 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7434 * target.h (set_desired_inferior): Renamed as...
7435 (set_desired_thread): New declaration. All uses updated.
7436 * server.c (myresume): Updated comment to reference thread instead
7438 (handle_serial_event): Likewise.
7439 (handle_target_event): Likewise.
7441 2014-09-12 Tom Tromey <tromey@redhat.com>
7442 Gary Benson <gbenson@redhat.com>
7444 * regcache.h: Include common-regcache.h.
7445 (regcache_read_pc): Don't declare.
7446 * regcache.c (get_thread_regcache_for_ptid): New function.
7448 2014-09-11 Tom Tromey <tromey@redhat.com>
7449 Gary Benson <gbenson@redhat.com>
7451 * symbol.c: New file.
7452 * Makefile.in (SFILES): Add symbol.c.
7453 (OBS): Add symbol.o.
7455 2014-09-11 Gary Benson <gbenson@redhat.com>
7457 * target.c (target_stop_ptid, target_continue_ptid): New
7460 2014-09-11 Tom Tromey <tromey@redhat.com>
7461 Gary Benson <gbenson@redhat.com>
7463 * target.h: Include target/target.h.
7464 * target.c (target_read_memory, target_read_uint32)
7465 (target_write_memory): New functions.
7467 2014-09-11 Gary Benson <gbenson@redhat.com>
7469 * server.h (debug_hw_points): Don't declare.
7470 * server.c (debug_hw_points): Don't define. Replace all uses
7471 with show_debug_regs.
7472 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7473 all uses with show_debug_regs.
7475 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7477 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7478 endianness into account.
7479 (ppc_supply_ptrace_register): Likewise.
7481 2014-09-03 James Hogan <james.hogan@imgtec.com>
7483 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7484 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7486 2014-09-03 Gary Benson <gbenson@redhat.com>
7488 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7489 ALL_DEBUG_ADDRESS_REGISTERS.
7491 2014-09-02 Gary Benson <gbenson@redhat.com>
7493 * i386-low.h: Renamed as...
7494 * x86-low.h: New file. All type, function and variable name
7495 prefixes changed from "i386_" to "x86_". All references updated.
7496 * i386-low.c: Renamed as...
7497 * x86-low.c: New file. All type, function and variable name
7498 prefixes changed from "i386_" to "x86_". All references updated.
7500 2014-09-02 Gary Benson <gbenson@redhat.com>
7502 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7503 (x86_linux_new_thread): Likewise.
7505 2014-08-29 Gary Benson <gbenson@redhat.com>
7507 * server.h (setjmp.h): Do not include.
7508 (toplevel): Do not declare.
7509 (common-exceptions.h): Include.
7510 (cleanups.h): Likewise.
7511 * server.c (toplevel): Do not define.
7512 (exit_code): New static global.
7513 (detach_or_kill_for_exit_cleanup): New function.
7514 (main): New function. Original main renamed to...
7515 (captured_main): New function.
7516 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7518 2014-08-29 Gary Benson <gbenson@redhat.com>
7520 * Makefile.in (SFILES): Add common/common-exceptions.c.
7521 (OBS): Add common-exceptions.o.
7522 (common-exceptions.o): New rule.
7523 * utils.c (prepare_to_throw_exception): New function.
7525 2014-08-29 Gary Benson <gbenson@redhat.com>
7527 * config.in: Regenerate.
7528 * configure: Likewise.
7530 2014-08-29 Gary Benson <gbenson@redhat.com>
7532 * Makefile.in (SFILES): Add common/cleanups.c.
7534 (cleanups.o): New rule.
7536 2014-08-29 Gary Benson <gbenson@redhat.com>
7538 * utils.c (internal_vwarning): New function.
7540 2014-08-28 Gary Benson <gbenson@redhat.com>
7542 * utils.h (fatal): Remove declaration.
7543 * utils.c (fatal): Remove function.
7545 2014-08-28 Gary Benson <gbenson@redhat.com>
7547 * tracepoint.c (gdb_agent_init): Replace fatal with
7549 (initialize_tracepoint): Likewise.
7551 2014-08-28 Gary Benson <gbenson@redhat.com>
7553 * remote-utils.c (remote_prepare): Replace fatal with error.
7555 2014-08-28 Gary Benson <gbenson@redhat.com>
7557 * linux-low.c (linux_async): Replace fatal with warning.
7559 (linux_start_non_stop): Return -1 if linux_async failed.
7561 2014-08-28 Gary Benson <gbenson@redhat.com>
7563 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7565 (i386_dr_low_get_addr): Remove vague comment.
7566 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7569 2014-08-28 Gary Benson <gbenson@redhat.com>
7571 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7572 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7574 (linux_resume_one_lwp): Likewise.
7575 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7577 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7578 with internal_error.
7579 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7580 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7581 (find_register_by_name): Replace fatal with internal_error.
7582 (find_regno): Likewise.
7583 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7584 * thread-db.c (thread_db_create_event): Likewise.
7585 (thread_db_load_search): Likewise.
7586 (try_thread_db_load_1): Likewise.
7587 * tracepoint.c (get_jump_space_head): Replace fatal with
7589 (claim_trampoline_space): Likewise.
7590 (have_fast_tracepoint_trampoline_buffer): Likewise.
7591 (cmd_qtstart): Likewise.
7592 (stop_tracing): Likewise.
7593 (fast_tracepoint_collecting): Likewise.
7594 (target_malloc): Likewise.
7595 (download_tracepoint): Likewise.
7596 (download_trace_state_variables): Replace check with gdb_assert.
7597 (upload_fast_traceframes): Replace fatal with internal_error.
7599 2014-08-19 Tom Tromey <tromey@redhat.com>
7600 Gary Benson <gbenson@redhat.com>
7602 * Makefile.in (SFILES): Add common/common-debug.c.
7603 (OBS): Add common-debug.o.
7604 (common-debug.o): New rule.
7605 * debug.h (debug_printf): Don't declare.
7606 * debug.c (debug_printf): Renamed and rewritten as...
7607 (debug_vprintf): New function.
7609 2014-08-19 Gary Benson <gbenson@redhat.com>
7611 * utils.h: Do not include print-utils.h.
7613 2014-08-19 Tom Tromey <tromey@redhat.com>
7614 Gary Benson <gbenson@redhat.com>
7616 * server.h: Add static assertion.
7617 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7619 2014-08-19 Tom Tromey <tromey@redhat.com>
7620 Gary Benson <gbenson@redhat.com>
7622 * Makefile.in (SFILES): Add common/errors.c.
7623 (OBS): Add errors.o.
7624 (IPA_OBS): Add errors-ipa.o.
7625 (errors.o): New rule.
7626 (errors-ipa.o): Likewise.
7627 * utils.h (perror_with_name, error, warning): Don't declare.
7628 * utils.c (warning): Renamed and rewritten as...
7629 (vwarning): New function.
7630 (error): Renamed and rewritten as...
7631 (verror): New function.
7632 (internal_error): Renamed and rewritten as...
7633 (internal_verror): New function.
7635 2014-08-07 Gary Benson <gbenson@redhat.com>
7637 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7638 * configure: Regenerate.
7639 * config.in: Likewise.
7640 * server.h: Do not include errno.h.
7641 * event-loop.c: Likewise.
7642 * hostio-errno.c: Likewise.
7643 * linux-low.c: Likewise.
7644 * remote-utils.c: Likewise.
7645 * spu-low.c: Likewise.
7646 * utils.c: Likewise.
7647 * gdbreplay.c: Unconditionally include errno.h.
7649 2014-08-07 Gary Benson <gbenson@redhat.com>
7651 * server.h: Do not include string.h.
7652 * event-loop.c: Likewise.
7653 * linux-low.c: Likewise.
7654 * regcache.c: Likewise.
7655 * remote-utils.c: Likewise.
7656 * spu-low.c: Likewise.
7657 * utils.c: Likewise.
7659 2014-08-07 Gary Benson <gbenson@redhat.com>
7661 * server.h: Do not include gdb_assert.h.
7663 2014-08-07 Gary Benson <gbenson@redhat.com>
7665 * server.h: Do not include common-utils.h.
7667 2014-08-07 Gary Benson <gbenson@redhat.com>
7669 * server.h: Do not include ptid.h.
7670 * notif.h: Likewise.
7672 2014-08-07 Gary Benson <gbenson@redhat.com>
7674 * server.h: Do not include gdb_locale.h.
7676 2014-08-07 Gary Benson <gbenson@redhat.com>
7678 * server.h: Do not include gdb/signals.h.
7679 * win32-low.c: Likewise.
7681 2014-08-07 Gary Benson <gbenson@redhat.com>
7683 * server.h: Do not include pathmax.h.
7685 2014-08-07 Gary Benson <gbenson@redhat.com>
7687 * server.h: Do not include libiberty.h.
7688 * linux-bfin-low.c: Likewise.
7690 2014-08-07 Gary Benson <gbenson@redhat.com>
7692 * server.h: Do not include ansidecl.h.
7694 2014-08-07 Gary Benson <gbenson@redhat.com>
7696 * linux-x86-low.c: Do not include stddef.h.
7697 * lynx-ppc-low.c: Likewise.
7698 * tracepoint.c: Likewise.
7700 2014-08-07 Gary Benson <gbenson@redhat.com>
7702 * server.h: Do not include stdarg.h.
7703 * nto-low.c: Likewise.
7705 2014-08-07 Gary Benson <gbenson@redhat.com>
7707 * server.h: Do not include stdlib.h.
7708 * inferiors.c: Likewise.
7709 * linux-low.c: Likewise.
7710 * regcache.c: Likewise.
7711 * spu-low.c: Likewise.
7712 * tracepoint.c: Likewise.
7713 * utils.c: Likewise.
7715 2014-08-07 Gary Benson <gbenson@redhat.com>
7717 * server.h: Do not include stdio.h.
7718 * linux-low.c: Likewise.
7719 * remote-utils.c: Likewise.
7720 * spu-low.c: Likewise.
7721 * utils.c: Likewise.
7722 * wincecompat.c: Likewise.
7724 2014-08-06 Gary Benson <gbenson@redhat.com>
7726 * regcache.c (init_register_cache): Move conditionals inside if.
7728 2014-08-06 Gary Benson <gbenson@redhat.com>
7730 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7732 2014-07-31 Gary Benson <gbenson@redhat.com>
7734 * ax.h: Do not include server.h.
7735 * gdbthread.h: Likewise.
7736 * lynx-low.h: Likewise.
7737 * notif.h: Likewise.
7739 2014-07-30 Gary Benson <gbenson@redhat.com>
7741 * server.h: Include common-defs.h.
7742 Do not include config.h or build-gnulib-gdbserver/config.h.
7744 2014-07-30 Gary Benson <gbenson@redhat.com>
7746 * hostio-errno.c: Move server.h to top of includes list.
7747 * inferiors.c: Likewise.
7748 * linux-x86-low.c: Likewise.
7749 * notif.c: Include server.h.
7751 2014-07-24 Tom Tromey <tromey@redhat.com>
7752 Gary Benson <gbenson@redhat.com>
7754 * server.h (CORE_ADDR): Now unsigned.
7756 2014-07-16 Pedro Alves <palves@redhat.com>
7758 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7760 2014-07-15 Pedro Alves <palves@redhat.com>
7762 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7765 2014-07-11 Pedro Alves <palves@redhat.com>
7767 * linux-low.c (kill_wait_lwp): New function, based on
7768 kill_one_lwp_callback, but use my_waitpid directly.
7769 (kill_one_lwp_callback, linux_kill): Use it.
7771 2014-06-23 Pedro Alves <palves@redhat.com>
7773 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7774 before setting DR0..DR3.
7776 2014-06-20 Gary Benson <gbenson@redhat.com>
7778 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7779 * configure: Regenerated.
7780 * config.in: Likewise.
7782 2014-06-20 Gary Benson <gbenson@redhat.com>
7784 * Makefile.in (SFILES): Update locations for files moved
7786 (object file files): Reordered.
7788 2014-06-20 Gary Benson <gbenson@redhat.com>
7790 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7791 (i386_dr_low_set_addr): Likewise.
7792 (i386_dr_low_get_addr): Likewise.
7793 (i386_dr_low_can_set_control): Likewise.
7794 (i386_dr_low_set_control): Likewise.
7795 (i386_dr_low_get_control): Likewise.
7796 (i386_dr_low_get_status): Likewise.
7797 (i386_get_debug_register_length): Likewise.
7798 * linux-x86-low.c (i386_dr_low_set_addr):
7799 Changed signature. Made static.
7800 (i386_dr_low_get_addr): Likewise.
7801 (i386_dr_low_set_control): Likewise.
7802 (i386_dr_low_get_control): Likewise.
7803 (i386_dr_low_get_status): Likewise.
7804 (i386_dr_low): New global variable.
7805 * win32-i386-low.c (i386_dr_low_set_addr):
7806 Changed signature. Made static.
7807 (i386_dr_low_get_addr): Likewise.
7808 (i386_dr_low_set_control): Likewise.
7809 (i386_dr_low_get_control): Likewise.
7810 (i386_dr_low_get_status): Likewise.
7811 (i386_dr_low): New global variable.
7813 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7815 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7816 * Makefile.in (AR, AR_FLAGS): Define.
7817 * configure: Regenerate.
7819 2014-06-19 Gary Benson <gbenson@redhat.com>
7821 * Makefile.in (i386-dregs.o): New rule.
7822 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7823 * i386-low.c (target.h): Remove include.
7824 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7825 (DR_CONTROL_SHIFT): Likewise.
7826 (DR_CONTROL_SIZE): Likewise.
7827 (DR_RW_EXECUTE): Likewise.
7828 (DR_RW_WRITE): Likewise.
7829 (DR_RW_READ): Likewise.
7830 (DR_RW_IORW): Likewise.
7831 (DR_LEN_1): Likewise.
7832 (DR_LEN_2): Likewise.
7833 (DR_LEN_4): Likewise.
7834 (DR_LEN_8): Likewise.
7835 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7836 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7837 (DR_ENABLE_SIZE): Likewise.
7838 (DR_LOCAL_SLOWDOWN): Likewise.
7839 (DR_GLOBAL_SLOWDOWN): Likewise.
7840 (DR_CONTROL_RESERVED): Likewise.
7841 (I386_DR_CONTROL_MASK): Likewise.
7842 (I386_DR_VACANT): Likewise.
7843 (I386_DR_LOCAL_ENABLE): Likewise.
7844 (I386_DR_GLOBAL_ENABLE): Likewise.
7845 (I386_DR_DISABLE): Likewise.
7846 (I386_DR_SET_RW_LEN): Likewise.
7847 (I386_DR_GET_RW_LEN): Likewise.
7848 (I386_DR_WATCH_HIT): Likewise.
7849 (i386_wp_op_t): Likewise.
7850 (i386_show_dr): Likewise.
7851 (i386_length_and_rw_bits): Likewise.
7852 (i386_insert_aligned_watchpoint): Likewise.
7853 (i386_remove_aligned_watchpoint): Likewise.
7854 (i386_handle_nonaligned_watchpoint): Likewise.
7855 i386_update_inferior_debug_regs(): Likewise.
7856 (i386_dr_insert_watchpoint): Likewise.
7857 (i386_dr_remove_watchpoint): Likewise.
7858 (i386_dr_region_ok_for_watchpoint): Likewise.
7859 (i386_dr_stopped_data_address): Likewise.
7860 (i386_dr_stopped_by_watchpoint): Likewise.
7862 2014-06-19 Gary Benson <gbenson@redhat.com>
7864 * i386-low.c (i386_dr_show): Renamed to
7865 i386_show_dr and made static. All uses updated.
7866 (i386_dr_length_and_rw_bits): Renamed to
7867 i386_length_and_rw_bits and made static.
7869 (i386_dr_insert_aligned_watchpoint): Renamed to
7870 i386_insert_aligned_watchpoint and made static.
7872 (i386_dr_remove_aligned_watchpoint): Renamed to
7873 i386_remove_aligned_watchpoint and made static.
7875 (i386_dr_update_inferior_debug_regs): Renamed to
7876 i386_update_inferior_debug_regs and made static.
7879 2014-06-18 Gary Benson <gbenson@redhat.com>
7881 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7882 (i386_dr_low_can_set_control): Likewise.
7883 (i386_get_debug_register_length): Likewise.
7884 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7885 (i386_dr_low_can_set_control): Likewise.
7886 (i386_get_debug_register_length): Likewise.
7888 2014-06-17 Gary Benson <gbenson@redhat.com>
7890 * i386-low.h (i386-dregs.h): New include.
7891 (DR_FIRSTADDR): Now in i386-dregs.h.
7892 (DR_LASTADDR): Likewise.
7893 (DR_NADDR): Likewise.
7894 (DR_STATUS): Likewise.
7895 (DR_CONTROL): Likewise.
7896 (i386_debug_reg_state): Likewise.
7897 (i386_dr_insert_watchpoint): Likewise.
7898 (i386_dr_remove_watchpoint): Likewise.
7899 (i386_dr_region_ok_for_watchpoint): Likewise.
7900 (i386_dr_stopped_data_address): Likewise.
7901 (i386_dr_stopped_by_watchpoint): Likewise.
7902 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7904 2014-06-18 Gary Benson <gbenson@redhat.com>
7906 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7907 i386_dr_insert_watchpoint.
7908 (i386_low_remove_watchpoint): Renamed to
7909 i386_dr_remove_watchpoint.
7910 (i386_low_region_ok_for_watchpoint): Renamed to
7911 i386_dr_region_ok_for_watchpoint.
7912 (i386_low_stopped_data_address): Renamed to
7913 i386_dr_stopped_data_address.
7914 (i386_low_stopped_by_watchpoint): Renamed to
7915 i386_dr_stopped_by_watchpoint.
7916 * i386-low.c (i386_show_dr): Renamed to
7917 i386_dr_show and made nonstatic. All uses updated.
7918 (i386_length_and_rw_bits): Renamed to
7919 i386_dr_length_and_rw_bits and made nonstatic.
7921 (i386_insert_aligned_watchpoint): Renamed to
7922 i386_dr_insert_aligned_watchpoint and made nonstatic.
7924 (i386_remove_aligned_watchpoint): Renamed to
7925 i386_dr_remove_aligned_watchpoint and made nonstatic.
7927 (i386_update_inferior_debug_regs): Renamed to
7928 i386_dr_update_inferior_debug_regs and made nonstatic.
7930 (i386_low_insert_watchpoint): Renamed to
7931 i386_dr_insert_watchpoint. All uses updated.
7932 (i386_low_remove_watchpoint): Renamed to
7933 i386_dr_remove_watchpoint. All uses updated.
7934 (i386_low_region_ok_for_watchpoint): Renamed to
7935 i386_dr_region_ok_for_watchpoint. All uses updated.
7936 (i386_low_stopped_data_address): Renamed to
7937 i386_dr_stopped_data_address. All uses updated.
7938 (i386_low_stopped_by_watchpoint): Renamed to
7939 i386_dr_stopped_by_watchpoint. All uses updated.
7941 2014-06-18 Gary Benson <gbenson@redhat.com>
7943 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7944 (i386_dr_low_can_set_control): Likewise.
7945 (i386_insert_aligned_watchpoint): New check.
7947 2014-06-18 Gary Benson <gbenson@redhat.com>
7949 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7952 2014-06-18 Gary Benson <gbenson@redhat.com>
7954 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7955 instead of fatal and error.
7956 (i386_handle_nonaligned_watchpoint): Likewise.
7958 2014-06-18 Gary Benson <gbenson@redhat.com>
7960 * i386-low.c (i386_get_debug_register_length): New macro.
7961 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7962 (i386_show_dr): Use debug_printf instead of fprintf. Use
7963 phex to format values.
7965 2014-06-18 Gary Benson <gbenson@redhat.com>
7967 * i386-low.h: Comment changes.
7968 * i386-low.c: Likewise.
7970 2014-06-18 Gary Benson <gbenson@redhat.com>
7972 * i386-low.c: Whitespace changes.
7974 2014-06-12 Tom Tromey <tromey@redhat.com>
7976 * utils.c (freeargv): Remove.
7978 2014-06-12 Tom Tromey <tromey@redhat.com>
7980 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7981 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7982 (parse_debug_format_options): Likewise.
7983 (gdbserver_usage): Likewise.
7984 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7985 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7986 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7988 ($(LIBGNU)): Depend on libiberty.
7989 (all-lib): Recurse into all subdirs.
7990 (install-only): Invoke "install" target in subdirs.
7991 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7993 * configure: Rebuild.
7994 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7995 for vasprintf, vsnprintf, or gettimeofday.
7996 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7999 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8001 * development.sh: Delete.
8002 * Makefile.in (config.status): Adjust dependency on development.sh.
8003 * configure.ac: Adjust development.sh source call.
8004 * configure: Regenerate.
8006 2014-06-02 Pedro Alves <palves@redhat.com>
8008 * ax.c (gdb_free_agent_expr): New function.
8009 * ax.h (gdb_free_agent_expr): New declaration.
8010 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8012 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8014 (clear_breakpoint_conditions_and_commands): New function.
8015 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8016 (clear_breakpoint_conditions_and_commands): New declaration.
8018 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8020 * linux-aarch64-low.c (asm/ptrace.h): Include.
8022 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8024 Fix TLS access for -static -pthread.
8025 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8026 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8027 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8029 2014-05-20 Pedro Alves <palves@redhat.com>
8031 * linux-aarch64-low.c (aarch64_insert_point)
8032 (aarch64_remove_point): No longer check whether the type is
8033 supported here. Adjust to new interface.
8034 (the_low_target): Install aarch64_supports_z_point_type as
8035 supports_z_point_type method.
8036 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8037 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8038 instead of a Z packet char. Adjust.
8039 (arm_supports_z_point_type): New function.
8040 (arm_insert_point, arm_remove_point): Adjust to new interface.
8041 (the_low_target): Install arm_supports_z_point_type.
8042 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8043 (cris_insert_point, cris_remove_point): Adjust to new interface.
8044 Don't check whether the type is supported here.
8045 (the_low_target): Install cris_supports_z_point_type.
8046 * linux-low.c (linux_supports_z_point_type): New function.
8047 (linux_insert_point, linux_remove_point): Adjust to new interface.
8048 * linux-low.h (struct linux_target_ops) <insert_point,
8049 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8050 raw_breakpoint pointer parameter.
8051 <supports_z_point_type>: New method.
8052 * linux-mips-low.c (mips_supports_z_point_type): New function.
8053 (mips_insert_point, mips_remove_point): Adjust to new interface.
8054 Use mips_supports_z_point_type.
8055 (the_low_target): Install mips_supports_z_point_type.
8056 * linux-ppc-low.c (the_low_target): Install NULL as
8057 supports_z_point_type method.
8058 * linux-s390-low.c (the_low_target): Install NULL as
8059 supports_z_point_type method.
8060 * linux-sparc-low.c (the_low_target): Install NULL as
8061 supports_z_point_type method.
8062 * linux-x86-low.c (x86_supports_z_point_type): New function.
8063 (x86_insert_point): Adjust to new insert_point interface. Use
8064 insert_memory_breakpoint. Adjust to new
8065 i386_low_insert_watchpoint interface.
8066 (x86_remove_point): Adjust to remove_point interface. Use
8067 remove_memory_breakpoint. Adjust to new
8068 i386_low_remove_watchpoint interface.
8069 (the_low_target): Install x86_supports_z_point_type.
8070 * lynx-low.c (lynx_target_ops): Install NULL as
8071 supports_z_point_type callback.
8072 * nto-low.c (nto_supports_z_point_type): New.
8073 (nto_insert_point, nto_remove_point): Adjust to new interface.
8074 (nto_target_ops): Install nto_supports_z_point_type.
8075 * mem-break.c: Adjust intro comment.
8076 (struct raw_breakpoint) <raw_type, size>: New fields.
8077 <inserted>: Update comment.
8078 <shlib_disabled>: Delete field.
8079 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8080 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8081 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8082 (raw_bkpt_type_to_target_hw_bp_type): New function.
8083 (find_enabled_raw_code_breakpoint_at): New function.
8084 (find_raw_breakpoint_at): New type and size parameters. Use them.
8085 (insert_memory_breakpoint): New function, based off
8086 set_raw_breakpoint_at.
8087 (remove_memory_breakpoint): New function.
8088 (set_raw_breakpoint_at): Reimplement.
8089 (set_breakpoint): New, based on set_breakpoint_at.
8090 (set_breakpoint_at): Reimplement.
8091 (delete_raw_breakpoint): Go through the_target->remove_point
8092 instead of assuming memory breakpoints.
8093 (find_gdb_breakpoint_at): Delete.
8094 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8095 (find_gdb_breakpoint): New function.
8096 (set_gdb_breakpoint_at): Delete.
8097 (z_type_supported): New function.
8098 (set_gdb_breakpoint_1): New function, loosely based off
8099 set_gdb_breakpoint_at.
8100 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8101 (delete_gdb_breakpoint_at): Delete.
8102 (delete_gdb_breakpoint_1): New function, loosely based off
8103 delete_gdb_breakpoint_at.
8104 (delete_gdb_breakpoint): New function.
8105 (clear_gdb_breakpoint_conditions): Rename to ...
8106 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8108 (add_condition_to_breakpoint): Make static.
8109 (add_breakpoint_condition): Take a struct breakpoint pointer
8110 instead of an address. Adjust.
8111 (gdb_condition_true_at_breakpoint): Rename to ...
8112 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8114 (gdb_condition_true_at_breakpoint): Reimplement.
8115 (add_breakpoint_commands): Take a struct breakpoint pointer
8116 instead of an address. Adjust.
8117 (gdb_no_commands_at_breakpoint): Rename to ...
8118 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8119 parameter. Return true if no breakpoint was found. Change debug
8121 (gdb_no_commands_at_breakpoint): Reimplement.
8122 (run_breakpoint_commands): Rename to ...
8123 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8124 and change return type to boolean.
8125 (run_breakpoint_commands): New function.
8126 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8127 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8128 breakpoint. Go through the_target->remove_point instead of
8129 assuming memory breakpoint.
8130 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8131 software and hardware breakpoints.
8132 (reinsert_raw_breakpoint): Go through the_target->insert_point
8133 instead of assuming memory breakpoint.
8134 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8135 software and hardware breakpoints.
8136 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8137 Check both software and hardware breakpoints.
8138 (validate_inserted_breakpoint): Assert the breakpoint is a
8139 software breakpoint. Set the inserted flag to -1 instead of
8140 setting shlib_disabled.
8141 (delete_disabled_breakpoints): Adjust.
8142 (validate_breakpoints): Only validate software breakpoints.
8143 Adjust to inserted flag change.
8144 (check_mem_read, check_mem_write): Skip breakpoint types other
8145 than software breakpoints. Adjust to inserted flag change.
8146 * mem-break.h (enum raw_bkpt_type): New enum.
8147 (raw_breakpoint, struct process_info): Forward declare.
8148 (Z_packet_to_target_hw_bp_type): Delete declaration.
8149 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8150 (set_gdb_breakpoint, delete_gdb_breakpoint)
8151 (clear_breakpoint_conditions): New declarations.
8152 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8153 (breakpoint_inserted_here): Update comment.
8154 (add_breakpoint_condition, add_breakpoint_commands): Replace
8155 address parameter with a breakpoint pointer parameter.
8156 (gdb_breakpoint_here): Update comment.
8157 (delete_gdb_breakpoint_at): Delete.
8158 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8159 * server.c (process_point_options): Take a struct breakpoint
8160 pointer instead of an address. Adjust.
8161 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8162 delete_gdb_breakpoint.
8163 * spu-low.c (spu_target_ops): Install NULL as
8164 supports_z_point_type method.
8165 * target.h: Include mem-break.h.
8166 (struct target_ops) <prepare_to_access_memory>: Update comment.
8167 <supports_z_point_type>: New field.
8168 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8169 instead of a char. Also take a raw breakpoint pointer.
8170 * win32-arm-low.c (the_low_target): Install NULL as
8171 supports_z_point_type.
8172 * win32-i386-low.c (i386_supports_z_point_type): New function.
8173 (i386_insert_point, i386_remove_point): Adjust to new interface.
8174 (the_low_target): Install i386_supports_z_point_type.
8175 * win32-low.c (win32_supports_z_point_type): New function.
8176 (win32_insert_point, win32_remove_point): Adjust to new interface.
8177 (win32_target_ops): Install win32_supports_z_point_type.
8178 * win32-low.h (struct win32_target_ops):
8179 <supports_z_point_type>: New method.
8180 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8181 instead of a char. Also take a raw breakpoint pointer.
8183 2014-05-20 Pedro Alves <palves@redhat.com>
8185 * mem-break.h: Include break-common.h.
8186 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8187 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8188 (Z_packet_to_target_hw_bp_type): New declaration.
8189 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8190 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8191 (Z_PACKET_ACCESS_WP): Delete macros.
8192 (Z_packet_to_hw_type): Delete function.
8193 * i386-low.h: Don't include break-common.h here.
8194 (Z_packet_to_hw_type): Delete declaration.
8195 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8196 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8197 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8198 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8199 * linux-aarch64-low.c: Don't include break-common.h here.
8200 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8201 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8202 (Z_packet_to_target_hw_bp_type): Delete function.
8203 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8205 (mips_insert_point, mips_remove_point): Use
8206 Z_packet_to_target_hw_bp_type.
8208 2014-05-20 Pedro Alves <palves@redhat.com>
8210 * linux-aarch64-low.c: Include break-common.h.
8211 (enum target_point_type): Delete.
8212 (Z_packet_to_point_type): Rename to ...
8213 (Z_packet_to_target_hw_bp_type): ... this, and return a
8214 target_hw_bp_type instead.
8215 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8216 instead of an enum target_point_type.
8217 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8219 (aarch64_dr_state_insert_one_point)
8220 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8221 (aarch64_handle_aligned_watchpoint)
8222 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8223 Take an enum target_hw_bp_type instead of an enum
8225 (aarch64_supports_z_point_type): New function.
8226 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8227 use Z_packet_to_target_hw_bp_type.
8229 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8231 * configure.ac: Only use -Werror by default when DEVELOPMENT
8233 * configure: Regenerate.
8235 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8237 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8238 * linux-x86-low.c (X86_64_USER_REGS): New.
8239 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8241 2014-04-28 Yao Qi <yao@codesourcery.com>
8243 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8246 2014-04-25 Pedro Alves <palves@redhat.com>
8249 * linux-low.c (linux_attach_fail_reason_string): New function.
8250 (linux_attach_lwp): Delete.
8251 (linux_attach_lwp_1): Rename to ...
8252 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8253 argument. Remove "initial" parameter. Return int instead of
8254 void. Don't error or warn here.
8255 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8256 failure to attach to the tgid. Call warning when failing to
8258 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8259 argument. Remove "initial" parameter. Return int instead of
8260 void. Don't error or warn here.
8261 (linux_attach_fail_reason_string): New declaration.
8262 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8263 interface change. Use linux_attach_fail_reason_string.
8265 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8266 Walfred Tedeschi <walfred.tedeschi@intel.com>
8268 * Makefile.in: Added rules to handle new files
8269 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8270 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8271 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8272 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8273 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8274 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8276 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8277 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8278 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8279 i386/x32-avx512.xml.
8280 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8281 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8282 i386/x32-avx512-linux.xml.
8283 * i387-fp.c (num_avx512_k_registers): New constant for number
8285 (num_avx512_zmmh_low_registers): New constant for number of
8286 lower ZMM registers (0-15).
8287 (num_avx512_zmmh_high_registers): New constant for number of
8288 higher ZMM registers (16-31).
8289 (num_avx512_ymmh_registers): New contant for number of higher
8290 YMM registers (ymm16-31 added by avx521 on x86_64).
8291 (num_avx512_xmm_registers): New constant for number of higher
8292 XMM registers (xmm16-31 added by AVX512 on x86_64).
8293 (struct i387_xsave): Add space for AVX512 registers.
8294 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8295 Add code to handle AVX512 registers.
8296 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8297 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8298 prototypei from generated file.
8299 (tdesc_amd64_avx512_linux): Likewise.
8300 (init_registers_x32_avx512_linux): Likewise.
8301 (tdesc_x32_avx512_linux): Likewise.
8302 (init_registers_i386_avx512_linux): Likewise.
8303 (tdesc_i386_avx512_linux): Likewise.
8304 (x86_64_regmap): Add AVX512 registers.
8305 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8307 (initialize_low_arch): Add code to initialize AVX512 registers.
8309 2014-04-23 Pedro Alves <palves@redhat.com>
8311 * mem-break.c (find_gdb_breakpoint_at): Make static.
8312 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8314 2014-04-23 Pedro Alves <palves@redhat.com>
8316 * i386-low.c: Don't include break-common.h here.
8317 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8318 prototype to take target_hw_bp_type as argument instead of a Z
8320 * i386-low.h: Include break-common.h here.
8321 (Z_packet_to_hw_type): Declare.
8322 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8324 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8325 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8326 (x86_remove_point): Convert the packet number to a
8327 target_hw_bp_type before calling i386_low_remove_watchpoint.
8328 * win32-i386-low.c (i386_insert_point): Convert the packet number
8329 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8330 (i386_remove_point): Convert the packet number to a
8331 target_hw_bp_type before calling i386_low_remove_watchpoint.
8333 2014-04-23 Pedro Alves <palves@redhat.com>
8335 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8337 2014-04-10 Pedro Alves <palves@redhat.com>
8339 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8340 Check if the condition or command is NULL before checking if the
8341 breakpoint is known. On success, return true.
8342 * mem-break.h (add_breakpoint_condition): Document return.
8343 (add_breakpoint_commands): Add describing comment.
8344 * server.c (skip_to_semicolon): New function.
8345 (process_point_options): Use it.
8347 2014-04-09 Pedro Alves <palves@redhat.com>
8349 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8352 2014-02-27 Pedro Alves <palves@redhat.com>
8355 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8357 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8359 (last_thread_of_process_p): Take a PID argument instead of a
8361 (linux_wait_for_lwp): Delete.
8362 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8364 (linux_low_filter_event): New function, party factored out from
8365 linux_wait_for_event.
8366 (linux_wait_for_event): Rename to ...
8367 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8368 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8369 sigsuspend. Check for zombie leaders.
8370 (linux_wait_for_event): Reimplement as wrapper around
8371 linux_wait_for_event_filtered.
8372 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8373 a normal or signal exit is seen, it's the whole process exiting.
8374 (wait_for_sigstop): No longer a for_each_inferior callback.
8375 Rewrite on top of linux_wait_for_event_filtered.
8376 (stop_all_lwps): Call wait_for_sigstop directly.
8377 * server.c (resume, handle_target_event): Handle
8378 TARGET_WAITKIND_NO_RESUMED.
8380 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8382 * win32-low.c (psapi_get_dll_name,
8383 * win32_CreateToolhelp32Snapshot): Delete.
8384 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8385 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8387 (handle_load_dll): Add function description.
8388 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8390 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8392 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8394 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8395 base address when calling win32_add_one_solib.
8396 (handle_load_dll): Delete local variable load_addr.
8397 Remove 0x1000 offset applied to DLL base address when calling
8398 win32_add_one_solib.
8399 (handle_unload_dll): Add comment.
8401 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8403 * win32-low.c (win32_add_all_dlls): Renames
8404 win32_ensure_ntdll_loaded. Rewrite function documentation.
8405 Adjust implementation to always load all DLLs.
8406 Add 0x1000 offset to DLL base address when calling
8407 win32_add_one_solib.
8408 (child_initialization_done): New static global.
8409 (do_initial_child_stuff): Set child_initialization_done to
8410 zero during child initialization, and 1 after. Replace call
8411 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8413 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8414 (handle_unload_dll): Add function documentation.
8415 (get_child_debug_event): Ignore load and unload DLL events
8416 during child initialization.
8418 2014-02-20 Doug Evans <dje@google.com>
8420 Remove global all_lwps.
8421 * inferiors.h (ptid_of): Move here from linux-low.h.
8422 (pid_of, lwpid_of): Ditto.
8423 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8424 parameter is a struct thread_info * now.
8425 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8426 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8427 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8429 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8430 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8431 * linux-arm-low.c (update_registers_callback): Update, "entry"
8432 parameter is a struct thread_info * now.
8433 Fetch lwpid from current_inferior directly.
8434 (arm_insert_point): Pass &all_threads to find_inferior instead of
8436 (arm_remove_point): Ditto.
8437 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8438 (arm_prepare_to_resume): Fetch pid from thread.
8439 (arm_read_description): Fetch lwpid from current_inferior directly.
8440 * linux-low.c (all_lwps): Delete.
8441 (delete_lwp): Delete call to remove_inferior.
8442 (handle_extended_wait): Fetch lwpid from thread.
8443 (add_lwp): Don't set lwp->entry.id. Remove call to
8444 add_inferior_to_list.
8445 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8446 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8447 (kill_one_lwp_callback): Ditto.
8448 (linux_kill): Don't dereference NULL pointer.
8449 Fetch ptid,lwpid from thread.
8450 (get_detach_signal): Fetch ptid from thread.
8451 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8452 Simplify call to regcache_invalidate_thread.
8453 (delete_lwp_callback): Update, "entry" parameter is a
8454 struct thread_info * now. Fetch pid from thread.
8455 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8456 (status_pending_p_callback): Update, "entry" parameter is a
8457 struct thread_info * now. Fetch ptid from thread.
8458 (find_lwp_pid): Update, "entry" parameter is a
8459 struct thread_info * now.
8460 (linux_wait_for_lwp): Fetch pid from thread.
8461 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8462 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8463 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8464 (dequeue_one_deferred_signal): Ditto.
8465 (cancel_breakpoint): Fetch ptid from current_inferior.
8466 (linux_wait_for_event): Pass &all_threads to find_inferior,
8467 not &all_lwps. Fetch ptid, lwpid from thread.
8468 (count_events_callback): Update, "entry" parameter is a
8469 struct thread_info * now.
8470 (select_singlestep_lwp_callback): Ditto.
8471 (select_event_lwp_callback): Ditto.
8472 (cancel_breakpoints_callback): Ditto.
8473 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8475 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8476 (unsuspend_one_lwp): Update, "entry" parameter is a
8477 struct thread_info * now.
8478 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8480 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8481 Fetch lwpid from thread, not lwp.
8482 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8483 Pass &all_threads to find_inferior, not &all_lwps.
8484 (send_sigstop): Fetch lwpid from thread, not lwp.
8485 (send_sigstop_callback): Update, "entry" parameter is a
8486 struct thread_info * now.
8487 (suspend_and_send_sigstop_callback): Ditto.
8488 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8489 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8490 struct thread_info * now.
8491 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8493 (lwp_running): Update, "entry" parameter is a
8494 struct thread_info * now.
8495 (stop_all_lwps): Fetch ptid from thread.
8496 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8497 (linux_resume_one_lwp): Fetch lwpid from thread.
8498 (linux_set_resume_request): Update, "entry" parameter is a
8499 struct thread_info * now. Fetch pid, lwpid from thread.
8500 (resume_status_pending_p): Update, "entry" parameter is a
8501 struct thread_info * now.
8502 (need_step_over_p): Ditto. Fetch lwpid from thread.
8503 (start_step_over): Fetch lwpid from thread.
8504 (linux_resume_one_thread): Update, "entry" parameter is a
8505 struct thread_info * now. Fetch lwpid from thread.
8506 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8507 (proceed_one_lwp): Update, "entry" parameter is a
8508 struct thread_info * now. Fetch lwpid from thread.
8509 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8510 struct thread_info * now.
8511 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8512 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8513 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8515 (regsets_store_inferior_registers): Ditto.
8516 (fetch_register, store_register): Ditto.
8517 (linux_read_memory, linux_write_memory): Ditto.
8518 (linux_request_interrupt): Ditto.
8519 (linux_read_auxv): Ditto.
8520 (linux_xfer_siginfo): Ditto.
8521 (linux_qxfer_spu): Ditto.
8522 (linux_qxfer_libraries_svr4): Ditto.
8523 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8524 moved to inferiors.h.
8526 (get_thread_lwp): Update.
8527 (struct lwp_info): Delete member "entry". Simplify comment for
8530 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8531 current_inferior directly.
8532 (update_watch_registers_callback): Update, "entry" parameter is a
8533 struct thread_info * now. Fetch pid from thread.
8534 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8535 (mips_insert_point): Fetch lwpid from current_inferior.
8536 Pass &all_threads to find_inferior, not &all_lwps.
8537 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8538 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8540 (mips_stopped_data_address): Ditto.
8541 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8543 * linux-tile-low.c (tile_arch_setup): Ditto.
8544 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8545 (update_debug_registers_callback): Update, "entry" parameter is a
8546 struct thread_info * now. Fetch pid from thread.
8547 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8548 Pass &all_threads to find_inferior, not &all_lwps.
8549 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8550 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8551 Pass &all_threads to find_inferior, not &all_lwps.
8552 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8553 (i386_dr_low_get_status): Ditto.
8554 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8555 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8556 (x86_linux_read_description): Ditto.
8557 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8559 2014-02-20 Doug Evans <dje@google.com>
8561 * inferiors.c (get_first_inferior): Fix buglet.
8563 2014-02-19 Doug Evans <dje@google.com>
8565 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8566 * inferiors.c (add_thread): Change result type to struct thread_info *.
8567 All callers updated.
8568 (add_lwp): Call add_thread here instead of in callers.
8569 All callers updated.
8570 * linux-low.h (get_lwp_thread): Rewrite.
8571 (struct lwp_info): New member "thread".
8573 2014-02-19 Doug Evans <dje@google.com>
8575 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8576 All callers updated.
8578 2014-02-19 Doug Evans <dje@google.com>
8580 * inferiors.c (add_thread): Fix whitespace.
8582 2014-02-19 Doug Evans <dje@google.com>
8584 * dll.c (clear_dlls): Replace accessing list implemention details
8586 * gdbthread.h (get_first_thread): Declare.
8587 * inferiors.c (for_each_inferior_with_data): New function.
8588 (get_first_thread): New function.
8589 (find_thread_ptid): Simplify.
8590 (get_first_inferior): New function.
8591 (clear_list): Delete.
8592 (one_inferior_p): New function.
8593 (clear_inferior_list): New function.
8594 (clear_inferiors): Update.
8595 * inferiors.h (for_each_inferior_with_data): Declare.
8596 (clear_inferior_list): Declare.
8597 (one_inferior_p): Declare.
8598 (get_first_inferior): Declare.
8599 * linux-low.c (linux_wait_for_event): Replace accessing list
8600 implemention details with API function.
8601 * server.c (target_running): Ditto.
8602 (accumulate_file_name_length): New function.
8603 (emit_dll_description): New function.
8604 (handle_qxfer_libraries): Replace accessing list implemention
8605 details with API function.
8606 (handle_qxfer_threads_worker): New function.
8607 (handle_qxfer_threads_proper): Replace accessing list implemention
8608 details with API function.
8609 (handle_query): Ditto.
8610 (visit_actioned_threads_callback_ftype): New typedef.
8611 (visit_actioned_threads_data): New struct.
8612 (visit_actioned_threads): Rewrite to be find_inferior callback.
8613 (resume): Call find_inferior.
8614 (handle_status): Replace accessing list implemention
8615 details with API function.
8616 (process_serial_event): Replace accessing list implemention details
8618 * target.c (set_desired_inferior): Replace accessing list implemention
8619 details with API function.
8620 * tracepoint.c (same_process_p): New function.
8621 (gdb_agent_about_to_close): Replace accessing list implemention
8622 details with API function.
8623 * win32-low.c (child_delete_thread): Replace accessing list
8624 implemention details with API function.
8625 (match_dll_by_basename): New function.
8626 (dll_is_loaded_by_basename): New function.
8627 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8628 details call to dll_is_loaded_by_basename.
8630 2014-02-19 Doug Evans <dje@google.com>
8632 * dll.h (struct dll_info): Add comment.
8633 * gdbthread.h (struct thread_info): Add comment.
8634 (current_ptid): Simplify.
8635 * inferiors.c (add_process): Update.
8636 (remove_process): Update.
8637 * inferiors.h (struct process_info): Rename member "head" to "entry".
8638 * linux-low.c (delete_lwp): Update.
8640 (last_thread_of_process_p): Update.
8641 (kill_one_lwp_callback, linux_kill): Update.
8642 (status_pending_p_callback): Update.
8643 (wait_for_sigstop): Update. Simplify read of ptid.
8644 (start_step_over): Update.
8645 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8646 (get_lwp_thread): Update.
8647 (struct lwp_info): Rename member "head" to "entry".
8648 * regcache.h (inferior_list_entry): Delete.
8649 * server.c (kill_inferior_callback): Update.
8650 (detach_or_kill_inferior_callback): Update.
8651 (print_started_pid): Update.
8652 (print_attached_pid): Update.
8653 (process_serial_event): Simplify read of ptid.
8654 * thread-db.c (thread_db_create_event): Update.
8655 (thread_db_get_tls_address): Update.
8656 * win32-low.c (current_inferior_ptid): Simplify.
8658 2014-02-19 Tom Tromey <tromey@redhat.com>
8660 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8662 (target_supports_btrace): Update.
8664 2014-02-14 Yao Qi <yao@codesourcery.com>
8666 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8667 (rsp-low-ipa.o): New target.
8669 2014-02-12 Tom Tromey <tromey@redhat.com>
8671 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8672 convert_ascii_to_int.
8673 * regcache.c (registers_to_string): Likewise.
8674 * remote-utils.c (decode_M_packet): Likewise.
8675 * server.c (process_serial_event): Likewise.
8677 2014-02-12 Tom Tromey <tromey@redhat.com>
8679 * server.c (handle_query, handle_v_run): Use hex2bin, not
8681 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8683 2014-02-12 Tom Tromey <tromey@redhat.com>
8685 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8686 convert_int_to_ascii.
8687 * regcache.c (registers_to_string, collect_register_as_string):
8689 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8691 * server.c (process_serial_event): Likewise.
8692 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8693 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8695 2014-02-12 Tom Tromey <tromey@redhat.com>
8697 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8698 bin2hex, not hexify.
8699 * tracepoint.c (cmd_qtstatus): Likewise.
8701 2014-02-12 Tom Tromey <tromey@redhat.com>
8703 * remote-utils.c (monitor_output): Pass explicit length to
8706 2014-02-12 Tom Tromey <tromey@redhat.com>
8708 * tracepoint.c: Include rsp-low.h.
8709 * server.c: Include rsp-low.h.
8710 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8711 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8713 * remote-utils.c: Include rsp-low.h.
8714 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8715 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8716 (convert_int_to_ascii, convert_ascii_to_int): Move to
8718 * regcache.c: Include rsp-low.h.
8719 * ax.c: Include rsp-low.h.
8720 * Makefile.in (SFILES): Add common/rsp-low.c.
8721 (OBS): Add rsp-low.o.
8722 (rsp-low.o): New target.
8724 2014-02-12 Tom Tromey <tromey@redhat.com>
8726 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8727 Include print-utils.h.
8728 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8729 (plongest, thirty_two, phex_nz): Remove.
8730 * Makefile.in (SFILES): Add common/print-utils.c.
8731 (OBS): Add print-utils.o.
8732 (print-utils-ipa.o): New target.
8733 (print-utils.o): New target.
8734 (IPA_OBJS): Add print-utils-ipa.o.
8736 2014-02-06 Tom Tromey <tromey@redhat.com>
8738 * Makefile.in (SFILES): Fix indentation.
8740 2014-02-05 Doug Evans <dje@google.com>
8742 * linux-low.c (linux_wait_for_event): Improve comment.
8743 (linux_wait_1): Keep current_inferior in sync with event_child.
8745 2014-01-22 Doug Evans <dje@google.com>
8747 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8749 2014-01-22 Doug Evans <dje@google.com>
8751 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8752 * configure: Regenerate.
8753 * config.in: Regenerate.
8754 * Makefile.in (SFILES): Add debug.c.
8756 * debug.c: New file.
8757 * debug.h: New file.
8758 * linux-aarch64-low.c (*): Update all debugging printfs to use
8759 debug_printf instead of fprintf.
8760 * linux-arm-low.c (*): Ditto.
8761 * linux-cris-low.c (*): Ditto.
8762 * linux-crisv32-low.c (*): Ditto.
8763 * linux-m32r-low.c (*): Ditto.
8764 * linux-sparc-low.c (*): Ditto.
8765 * linux-x86.c (*): Ditto.
8766 * linux-low.c (*): Ditto.
8767 (linux_wait_1): Add calls to debug_enter, debug_exit.
8768 (linux_wait): Remove redundant debugging printf.
8769 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8770 (linux_resume, unstop_all_lwps): Ditto.
8771 * mem-break.c (*): Update all debugging printfs to use
8772 debug_printf instead of fprintf.
8773 * remote-utils.c (*): Ditto.
8774 * thread-db.c (*): Ditto.
8775 * server.c #include <ctype.h>, "gdb_vecs.h".
8776 (debug_threads): Moved to debug.c.
8777 (*): Update all debugging printfs to use debug_printf instead of
8779 (start_inferior): Replace call to fflush with call to debug_flush.
8780 (monitor_show_help): Mention set debug-format.
8781 (parse_debug_format_options): New function.
8782 (handle_monitor_command): Handle "monitor set debug-format".
8783 (gdbserver_usage): Mention --debug-format.
8784 (main): Parse --debug-format.
8785 * server.h (debug_threads): Declaration moved to debug.h.
8787 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8788 trace_debug_1 that uses debug_printf.
8789 (tracepoint_look_up_symbols): Update all debugging printfs to use
8790 debug_printf instead of fprintf.
8792 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8794 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8797 2014-01-17 Pedro Alves <palves@redhat.com>
8800 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8801 defined after including gdb_proc_service.h.
8803 2014-01-16 Doug Evans <dje@google.com>
8805 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8806 (match_dll): Use it.
8808 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8810 * target.h (target_ops) <read_btrace>: Change parameters and
8811 return type to allow error reporting.
8812 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8813 trace reading errors on.
8814 * linux-low.c (linux_low_read_btrace): Pass trace reading
8816 (linux_low_disable_btrace): New.
8818 2014-01-15 Doug Evans <dje@google.com>
8820 * inferiors.c (thread_id_to_gdb_id): Delete.
8821 * inferiors.h (thread_id_to_gdb_id): Delete.
8823 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8825 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8826 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8829 2014-01-08 Pedro Alves <palves@redhat.com>
8831 * server.c (handle_status): Don't discard previous queued stop
8832 replies or thread's pending status here.
8833 (main) <disconnection>: Do it here instead.
8835 2014-01-08 Pedro Alves <palves@redhat.com>
8837 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8838 * server.c (visit_actioned_threads, handle_pending_status): New
8840 (handle_v_cont): Factor out parts to ...
8841 (resume): ... this new function. If in all-stop, and a thread
8842 being resumed has a pending status, report it without actually
8844 (myresume): Adjust to use the new 'resume' function.
8845 (clear_pending_status_callback, set_pending_status_callback)
8846 (find_status_pending_thread_callback): New functions.
8847 (handle_status): Handle the case of multiple threads having
8848 interesting statuses to report. Report threads' real last signal
8849 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8850 with an interesting thread to report the status for, instead of
8851 always reporting the status of the first thread.
8853 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8855 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8856 * gdbreplay.c (gdbreplay_version): Likewise.
8858 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8860 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8861 iov.iov_len with the real length in use.
8863 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8865 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8866 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8867 for all targets that use win32-low.c.
8868 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8869 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8871 2013-12-13 Pedro Alves <palves@redhat.com>
8873 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8874 if equal to TARGET_WAITKIND_LOADED.
8875 * win32-low.c (cached_status): New static global.
8876 (win32_wait): Add declaration.
8877 (do_initial_child_stuff): Flush all initial pending debug events
8878 up to the initial breakpoint.
8879 (win32_wait): If CACHED_STATUS was set, return that instead
8880 of doing a real wait. Remove the code resuming the execution
8881 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8882 during the initial phase. Also remove the code changing
8883 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8884 TARGET_WAITKIND_STOPPED.
8886 2013-12-11 Yao Qi <yao@codesourcery.com>
8888 * notif.c (handle_notif_ack): Return 0 if no notification
8891 2013-11-20 Doug Evans <dje@google.com>
8893 * linux-low.c (linux_set_resume_request): Fix comment.
8895 2013-11-20 Doug Evans <dje@google.com>
8897 * linux-low.c (resume_status_pending_p): Tweak comment.
8899 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8901 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8902 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8903 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8904 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8905 (srv_amd64_regobj): Add amd64-mpx.o.
8906 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8907 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8908 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8909 * i387-fp.c (num_pl_bnd_register) Added constant.
8910 (num_pl_bnd_cfg_registers) Added constant.
8911 (struct i387_xsave) Added reserved area and MPX fields.
8912 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8913 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8915 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8916 (init_registers_amd64_mpx_linux): Declare new function.
8917 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8918 (x86_64_regmap): Add MPX registers.
8919 (x86_linux_read_description): Add MPX case.
8920 (initialize_low_arch): Initialize MPX targets.
8922 2013-11-18 Tom Tromey <tromey@redhat.com>
8924 * configure: Rebuild.
8925 * configure.ac: Don't check for stdlib.h.
8926 * gdbreplay.c: Unconditionally include stdlib.h.
8928 2013-11-18 Tom Tromey <tromey@redhat.com>
8930 * config.in: Rebuild.
8931 * configure: Rebuild.
8932 * configure.ac: Don't use AC_HEADER_DIRENT.
8934 2013-11-18 Tom Tromey <tromey@redhat.com>
8936 * server.h: Don't check HAVE_STRING_H.
8937 * gdbreplay.c: Don't check HAVE_STRING_H.
8938 * configure: Rebuild.
8940 2013-11-18 Tom Tromey <tromey@redhat.com>
8942 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8945 2013-11-08 Tom Tromey <tromey@redhat.com>
8947 * configure, config.in: Rebuild.
8948 * configure.ac: Remove unused configury.
8950 2013-11-08 Tom Tromey <tromey@redhat.com>
8952 * acinclude.m4: Include common.m4, codeset.m4.
8953 * configure, config.in: Rebuild.
8954 * configure.ac: Use GDB_AC_COMMON.
8956 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8958 * linux-s390-low.c (HWCAP_S390_TE): New define.
8959 (s390_arch_setup): Consider the TE field in the HWCAP for
8960 determining 'have_regset_tdb'.
8962 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8965 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8968 2013-10-02 Pedro Alves <palves@redhat.com>
8970 * server.c (process_serial_event): Don't output "GDBserver
8971 exiting" if GDB is connected through stdio.
8972 * target.c (mywait): Likewise, be silent if GDB is connected
8975 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8977 * lynx-low.c (lynx_add_threads_after_attach): New function.
8978 (lynx_attach): Remove call to add_thread. Add call to
8979 lynx_add_threads_after_attach instead.
8981 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8983 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8984 * config.in, configure: Regenerated.
8986 2013-09-18 Yao Qi <yao@codesourcery.com>
8989 * server.c (start_inferior): Clear 'resume_info'.
8991 2013-09-16 Jiong Wang <jiwang@tilera.com>
8993 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8996 2013-09-16 Jiong Wang <jiwang@tilera.com>
8998 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8999 linux-tile-low.o to srv_tgtobj.
9001 2013-09-16 Will Newton <will.newton@linaro.org>
9003 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9006 2013-09-06 Pedro Alves <palves@redhat.com>
9008 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9009 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9010 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9011 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9012 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9013 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9015 2013-09-06 Pedro Alves <palves@redhat.com>
9017 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9018 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9020 2013-09-06 Pedro Alves <palves@redhat.com>
9022 * linux-amd64-ipa.c: Include tracepoint.h.
9023 * linux-i386-ipa.c: Include tracepoint.h.
9025 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9027 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9028 (ps_get_thread_area): New function.
9030 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9032 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9033 (initialize_low_arch): Call init_registers_crisv32 rather than
9034 init_register_crisv32.
9036 2013-09-05 Pedro Alves <palves@redhat.com>
9038 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9040 * hostio.h: ... this new file.
9041 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9042 win32-low.c: Include hostio.h.
9044 2013-09-05 Pedro Alves <palves@redhat.com>
9046 * server.h (gdb_client_data, handler_func, callback_handler_func)
9047 (delete_file_handler, add_file_handler, append_callback_event)
9048 (delete_callback_event, start_event_loop, initialize_event_loop):
9049 Move to event-loop.h and include it.
9050 * event-loop.h: New file.
9052 2013-09-05 Pedro Alves <palves@redhat.com>
9054 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9055 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9056 (loaded_dll, unloaded_dll): Move to ...
9057 * dll.h: ... this new file.
9058 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9060 2013-09-05 Pedro Alves <palves@redhat.com>
9062 * server.h (current_process, get_thread_process, all_processes)
9063 (add_inferior_to_list, for_each_inferior, current_inferior)
9064 (remove_inferior, add_process, remove_process, find_process_pid)
9065 (have_started_inferiors_p, have_attached_inferiors_p)
9066 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9067 (clear_inferiors, find_inferior, find_inferior_id)
9068 (inferior_target_data, set_inferior_target_data)
9069 (inferior_regcache_data, set_inferior_regcache_data): Move to
9070 inferiors.h, and include it.
9071 * inferiors.h: New file.
9073 2013-09-05 Pedro Alves <palves@redhat.com>
9075 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9079 2013-09-05 Pedro Alves <palves@redhat.com>
9081 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9083 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9084 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9085 (handle_tracepoint_general_set, handle_tracepoint_query)
9086 (tracepoint_finished_step, tracepoint_was_hit)
9087 (release_while_stepping_state_list, current_traceframe)
9088 (in_readonly_region, traceframe_read_mem)
9089 (fetch_traceframe_registers, traceframe_read_sdata)
9090 (traceframe_read_info, struct fast_tpoint_collect_status)
9091 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9092 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9093 (supply_fast_tracepoint_registers)
9094 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9095 (ipa_tdesc, claim_trampoline_space)
9096 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9097 (agent_mem_read, agent_get_trace_state_variable_value)
9098 (agent_set_trace_state_variable_value, agent_tsv_read)
9099 (agent_mem_read_string, get_raw_reg_func_addr)
9100 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9101 * tracepoint.h: ... this new file.
9103 2013-09-05 Pedro Alves <palves@redhat.com>
9105 * server.h (perror_with_name, error, fatal, warning, paddress)
9106 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9108 * utils.h: New file.
9110 2013-09-05 Pedro Alves <palves@redhat.com>
9112 * server.h (remote_debug, noack_mode, transport_is_reliable)
9113 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9114 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9115 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9116 (write_enn, initialize_async_io, enable_async_io)
9117 (disable_async_io, check_remote_input_interrupt_request)
9118 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9119 (dead_thread_notify, prepare_resume_reply)
9120 (decode_address_to_semicolon, decode_address, decode_m_packet)
9121 (decode_M_packet, decode_X_packet, decode_xfer_write)
9122 (decode_search_memory_packet, unhexify, hexify)
9123 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9124 (look_up_one_symbol, relocate_instruction)
9125 (monitor_output): Move to remote-utils.h, and include it.
9126 * remote-utils.h: New file.
9128 2013-09-05 Pedro Alves <palves@redhat.com>
9130 * server.h (_): Delete.
9132 2013-09-02 Pedro Alves <palves@redhat.com>
9134 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9135 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9137 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9139 2013-09-02 Pierre Muller <muller@sourceware.org>
9141 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9142 or WriteProcessMemory complete successfully and handle
9143 ERROR_PARTIAL_COPY error.
9145 2013-09-02 Pedro Alves <palves@redhat.com>
9147 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9148 error instead of EIO.
9150 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9153 * linux-low.c: Include filestuff.h.
9154 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9155 * lynx-low.c: Include filestuff.h.
9156 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9157 * server.c: Include filestuff.h.
9158 (main): Call notice_open_fds.
9159 * spu-low.c: Include filestuff.h.
9160 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9162 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9164 * Makefile.in: Explain why ../target and ../nat are not
9165 listed as include file search paths.
9166 (linux-waitpid.o): New object file rule.
9167 * configure.srv (srv_native_linux_obj): New variable.
9168 Replace all occurrences of linux native object files with
9169 $srv_native_linux_obj.
9170 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9171 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9172 (linux_enable_event_reporting): Remove declaration.
9173 (my_waitpid): Moved to common/linux-waitpid.c.
9174 (linux_wait_for_event): Pass ptid when calling
9175 linux_enable_event_reporting.
9176 (linux_supports_tracefork_flag): Remove.
9177 (linux_enable_event_reporting): Likewise.
9178 (linux_tracefork_grandchild): Remove.
9179 (STACK_SIZE): Moved to common/linux-ptrace.c.
9180 (linux_tracefork_child): Remove.
9181 (linux_test_for_tracefork): Remove.
9182 (linux_look_up_symbols): Call linux_supports_traceclone.
9183 (initialize_low): Remove call to linux_test_for_tracefork.
9184 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9185 common/linux-ptrace.h.
9186 (PTRACE_TYPE_ARG4): Likewise.
9187 Include linux-ptrace.h.
9189 2013-08-21 Pedro Alves <palves@redhat.com>
9191 * config.in: Renegerate.
9193 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9195 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9196 (SFILES): Remove $(srcdir)/common/target-common.c and
9197 add $(srcdir)/target/waitstatus.c.
9198 (OBS): Remove target-common.o and add waitstatus.o.
9199 (server_h): Remove $(srcdir)/../common/target-common.h and
9200 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9201 and $(srcdir)/../target/waitstatus.h.
9202 (target-common.o): Remove.
9203 (waitstatus.o): New target object file.
9204 * target.h: Do not include target-common.h and
9205 include target/resume.h, target/wait.h and
9206 target/waitstatus.h.
9208 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9210 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9211 to PTRACE_TYPE_ARG3.
9212 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9213 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9215 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9216 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9218 2013-07-27 Jie Zhang <jie@codesourcery.com>
9219 Daniel Jacobowitz <dan@codesourcery.com>
9220 Yao Qi <yao@codesourcery.com>
9222 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9223 (mips-linux-watch.o): New rule.
9224 (mips_linux_watch_h): New variable.
9225 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9227 * linux-mips-low.c: Include mips-linux-watch.h.
9228 (struct arch_process_info, struct arch_lwp_info): New.
9229 (update_watch_registers_callback): New function.
9230 (mips_linux_new_process, mips_linux_new_thread) New functions.
9231 (mips_linux_prepare_to_resume, mips_insert_point): New
9233 (mips_remove_point, mips_stopped_by_watchpoint): New
9235 (rsp_bp_type_to_target_hw_bp_type): New function.
9236 (mips_stopped_data_address): New function.
9237 (the_low_target): Add watchpoint support functions.
9239 2013-07-27 Yao Qi <yao@codesourcery.com>
9241 * i386-low.c: Include break-common.h.
9242 (enum target_hw_bp_type): Remove.
9244 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9246 * Makefile.in (SFILES): /common/target-common.c.
9247 (OBS): Add target-common.o.
9248 (server_h): Add $(srcdir)/../common/target-common.h.
9249 (target-common.o): New target.
9250 * server.c (queue_stop_reply_callback): Free
9251 status string after use.
9252 * target.c (target_waitstatus_to_string): Remove.
9253 * target.h: Include target-common.h.
9254 (resume_kind): Likewise.
9255 (target_waitkind): Likewise.
9256 (target_waitstatus): Likewise.
9257 (TARGET_WNOHANG): Likewise.
9259 2013-07-04 Yao Qi <yao@codesourcery.com>
9261 * Makefile.in (host_alias): Use @host_noncanonical@.
9262 (target_alias): Use @target_noncanonical@.
9263 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9264 ACX_NONCANONICAL_HOST.
9265 * configure: Regenerated.
9268 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9270 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9271 * configure: Rebuild.
9272 * Makefile.in (version_host, version_target): Get from configure.
9273 (version.c): Use $(version_host) and $(version_target).
9275 2013-07-03 Pedro Alves <palves@redhat.com>
9277 * Makefile.in (config.status): Depend on development.sh.
9278 * acinclude.m4: Include libmcheck.m4.
9279 * configure: Regenerate.
9281 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9283 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9284 attribute inside the parentheses.
9285 (winapi_DebugSetProcessKillOnExit): Ditto.
9286 (winapi_DebugBreakProcess): Ditto.
9287 (winapi_GenerateConsoleCtrlEvent): Ditto.
9289 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9291 * notif.h (notif_event): Add a dummy member to avoid compiler
9294 2013-07-01 Pedro Alves <palves@redhat.com>
9296 * hostio.c (HOSTIO_PATH_MAX): Define.
9297 (require_filename, handle_open, handle_unlink, handle_readlink):
9300 2013-07-01 Pedro Alves <palves@redhat.com>
9302 * server.h: Include "pathmax.h".
9303 * linux-low.c: Don't include sys/param.h.
9304 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9306 * win32-low.c: Don't include sys/param.h.
9307 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9309 2013-07-01 Pedro Alves <palves@redhat.com>
9311 * event-loop.c: Don't check HAVE_UNISTD_H before including
9313 * gdbreplay.c: Likewise.
9314 * remote-utils.c: Likewise.
9315 * server.c: Likewise.
9316 * configure.ac: Don't check for unistd.h.
9317 * configure: Regenerate.
9319 2013-06-28 Tom Tromey <tromey@redhat.com>
9321 * Makefile.in (version.c): Use version.in, not
9324 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9326 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9327 * configure: Rebuild.
9328 * Makefile.in (version_host, version_target): Get from configure.
9329 (version.c): Use $(version_host) and $(version_target).
9331 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9333 Fix trace-status to output user name without trailing colon.
9334 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9336 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9338 Fix trace-status to output proper start-time and stop-time.
9339 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9340 output start time and stop time in hex as gdb expects.
9342 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9344 * tracepoint.c (build_traceframe_info_xml): Output trace state
9345 variables present in the trace buffer.
9347 2013-06-24 Tom Tromey <tromey@redhat.com>
9349 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9351 (version.o): Remove.
9352 * gdbreplay.c: Include version.h.
9353 (version, host_name): Don't declare.
9354 * server.h: Include version.h.
9355 (version, host_name): Don't declare.
9357 2013-06-12 Pedro Alves <palves@redhat.com>
9359 * linux-x86-low.c (linux_is_elf64): Delete global.
9360 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9361 with local linux_pid_exe_is_elf_64_file use.
9363 2013-06-11 Pedro Alves <palves@redhat.com>
9365 * linux-low.c (regset_disabled, disable_regset): New functions.
9366 (regsets_fetch_inferior_registers)
9367 (regsets_store_inferior_registers): Use them.
9368 (initialize_regsets_info); Don't allocate the disabled_regsets
9370 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9373 2013-06-11 Pedro Alves <palves@redhat.com>
9375 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9378 2013-06-11 Pedro Alves <palves@redhat.com>
9380 * linux-x86-low.c (initialize_low_arch): Call
9381 init_registers_x32_avx_linux.
9383 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9385 Fix compatibility with Android Bionic.
9386 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9389 2013-06-07 Pedro Alves <palves@redhat.com>
9392 * Makefile.in (OBS): Add tdesc.o.
9393 (IPA_OBJS): Add tdesc-ipa.o.
9394 (tdesc-ipa.o): New rule.
9395 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9397 * linux-low.c (new_inferior): Delete.
9398 (disabled_regsets, num_regsets): Delete.
9399 (linux_add_process): Adjust to set the new per-process
9401 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9402 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9403 was a stop. When calling arch_setup, switch the current inferior
9404 to the thread that got an event.
9405 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9406 (regsets_fetch_inferior_registers)
9407 (regsets_store_inferior_registers): New regsets_info parameter.
9409 (linux_register_in_regsets): New regs_info parameter. Adjust to
9411 (register_addr, fetch_register, store_register): New usrregs_info
9412 parameter. Adjust to use it.
9413 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9414 parameter regs_info. Adjust to use it.
9415 (linux_fetch_registers): Get the current inferior's regs_info, and
9417 (linux_store_registers): Ditto.
9418 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9419 (initialize_low): Don't initialize the target_regsets here. Call
9420 initialize_low_arch.
9421 * linux-low.h (target_regsets): Delete declaration.
9422 (struct regsets_info): New.
9423 (struct usrregs_info): New.
9424 (struct regs_info): New.
9425 (struct process_info_private) <new_inferior>: New field.
9426 (struct linux_target_ops): Delete the num_regs, regmap, and
9427 regset_bitmap fields. New field regs_info.
9428 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9429 * i387-fp.c (num_xmm_registers): Delete.
9430 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9431 calls to new interface.
9432 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9433 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9434 Infer the number of xmm registers from the regcache's target
9436 * i387-fp.h (num_xmm_registers): Delete.
9437 * inferiors.c (add_thread): Don't install the thread's regcache
9439 * proc-service.c (gregset_info): Fetch the current inferior's
9440 regs_info. Adjust to use it.
9441 * regcache.c: Include tdesc.h.
9442 (register_bytes, reg_defs, num_registers)
9443 (gdbserver_expedite_regs): Delete.
9444 (get_thread_regcache): If the thread doesn't have a regcache yet,
9445 create one, instead of aborting gdbserver.
9446 (regcache_invalidate_one): Rename to ...
9447 (regcache_invalidate_thread): ... this.
9448 (regcache_invalidate_one): New.
9449 (regcache_invalidate): Only invalidate registers of the current
9451 (init_register_cache): Add target_desc parameter, and use it.
9452 (new_register_cache): Ditto. Assert the target description has a
9453 non zero registers_size.
9454 (regcache_cpy): Add assertions. Adjust.
9455 (realloc_register_cache, set_register_cache): Delete.
9456 (registers_to_string, registers_from_string): Adjust.
9457 (find_register_by_name, find_regno, find_register_by_number)
9458 (register_cache_size): Add target_desc parameter, and use it.
9459 (free_register_cache_thread, free_register_cache_thread_one)
9460 (regcache_release, register_cache_size): New.
9461 (register_size): Add target_desc parameter, and use it.
9462 (register_data, supply_register, supply_register_zeroed)
9463 (supply_regblock, supply_register_by_name, collect_register)
9464 (collect_register_as_string, collect_register_by_name): Adjust.
9465 * regcache.h (struct target_desc): Forward declare.
9466 (struct regcache) <tdesc>: New field.
9467 (init_register_cache, new_register_cache): Add target_desc
9469 (regcache_invalidate_thread): Declare.
9470 (regcache_invalidate_one): Delete declaration.
9471 (regcache_release): Declare.
9472 (find_register_by_number, register_cache_size, register_size)
9473 (find_regno): Add target_desc parameter.
9474 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9476 * remote-utils.c: Include tdesc.h.
9477 (outreg, prepare_resume_reply): Adjust.
9478 * server.c: Include tdesc.h.
9479 (gdbserver_xmltarget): Delete declaration.
9480 (get_features_xml, process_serial_event): Adjust.
9481 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9483 (struct process_info) <tdesc>: New field.
9484 (ipa_tdesc): Declare.
9485 * tdesc.c: New file.
9486 * tdesc.h: New file.
9487 * tracepoint.c: Include tdesc.h.
9488 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9489 (get_context_regcache): Adjust to pass ipa_tdesc down.
9490 (do_action_at_tracepoint): Adjust to get the register cache size
9491 from the context regcache's description.
9492 (traceframe_walk_blocks): Adjust to get the register cache size
9493 from the current trace frame's description.
9494 (traceframe_get_pc): Adjust to get current trace frame's
9495 description and pass it down.
9496 (gdb_collect): Adjust to get the register cache size from the
9498 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9499 (gdbserver_xmltarget): Delete.
9500 (initialize_low_tracepoint): Set the ipa's target description.
9501 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9502 (initialize_low_tracepoint): Set the ipa's target description.
9503 * linux-x86-low.c: Include tdesc.h.
9504 [__x86_64__] (is_64bit_tdesc): New.
9505 (ps_get_thread_area, x86_get_thread_area): Use it.
9506 (i386_cannot_store_register): Rename to ...
9507 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9508 (i386_cannot_fetch_register): Rename to ...
9509 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9510 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9512 (target_regsets): Rename to ...
9513 (x86_regsets): ... this.
9514 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9516 (x86_siginfo_fixup): Use is_64bit_tdesc.
9517 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9518 (tdesc_x32_avx_linux, tdesc_x32_linux)
9519 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9521 (x86_linux_update_xmltarget): Delete.
9522 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9523 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9524 (AMD64_LINUX_USER64_CS): New.
9525 (x86_linux_read_description): New, based on
9526 x86_linux_update_xmltarget.
9527 (same_process_callback): New.
9528 (x86_arch_setup_process_callback): New.
9529 (x86_linux_update_xmltarget): New.
9530 (x86_regsets_info): New.
9531 (amd64_linux_regs_info): New.
9532 (i386_linux_usrregs_info): New.
9533 (i386_linux_regs_info): New.
9534 (x86_linux_regs_info): New.
9535 (x86_arch_setup): Reimplement.
9536 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9537 (x86_emit_ops): Ditto.
9538 (the_low_target): Adjust. Install x86_linux_regs_info,
9539 x86_cannot_fetch_register, and x86_cannot_store_register.
9540 (initialize_low_arch): New.
9541 * linux-ia64-low.c (tdesc_ia64): Declare.
9542 (ia64_fetch_register): Adjust.
9543 (ia64_usrregs_info, regs_info): New globals.
9544 (ia64_regs_info): New function.
9545 (the_low_target): Adjust.
9546 (initialize_low_arch): New function.
9547 * linux-sparc-low.c (tdesc_sparc64): Declare.
9548 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9550 (sparc_arch_setup): New function.
9551 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9552 (the_low_target): Adjust.
9553 (initialize_low_arch): New function.
9554 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9555 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9556 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9557 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9558 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9559 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9560 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9561 (tdesc_powerpc_isa205_vsx64l): Declare.
9562 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9563 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9564 (ppc_set_pc, ppc_get_hwcap): Adjust.
9565 (ppc_usrregs_info): Forward declare.
9566 (!__powerpc64__) ppc_regmap_adjusted: New global.
9567 (ppc_arch_setup): Adjust to the current process'es target
9569 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9570 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9571 (ppc_store_evrregset): Adjust.
9572 (target_regsets): Rename to ...
9573 (ppc_regsets): ... this, and make static.
9574 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9575 (ppc_regs_info): New function.
9576 (the_low_target): Adjust.
9577 (initialize_low_arch): New function.
9578 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9579 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9580 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9581 (tdesc_s390x_linux64v2): Declare.
9582 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9583 (s390_fill_gregset, s390_store_last_break): Adjust.
9584 (target_regsets): Rename to ...
9585 (s390_regsets): ... this, and make static.
9586 (s390_get_pc, s390_set_pc): Adjust.
9587 (s390_get_hwcap): New target_desc parameter, and use it.
9588 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9589 (s390_arch_setup): Adjust to set the current process'es target
9590 description. Don't adjust the regmap.
9591 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9592 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9593 (regs_info_3264): New globals.
9594 (s390_regs_info): New function.
9595 (the_low_target): Adjust.
9596 (initialize_low_arch): New function.
9597 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9598 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9599 [__mips64] (init_registers_mips_linux)
9600 (init_registers_mips_dsp_linux): Delete defines.
9601 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9602 (have_dsp): New global.
9603 (mips_read_description): New, based on mips_arch_setup.
9604 (mips_arch_setup): Reimplement.
9605 (get_usrregs_info): New function.
9606 (mips_cannot_fetch_register, mips_cannot_store_register)
9607 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9608 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9609 (target_regsets): Rename to ...
9610 (mips_regsets): ... this, and make static.
9611 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9612 (dsp_regs_info, regs_info): New globals.
9613 (mips_regs_info): New function.
9614 (the_low_target): Adjust.
9615 (initialize_low_arch): New function.
9616 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9617 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9619 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9620 (arm_read_description): New, with bits factored from
9622 (arm_arch_setup): Reimplement.
9623 (target_regsets): Rename to ...
9624 (arm_regsets): ... this, and make static.
9625 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9626 (arm_regs_info): New function.
9627 (the_low_target): Adjust.
9628 (initialize_low_arch): New function.
9629 * linux-m68k-low.c (tdesc_m68k): Declare.
9630 (target_regsets): Rename to ...
9631 (m68k_regsets): ... this, and make static.
9632 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9633 (m68k_regs_info): New function.
9634 (m68k_arch_setup): New function.
9635 (the_low_target): Adjust.
9636 (initialize_low_arch): New function.
9637 * linux-sh-low.c (tdesc_sharch): Declare.
9638 (target_regsets): Rename to ...
9639 (sh_regsets): ... this, and make static.
9640 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9641 (sh_regs_info, sh_arch_setup): New functions.
9642 (the_low_target): Adjust.
9643 (initialize_low_arch): New function.
9644 * linux-bfin-low.c (tdesc_bfin): Declare.
9645 (bfin_arch_setup): New function.
9646 (bfin_usrregs_info, regs_info): New globals.
9647 (bfin_regs_info): New function.
9648 (the_low_target): Adjust.
9649 (initialize_low_arch): New function.
9650 * linux-cris-low.c (tdesc_cris): Declare.
9651 (cris_arch_setup): New function.
9652 (cris_usrregs_info, regs_info): New globals.
9653 (cris_regs_info): New function.
9654 (the_low_target): Adjust.
9655 (initialize_low_arch): New function.
9656 * linux-cris-low.c (tdesc_crisv32): Declare.
9657 (cris_arch_setup): New function.
9658 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9659 (cris_regs_info): New function.
9660 (the_low_target): Adjust.
9661 (initialize_low_arch): New function.
9662 * linux-m32r-low.c (tdesc_m32r): Declare.
9663 (m32r_arch_setup): New function.
9664 (m32r_usrregs_info, regs_info): New globals.
9665 (m32r_regs_info): Adjust.
9666 (initialize_low_arch): New function.
9667 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9668 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9669 (tic6x_usrregs_info): Forward declare.
9670 (tic6x_read_description): New function, based on ...
9671 (tic6x_arch_setup): ... this. Reimplement.
9672 (target_regsets): Rename to ...
9673 (tic6x_regsets): ... this, and make static.
9674 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9675 (tic6x_regs_info): New function.
9676 (the_low_target): Adjust.
9677 (initialize_low_arch): New function.
9678 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9679 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9680 (target_regsets): Rename to ...
9681 (xtensa_regsets): ... this, and make static.
9682 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9684 (xtensa_arch_setup, xtensa_regs_info): New functions.
9685 (the_low_target): Adjust.
9686 (initialize_low_arch): New function.
9687 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9688 (nios2_arch_setup): Set the current process'es tdesc.
9689 (target_regsets): Rename to ...
9690 (nios2_regsets): ... this.
9691 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9692 (nios2_regs_info): New function.
9693 (the_low_target): Adjust.
9694 (initialize_low_arch): New function.
9695 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9696 (aarch64_arch_setup): Set the current process'es tdesc.
9697 (target_regsets): Rename to ...
9698 (aarch64_regsets): ... this.
9699 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9700 (aarch64_regs_info): New function.
9701 (the_low_target): Adjust.
9702 (initialize_low_arch): New function.
9703 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9705 (target_regsets): Rename to ...
9706 (tile_regsets): ... this.
9707 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9708 (tile_regs_info): New function.
9709 (tile_arch_setup): Set the current process'es tdesc.
9710 (the_low_target): Adjust.
9711 (initialize_low_arch): New function.
9712 * spu-low.c (tdesc_spu): Declare.
9713 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9714 * win32-arm-low.c (tdesc_arm): Declare.
9715 (arm_arch_setup): New function.
9716 (the_low_target): Install arm_arch_setup instead of
9718 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9719 (init_windows_x86): Rename to ...
9720 (i386_arch_setup): ... this. Set `win32_tdesc'.
9721 (the_low_target): Adjust.
9722 * win32-low.c (win32_tdesc): New global.
9723 (child_add_thread): Don't create the thread cache here.
9724 (do_initial_child_stuff): Set the new process'es tdesc.
9725 * win32-low.h (struct target_desc): Forward declare.
9726 (win32_tdesc): Declare.
9727 * lynx-i386-low.c (tdesc_i386): Declare global.
9728 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9729 * lynx-low.c (lynx_tdesc): New global.
9730 (lynx_add_process): Set the new process'es tdesc.
9731 * lynx-low.h (struct target_desc): Forward declare.
9732 (lynx_tdesc): Declare global.
9733 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9734 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9735 * nto-low.c (nto_tdesc): New global.
9736 (do_attach): Set the new process'es tdesc.
9737 * nto-low.h (struct target_desc): Forward declare.
9738 (nto_tdesc): Declare.
9739 * nto-x86-low.c (tdesc_i386): Declare.
9740 (nto_x86_arch_setup): Set `nto_tdesc'.
9742 2013-06-04 Gary Benson <gbenson@redhat.com>
9744 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9745 to qSupported response when appropriate.
9746 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9747 with nonzero-length annex.
9748 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9749 arguments supplied in annex.
9751 2013-05-31 Doug Evans <dje@google.com>
9754 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9755 64 bits in 64-cross-32 environment.
9757 2013-05-28 Pedro Alves <palves@redhat.com>
9759 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9760 (aarch64-without-fpu.c): Delete rule.
9761 * configure.srv (aarch64*-*-linux*): Remove references to
9762 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9763 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9766 2013-05-24 Pedro Alves <palves@redhat.com>
9768 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9769 instead of strchr/decode_address. Error if the range isn't split
9770 with a ','. Don't assume there's be a ':' in the action.
9772 2013-05-23 Yao Qi <yao@codesourcery.com>
9773 Pedro Alves <palves@redhat.com>
9775 * linux-low.c (lwp_in_step_range): New function.
9776 (linux_wait_1): If the thread was range stepping and stopped
9777 outside the stepping range, report the stop to GDB. Otherwise,
9778 continue stepping. Add range stepping debug output.
9779 (linux_set_resume_request): Copy the step range from the resume
9781 (linux_supports_range_stepping): New.
9782 (linux_target_ops) <supports_range_stepping>: Set to
9783 linux_supports_range_stepping.
9784 * linux-low.h (struct linux_target_ops)
9785 <supports_range_stepping>: New field.
9786 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9787 * linux-x86-low.c (x86_supports_range_stepping): New.
9788 (the_low_target) <supports_range_stepping>: Set to
9789 x86_supports_range_stepping.
9790 * server.c (handle_v_cont): Handle 'r' action.
9791 (handle_v_requests): Append ";r" if the target supports range
9793 * target.h (struct thread_resume) <step_range_start,
9794 step_range_end>: New fields.
9795 (struct target_ops) <supports_range_stepping>:
9797 (target_supports_range_stepping): New macro.
9799 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9801 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9802 confusion in comment.
9804 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9806 * lynx-low.c (struct process_info_private): New type.
9807 (lynx_add_process): New function.
9808 (lynx_create_inferior, lynx_attach): Replace calls to
9809 add_process by calls to lynx_add_process.
9810 (lynx_resume): If PTID is null, then try using
9811 current_process()->private->last_wait_event_ptid.
9813 (lynx_clear_inferiors): Delete. The contents of that function
9814 has been inlined in lynx_mourn;
9815 (lynx_wait_1): Save the ptid in the process's private data.
9816 (lynx_mourn): Free the process' private data. Replace call
9817 to lynx_clear_inferiors by call to clear_inferiors.
9819 2013-05-17 Yao Qi <yao@codesourcery.com>
9821 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9824 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9826 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9827 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9828 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9829 PT_TEXT_END_ADDR guards. Update comments.
9830 (linux_target_op) <read_offsets>: Conditionally define to
9831 linux_read_offsets if the target is UCLIBC and if it defines
9832 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9834 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9835 Andrew Jenner <andrew@codesourcery.com>
9837 * Makefile.in (SFILES): Add linux-nios2-low.c.
9838 (clean): Add action to delete nios2-linux.c.
9839 (nios2-linux.c): New rule.
9840 * configure.srv: Add nios2*-*-linux*.
9841 * linux-nios2-low.c: New.
9843 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9845 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9847 2013-04-25 Hui Zhu <hui@codesourcery.com>
9850 * ax.c (ax_printf): Add fflush.
9852 2013-04-22 Tom Tromey <tromey@redhat.com>
9854 * Makefile.in (SFILES): Add filestuff.c.
9855 (OBS): Add filestuff.o.
9856 (filestuff.o): New target.
9857 * config.in, configure: Rebuild.
9858 * configure.ac: Check for fdwalk, pipe2.
9860 2013-04-17 Pedro Alves <palves@redhat.com>
9862 * configure.ac (USE_THREAD_DB): Delete variable.
9863 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9864 Don't AC_SUBST USE_THREAD_DB.
9865 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9866 * config.in, configure: Regenerate.
9868 2013-04-16 Pedro Alves <palves@redhat.com>
9870 * linux-low.h (struct lwp_info) <thread_known>: Move under
9871 the USE_THREAD_DB #ifdef.
9873 2013-04-16 Pedro Alves <palves@redhat.com>
9875 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9876 (linux-low.o): Delete rule.
9877 * linux-low.h: Always include "gdb_thread_db.h" instead of
9878 conditionally including thread_db.h.
9879 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9882 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9884 * Makefile.in (install-only): Fix make install regression.
9886 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9888 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9889 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9891 * gdbserver.1: Remove.
9893 2013-03-22 Pedro Alves <palves@redhat.com>
9895 * linux-low.c (handle_extended_wait): Don't call
9896 linux_enable_event_reporting.
9898 2013-03-15 Tony Theodore <tonyt@logyst.com>
9901 * Makefile.in (SHELL): Use @SHELL@.
9903 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9905 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9908 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9910 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9911 Remove extraneous NULL element.
9913 2013-03-13 Yao Qi <yao@codesourcery.com>
9915 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9916 'V' block in trace frame.
9918 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9920 * target.h (struct target_ops): Add btrace ops.
9921 (target_supports_btrace): New macro.
9922 (target_enable_btrace): New macro.
9923 (target_disable_btrace): New macro.
9924 (target_read_btrace): New macro.
9925 * gdbthread.h (struct thread_info): Add btrace field.
9926 * server.c: Include btrace-common.h.
9927 (handle_btrace_general_set): New function.
9928 (handle_btrace_enable): New function.
9929 (handle_btrace_disable): New function.
9930 (handle_general_set): Call handle_btrace_general_set.
9931 (handle_qxfer_btrace): New function.
9932 (struct qxfer qxfer_packets[]): Add btrace entry.
9933 * inferiors.c (remove_thread): Disable btrace.
9934 * linux-low: Include linux-btrace.h.
9935 (linux_low_enable_btrace): New function.
9936 (linux_low_read_btrace): New function.
9937 (linux_target_ops): Add btrace ops.
9938 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9939 Add srv_linux_btrace=yes.
9940 (x86_64-*-linux*): Add linux-btrace.o.
9941 Add srv_linux_btrace=yes.
9942 * configure.ac: Define HAVE_LINUX_BTRACE.
9943 * config.in: Regenerated.
9944 * configure: Regenerated.
9946 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9948 * server.c (handle_qxfer): Preserve error message if -3 is
9950 (qxfer): Document the -3 return value.
9952 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9954 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9955 (linux_btrace_h): New variable.
9956 (linux-btrace.o): New rule.
9958 2013-03-08 Stan Shebs <stan@codesourcery.com>
9959 Hafiz Abid Qadeer <abidh@codesourcery.com>
9961 * tracepoint.c (trace_buffer_size): New global.
9962 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9963 (init_trace_buffer): Change to one-argument function. Allocate
9964 trace buffer memory.
9965 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9966 handle QTBuffer:size packet.
9967 (cmd_bigqtbuffer_size): New function.
9968 (initialize_tracepoint): Call init_trace_buffer with
9969 DEFAULT_TRACE_BUFFER_SIZE.
9970 * server.c (handle_query): Add QTBuffer:size in the
9973 2013-03-07 Yao Qi <yao@codesourcery.com>
9975 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9976 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9978 (cmd_qtsp): Adjust condition. Do post increment.
9979 Set cur_action and cur_step_action back to 0.
9981 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9984 * linux-low.c (linux_write_memory): Return early success if LEN is
9987 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9989 * configure.srv: Add x86_64-*-cygwin* as target.
9991 2013-02-28 Tom Tromey <tromey@redhat.com>
9993 * configure.ac: Invoke AC_SYS_LARGEFILE.
9994 * configure, config.in: Rebuild.
9996 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9998 * win32-low.c: Throughout, fix format strings and casts of
9999 printf-like functions to avoid type related warnings on all
10001 (get_child_debug_event): Print dwDebugEventCode as hex since
10002 that's how it's usually documented.
10004 2013-02-28 Yao Qi <yao@codesourcery.com>
10006 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10009 2013-02-27 Jiong Wang <jiwang@tilera.com>
10011 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10012 (reg-tilegx32.c): New rule.
10013 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10014 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10015 different register info initializer according to elf class.
10016 (init_registers_tilgx32): New function. The tilegx32 register info
10018 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10019 (tile_store_gregset): Likewise.
10021 2013-02-27 Yao Qi <yao@codesourcery.com>
10023 * server.c (process_point_options): Print debug message when
10024 debug_threads is true.
10026 2013-02-26 Yao Qi <yao@codesourcery.com>
10028 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10030 2013-02-19 Pedro Alves <palves@redhat.com>
10031 Kai Tietz <ktietz@redhat.com>
10035 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10036 instead of strtoul to extract address from packet.
10037 (process_serial_event) <'z'>: Likewise.
10039 2013-02-18 Yao Qi <yao@codesourcery.com>
10041 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10043 2013-02-14 Pedro Alves <palves@redhat.com>
10047 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10048 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10050 2013-02-14 Pedro Alves <palves@redhat.com>
10052 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10054 2013-02-14 Pedro Alves <palves@redhat.com>
10056 * tracepoint.c (save_string): Delete.
10057 (add_tracepoint_action): Use savestring instead of save_string.
10059 2013-02-12 Pedro Alves <palves@redhat.com>
10061 * linux-xtensa-low.c: Ditto.
10062 * xtensa-xtregs.c: Ditto.
10064 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10066 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10069 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10071 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10072 aarch64_num_wp_regs and aarch64_num_bp_regs to
10073 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10075 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10077 * linux-aarch64-low.c (ps_get_thread_area): Replace
10078 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10080 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10081 Marcus Shawcroft <marcus.shawcroft@arm.com>
10082 Nigel Stephens <nigel.stephens@arm.com>
10083 Yufeng Zhang <yufeng.zhang@arm.com>
10085 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10086 (aarch64.c, aarch64-without-fpu.c): New targets.
10087 * configure.srv (aarch64*-*-linux*): New.
10088 * linux-aarch64-low.c: New file.
10090 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10092 * linux-low.c (handle_extended_wait, linux_create_inferior)
10093 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10094 (dequeue_one_deferred_signal, linux_resume_one_thread)
10095 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10096 (linux_tracefork_grandchild, linux_test_for_tracefork)
10097 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10098 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10099 where the argument is 0.
10101 2013-01-25 Yao Qi <yao@codesourcery.com>
10103 * event-loop.c: Include "queue.h".
10104 (gdb_event_p): New typedef.
10105 (struct gdb_event) <next_event>: Remove.
10106 (event_queue): Change to QUEUE(gdb_event_p).
10107 (async_queue_event): Remove.
10108 (gdb_event_xfree): New.
10109 (initialize_event_loop): New.
10110 (process_event): Use API from QUEUE.
10111 (wait_for_event): Likewise.
10112 * server.c (main): Call initialize_event_loop.
10113 * server.h (initialize_event_loop): Declare.
10115 2013-01-18 Yao Qi <yao@codesourcery.com>
10117 * ax.h (struct eval_agent_expr_context): New.
10118 (gdb_eval_agent_expr): Update declaration.
10119 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10120 TFRAME. Add new argument CTX.
10121 * server.h (struct eval_agent_expr_context): Declare.
10122 (agent_mem_read, agent_tsv_read): Update declaration.
10123 (agent_mem_read_string): Likewise.
10124 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10125 (add_traceframe_block): Add new argument TPOINT.
10126 Increase TPOINT->traceframe_usage.
10127 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10128 eval_tracepoint_agent_expr.
10129 (condition_true_at_tracepoint): Likewise.
10130 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10131 (agent_mem_read_string, agent_tsv_read): Likewise.
10133 2013-01-16 Yao Qi <yao@codesourcery.com>
10135 * linux-low.c (linux_resume_one_lwp): Don't check
10136 'lwp->bp_reinsert != 0'.
10138 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10139 Pedro Alves <palves@redhat.com>
10141 * lynx-low.c (ptrace_request_to_str): Define a temporary
10142 macro and use it to simplify this function's implementation.
10144 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10146 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10149 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10151 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10153 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10155 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10157 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10159 * lynx-low.c (lynx_resume): Use the resume_info parameter
10160 to determine the ptid for the lynx_ptrace call, unless
10161 it is equal to minus_one_ptid, in which case we use the
10162 ptid of the current_inferior.
10163 (lynx_wait_1): After having received a thread create/exit
10164 event, resume the inferior's execution using the signaling
10165 thread's ptid, rather than the old ptid.
10167 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10169 * lynx-low.c (lynx_resume): Delete variable ret.
10171 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10173 * gdbreplay.c (gdbreplay_version): Update copyright year.
10174 * server.c (gdbserver_version): Likewise.
10176 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10178 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10181 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10183 * lynx-low.c (ptrace_request_to_str): Add handling for
10184 PTRACE_GETTRACESIG.
10186 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10188 * lynx-low.c (lynx_attach): Delete variable new_process.
10190 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10192 * lynx-low.c (lynx_create_inferior): Delete variable
10195 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10197 * lynx-low.c (ptrace_request_to_str): Do not handle
10198 PTRACE_GETTHREADLIST if this macro does not exist.
10200 2012-12-15 Yao Qi <yao@codesourcery.com>
10202 * Makefile.in (OBS): Add notif.o.
10203 * notif.c, notif.h: New.
10204 * server.c: Include "notif.h".
10205 (struct vstop_notif) <next>: Remove.
10207 (queue_stop_reply): Update.
10208 (push_event, send_next_stop_reply): Remove.
10209 (discard_queued_stop_replies): Update.
10210 (notif_stop): New variable.
10211 (handle_v_stopped): Remove.
10212 (handle_v_requests): Don't call handle_v_stopped. Call
10213 handle_ack_notif instead.
10214 (queue_stop_reply_callback): Call notif_event_enque instead
10215 of queue_stop_reply.
10216 (handle_status): Don't call send_next_stop_reply, call
10217 notif_write_event instead.
10218 (kill_inferior_callback): Likewise.
10219 (detach_or_kill_inferior_callback): Likewise.
10220 (main): Call initialize_notif.
10221 (process_serial_event): Call QUEUE_is_empty.
10222 (handle_target_event): Call notif_push instead of push event.
10223 * server.h (push_event): Remove declaration.
10225 2012-12-10 Tom Tromey <tromey@redhat.com>
10227 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10228 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10231 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10232 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10233 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10234 (amd64-linux-ipa.o, ax.o): Rewrite.
10235 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10236 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10237 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10238 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10239 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10240 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10241 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10242 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10243 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10244 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10245 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10246 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10247 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10248 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10249 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10250 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10251 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10252 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10253 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10254 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10255 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10256 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10257 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10258 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10259 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10260 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10261 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10262 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10263 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10264 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10265 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10266 (reg-tilegx.o): Remove.
10267 (all_object_files): New macro.
10268 Include .deps files.
10269 * aclocal.m4, configure: Rebuild.
10270 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10271 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10272 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10274 2012-12-05 Tom Tromey <tromey@redhat.com>
10277 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10279 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10281 * configure.ac: Check for linux/perf_event.h.
10282 * config.in: Regenerated.
10283 * configure: Regenerated.
10285 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10287 * hostio.c (handle_readlink): Decrease buffer size
10288 parameter passed to readlink by one byte.
10290 2012-11-26 Yao Qi <yao@codesourcery.com>
10292 * configure.ac (build_warnings): Append '-Wempty-body'.
10293 * configure: Regenerated.
10294 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10297 2012-11-15 Pierre Muller <muller@sourceware.org>
10299 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10300 * config.in: Regenerate.
10301 * configure: Regenerate.
10302 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10303 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10304 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10305 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10307 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10308 instead of <sys/wait.h> header.
10309 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10311 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10313 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10314 (various make rules): Remove -DGDBSERVER
10316 2012-11-09 Yao Qi <yao@codesourcery.com>
10318 * spu-low.c (current_ptid): Move it to ..
10319 * gdbthread.h: ... here. New.
10320 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10321 * server.c (myresume, process_serial_event): Likewise.
10322 * thread-db.c (thread_db_find_new_threads): Likewise.
10323 * tracepoint.c (run_inferior_command): Likewise.
10325 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10327 * server.c (handle_search_memory_1): Include access length in
10330 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10332 * linux-crisv32-low.c: Fix compile errors.
10334 2012-09-04 Yao Qi <yao@codesourcery.com>
10336 * tracepoint.c (cmd_qtsv): Adjust debug message.
10337 Don't check CUR_TPOINT.
10339 2012-08-28 Yao Qi <yao@codesourcery.com>
10341 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10342 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10343 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10344 Remove declarations of xmalloc, xreallloc, xstrdup and
10346 * Makefile.in (libiberty_h): New.
10347 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10348 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10350 2012-08-23 Yao Qi <yao@codesourcery.com>
10352 * server.h: Remove declaration of 'xsnprintf'.
10354 2012-08-22 Keith Seitz <keiths@redhat.com>
10356 * server.h: Include build-gnulib-gbserver/config.h.
10357 * gdbreplay.c: Likewise.
10359 2012-08-08 Doug Evans <dje@google.com>
10361 * Makefile.in (SFILES): Add gdb_vecs.c.
10362 (OBS): Add gdb_vecs.o.
10363 (gdb_vecs_h, host_defs_h): New variables.
10364 (thread-db.o): Add $(gdb_vecs_h) dependency.
10365 (gdb_vecs.o): New rule.
10366 * thread-db.c: #include "gdb_vecs.h".
10367 (thread_db_load_search): Use a vector to iterate over path elements.
10368 Handle text appearing after "$pdir".
10370 * configure.ac: Add check for strstr.
10371 * config.in: Regenerate.
10372 * configure: Regenerate.
10374 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10376 * hostio.c (handle_pread): If pread fails, fall back to attempting
10378 (handle_pwrite): Likewise for pwrite.
10380 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10382 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10383 between unsupported TYPE and unimplementable ADDR/LEN combination.
10384 (arm_insert_point): Act on new return value.
10386 2012-07-31 Pedro Alves <palves@redhat.com>
10388 * server.c (process_point_options): Only skip tokens if we find
10389 one that is unrecognized. Don't treat 'X' specially while
10390 skipping unrecognized tokens.
10392 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10394 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10395 to 4-byte-align HW breakpoint addresses for Thumb.
10397 2012-07-27 Yao Qi <yao@codesourcery.com>
10401 * server.h: Declare gdb_agent_about_to_close.
10402 * target.c (kill_inferior): Include "agent.h".
10403 New. Send command 'kill'.
10404 * target.h (kill_inferior): Removed macro.
10405 * tracepoint.c (gdb_agent_about_to_close): New.
10406 (gdb_agent_helper_thread): Handle command 'close'.
10407 Wait endlessly until the inferior stops.
10408 Install gdb_agent_remove_socket to atexit hook.
10409 (agent_socket_name): New static variable.
10410 (gdb_agent_socket_init): Replace local variable 'name' with
10411 'agent_socket_name'.
10412 (gdb_agent_remove_socket): New.
10414 2012-07-27 Yao Qi <yao@codesourcery.com>
10416 * server.c (process_point_options): Stop at 'X' when parsing.
10418 2012-07-19 Michael Eager <eager@eagercon.com>
10420 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10422 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10423 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10424 hardware breakpoint.
10426 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10428 * gdbserver/linux-low.c (initialize_low): Call
10429 linux_ptrace_init_warnings.
10431 2012-07-02 Doug Evans <dje@google.com>
10433 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10436 2012-07-02 Stan Shebs <stan@codesourcery.com>
10438 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10439 (ax.o): Add it to build rule.
10441 (OBS): Add format.o.
10442 (IPA_OBS): Add format.o.
10443 * server.c (handle_query): Claim support for breakpoint commands.
10444 (process_point_options): Add command case.
10445 (process_serial_event): Leave running if there are printfs in
10447 * mem-break.h (any_persistent_commands): Declare.
10448 (add_breakpoint_commands): Declare.
10449 (gdb_no_commands_at_breakpoint): Declare.
10450 (run_breakpoint_commands): Declare.
10451 * mem-break.c (struct point_command_list): New struct.
10452 (struct breakpoint): New field command_list.
10453 (any_persistent_commands): New function.
10454 (add_commands_to_breakpoint): New function.
10455 (add_breakpoint_commands): New function.
10456 (gdb_no_commands_at_breakpoint): New function.
10457 (run_breakpoint_commands): New function.
10458 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10460 * ax.c: Include format.h.
10461 (ax_printf): New function.
10462 (gdb_eval_agent_expr): Add printf opcode.
10464 2012-06-13 Yao Qi <yao@codesourcery.com>
10466 * server.c (start_inferior): Remove duplicated writes to fields
10467 'last_resume_kind' and 'last_status' of 'current_inferior'.
10469 2012-06-12 Yao Qi <yao@codesourcery.com>
10470 Pedro Alves <palves@redhat.com>
10472 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10474 * server.c (handle_v_cont): Extend comment.
10476 2012-06-11 Yao Qi <yao@codesourcery.com>
10478 * linux-low.c (linux_attach): Add 'static'.
10480 2012-06-06 Yao Qi <yao@codesourcery.com>
10482 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10484 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10486 Fix gcc -flto compilation warning.
10487 * server.c (main): Make variable multi_mode and attach volatile.
10489 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10491 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10492 if the platform doesn't know about it.
10494 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10496 * Makefile.in (SFILES): Add linux-tile-low.c.
10497 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10498 * configure.srv: Handle tilegx-*-linux*.
10499 * linux-tile-low.c: New file.
10501 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10503 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10505 2012-05-24 Pedro Alves <palves@redhat.com>
10509 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10511 2012-05-24 Pedro Alves <palves@redhat.com>
10515 Replace target_signal with gdb_signal throughout.
10517 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10519 * linux-low.c (linux_store_registers): Avoid the copying sequence
10520 when no data has been retrieved by ptrace.
10522 2012-05-22 Will Deacon <will.deacon@arm.com>
10524 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10525 Include asm/ptrace.h.
10526 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10529 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10531 * linux-low.c (linux_store_registers): Don't re-retrieve data
10532 with ptrace that has already been obtained from /proc. Always
10533 copy any data retrieved with ptrace to the buffer supplied.
10535 2012-05-11 Yao Qi <yao@codesourcery.com>
10536 Pedro Alves <palves@redhat.com>
10538 * linux-low.c (enum stopping_threads_kind): New.
10539 (stopping_threads): Change type to `enum stopping_threads_kind'.
10540 (handle_extended_wait): If stopping and suspending threads, leave
10541 the new_lwp suspended too.
10542 (linux_wait_for_event): Adjust.
10543 (stop_all_lwps): Set `stopping_threads' to
10544 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10545 whether we're suspending threads or just stopping them. Assert no
10548 2012-04-29 Yao Qi <yao@codesourcery.com>
10550 * server.h: Move some code to ...
10551 * gdbthread.h: ... here. New.
10552 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10553 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10554 (nto-low.o, win32-low.o): Likewise.
10555 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10556 * regcache.c, remote-utils.c, server.c: Likewise.
10557 * target.c, tracepoint.c, win32-low.c: Likewise.
10559 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10561 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10562 (PTRACE_ARG4_TYPE): Likewise.
10563 (PTRACE_XFER_TYPE): Likewise.
10564 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10565 ptrace to PTRACE_ARG3_TYPE.
10566 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10567 (PTRACE_ARG4_TYPE): Likewise.
10568 (PTRACE_XFER_TYPE): Likewise.
10569 (linux_detach_one_lwp): Cast fourth argument of
10570 ptrace to long then PTRACE_ARG4_TYPE.
10571 (regsets_fetch_inferior_registers): Cast third argument of
10572 ptrace to long then PTRACE_ARG3_TYPE.
10573 (regsets_store_inferior_registers): Likewise.
10575 2012-04-20 Pedro Alves <palves@redhat.com>
10577 * configure: Regenerate.
10579 2012-04-19 Pedro Alves <palves@redhat.com>
10581 * Makefile.in (GNULIB_BUILDDIR): New.
10582 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10583 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10584 (all, install-only, uninstall, clean-info, all-lib, clean): No
10585 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10586 (maintainer-clean realclean distclean): Use subdir_do.
10588 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10589 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10590 * acinclude.m4: Include acx_configure_dir.m4.
10591 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10592 calls. Call AC_PROG_RANLIB. Configure gnulib using
10595 (GNULIB_STDINT_H): Adjust.
10596 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10597 * gdbreplay.c: Include build-gnulib/config.h.
10598 * server.h: Likewise.
10599 * aclocal.m4: Regenerate.
10600 * config.in: Regenerate.
10601 * configure: Regenerate.
10603 2012-04-19 Pedro Alves <palves@redhat.com>
10605 * Makefile.in (LIBGNU, INCGNU): Adjust.
10606 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10607 (all, install-only, uninstall, clean-info, all-lib, clean)
10608 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10609 * configure.ac: Adjust AC_OUTPUT output.
10610 * aclocal.m4: Regenerate.
10611 * configure: Regenerate.
10613 2012-04-19 Pedro Alves <palves@redhat.com>
10615 * Makefile.in (generated_files): New.
10616 (server_h): Remove the explicit dependency on config.h, and depend
10617 on $generated_files.
10619 2012-04-19 Pedro Alves <palves@redhat.com>
10621 * Makefile.in (INCGNU): Add -Ignulib.
10623 2012-04-19 Pedro Alves <palves@redhat.com>
10625 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10626 (INCGNU): ... this, and spell out -I here.
10627 (GNULIB_LIB): Rename to ...
10628 (LIBGNU): ... this.
10629 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10631 2012-04-19 Pedro Alves <palves@redhat.com>
10633 * config.in: Regenerate.
10635 2012-04-19 Pedro Alves <palves@redhat.com>
10637 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10638 * server.h (memmem): Remove declaration.
10639 * config.in: Regenerate.
10640 * configure: Regenerate.
10642 2012-04-19 Yao Qi <yao@codesourcery.com>
10644 * Makefile.in (SFILES): Add common/vec.c.
10648 2012-04-19 Yao Qi <yao@codesourcery.com>
10650 * remote-utils.c (prepare_resume_reply): Replace with macro
10651 target_core_of_thread.
10652 * server.c (handle_qxfer_threads_proper): Likewise.
10653 * target.h (traget_core_of_thread): New macro.
10655 2012-04-18 Pedro Alves <palves@redhat.com>
10657 * aclocal.m4: Regenerate.
10658 * configure: Regenerate.
10660 2012-04-16 Yao Qi <yao@codesourcery.com>
10662 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10663 duplicated on address.
10665 2012-04-16 Yao Qi <yao@codesourcery.com>
10667 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10668 (struct tracepoint_action_ops) <send>: New field.
10669 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10670 (agent_expr_send, x_tracepoint_action_send): New.
10671 (l_tracepoint_action_send): New.
10672 (cmd_qtdp): Download and install tracepoint
10673 according to `use_agent'.
10674 (run_inferior_command): Add one more parameter `len'.
10676 (tracepoint_send_agent): New.
10677 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10679 2012-04-16 Yao Qi <yao@codesourcery.com>
10681 * tracepoint.c (download_tracepoints): Moved to ...
10682 (cmd_qtstart): ... here.
10684 2012-04-14 Yao Qi <yao@codesourcery.com>
10686 * tracepoint.c: Include inttypes.h.
10687 (struct collect_memory_action): Use sized types.
10688 (struct tracepoint): Likewise.
10689 (cmd_qtdp, stop_tracing): Update print specifiers.
10690 (cmd_qtp, response_tracepoint): Likewise.
10691 (collect_data_at_tracepoint): Likewise.
10692 (collect_data_at_step): Likewise.
10694 2012-04-14 Yao Qi <yao@codesourcery.com>
10696 Import gnulib module inttypes.
10697 * aclocal.m4, config.in, configure: Regenerated.
10699 2012-04-14 Yao Qi <yao@codesourcery.com>
10701 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10702 Makefile and config.status at last.
10704 2012-04-13 Yao Qi <yao@codesourcery.com>
10706 * tracepoint.c: Include stdint.h unconditionally.
10708 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10710 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10711 on BFD_HAVE_SYS_PROCFS_TYPE.
10712 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10713 * configure: Regenerate.
10714 * config.in: Likewise.
10716 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10718 * Makefile.in (clean): Also remove x32.c x32-linux.c
10719 x32-avx.c x32-avx-linux.c.
10720 (x32.o): New target.
10722 (x32-linux.o): Likewise.
10723 (x32-linux.c): Likewise.
10724 (x32-avx.o): Likewise.
10725 (x32-avx.c): Likewise.
10726 (x32-avx-linux.o): Likewise.
10727 (x32-avx-linux.c): Likewise.
10729 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10730 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10731 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10732 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10733 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10734 i386/x32-avx-linux.xml.
10736 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10737 (init_registers_x32_avx_linux): Likwise.
10738 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10739 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10741 2012-04-13 Pedro Alves <palves@redhat.com>
10743 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10744 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10745 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10746 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10749 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10751 * linux-x86-low.c (compat_x32_clock_t): New.
10752 (compat_x32_siginfo_t): Likewise.
10753 (compat_x32_siginfo_from_siginfo): Likewise.
10754 (siginfo_from_compat_x32_siginfo): Likewise.
10755 (linux_is_elf64): Likewise.
10756 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10757 and siginfo_from_compat_x32_siginfo for x32.
10758 (x86_arch_setup): Set linux_is_elf64.
10760 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10763 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10765 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10766 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10767 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10768 compatible with process.
10770 2012-04-12 Yao Qi <yao@codesourcery.com>
10772 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10773 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10774 (install-only, install-info, clean): Handle sub dir gnulib.
10775 (all-lib, am--refresh): New targets.
10776 (memmem.o): Remove target.
10777 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10778 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10779 (AC_REPLACE_FUNCS): Remove memmem.
10780 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10781 (AC_OUTPUT): Generate Makefile in gnulib/.
10782 * aclocal.m4, config.in, configure: Regenerated.
10784 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10786 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10788 2012-04-05 Pedro Alves <palves@redhat.com>
10790 -Werror=strict-aliasing
10792 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10795 2012-04-04 Pedro Alves <palves@redhat.com>
10797 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10798 (sparc_store_gregset_from_stack, sparc_store_gregset)
10799 (sparc_breakpoint_at): Fix formatting.
10801 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10803 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10805 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10806 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10807 * config.in: Regenerate.
10808 * configure: Likewise.
10810 2012-03-29 Pedro Alves <palves@redhat.com>
10812 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10813 Correct ptrace arguments.
10815 2012-03-28 Pedro Alves <palves@redhat.com>
10817 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10818 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10819 (IA64_FR1_REGNUM): New defines.
10820 (ia64_fetch_register): New.
10821 (the_low_target): Install it.
10822 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10824 * linux-low.c (linux_fetch_registers): Try the
10825 the_low_target.fetch_register hook first.
10827 * linux-arm-low.c (the_low_target): Adjust.
10828 * linux-bfin-low.c (the_low_target): Adjust.
10829 * linux-cris-low.c (the_low_target): Adjust.
10830 * linux-crisv32-low.c (the_low_target): Adjust.
10831 * linux-m32r-low.c (the_low_target): Adjust.
10832 * linux-m68k-low.c (the_low_target): Adjust.
10833 * linux-mips-low.c (the_low_target): Adjust.
10834 * linux-ppc-low.c (the_low_target): Adjust.
10835 * linux-s390-low.c (the_low_target): Adjust.
10836 * linux-sh-low.c (the_low_target): Adjust.
10837 * linux-sparc-low.c (the_low_target): Adjust.
10838 * linux-tic6x-low.c (the_low_target): Adjust.
10839 * linux-x86-low.c (the_low_target): Adjust.
10840 * linux-xtensa-low.c (the_low_target): Adjust.
10842 2012-03-26 Pedro Alves <palves@redhat.com>
10844 * server.c (handle_qxfer_libraries): Don't bail early if
10845 the_target->qxfer_libraries_svr4 is not NULL.
10847 2012-03-26 Pedro Alves <palves@redhat.com>
10849 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10851 2012-03-23 Pedro Alves <palves@redhat.com>
10853 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10854 "library-list-svr4" element's start tag when the the DSO list is
10857 2012-03-23 Pedro Alves <palves@redhat.com>
10859 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10860 a variable whose type size is the same as the inferior's pointer
10863 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10865 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10867 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10868 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10869 * linux-low.h: Include <signal.h>.
10870 (struct siginfo): Remove forward declaration.
10871 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10874 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10876 * .gitignore: Ignore more files.
10878 2012-03-19 Pedro Alves <palves@redhat.com>
10879 Jan Kratochvil <jan.kratochvil@redhat.com>
10881 * server.c (cont_thread, general_thread): Add describing comments.
10882 (start_inferior): Clear `cont_thread'.
10883 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10886 2012-03-15 Yao Qi <yao@codesourcery.com>
10888 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10890 (cmd_qtdp): ... here.
10892 2012-03-15 Yao Qi <yao@codesourcery.com>
10894 * tracepoint.c (struct tracepoint_action_ops): New.
10895 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10896 (m_tracepoint_action_download): New.
10897 (r_tracepoint_action_download): New.
10898 (x_tracepoint_action_download): New.
10899 (l_tracepoint_action_download): New.
10900 (add_tracepoint_action): Install `action->ops' according type.
10901 (download_tracepoint_1): Move code `download' function pointer
10902 of various tracepoint_action_ops.
10904 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10906 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10907 linux_ptrace_attach_warnings.
10909 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10911 * Makefile.in (linux-ptrace.o): New.
10912 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10913 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10914 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10915 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10916 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10918 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10920 2012-03-08 Yao Qi <yao@codesourcery.com>
10921 Pedro Alves <palves@redhat.com>
10923 Fix PR server/13392.
10924 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10925 offset of JMP insn.
10926 * tracepoint.c (remove_tracepoint): New.
10927 (cmd_qtdp): Call remove_tracepoint when failed to install.
10929 2012-03-07 Pedro Alves <palves@redhat.com>
10931 * linux-low.c (get_detach_signal): New.
10932 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10933 Pass on pending signals to PTRACE_DETACH. Check the result of the
10935 * server.c (program_signals, program_signals_p): New.
10936 (handle_general_set): Handle QProgramSignals.
10937 * server.h (program_signals, program_signals_p): Declare.
10939 2012-03-05 Pedro Alves <palves@redhat.com>
10940 Jan Kratochvil <jan.kratochvil@redhat.com>
10942 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10945 2012-03-03 Yao Qi <yao@codesourcery.com>
10947 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10948 agent_look_up_symbols.
10950 2012-03-03 Yao Qi <yao@codesourcery.com>
10952 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10953 (linux-x86-low.o): Likewise.
10954 * server.h: Remove in_process_agent_loaded.
10955 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10959 2012-03-03 Yao Qi <yao@codesourcery.com>
10961 * tracepoint.c (gdb_agent_capability): New global.
10962 (in_process_agent_loaded_ust): Renamed to
10963 `in_process_agent_supports_ust'.
10965 (in_process_agent_supports_ust): Call agent_capability_check.
10966 (clear_installed_tracepoints): Assert that agent supports
10969 2012-03-03 Yao Qi <yao@codesourcery.com>
10971 * linux-low.c (linux_supports_agent): New.
10972 (linux_target_ops): Initialize field `supports_agent' with
10973 linux_supports_agent.
10974 * target.h (struct target_ops) <supports_agent>: New.
10975 (target_supports_agent): New macro.
10976 * server.c (handle_general_set): Handle packet 'QAgent'.
10977 (handle_query): Send `QAgent+'.
10978 * Makefile.in (server.o): Depends on agent.h.
10980 2012-03-03 Yao Qi <yao@codesourcery.com>
10982 * Makefile.in (OBS): Add agent.o.
10983 Add new rule for agent.o.
10984 Track dependence of tracepoint.c on agent.h.
10985 * tracepoint.c (run_inferior_command_1):
10986 (run_inferior_command): Call agent_run_command.
10987 (gdb_ust_connect_sync_socket): Deleted. Move it to
10989 (resume_thread, stop_thread): Likewise.
10990 (gdb_ust_socket_init): Renamed to ...
10991 (gdb_agent_socket_init): ... New.
10992 (gdb_ust_thread): Renamed to ...
10993 (gdb_agent_helper_thread): ... New.
10994 (gdb_ust_init): Move some code to ...
10995 (gdb_agent_init): ... here. New.
10996 [HAVE_UST]: Call gdb_ust_init.
10997 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10998 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10999 * config.in, configure: Regenerated.
11001 2012-03-02 Pedro Alves <palves@redhat.com>
11003 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11004 * linux-low.c (struct simple_pid_list): New.
11005 (stopped_pids): New a struct simple_pid_list pointer.
11006 (add_to_pid_list, pull_pid_from_list): New.
11007 (handle_extended_wait): Don't assume the first signal new children
11008 report is SIGSTOP. Adjust call to pull_pid_from_list.
11009 (linux_wait_for_lwp): Adjust.
11011 2012-03-02 Yao Qi <yao@codesourcery.com>
11013 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11016 2012-03-02 Yao Qi <yao@codesourcery.com>
11018 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11019 `stop_pc' and `tpoint'. Update caller.
11021 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11023 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11024 * linux-low.c (use_linux_regsets): New macro.
11025 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11026 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11027 (linux_register_in_regsets): New function.
11028 (usr_fetch_inferior_registers): Skip registers covered by
11030 (usr_store_inferior_registers): Likewise.
11031 (usr_fetch_inferior_registers): New macro.
11032 (usr_store_inferior_registers): Likewise.
11033 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11034 (linux_store_registers): Likewise.
11035 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11037 (init_registers_mips64_dsp_linux): Likewise.
11038 (init_registers_mips_linux): New macro.
11039 (init_registers_mips_dsp_linux): Likewise.
11040 (mips_dsp_num_regs): Likewise.
11041 (DSP_BASE, DSP_CONTROL): New fallback macros.
11042 (mips_base_regs): New macro.
11043 (mips_regmap): Use it. Fix the size.
11044 (mips_dsp_regmap): New variable.
11045 (mips_dsp_regset_bitmap): Likewise.
11046 (mips_arch_setup): New function.
11047 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11049 (mips_cannot_store_register): Likewise.
11050 (the_low_target): Update .arch_setup, .num_regs and .regmap
11051 initializers. Add .regset_bitmap initializer.
11052 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11054 * linux-bfin-low.c (the_low_target): Likewise.
11055 * linux-cris-low.c (the_low_target): Likewise.
11056 * linux-crisv32-low.c (the_low_target): Likewise.
11057 * linux-ia64-low.c (the_low_target): Likewise.
11058 * linux-m32r-low.c (the_low_target): Likewise.
11059 * linux-m68k-low.c (the_low_target): Likewise.
11060 * linux-ppc-low.c (the_low_target): Likewise.
11061 * linux-s390-low.c (the_low_target): Likewise.
11062 * linux-sh-low.c (the_low_target): Likewise.
11063 * linux-sparc-low.c (the_low_target): Likewise.
11064 * linux-tic6x-low.c (the_low_target): Likewise.
11065 * linux-x86-low.c (the_low_target): Likewise.
11066 * linux-xtensa-low.c (the_low_target): Likewise.
11067 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11068 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11069 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11071 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11072 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11074 2012-02-29 Yao Qi <yao@codesourcery.com>
11075 Pedro Alves <palves@redhat.com>
11077 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11078 `step_over_finished' is true.
11080 2012-02-27 Pedro Alves <palves@redhat.com>
11082 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11083 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11085 2012-02-27 Pedro Alves <palves@redhat.com>
11088 * linux-low.c (pid_is_stopped): New.
11089 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11091 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11093 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11096 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11098 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11100 2012-02-24 Luis Machado <lgustavo@codesourcery>
11102 * server.c (handle_query): Advertise support for target-side
11103 breakpoint condition evaluation.
11104 (process_point_options): New function.
11105 (process_serial_event): When inserting a breakpoint, check for
11106 a target-side condition that should be evaluated.
11108 * mem-break.c: Include regcache.h and ax.h.
11109 (point_cond_list_t): New data structure.
11110 (breakpoint) <cond_list>: New field.
11111 (find_gdb_breakpoint_at): Make non-static.
11112 (delete_gdb_breakpoint_at): Clear any target-side
11114 (clear_gdb_breakpoint_conditions): New function.
11115 (add_condition_to_breakpoint): Likewise.
11116 (add_breakpoint_condition): Likewise.
11117 (gdb_condition_true_at_breakpoint): Likewise.
11118 (gdb_breakpoint_here): Return result directly instead
11119 of going through a local variable.
11121 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11122 (clear_gdb_breakpoint_conditions): Likewise.
11123 (add_breakpoint_condition): Likewise.
11124 (gdb_condition_true_at_breakpoint): Likewise.
11126 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11127 (need_step_over_p): Take target-side breakpoint condition into
11130 2012-02-24 Luis Machado <lgustavo@codesourcery>
11132 * server.h: Include tracepoint.h.
11133 (agent_mem_read, agent_get_trace_state_variable_value,
11134 agent_set_trace_state_variable_value,
11135 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11136 get_set_tsv_func_addr): New prototypes.
11138 * ax.h: New include file.
11139 * ax.c: New source file.
11141 * tracepoint.c: Include ax.h.
11142 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11143 agent_expr, eval_result_type): Move to ax.h.
11144 (parse_agent_expr): Rename to ...
11145 (gdb_parse_agent_expr): ... this, make it non-static and move
11147 (unparse_agent_expr) Rename to ...
11148 (gdb_unparse_agent_expr): ... this, make it non-static and move
11150 (eval_agent_expr): Rename to ...
11151 (eval_tracepoint_agent_expr): ... this.
11152 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11153 forward declarations.
11154 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11155 (agent_get_trace_state_variable_value): New function.
11156 (agent_set_trace_state_variable_value): New function.
11157 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11158 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11159 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11160 (condition_true_at_tracepoint): Likewise.
11161 (parse_agent_expr): Rename to ...
11162 (gdb_parse_agent_expr): ... this and move to ax.c.
11163 (unparse_agent_expr): Rename to ...
11164 (gdb_unparse_agent_expr): ... this and move to ax.c.
11165 (gdb_agent_op_name): Move to ax.c.
11166 (eval_agent_expr): Rename to ...
11167 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11169 (eval_tracepoint_agent_expr): New function.
11170 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11172 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11174 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11175 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11176 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11177 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11178 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11179 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11180 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11181 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11182 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11183 (compile_bytecodes): Remove forward declaration.
11184 (is_goto_target): Move to ax.c.
11185 (compile_bytecodes): Move to ax.c and call
11186 agent_get_trace_state_variable_value (...) and
11187 agent_set_trace_state_variable_value (...).
11189 * Makefile.in: Update ax.c and IPA dependencies.
11191 2012-02-24 Pedro Alves <palves@redhat.com>
11193 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11194 (cmd_bigqtbuffer_circular): ... this. Only handle
11195 'QTBuffer:circular:'.
11196 (handle_tracepoint_general_set): Adjust.
11198 2012-02-16 Yao Qi <yao@codesourcery.com>
11200 * inferiors.c: Move code to ...
11201 * dll.c: .... here. New.
11202 * server.h: Declare clear_dlls.
11203 * Makefile.in (SFILES): Add dll.c.
11207 2012-02-11 Yao Qi <yao@codesourcery.com>
11209 * server.c: (handle_monitor_command): Add a new parameter
11211 (handle_query): Update caller.
11213 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11215 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11216 * configure, config.in: Regenerate.
11217 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11220 2012-02-02 Pedro Alves <palves@redhat.com>
11222 Try SIGKILL first, then PTRACE_KILL.
11223 * linux-low.c (linux_kill_one_lwp): New.
11224 (linux_kill_one_lwp): Rename to ...
11225 (kill_one_lwp_callback): ... this. Use the new
11226 linux_kill_one_lwp.
11228 2012-02-02 Pedro Alves <palves@redhat.com>
11230 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11233 2012-01-27 Pedro Alves <palves@redhat.com>
11235 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11236 (elf_64_file_p): Make static.
11237 (linux_pid_exe_is_elf_64_file): New.
11238 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11239 Delete declarations.
11240 (linux_pid_exe_is_elf_64_file): Declare.
11241 * linux-x86-low.c (x86_arch_setup): Use
11242 linux_pid_exe_is_elf_64_file.
11244 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11246 * linux-low.c (linux_wait_for_event_1): Rename to ...
11247 (linux_wait_for_event): ... here and merge it with former
11248 linux_wait_for_event - new variable wait_ptid, use it.
11249 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11251 2012-01-23 Pedro Alves <palves@redhat.com>
11253 * server.c (main): Avoid yet another case of infinite loop while
11254 detaching/killing after a longjmp.
11256 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11259 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11261 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11263 * hostio.c (handle_readlink): New function.
11264 (handle_vFile): Call it to handle "vFile:readlink" packets.
11266 2012-01-20 Pedro Alves <palves@redhat.com>
11267 Ulrich Weigand <ulrich.weigand@linaro.org>
11269 * server.c (handle_v_requests): Only support vAttach and vRun to
11270 start multiple processes when in extended protocol mode.
11272 2012-01-17 Pedro Alves <palves@redhat.com>
11274 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11275 memalign plus mprotect to allocate the scratch buffer.
11277 2012-01-13 Pedro Alves <palves@redhat.com>
11279 * server.c (attach_inferior): Clear `cont_thread'.
11281 2012-01-13 Pedro Alves <palves@redhat.com>
11283 * server.c (main): Avoid infinite loop while detaching/killing
11286 2012-01-09 Doug Evans <dje@google.com>
11288 * server.c (start_inferior): Set last_ptid in --wrapper case.
11290 2012-01-06 Yao Qi <yao@codesourcery.com>
11292 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11294 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11296 2012-01-04 Yao Qi <yao@codesourcery.com>
11298 * tracepoint.c (cmd_qtdp): Print debug message
11299 for static tracepoint.
11301 2012-01-04 Yao Qi <yao@codesourcery.com>
11303 * tracepoint.c (trace_vdebug): Differentiate debug message
11304 between gdbserver and IPA.
11306 2012-01-03 Yao Qi <yao@codesourcery.com>
11308 * tracepoint.c (tracepoint_was_hit): Don't collect for
11311 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11313 * terminal.h: Reformat copyright header.
11315 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11317 * server.c (gdbserver_version): Update copyright year.
11318 * gdbreplay.c (gdbreplay_version): Likewise.
11320 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11322 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11325 2011-12-18 Hui Zhu <teawater@gmail.com>
11326 * linux-low.c (linux_create_inferior): Save return value to ret.
11328 2011-12-18 Hui Zhu <teawater@gmail.com>
11330 * linux-low.c (linux_create_inferior): Save return value to ret.
11332 2011-12-16 Doug Evans <dje@google.com>
11334 * linux-low.c (linux_create_inferior): If stdio connection,
11335 redirect stdin from /dev/null, stdout to stderr.
11336 * remote-utils.c (remote_is_stdio): New static global.
11337 (remote_connection_is_stdio): New function.
11338 (remote_prepare): Handle stdio connection.
11339 (remote_open): Ditto.
11340 (remote_close): Don't close stdin for stdio connections.
11341 (read_prim,write_prim): New functions. Replace all calls to
11342 read/write to these.
11343 * server.c (main): Watch for "-" argument. Move call to
11344 remote_prepare before start_inferior.
11345 * server.h (STDIO_CONNECTION_NAME): New macro.
11346 (remote_connection_is_stdio): Declare.
11348 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11349 in debugging output.
11351 2011-12-15 Yao Qi <yao@codesourcery.com>
11353 * tracepoint.c: Include sys/syscall.h.
11354 (gdb_ust_thread): Remove preprocessor conditional.
11356 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11358 * linux-low.c (linux_detach_one_lwp): Call
11359 the_low_target.prepare_to_resume before detaching.
11361 2011-12-14 Yao Qi <yao@codesourcery.com>
11363 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11366 2011-12-14 Yao Qi <yao@codesourcery.com>
11368 * i386-low.c (i386_low_stopped_data_address): Initialize local
11369 variable `control'.
11371 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11375 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11376 DR_CONTROL unless necessary. Extend comments.
11377 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11378 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11380 2011-12-13 Yao Qi <yao@codesourcery.com>
11382 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11384 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11386 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11388 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11389 Print new debug message for such case.
11391 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11393 Fix overlapping memcpy.
11394 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11395 the read_inferior_memory transfer.
11396 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11397 write_inferior_memory transfer.
11398 (set_fast_tracepoint_jump): New variable buf. Use it for the
11399 read_inferior_memory and write_inferior_memory transfers.
11400 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11401 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11402 Use it for the write_inferior_memory transfer.
11403 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11406 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11408 * linux-low.c (fetch_register, store_register): Make code
11409 consistent, fix formatting.
11411 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11413 * linux-low.c (usr_store_inferior_registers): Factor out code
11414 to handle individual registers into...
11415 (store_register): ... this new function.
11417 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11419 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11420 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11421 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11422 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11423 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11424 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11425 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11426 (srv_xmlfiles): Add new XML files.
11428 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11430 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11431 (init_registers_s390_linux32v1): Add prototype.
11432 (init_registers_s390_linux32v2): Likewise.
11433 (init_registers_s390_linux64v1): Likewise.
11434 (init_registers_s390_linux64v2): Likewise.
11435 (init_registers_s390x_linux64v1): Likewise.
11436 (init_registers_s390x_linux64v2): Likewise.
11437 (s390_num_regs): Increment to 52.
11438 (s390_regmap): Add orig_r2 register.
11439 (s390_num_regs_3264): Increment to 68.
11440 (s390_regmap_3264): Add orig_r2 register.
11441 (s390_collect_ptrace_register): Handle orig_r2 register.
11442 (s390_supply_ptrace_register): Likewise.
11443 (s390_fill_last_break): New function.
11444 (s390_store_last_break): Likewise.
11445 (s390_fill_system_call): New function.
11446 (s390_store_system_call): Likewise.
11447 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11449 (s390_check_regset): New function.
11450 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11451 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11452 Update target_regsets for available register sets.
11454 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11455 Jan Kratochvil <jan.kratochvil@redhat.com>
11457 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11458 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11460 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11461 * linux-low.h (struct process_info_private): New member r_debug.
11462 * server.c (handle_qxfer_libraries): Call
11463 the_target->qxfer_libraries_svr4.
11464 (handle_qxfer_libraries_svr4): New function.
11465 (qxfer_packets): New entry "libraries-svr4".
11466 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11467 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11468 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11469 PACKET_qXfer_libraries_svr4.
11471 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11473 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11474 PSW address/mask between 8-byte and 16-byte formats.
11475 (s390_supply_ptrace_register): Likewise.
11476 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11477 basic addressing mode bit.
11479 2011-11-24 Stan Shebs <stan@codesourcery.com>
11481 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11483 2011-11-17 Stan Shebs <stan@codesourcery.com>
11485 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11486 (tracing_start_time): New global.
11487 (tracing_stop_time): New global.
11488 (tracing_user_name): New global.
11489 (tracing_notes): New global.
11490 (tracing_stop_note): New global.
11491 (cmd_qtstart): Set traceframe_usage, start_time.
11492 (stop_tracing): Set stop_time.
11493 (cmd_qtstatus): Report additional status.
11494 (cmd_qtp): New function.
11495 (handle_tracepoint_query): Call it.
11496 (cmd_qtnotes): New function.
11497 (handle_tracepoint_general_set): Call it.
11498 (get_timestamp): Rename from tsv_get_timestamp.
11500 2011-11-14 Stan Shebs <stan@codesourcery.com>
11501 Kwok Cheung Yeung <kcy@codesourcery.com>
11503 * linux-x86-low.c (small_jump_insn): New.
11504 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11505 trampoline and error message, build a trampoline and issue a small
11506 jump instruction to it.
11507 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11508 trampoline and error message.
11509 (x86_get_min_fast_tracepoint_insn_len): New.
11510 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11511 * linux-low.h (struct linux_target_ops): Add arguments to
11512 install_fast_tracepoint_jump_pad operation, add new operation.
11513 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11515 (linux_get_min_fast_tracepoint_insn_len): New function.
11516 (linux_target_op): Add new operation.
11517 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11518 (gdb_trampoline_buffer_end): Ditto.
11519 (gdb_trampoline_buffer_error): Ditto.
11520 (struct ipa_sym_addresses): Add fields for new IPA variables.
11521 (symbol_list): Add entries for new IPA variables.
11522 (struct tracepoint): Add fields to hold the address range of the
11523 trampoline used by the tracepoint.
11524 (trampoline_buffer_head): New static variable.
11525 (trampoline_buffer_tail): Ditto.
11526 (claim_trampoline_space): New function.
11527 (have_fast_tracepoint_trampoline_buffer): New function.
11528 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11530 (install_fast_tracepoint): Ditto, also add error buffer argument.
11531 (cmd_qtminftpilen): New function.
11532 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11533 (fast_tracepoint_from_trampoline_address): New function.
11534 (fast_tracepoint_collecting): Handle trampoline as part of jump
11536 (set_trampoline_buffer_space): New function.
11537 (initialize_tracepoint): Initialize new IPA variables.
11538 * target.h (struct target_ops): Add arguments to
11539 install_fast_tracepoint_jump_pad operation, add new
11540 get_min_fast_tracepoint_insn_len operation.
11541 (target_get_min_fast_tracepoint_insn_len): New.
11542 (install_fast_tracepoint_jump_pad): Add arguments.
11543 * server.h (IPA_BUFSIZ): Define.
11544 * linux-i386-ipa.c: Include extra header files.
11545 (initialize_fast_tracepoint_trampoline_buffer): New function.
11546 (initialize_low_tracepoint): Call it.
11547 * server.h (set_trampoline_buffer_space): Declare.
11548 (claim_trampoline_space): Ditto.
11549 (have_fast_tracepoint_trampoline_buffer): Ditto.
11551 2011-11-14 Yao Qi <yao@codesourcery.com>
11553 * server.c (handle_query): Handle InstallInTrace for qSupported.
11554 * tracepoint.c (add_tracepoint): Sort list.
11555 (install_tracepoint, download_tracepoint): New.
11556 (cmd_qtdp): Call them to install and download tracepoints.
11557 (sort_tracepoints): Removed.
11558 (cmd_qtstart): Update.
11560 2011-11-14 Yao Qi <yao@codesourcery.com>
11562 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11563 * mem-break.h: Declare.
11564 * tracepoint.c (cmd_qtstart): Move some code to ...
11565 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11567 (download_tracepoints): Move some code to ...
11568 (download_tracepoint_1): ... here. New.
11570 2011-11-08 Yao Qi <yao@codesourcery.com>
11572 * remote-utils.c (relocate_instruction): A comment fix.
11574 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11576 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11577 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11578 dr_status_mirror and dr_control_mirror from debug_reg_state.
11579 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11580 (i386_initial_stuff): Remove use of deleted globals.
11581 (i386_get_thread_context, i386_set_thread_context,
11582 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11583 from debug_reg_state.
11585 2011-11-05 Yao Qi <yao@codesourcery.com>
11587 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11588 address as TPOINT's.
11590 2011-11-02 Stan Shebs <stan@codesourcery.com>
11592 * tracepoint.c (agent_mem_read_string): New function.
11593 (eval_agent_expr): Call it for tracenz.
11594 * server.c (handle_query): Report support for tracenz.
11596 2011-11-02 Yao Qi <yao@codesourcery.com>
11598 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11600 2011-11-02 Yao Qi <yao@codesourcery.com>
11602 * target.h: Fix a typo in comment.
11604 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11606 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11607 clobber the breakpoints' shadows with fast tracepoint jumps.
11608 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11609 * target.c (write_inferior_memory): Also pass MYADDR down to
11612 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11614 * configure.ac: Check support for personality routine.
11615 * configure: Regenerate.
11616 * config.in: Likewise.
11617 * linux-low.c: Include <sys/personality.h>.
11618 Define ADDR_NO_RANDOMIZE if necessary.
11619 (linux_create_inferior): Disable address space randomization when
11620 forking inferior, if requested.
11621 (linux_supports_disable_randomization): New function.
11622 (linux_target_ops): Install it.
11623 * server.h (disable_randomization): Declare.
11624 * server.c (disable_randomization): New global variable.
11625 (handle_general_set): Handle QDisableRandomization.
11626 (handle_query): Likewise for qSupported.
11627 (main): Support --disable-randomization and --no-disable-randomization
11628 command line arguments.
11629 * target.h (struct target_ops): Add supports_disable_randomization.
11630 (target_supports_disable_randomization): New macro.
11632 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11634 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11636 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11637 [!PT_GETDSBT] (target_loadmap): New definition.
11638 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11639 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11640 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11641 and PT_GETDSBT to LINUX_LOADMAP.
11642 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11643 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11645 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11647 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11648 (arm_linux_hwbp_cap): New static variable.
11649 (arm_linux_get_hwbp_cap): Replace by ...
11650 (arm_linux_init_hwbp_cap): ... this new function.
11651 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11652 (arm_linux_get_hw_watchpoint_count): Likewise.
11653 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11654 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11655 (arm_prepare_to_resume): Use perror_with_name instead of error.
11657 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11659 * linux-arm-low.c: Include <signal.h>.
11660 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11661 (struct arm_linux_hwbp_cap): New data type.
11662 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11663 (struct arm_linux_hw_breakpoint): New data type.
11664 (MAX_BPTS, MAX_WPTS): Define.
11665 (struct arch_process_info, struct arch_lwp_info): New data types.
11666 (arm_linux_get_hwbp_cap): New function.
11667 (arm_linux_get_hw_breakpoint_count): Likewise.
11668 (arm_linux_get_hw_watchpoint_count): Likewise.
11669 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11670 (arm_hwbp_control_initialize): Likewise.
11671 (arm_hwbp_control_is_enabled): Likewise.
11672 (arm_hwbp_control_is_initialized): Likewise.
11673 (arm_hwbp_control_disable): Likewise.
11674 (arm_linux_hw_breakpoint_equal): Likewise.
11675 (arm_linux_hw_point_initialize): Likewise.
11676 (struct update_registers_data): New data structure.
11677 (update_registers_callback: New function.
11678 (arm_insert_point): Likewise.
11679 (arm_remove_point): Likewise.
11680 (arm_stopped_by_watchpoint): Likewise.
11681 (arm_stopped_data_address): Likewise.
11682 (arm_new_process): Likewise.
11683 (arm_new_thread): Likewise.
11684 (arm_prepare_to_resume): Likewise.
11685 (the_low_target): Register arm_insert_point, arm_remove_point,
11686 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11687 arm_new_thread, and arm_prepare_to_resume.
11689 2011-09-15 Stan Shebs <stan@codesourcery.com>
11691 * server.h (struct emit_ops): Add compare-goto fields.
11692 * tracepoint.c (gdb_agent_op_sizes): New table.
11693 (emit_eq_goto): New function.
11694 (emit_ne_goto): New function.
11695 (emit_lt_goto): New function.
11696 (emit_le_goto): New function.
11697 (emit_gt_goto): New function.
11698 (emit_ge_goto): New function.
11699 (is_goto_target): New function.
11700 (compile_bytecodes): Recognize special cases of compare-goto
11701 combinations and call specialized emitters for them.
11702 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11703 (amd64_emit_ne_goto): New function.
11704 (amd64_emit_lt_goto): New function.
11705 (amd64_emit_le_goto): New function.
11706 (amd64_emit_gt_goto): New function.
11707 (amd64_emit_ge_goto): New function.
11708 (amd64_emit_ops): Add the new functions.
11709 (i386_emit_eq_goto): New function.
11710 (i386_emit_ne_goto): New function.
11711 (i386_emit_lt_goto): New function.
11712 (i386_emit_le_goto): New function.
11713 (i386_emit_gt_goto): New function.
11714 (i386_emit_ge_goto): New function.
11715 (i386_emit_ops): Add the new functions.
11717 2011-09-08 Stan Shebs <stan@codesourcery.com>
11719 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11720 (i386_emit_epilogue): Restore %ebx.
11722 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11724 * server.c (step_thread): Remove definition.
11725 (process_serial_event): Don't handle Hs.
11726 * server.h (step_thread): Remove declaration.
11727 * target.c (set_desired_inferior): Remove use of step_thread.
11729 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11731 * linux-low.c: Include linux-procfs.h.
11732 (linux_attach_lwp_1): Update comments.
11733 (linux_attach): Scan for existing threads when attaching to a
11734 process that is the tgid.
11735 * Makefile.in: Update dependencies.
11737 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11739 * configure.srv: Add linux-procfs.o dependencies.
11741 2011-08-14 Yao Qi <yao@codesourcery.com>
11743 * target.h (struct target_ops): Fix indent.
11744 * win32-low.c (win32_target_ops): Fix comment.
11746 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11747 Yao Qi <yao@codesourcery.com>
11749 * Makefile.in (clean): Remove tic6x-*.c files.
11750 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11751 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11752 (tic6x-c64xp-linux.c): Likewise.
11753 * configure.srv: Add support for tic6x-*-uclinux.
11754 * linux-tic6x-low.c: New.
11755 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11757 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11758 Yao Qi <yao@codesourcery.com>
11760 * target.h (struct target_ops): Add read_loadmap.
11761 * linux-low.c (struct target_loadseg): New type.
11762 (struct target_loadmap): New type.
11763 (linux_read_loadmap): New function.
11764 (linux_target_ops): Add linux_read_loadmap.
11765 * server.c (handle_query): Support qXfer:fdpic:read packet.
11766 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11769 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11771 * win32-low.c: Include <stdint.h>.
11773 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11775 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11776 to the inferior here.
11777 (i386_remove_aligned_watchpoint): Ditto.
11778 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11779 fit part of the watchpoint in the debug registers.
11780 (i386_update_inferior_debug_regs): New.
11781 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11782 registers, and only update the inferior on success.
11783 (i386_low_remove_watchpoint): Ditto.
11785 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11787 * linux-low.c (compare_ints, unique, list_threads, show_process,
11788 linux_core_of_thread): Delete.
11789 (linux_target_ops): Change linux_core_of_thread to
11790 linux_common_core_of_thread.
11791 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11792 * utils.c (malloc_failure): Change type of argument.
11793 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11794 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11795 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11796 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11797 (IPA_OBJS): Add common-utils-ipa.o.
11798 (ptid_h, linux_osdata_h): New macros.
11799 (server_h): Add common/common-utils.h, common/xml-utils.h,
11800 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11802 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11803 ptid.o, buffer.o): New rules.
11804 (linux-low.o): Add common/linux-osdata.h as a dependency.
11805 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11806 * configure.ac: Add AC_HEADER_DIRENT check.
11807 * config.in: Regenerate.
11808 * configure: Regenerate.
11809 * remote-utils.c (xml_escape_text): Delete.
11810 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11811 buffer_xml_printf): Move to common/buffer.c.
11812 * server.c (main): Remove call to initialize_inferiors.
11813 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11814 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11815 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11816 internal_error, gdb_assert, gdb_assert_fail): Delete.
11817 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11818 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11820 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11821 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11822 initialize_inferiors): Delete.
11824 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11826 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11829 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11831 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11833 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11835 2011-05-26 Yao Qi <yao@codesourcery.com>
11837 * Makefile.in (thread-db.o): Track dependence to
11838 common/gdb_thread_db.h.
11839 * thread-db.c: include gdb_thread_db.h from right place.
11841 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11843 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11844 __FILE__ and __LINE__ to internal_error.
11846 2011-05-13 Doug Evans <dje@google.com>
11848 * thread-db.c (try_thread_db_load_from_sdir): New function.
11849 (try_thread_db_load_from_dir): New function.
11850 (thread_db_load_search): Handle $sdir, ignore $pdir.
11851 Remove trying of system directories if search of
11852 libthread-db-search-path fails, that is now done via $sdir.
11854 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11856 * server.c (handle_query): Add EnableDisableTracepoints to the list
11857 of supported features.
11858 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11860 (cmd_qtenable_disable): New.
11861 (cmd_qtstart): Install tracepoints even if disabled.
11862 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11863 receiving a QTEnable or QTDisable packet.
11864 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11865 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11867 (gdb_probe): Skip data collection if static tracepoint is disabled.
11869 2011-05-10 Doug Evans <dje@google.com>
11871 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11873 2011-05-04 Doug Evans <dje@google.com>
11875 * linux-low.c (linux_join): Skip process lookup.
11876 * spu-low.c (spu_join): Ditto.
11877 * server.c (join_inferiors_callback): Delete.
11878 (process_serial_event): For 'D' packet (detach) call join_inferior
11881 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11883 * README: Don't mention xscale*-*-linux*.
11884 * configure.srv (xscale*-*-linux*): Don't handle target.
11886 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11888 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11890 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11891 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11892 (i386_emit_void_call_2): Likewise.
11894 2011-04-26 Yao Qi <yao@codesourcery.com>
11896 * linux-low.c: Move common macros to linux-ptrace.h.
11897 Include linux-ptrace.h.
11898 * Makefile.in (linux_ptrace_h): New.
11899 (linux-low.o): Depends on linux-ptrace.h.
11901 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11903 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11904 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11905 (remote_prepare): New function with most of the TCP code from ...
11906 (remote_open): ... here. Detect PORT here unconditionally. Move also
11907 setting transport_is_reliable.
11908 * server.c (run_once): New variable.
11909 (gdbserver_usage): Document it.
11910 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11911 the first run if RUN_ONCE.
11912 * server.h (run_once, remote_prepare): New declarations.
11914 2011-04-19 Tom Tromey <tromey@redhat.com>
11916 * win32-low.c (handle_load_dll): Remove duplicate "the".
11918 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11920 Remove support for old Cygwin 1.5 versions.
11921 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11922 function to avoid warning.
11923 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11926 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11928 * gdbserver/server.h (Macro _): Define it if not available.
11930 2011-03-14 Michael Snyder <msnyder@vmware.com>
11932 * hostio.c (handle_close): Remove unnecessary null test.
11934 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11936 * Makefile.in (maintainer-clean realclean distclean): Remove
11937 "make ... subdir_do" command.
11939 2011-03-10 Michael Snyder <msnyder@vmware.com>
11941 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11943 * server.c (handle_v_run): Free alloced buffer on early return.
11945 2011-03-09 Yao Qi <yao@codesourcery.com>
11948 2011-03-04 Yao Qi <yao@codesourcery.com>
11950 * Makefile.in: Remove GNU make feature --directory.
11952 2011-03-05 Yao Qi <yao@codesourcery.com>
11954 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11955 (subdir_do): New make target. Copied from gdb/Makefile.
11956 (maintainer-clean, realclean, distclean, clean): Call corresponding
11957 make targets in common/Makefile.
11959 2011-02-11 Yao Qi <yao@codesourcery.com>
11961 * configure.ac: Call AC_PROG_RANLIB.
11962 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11963 * configure: Regenerate.
11965 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11967 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11969 2011-03-06 Yao Qi <yao@codesourcery.com>
11971 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11973 2011-03-05 Yao Qi <yao@codesourcery.com>
11975 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11976 (subdir_do): New make target. Copied from gdb/Makefile.
11977 (maintainer-clean, realclean, distclean, clean): Call corresponding
11978 make targets in common/Makefile.
11980 2011-03-04 Yao Qi <yao@codesourcery.com>
11982 * Makefile.in: Remove GNU make feature --directory.
11984 2011-03-04 Michael Snyder <msnyder@vmware.com>
11986 * server.c (queue_stop_reply): Call xmalloc not malloc.
11988 2011-03-02 Michael Snyder <msnyder@vmware.com>
11990 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11992 2011-02-28 Michael Snyder <msnyder@vmware.com>
11994 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11995 (cmd_qtframe): Ditto.
11996 (cmd_qtbuffer): Ditto.
11997 (cmd_bigqtbuffer): Ditto.
11999 * utils.c (decimal2str): Initialize 'width' to nine, then
12000 don't mess with it.
12002 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12004 * hostio.c (require_data): Free *data, not data.
12006 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12008 * hostio.c (require_data): Use free, not xfree.
12010 2011-02-27 Michael Snyder <msnyder@vmware.com>
12012 * server.c (handle_query): Discard unused value.
12014 * hostio.c (require_data): Free malloc memory before returning
12017 2011-02-26 Michael Snyder <msnyder@vmware.com>
12019 * linux-low.c (list_threads): Call closedir for dirent.
12021 2011-02-27 Michael Snyder <msnyder@vmware.com>
12023 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12024 a case statement falls through.
12026 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12028 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12031 2011-02-26 Michael Snyder <msnyder@vmware.com>
12033 * utils.c (decimal2str): Eliminate dead code and dead param.
12034 (pulongest): Drop dead param from call to decimal2str.
12037 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12039 Revert the following patch (not approved yet):
12040 2011-02-21 Hui Zhu <teawater@gmail.com>
12041 * tracepoint.c (tp_printf): New function.
12042 (eval_agent_expr): Handle gdb_agent_op_printf.
12044 2011-02-21 Hui Zhu <teawater@gmail.com>
12046 * tracepoint.c (tp_printf): New function.
12047 (eval_agent_expr): Handle gdb_agent_op_printf.
12049 2011-02-18 Tom Tromey <tromey@redhat.com>
12051 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12052 (tracepoint.o): Likewise.
12053 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12054 (gdb_agent_op_names): Likewise.
12056 2011-02-18 Tom Tromey <tromey@redhat.com>
12058 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12059 gdb_agent_op_rot>: New constants.
12060 (gdb_agent_op_names): Add pick and roll.
12061 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12064 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12066 * aclocal.m4: Regenerated with aclocal-1.11.1.
12068 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12070 * server.c (handle_qxfer_traceframe_info): New.
12071 (qxfer_packets): Register "traceframe-info".
12072 (handle_query): Report support for qXfer:traceframe-info:read+.
12073 * tracepoint.c (match_blocktype): New.
12074 (traceframe_find_block_type): Rename to ...
12075 (traceframe_walk_blocks): ... this. Add callback filter argument,
12077 (traceframe_find_block_type): New, reimplemented on top of
12078 traceframe_walk_blocks.
12079 (build_traceframe_info_xml): New.
12080 (traceframe_read_info): New.
12081 * server.h (traceframe_read_info): Declare.
12083 2011-02-11 Yao Qi <yao@codesourcery.com>
12085 * configure.ac: Call AC_PROG_RANLIB.
12086 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12087 * configure: Regenerate.
12089 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12091 * server.c (gdb_read_memory): Change return semantics to allow
12093 (handle_search_memory_1): Adjust.
12094 (process_serial_event) <'m' packet>: Handle partial transfers.
12095 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12097 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12099 * regcache.c (init_register_cache): Initialize
12100 regcache->register_status.
12101 (free_register_cache): Release regcache->register_status.
12102 (regcache_cpy): Copy register_status.
12103 (registers_to_string): Print 'x's for unavailable registers.
12104 (supply_register): Mark the register's status valid or
12105 unavailable, depending on whether a buffer was passed in or not.
12106 (supply_register_zeroed): New.
12107 (supply_regblock): Mark the registers' status valid or
12108 unavailable, depending on whether a buffer was passed in or not.
12109 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12110 (struct regcache): New `register_status' field.
12111 (supply_register_zeroed): Declare.
12112 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12113 supply_register_zeroed, rather than passing a NULL buffer to
12115 * tracepoint.c (fetch_traceframe_registers): Update comment.
12117 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12119 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12122 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12124 * server.h (decode_xfer_write): Change prototype.
12125 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12126 and don't extract the annex here.
12127 * server.c (decode_xfer_read): Remove `annex' parameter,
12128 and don't extract the annex here.
12129 (decode_xfer): New.
12130 (struct qxfer): New.
12131 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12132 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12133 (handle_qxfer_statictrace): New functions, abstracted out from
12134 handle_query, and made to use the struct qxfer interface.
12135 (handle_threads_qxfer_proper): Rename to ...
12136 (handle_qxfer_threads_proper): ... this.
12137 (handle_threads_qxfer): Rename to ...
12138 (handle_qxfer_threads): ... this. Adjust.
12139 (qxfer_packets): New array.
12140 (handle_qxfer): New function.
12141 (handle_query): Use handle_qxfer.
12143 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12145 * gdbreplay.c: Shorten lines of >= 80 columns.
12146 * linux-low.c: Ditto.
12147 * linux-ppc-low.c: Ditto.
12148 * linux-s390-low.c: Ditto.
12149 * linux-sparc-low.c: Ditto.
12150 * linux-x86-low.c: Ditto.
12151 * linux-xtensa-low.c: Ditto.
12152 * mem-break.c: Ditto.
12153 * nto-low.c: Ditto.
12154 * regcache.h: Ditto.
12155 * remote-utils.c: Ditto.
12158 * thread-db.c: Ditto.
12159 * tracepoint.c: Ditto.
12161 * win32-low.h: Ditto.
12163 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12165 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12168 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12170 * server.c (gdbserver_version): Update copyright year in version
12172 * gdbreplay.c (gdbreplay_version): Ditto.
12174 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12176 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12177 * linux-bfin-low.c: New file.
12178 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12179 PT_DATA_ADDR for BFIN targets.
12180 * Makefile.in (SFILES): Add linux-bfin-low.c.
12181 (clean): Remove reg-bfin.c.
12182 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12183 * README: Mention supported Blackfin targets.
12185 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12187 * .gitignore: New file.
12189 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12191 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12193 2010-10-22 Jie Zhang <jie@codesourcery.com>
12195 * Makefile.in: Add FLAGS_TO_PASS variable.
12196 (install): Remove dependency of install-only and recursively
12197 invoke make for install-only.
12199 2010-10-04 Doug Evans <dje@google.com>
12201 * Makefile.in (uninstall): Use $(DESTDIR).
12203 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12207 * linux-x86-low.c (compat_siginfo_from_siginfo)
12208 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12209 si_code is < 0. Check for si_code == SI_TIMER before checking for
12212 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12214 * lynx-i386-low.c: New file.
12215 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12217 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12219 * lynx-low.c (ptrace_request_to_str): Remove handling for
12220 request values that have been removed in LynxOS 5.x.
12222 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12224 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12227 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12229 * configure.ac: Add --enable-inprocess-agent option.
12230 * configure: Rebuilt.
12232 2010-09-06 Yao Qi <yao@codesourcery.com>
12234 * linux-low.c (linux_kill): Remove unused variable.
12235 (linux_stabilize_threads): Likewise.
12236 * server.c (start_inferior): Likewise.
12237 (queue_stop_reply_callback): Likewise.
12238 * tracepoint.c (do_action_at_tracepoint): Likewise.
12240 2010-09-06 Yao Qi <yao@codesourcery.com>
12242 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12245 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12247 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12249 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12251 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12254 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12256 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12257 gdbserver/lynx-ppc-low.c: New files.
12258 * Makefile.in (lynx_low_h): New variable.
12259 (lynx-low.o, lynx-ppc-low.o): New rules.
12260 * configure.ac: On LynxOS, link with -lnetinet.
12261 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12262 * configure: regenerate.
12264 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12266 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12267 * configure.ac: Add check for vasprintf and vsnprintf.
12268 * configure, config.in: Regenerate.
12269 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12271 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12273 * gdbreplay.c: Move include of alloca.h up, next to include of
12275 * server.h: Add include of malloc.h.
12276 * mem-break.c: Remove include of malloc.h.
12277 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12279 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12281 * Makefile.in (memmem.o): Build with -Wno-error.
12283 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12285 * utils.c (xsnprintf): Make non-static.
12286 * server.h: Add xsnprintf declaration.
12287 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12288 replace calls to snprintf by calls to xsnprintf throughout.
12290 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12292 * configure.ac: Add configure check for alloca.
12293 * configure, config.in: Regenerate.
12294 * server.h: Include alloca.h if it exists.
12295 * gdbreplay.c: Include alloca.h if it exists.
12297 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12299 * linux-low.c (__SIGRTMIN): Define if not already defined.
12300 (linux_create_inferior): Check for __ANDROID__ rather than
12302 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12303 are already deferred.
12304 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12305 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12306 stopped and already has a pending signal to report.
12307 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12308 a pending signal to report or is moving out of a jump pad.
12309 (linux_init_signals): Check for __ANDROID__ rather than
12312 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12314 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12315 debug_threads check. Avoid a linear search when not doing debug
12318 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12320 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12321 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12322 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12323 (process_event): Change local fd's type to gdb_fildes_t.
12324 (create_file_handler): Adjust prototype.
12325 (delete_file_handler): Adjust prototype.
12326 (handle_file_event): Adjust prototype. Use pfildes.
12327 (create_file_event): Adjsut prototype.
12328 * remote-utils.c (remote_desc, listen_desc): Change type to
12330 * server.h: New gdb_fildes_t typedef.
12331 [USE_WIN32API]: Include winsock2.h.
12332 (delete_file_handler, add_file_handler): Adjust prototypes.
12333 (pfildes): Declare.
12334 * utils.c (pfildes): New.
12336 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12338 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12339 * configure: Regenerate.
12341 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12343 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12344 (linux_done_accessing_memory): ... this.
12345 (linux_target_ops): Adjust.
12346 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12347 * nto-low.c (nto_target_ops): Adjust comment.
12348 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12349 * spu-low.c (spu_target_ops): Adjust comment.
12350 * target.h (target_ops): Rename unprepare_to_access_memory field
12351 to done_accessing_memory.
12352 (unprepare_to_access_memory): Rename to ...
12353 (done_accessing_memory): ... this.
12355 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12357 * linux-low.c (linux_prepare_to_access_memory): New.
12358 (linux_unprepare_to_access_memory): New.
12359 (linux_target_ops): Install them.
12360 * server.c (read_memory): Rename to ...
12361 (gdb_read_memory): ... this. Use
12362 prepare_to_access_memory/prepare_to_access_memory.
12363 (write_memory): Rename to ...
12364 (gdb_write_memory): ... this. Use
12365 prepare_to_access_memory/prepare_to_access_memory.
12366 (handle_search_memory_1): Adjust.
12367 (process_serial_event): Adjust.
12368 * target.h (struct target_ops): New fields
12369 prepare_to_access_memory and unprepare_to_access_memory.
12370 (prepare_to_access_memory, unprepare_to_access_memory): New.
12371 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12372 prepare_to_access_memory/prepare_to_access_memory.
12373 * nto-low.c (nto_target_ops): Adjust.
12374 * spu-low.c (spu_target_ops): Adjust.
12375 * win32-low.c (win32_target_ops): Adjust.
12377 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12379 * Makefile.in (WARN_CFLAGS): Get it from configure.
12380 (WERROR_CFLAGS): New.
12381 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12382 * configure.ac: Introduce --enable-werror, which adds -Werror to
12383 the compiler command line. Enabled by default. Disable with
12384 --disable-werror. Add -Wdeclaration-after-statement
12385 Wpointer-arith and -Wformat-nonliteral to warning flags.
12386 * configure: Regenerate.
12388 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12390 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12392 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12394 * gdbreplay.c (remote_error): New.
12396 (expect): Use gdbchar. Check for error reading from GDB.
12397 Clarify sync error output.
12398 (play): Check for errors writing to GDB.
12399 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12400 * remote-utils.c (getpkt): Check for errors writing to the remote
12403 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12405 * linux-low.c (linux_wait_1): Move non-debugging code out of
12406 `debug_threads' control.
12408 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12410 * linux-low.c (linux_wait_1): Don't set last_status here.
12411 * server.c (push_event, queue_stop_reply_callback): Assert we're
12412 not pushing a TARGET_WAITKIND_IGNORE event.
12413 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12414 (myresume, handle_target_event): Set the thread's last_resume_kind
12415 and last_status from the target returned status.
12417 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12421 * linux-x86-low.c (update_debug_registers_callback): New.
12422 (i386_dr_low_set_addr): Use it.
12423 (i386_dr_low_get_addr): New.
12424 (i386_dr_low_set_control): Use update_debug_registers_callback.
12425 (i386_dr_low_get_control): New.
12426 (i386_dr_low_get_status): Adjust.
12427 * linux-low.c (linux_stop_lwp): New.
12428 * linux-low.h (linux_stop_lwp): Declare.
12430 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12431 argument instead of a i386_debug_reg_state.
12432 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12433 a i386_debug_reg_state.
12434 (i386_insert_aligned_watchpoint): Adjust.
12435 (i386_remove_aligned_watchpoint): Adjust.
12436 (i386_low_stopped_data_address): Read the debug registers from the
12437 inferior instead of from the mirrors.
12438 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12439 (i386_dr_low_get_addr): Declare.
12440 (i386_dr_low_get_control): Declare.
12441 (i386_dr_low_get_status): Change prototype.
12443 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12444 (i386_dr_low_get_addr): New.
12445 (i386_dr_low_get_control): New.
12446 (i386_dr_low_get_status): Adjust prototype. Return
12448 (i386_initial_stuff): Clear dr_status_mirror and
12450 (i386_get_thread_context): Adjust.
12451 (i386_set_thread_context): Adjust.
12452 (i386_thread_added): Adjust.
12454 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12456 * linux-low.h (linux_thread_area): Delete declaration.
12458 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12460 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12461 after its termination.
12463 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12465 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12466 (gdb_wants_all_stopped): Delete.
12467 (linux_wait_1): Don't call them.
12468 * server.c (handle_v_cont): Tag all threads as want-stopped.
12469 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12470 stopped as "client-wants-stopped".
12472 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12474 * Makefile.in (signals_h): New.
12475 (server_h): Depend on it.
12476 (server.o): Don't depend on $(signals_def).
12477 (signals.o): Depend on $(signals_def).
12479 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12481 * Makefile.in (signals_def): New.
12482 (server_h): Append include/gdb/signals.h and signals_def.
12483 (server.o): Append signals_def.
12485 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12487 * server.c (handle_target_event): Use target_signal_to_host for
12488 resume_info.sig initialization.
12489 * target.h (struct thread_resume) <sig>: New comment.
12491 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12493 * server.c (handle_query): strcpy() the returned string from paddress()
12494 instead of sprintf().
12495 * utils.c (paddress): Return phex_nz().
12497 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12499 * server.c (handle_v_cont): Call mourn_inferior if process
12501 (myresume): Likewise.
12503 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12505 Static tracepoints, and integration with UST.
12507 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12508 * mem-break.c (uninsert_all_breakpoints)
12509 (reinsert_all_breakpoints): New.
12510 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12511 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12512 (gdb_agent_ust_loaded, helper_thread_id)
12513 (gdb_agent_helper_thread_id): New macros.
12514 (struct ipa_sym_addresses): Add addr_ust_loaded,
12515 addr_helper_thread_id, addr_cmd_buf.
12516 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12517 (in_process_agent_loaded_ust): New.
12518 (write_e_ust_not_loaded): New.
12519 (maybe_write_ipa_ust_not_loaded): New.
12520 (struct collect_static_trace_data_action): New.
12521 (enum tracepoint_type) <static_tracepoint>: New.
12522 (struct tracepoint) <handle>: Mention static tracepoints.
12523 (struct static_tracepoint_ctx): New.
12524 (CMD_BUF_SIZE): New.
12525 (add_tracepoint_action): Handle static tracepoint actions.
12526 (unprobe_marker_at): New.
12527 (clear_installed_tracepoints): Handle static tracepoints.
12528 (cmd_qtdp): Handle static tracepoints.
12529 (probe_marker_at): New.
12530 (cmd_qtstart): Handle static tracepoints.
12531 (response_tracepoint): Handle static tracepoints.
12532 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12533 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12534 (get_context_regcache): Handle static tracepoints.
12535 (do_action_at_tracepoint): Handle static tracepoint actions.
12536 (traceframe_find_block_type): Handle static trace data blocks.
12537 (traceframe_read_sdata): New.
12538 (download_tracepoints): Download static tracepoint actions.
12539 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12540 (GDB_PROBE_NAME): New.
12542 (GET_UST_SYM): New.
12545 (ust_marker_to_static_tracepoint): New.
12547 (collect_ust_data_at_tracepoint): New.
12548 (gdb_ust_probe): New.
12549 (UNIX_PATH_MAX, SOCK_DIR): New.
12550 (gdb_ust_connect_sync_socket): New.
12551 (resume_thread, stop_thread): New.
12552 (run_inferior_command): New.
12553 (init_named_socket): New.
12554 (gdb_ust_socket_init): New.
12555 (cstr_to_hexstr): New.
12557 (first_marker, next_marker): New.
12558 (response_ust_marker): New.
12559 (cmd_qtfstm, cmd_qtsstm): New.
12560 (unprobe_marker_at, probe_marker_at): New.
12561 (cmd_qtstmat, gdb_ust_thread): New.
12562 (gdb_ust_init): New.
12563 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12564 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12565 (ST_REGENTRY): New.
12566 (x86_64_st_collect_regmap): New.
12567 (X86_64_NUM_ST_COLLECT_GREGS): New.
12568 (AMD64_RIP_REGNUM): New.
12569 (supply_static_tracepoint_registers): New.
12570 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12571 (ST_REGENTRY): New.
12572 (i386_st_collect_regmap): New.
12573 (i386_NUM_ST_COLLECT_GREGS): New.
12574 (supply_static_tracepoint_registers): New.
12575 * server.c (handle_query): Handle qXfer:statictrace:read.
12576 <qSupported>: Report support for StaticTracepoints, and
12577 qXfer:statictrace:read features.
12578 * server.h (traceframe_read_sdata)
12579 (supply_static_tracepoint_registers): Declare.
12580 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12581 (unpack_varlen_hex): Include in IPA build.
12582 * Makefile.in (ustlibs, ustinc): New.
12583 (IPA_OBJS): Add remote-utils-ipa.o.
12584 ($(IPA_LIB)): Link -ldl and -lpthread.
12586 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12587 * config.in, configure: Regenerate.
12589 2010-06-20 Ian Lance Taylor <iant@google.com>
12590 Pedro Alves <pedro@codesourcery.com>
12592 * linux-x86-low.c (always_true): Delete.
12593 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12594 trying to fool the compiler with always_true.
12596 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12598 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12599 conditions in gdbserver.
12601 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12603 * spu-low.c (spu_read_memory): Wrap around local store limit.
12604 (spu_write_memory): Likewise.
12606 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12608 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12609 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12611 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12613 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12614 uses with LONGEST uses.
12616 2010-06-14 Stan Shebs <stan@codesourcery.com>
12617 Pedro Alves <pedro@codesourcery.com>
12621 * linux-x86-low.c: Include limits.h.
12623 (always_true): New.
12626 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12627 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12628 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12629 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12630 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12631 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12632 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12633 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12634 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12635 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12636 (amd64_emit_void_call_2): New.
12637 (amd64_emit_ops): New.
12638 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12639 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12640 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12641 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12642 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12643 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12644 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12645 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12646 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12647 (i386_emit_stack_adjust, i386_emit_int_call_1)
12648 (i386_emit_void_call_2): New.
12649 (i386_emit_ops): New.
12650 (x86_emit_ops): New.
12651 (the_low_target): Install x86_emit_ops.
12652 * server.h (struct emit_ops): New.
12653 (get_raw_reg_func_addr): Declare.
12654 (current_insn_ptr, emit_error): Declare.
12655 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12656 (set_trace_state_variable_value): New defines.
12657 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12658 addr_get_trace_state_variable_value and
12659 addr_set_trace_state_variable_value.
12660 (symbol_list): New fields for get_raw_reg,
12661 get_trace_state_variable_value and set_trace_state_variable_value.
12662 (condfn): New typedef.
12663 (struct tracepoint): New field `compiled_cond'.
12664 (do_action_at_tracepoint): Clear compiled_cond.
12665 (get_trace_state_variable_value, set_trace_state_variable_value):
12667 (condition_true_at_tracepoint): If there's a compiled condition,
12669 (current_insn_ptr, emit_error): New globals.
12670 (struct bytecode_address): New.
12671 (get_raw_reg_func_addr): New.
12672 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12673 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12674 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12675 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12676 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12677 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12678 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12679 (compile_tracepoint_condition, compile_bytecodes): New.
12680 * target.h (emit_ops): Forward declare.
12681 (struct target_ops): New field emit_ops.
12682 (target_emit_ops): New.
12683 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12684 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12685 * linux-low.c (linux_emit_ops): New.
12686 (linux_target_ops): Install it.
12687 * linux-low.h (struct linux_target_ops): New field emit_ops.
12689 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12691 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12692 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12694 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12695 Stan Shebs <stan@codesourcery.com>
12697 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12698 (all): Depend on $(extra_libraries).
12699 (install-only): Install the IPA.
12700 (IPA_OBJS, IPA_LIB): New.
12701 (clean): Remove the IPA lib.
12702 (IPAGENT_CFLAGS): New.
12703 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12704 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12705 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12706 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12707 * configure.ac: Check for atomic builtins support in the compiler.
12708 (IPA_DEPFILES, extra_libraries): Define.
12709 * configure.srv (ipa_obj): Add description.
12710 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12711 (i[34567]86-*-linux*): Set ipa_obj.
12712 (x86_64-*-linux*): Set ipa_obj.
12713 * linux-low.c (stabilizing_threads): New.
12714 (supports_fast_tracepoints): New.
12715 (linux_detach): Stabilize threads before detaching.
12716 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12717 the lwp is either not stabilizing, or is moving out of a jump pad.
12718 (linux_fast_tracepoint_collecting): New.
12719 (maybe_move_out_of_jump_pad): New.
12720 (enqueue_one_deferred_signal): New.
12721 (dequeue_one_deferred_signal): New.
12722 (linux_wait_for_event_1): If moving out of a jump pad, defer
12723 pending signals to later.
12724 (linux_stabilize_threads): New.
12725 (linux_wait_1): Check if threads need moving out of jump pads, and
12727 (stuck_in_jump_pad_callback): New.
12728 (move_out_of_jump_pad_callback): New.
12729 (lwp_running): New.
12730 (linux_resume_one_lwp): Handle moving out of jump pads.
12731 (linux_set_resume_request): Dequeue deferred signals.
12732 (need_step_over_p): Also step over fast tracepoint jumps.
12733 (start_step_over): Also uninsert fast tracepoint jumps.
12734 (finish_step_over): Also reinsert fast tracepoint jumps.
12735 (linux_install_fast_tracepoint_jump): New.
12736 (linux_target_ops): Install linux_stabilize_threads and
12737 linux_install_fast_tracepoint_jump_pad.
12738 * linux-low.h (linux_target_ops) <get_thread_area,
12739 install_fast_tracepoint_jump_pad>: New fields.
12740 (struct lwp_info) <collecting_fast_tracepoint,
12741 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12742 (linux_get_thread_area): Declare.
12743 * linux-x86-low.c (jump_insn): New.
12744 (x86_get_thread_area): New.
12745 (append_insns): New.
12746 (push_opcode): New.
12747 (amd64_install_fast_tracepoint_jump_pad): New.
12748 (i386_install_fast_tracepoint_jump_pad): New.
12749 (x86_install_fast_tracepoint_jump_pad): New.
12750 (the_low_target): Install x86_get_thread_area and
12751 x86_install_fast_tracepoint_jump_pad.
12752 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12753 (struct fast_tracepoint_jump): New.
12754 (fast_tracepoint_jump_insn): New.
12755 (fast_tracepoint_jump_shadow): New.
12756 (find_fast_tracepoint_jump_at): New.
12757 (fast_tracepoint_jump_here): New.
12758 (delete_fast_tracepoint_jump): New.
12759 (set_fast_tracepoint_jump): New.
12760 (uninsert_fast_tracepoint_jumps_at): New.
12761 (reinsert_fast_tracepoint_jumps_at): New.
12762 (set_breakpoint_at): Use write_inferior_memory.
12763 (uninsert_raw_breakpoint): Use write_inferior_memory.
12764 (check_mem_read): Mask out fast tracepoint jumps.
12765 (check_mem_write): Mask out fast tracepoint jumps.
12766 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12767 (set_fast_tracepoint_jump): Declare.
12768 (delete_fast_tracepoint_jump)
12769 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12770 (reinsert_fast_tracepoint_jumps_at): Declare.
12771 * regcache.c: Don't compile many functions when building the
12772 in-process agent library.
12773 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12774 the register buffer in the heap.
12775 (free_register_cache): If the register buffer isn't owned by the
12776 regcache, don't free it.
12777 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12778 pre-existing register caches.
12779 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12781 (convert_ascii_to_int): : Constify `from' parameter type.
12782 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12783 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12784 the needed buffer in-place.
12785 (relocate_instruction): New.
12786 * server.c (handle_query) <qSymbols>: If the target supports
12787 tracepoints, give it a chance of looking up symbols. Report
12788 support for fast tracepoints.
12789 (handle_status): Stabilize threads.
12790 (process_serial_event): Adjust.
12791 * server.h (struct fast_tracepoint_jump): Forward declare.
12792 (struct process_info) <fast_tracepoint_jumps>: New field.
12793 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12794 (decode_X_packet, decode_M_packet): Adjust.
12795 (relocate_instruction): Declare.
12796 (in_process_agent_loaded): Declare.
12797 (tracepoint_look_up_symbols): Declare.
12798 (struct fast_tpoint_collect_status): Declare.
12799 (fast_tracepoint_collecting): Declare.
12800 (force_unlock_trace_buffer): Declare.
12801 (handle_tracepoint_bkpts): Declare.
12802 (initialize_low_tracepoint)
12803 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12804 * target.h (struct target_ops) <stabilize_threads,
12805 install_fast_tracepoint_jump_pad>: New fields.
12806 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12807 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12808 [HAVE_STDINT_H]: Include stdint.h.
12809 (trace_debug_1): Rename to ...
12810 (trace_vdebug): ... this.
12811 (trace_debug): Rename to ...
12812 (trace_debug_1): ... this. Add `level' parameter.
12813 (trace_debug): New.
12814 (ATTR_USED, ATTR_NOINLINE): New.
12815 (IP_AGENT_EXPORT): New.
12816 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12817 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12818 (about_to_request_buffer_space, trace_buffer_is_full)
12819 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12820 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12821 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12822 (traceframe_write_count, traceframes_created)
12823 (trace_state_variables)
12824 New renaming defines.
12825 (struct ipa_sym_addresses): New.
12826 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12827 (symbol_list): New.
12828 (ipa_sym_addrs): New.
12829 (all_tracepoint_symbols_looked_up): New.
12830 (in_process_agent_loaded): New.
12831 (write_e_ipa_not_loaded): New.
12832 (maybe_write_ipa_not_loaded): New.
12833 (tracepoint_look_up_symbols): New.
12834 (debug_threads) [IN_PROCESS_AGENT]: New.
12835 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12836 (UNKNOWN_SIDE_EFFECTS): New.
12837 (stop_tracing): New.
12838 (flush_trace_buffer): New.
12839 (stop_tracing_bkpt): New.
12840 (flush_trace_buffer_bkpt): New.
12841 (read_inferior_integer): New.
12842 (read_inferior_uinteger): New.
12843 (read_inferior_data_pointer): New.
12844 (write_inferior_data_pointer): New.
12845 (write_inferior_integer): New.
12846 (write_inferior_uinteger): New.
12847 (struct collect_static_trace_data_action): Delete.
12848 (enum tracepoint_type): New.
12849 (struct tracepoint) <type>: New field `type'.
12850 <actions_str, step_actions, step_actions_str>: Only include in
12852 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12853 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12854 (tracepoints): Use IP_AGENT_EXPORT.
12855 (last_tracepoint): Don't include in the IPA.
12856 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12857 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12858 (alloced_trace_state_variables): New.
12859 (trace_state_variables): Use IP_AGENT_EXPORT.
12860 (traceframe_t): Delete unused variable.
12861 (circular_trace_buffer): Don't include in the IPA.
12862 (trace_buffer_start): Delete.
12863 (struct trace_buffer_control): New.
12864 (trace_buffer_free): Delete.
12865 (struct ipa_trace_buffer_control): New.
12866 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12867 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12869 (trace_buffer_ctrl): New.
12870 (TRACE_BUFFER_CTRL_CURR): New.
12871 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12872 Reimplement as macros.
12873 (trace_buffer_wrap): Delete.
12874 (traceframe_write_count, traceframe_read_count)
12875 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12876 (struct tracepoint_hit_ctx) <type>: New field.
12877 (struct fast_tracepoint_ctx): New.
12878 (memory_barrier): New.
12880 (record_tracepoint_error): Update atomically in the IPA.
12881 (clear_inferior_trace_buffer): New.
12882 (about_to_request_buffer_space): New.
12883 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12884 updating the same buffer.
12885 (add_tracepoint): Default the tracepoint's type to trap
12886 tracepoint, and orig_size to -1.
12887 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12888 internal variables.
12889 (create_trace_state_variable): New parameter `gdb'. Handle it.
12890 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12891 (cmd_qtdp): Handle fast tracepoints.
12892 (cmd_qtdv): Adjust.
12893 (max_jump_pad_size): New.
12894 (gdb_jump_pad_head): New.
12895 (get_jump_space_head): New.
12896 (claim_jump_space): New.
12897 (sort_tracepoints): New.
12898 (MAX_JUMP_SIZE): New.
12899 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12901 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12902 support. Upload fast traceframes, and delete internal IPA
12904 (stop_tracing_handler): New.
12905 (flush_trace_buffer_handler): New.
12906 (cmd_qtstop): Upload fast tracepoints.
12907 (response_tracepoint): Handle fast tracepoints.
12908 (tracepoint_finished_step): Upload fast traceframes. Set the
12909 tracepoint hit context's tracepoint type.
12910 (handle_tracepoint_bkpts): New.
12911 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12912 type. Add comment about fast tracepoints.
12913 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12914 non-existing action_str field.
12915 (get_context_regcache): Handle fast tracepoints.
12916 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12918 (fast_tracepoint_from_jump_pad_address): New.
12919 (fast_tracepoint_from_ipa_tpoint_address): New.
12920 (collecting_t): New.
12921 (force_unlock_trace_buffer): New.
12922 (fast_tracepoint_collecting): New.
12924 (gdb_collect): New.
12925 (write_inferior_data_ptr): New.
12926 (target_tp_heap): New.
12927 (target_malloc): New.
12928 (download_agent_expr): New.
12930 (download_tracepoints): New.
12931 (download_trace_state_variables): New.
12932 (upload_fast_traceframes): New.
12933 (IPA_FIRST_TRACEFRAME): New.
12934 (IPA_NEXT_TRACEFRAME_1): New.
12935 (IPA_NEXT_TRACEFRAME): New.
12936 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12937 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12938 (gdb_jump_pad_buffer_end): New.
12939 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12940 (initialize_tracepoint): Adjust.
12941 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12942 buffer. Initialize the low module.
12943 * utils.c (PREFIX, TOOLNAME): New.
12944 (malloc_failure): Use PREFIX.
12945 (error): In the IPA, an error causes an exit.
12946 (fatal, warning): Use PREFIX.
12947 (internal_error): Use TOOLNAME.
12948 (NUMCELLS): Increase to 10.
12949 * configure, config.in: Regenerate.
12951 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12953 * server.c (handle_query) <qSupported>: Do two passes over the
12954 qSupported string to avoid nesting strtok.
12956 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12958 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12960 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12961 -Wl,--dynamic-list.
12962 * configure: Regenerate.
12963 * proc-service.list: New.
12965 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12967 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12970 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12972 * gdbreplay.c (remote_open): Check error return from socket() call by
12973 its equality to -1 not by it being negative.
12974 * remote-utils.c (remote_open): Likewise.
12976 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12978 * config.h: Regenerate.
12980 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12982 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12983 doesn't provide PTRACE_GET_THREAD_AREA.
12985 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12987 * linux-m68k-low.c: Include <asm/ptrace.h>
12988 (ps_get_thread_area): Implement.
12990 2010-05-03 Doug Evans <dje@google.com>
12992 * event-loop.c (struct callback_event): New struct.
12993 (callback_list): New global.
12994 (append_callback_event, delete_callback_event): New functions.
12995 (process_callback): New function.
12996 (start_event_loop): Call it.
12997 * remote-utils.c (NOT_SCHEDULED): Define.
12998 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12999 moved out of readchar.
13000 (readchar): Rewrite. Call reschedule before returning.
13001 (reset_readchar): New function.
13002 (remote_close): Call it.
13003 (process_remaining, reschedule): New functions.
13004 * server.h (callback_handler_func): New typedef.
13005 (append_callback_event, delete_callback_event): Declare.
13007 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13009 * proc-service.c (ps_pglobal_lookup): Use
13010 thread_db_look_up_one_symbol.
13011 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13012 parameter. Use it instead of all_symbols_looked_up.
13013 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13015 (all_symbols_looked_up): Don't declare.
13016 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13017 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13019 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13020 Set all_symbols_looked_up here.
13021 (thread_db_look_up_one_symbol): New.
13022 (thread_db_get_tls_address): Adjust.
13023 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13024 thread_db object on the heap, and tentatively set it in the
13026 (thread_db_init): Don't set all_symbols_looked_up here.
13027 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13029 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13031 * linux-low.c (linux_kill, linux_detach): Adjust.
13032 (status_pending_p_callback): Remove redundant statement. Check
13033 for !TARGET_WAITIKIND_IGNORE, instead of
13034 TARGET_WAITKIND_STOPPED.
13035 (handle_tracepoints): Make sure LWP is locked. Adjust.
13036 (linux_wait_for_event_1): Adjust.
13037 (linux_cancel_breakpoints): New.
13038 (unsuspend_one_lwp): New.
13039 (unsuspend_all_lwps): New.
13040 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13041 (send_sigstop_callback): Change return type to int, add new
13042 `except' parameter and handle it.
13043 (suspend_and_send_sigstop_callback): New.
13044 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13045 pass them down. If SUSPEND, also increment the lwp's suspend
13047 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13048 (need_step_over_p): Don't consider suspended LWPs.
13049 (start_step_over): Adjust.
13050 (proceed_one_lwp): Change return type to int, add new `except'
13051 parameter and handle it.
13052 (unsuspend_and_proceed_one_lwp): New.
13053 (proceed_all_lwps): Use find_inferior instead of
13055 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13056 also decrement the suspend count of LWPs. Pass `except' down,
13057 instead of hacking its suspend count.
13058 (linux_pause_all): Add `freeze' parameter. Adjust.
13059 (linux_unpause_all): New.
13060 (linux_target_ops): Install linux_unpause_all.
13061 * server.c (handle_status): Adjust.
13062 * target.h (struct target_ops): New fields `unpause_all' and
13063 `cancel_breakpoints'. Add new parameter to `pause_all'.
13064 (pause_all): Add new `freeze' parameter.
13065 (unpause_all): New.
13066 (cancel_breakpoints): New.
13067 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13068 cancel breakpoints.
13069 (cmd_qtstart): Pause threads.
13070 (stop_tracing): Pause threads, and cancel breakpoints.
13071 * win32-low.c (win32_target_ops): Adjust.
13073 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13075 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13076 the inferior right away from here...
13077 (linux_wait_1): ... to here, and adjust to check the thread's
13078 last_resume_kind instead of the lwp's step or stop_expected flags.
13080 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13082 * README: Use consistent `GDB' and `GDBserver' spellings.
13084 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13086 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13087 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13088 (linux_detach_one_lwp): Assume the lwp is stopped.
13089 (any_thread_of): Delete.
13090 (linux_detach): Stop all lwps here. Don't blindly delete all
13092 (delete_lwp_callback): New.
13093 (linux_mourn): Delete all lwps of the process that is gone.
13094 (linux_wait_1): Don't delete the last lwp of the process here.
13095 * mem-break.h (mark_breakpoints_out): Declare.
13096 * mem-break.c (mark_breakpoints_out): New.
13097 (free_all_breakpoints): Use it.
13098 * server.c (handle_target_event): If the process is gone, mark
13100 * thread-db.c (struct thread_db) <create_bp>: New field.
13101 (thread_db_enable_reporting): Fix prototype. Store a thread event
13102 breakpoint reference in the thread_db struct.
13103 (thread_db_load_search): Clear the thread_db object.
13104 (try_thread_db_load_1): Ditto.
13105 (switch_to_process): New.
13106 (disable_thread_event_reporting): Use it.
13107 (remove_thread_event_breakpoints): New.
13108 (thread_db_detach, thread_db_mourn): Use it.
13110 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13112 * linux-low.c (linux_enable_event_reporting): New.
13113 (linux_wait_for_event_1, handle_extended_wait): Use it.
13115 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13117 * linux-low.c (linux_kill_one_lwp, linux_kill)
13118 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13119 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13120 SIGSTOP even if the LWP is stopped.
13121 (send_sigstop_callback): New.
13122 (stop_all_lwps): Use send_sigstop_callback instead.
13123 (linux_resume_one_thread): Adjust.
13124 (proceed_one_lwp): Still proceed an LWP that the client has
13125 requested to stop, if we haven't reported it as stopped yet. Make
13126 sure that LWPs the client want stopped, have a pending SIGSTOP.
13128 2010-04-26 Doug Evans <dje@google.com>
13130 * server.c (handle_general_set): Make static.
13132 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13133 Print received char after testing for error/eof instead of before.
13134 (input_interrupt): Tweak comment.
13136 2010-04-23 Doug Evans <dje@google.com>
13138 * server.c (start_inferior): Print inferior argv if --debug.
13140 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13142 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13143 * nto-x86-low.c: Include server.h
13145 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13147 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13148 be consistent with other sources of this directory.
13149 (init_registers_amd64): Correct name of source file of this function
13152 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13154 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13155 64-bit executables.
13157 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13159 * win32-i386-low.c: Add 64-bit support.
13160 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13161 (init_registers_amd64): Declare.
13162 (mappings): Add 64-bit version of array.
13163 (init_windows_x86): New function.
13164 (the_low_target): Change init_arch field to init_windows_x86.
13166 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13168 * win32-low.c: Adapt to support also 64-bit architecture.
13169 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13170 (get_image_name): Use SIZE_T type for local variable `done'.
13171 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13172 (toolhelp_get_dll_name): Idem.
13173 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13174 Use uintptr_t typecast to avoid warning.
13175 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13176 (handle_exception): Use phex_nz to avoid warning.
13177 (win32_wait): Remove unused local variable `process'.
13179 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13181 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13184 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13186 * configure.ac: Use `ws2_32' library for srv_mingw.
13187 * configure: Regenerate.
13188 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13189 * remote-utils.c: Likewise.
13191 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13193 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13194 if __x86_64__ is defined.
13196 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13198 * configure: Regenerate.
13200 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13202 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13203 * target.h (target_ops): New get_tib_address field.
13204 * win32-low.h (win32_thread_info): Add thread_local_base field.
13205 * win32-low.c (child_add_thread): Add tlb argument.
13206 Set thread_local_base field to TLB.
13207 (get_child_debug_event): Adapt to child_add_thread change.
13208 (win32_get_tib_address): New function.
13209 (win32_target_ops): Set get_tib_address field to
13210 win32_get_tib_address.
13211 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13213 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13215 * linux-low.c (linux_mourn): Also remove the process.
13216 * server.c (handle_target_event): Don't remove the process here.
13217 * nto-low.c (nto_mourn): New.
13218 (nto_target_ops): Install it.
13219 * spu-low.c (spu_mourn): New.
13220 (spu_target_ops): Install it.
13221 * win32-low.c (win32_mourn): New.
13222 (win32_target_ops): Install it.
13224 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13226 * server.h (buffer_xml_printf): Remove redundant `;'.
13228 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13230 * regcache.c (set_register_cache): Invalidate regcaches before
13231 changing the register cache layout.
13232 (regcache_invalidate_one): Allow a NULL regcache.
13233 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13234 regcaches before changing the register cache layout or the target
13237 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13239 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13240 variable warning on Linux/x86-64.
13242 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13244 GDBserver disconnected tracing support.
13246 * linux-low.c (linux_remove_process): Delete.
13247 (add_lwp): Don't set last_resume_kind here.
13248 (linux_kill): Use `mourn'.
13249 (linux_detach): Use `thread_db_detach', and `mourn'.
13250 (linux_mourn): New.
13251 (linux_attach_lwp_1): Adjust comment.
13252 (linux_attach): last_resume_kind moved the thread_info; adjust.
13253 (status_pending_p_callback): Adjust.
13254 (linux_wait_for_event_1): Adjust.
13255 (count_events_callback, select_singlestep_lwp_callback)
13256 (select_event_lwp_callback, cancel_breakpoints_callback)
13257 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13258 (proceed_one_lwp): Adjust.
13259 (linux_async): Add debug output.
13260 (linux_thread_stopped): New.
13261 (linux_pause_all): New.
13262 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13264 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13265 (thread_db_free): Delete declaration.
13266 (thread_db_detach, thread_db_mourn): Declare.
13267 * thread-db.c (thread_db_init): Use thread_db_mourn.
13268 (thread_db_free): Delete, split in two.
13269 (disable_thread_event_reporting): New.
13270 (thread_db_detach): New.
13271 (thread_db_mourn): New.
13273 * server.h (struct thread_info) <last_resume_kind>: New field.
13274 <attached>: Add comment.
13275 <gdb_detached>: New field.
13276 (handler_func): Change return type to int.
13277 (handle_serial_event, handle_target_event): Ditto.
13278 (gdb_connected): Declare.
13280 (disconnected_tracing): Declare.
13281 (stop_tracing): Declare.
13283 * server.c (handle_query) <qSupported>: Report support for
13284 disconnected tracing.
13285 (queue_stop_reply_callback): Account for running threads.
13286 (gdb_wants_thread_stopped): New.
13287 (gdb_wants_all_threads_stopped): New.
13288 (gdb_reattached_process): New.
13289 (handle_status): Clear the `gdb_detached' flag of all processes.
13290 In all-stop, stop all threads.
13291 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13292 (process_serial_event): If the remote connection breaks, or if an
13293 exit was forced with "monitor exit", force an event loop exit.
13294 Handle disconnected tracing on detach.
13295 (handle_serial_event): Adjust.
13296 (handle_target_event): If GDB isn't connected, forward events back
13297 to the inferior, unless the last process exited, in which case,
13298 exit gdbserver. Adjust interface.
13300 * remote-utils.c (remote_open): Don't block in accept. Instead
13301 register an event loop source on the listen socket file
13302 descriptor. Refactor bits into ...
13303 (listen_desc): ... this new global.
13304 (gdb_connected): ... this new function.
13305 (enable_async_notification): ... this new function.
13306 (handle_accept_event): ... this new function.
13307 (remote_close): Clear remote_desc.
13309 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13311 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13313 (mourn_inferior): Define.
13314 (target_process_qsupported): Avoid the dangling else problem.
13315 (thread_stopped): Define.
13316 (pause_all): Define.
13317 (target_waitstatus_to_string): Declare.
13318 * target.c (target_waitstatus_to_string): New.
13320 * tracepoint.c (tracing): Make extern.
13321 (disconnected_tracing): New.
13322 (stop_tracing): Make extern. Handle tracing stops due to GDB
13324 (cmd_qtdisconnected): New.
13325 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13326 (handle_tracepoint_general_set): Handle QTDisconnected.
13328 * event-loop.c (event_handler_func): Change return type to int.
13329 (process_event): Bail out if the event handler wants the event
13331 (handle_file_event): Ditto.
13332 (start_event_loop): Bail out if the event handler wants the event
13335 * nto-low.c (nto_target_ops): Adjust.
13336 * spu-low.c (spu_wait): Don't remove the process here.
13337 (spu_target_ops): Adjust.
13338 * win32-low.c (win32_wait): Don't remove the process here.
13339 (win32_target_ops): Adjust.
13341 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13343 * regcache.c (realloc_register_cache): Invalidate inferior's
13344 regcache before recreating it.
13346 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13348 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13350 2010-04-09 Stan Shebs <stan@codesourcery.com>
13351 Pedro Alves <pedro@codesourcery.com>
13353 * server.h (LONGEST): New.
13354 (struct thread_info) <while_stepping>: New field.
13355 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13357 (initialize_tracepoint, handle_tracepoint_general_set)
13358 (handle_tracepoint_query, tracepoint_finished_step)
13359 (tracepoint_was_hit, release_while_stepping_state_list):
13360 (current_traceframe): Declare.
13361 * server.c (handle_general_set): Handle tracepoint packets.
13362 (read_memory): New.
13363 (write_memory): New.
13364 (handle_search_memory_1): Use read_memory.
13365 (handle_query): Report support for conditional tracepoints, trace
13366 state variables, and tracepoint sources. Handle tracepoint
13368 (main): Initialize the tracepoints module.
13369 (process_serial_event): Handle traceframe reads/writes.
13371 * linux-low.c (handle_tracepoints): New.
13372 (linux_wait_1): Call it.
13373 (linux_resume_one_lwp): Handle while-stepping.
13374 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13375 (linux_target_ops): Install them.
13376 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13378 * linux-x86-low.c (x86_supports_tracepoints): New.
13379 (the_low_target). Install it.
13381 * mem-break.h (delete_breakpoint): Declare.
13382 * mem-break.c (delete_breakpoint): Make external.
13384 * target.h (struct target_ops): Add `supports_tracepoints',
13385 `read_pc', and `write_pc' fields.
13386 (target_supports_tracepoints): Define.
13387 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13390 * regcache.h (struct regcache) <registers_owned>: New field.
13391 (init_register_cache, regcache_cpy): Declare.
13392 (regcache_read_pc, regcache_write_pc): Declare.
13393 (register_cache_size): Declare.
13394 (supply_regblock): Declare.
13395 * regcache.c (init_register_cache): New.
13396 (new_register_cache): Use it.
13397 (regcache_cpy): New.
13398 (register_cache_size): New.
13399 (supply_regblock): New.
13400 (regcache_read_pc, regcache_write_pc): New.
13402 * tracepoint.c: New.
13404 * Makefile.in (OBS): Add tracepoint.o.
13405 (tracepoint.o): New rule.
13407 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13409 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13411 (i386-mmx.c): Likewise.
13412 (i386-mmx-linux.o): Likewise.
13413 (i386-mmx-linux.c): Likewise.
13415 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13416 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13417 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13418 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13420 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13421 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13422 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13424 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13426 * Makefile.in (clean): Updated.
13428 (i386-avx.c): Likewise.
13429 (i386-avx-linux.o): Likewise.
13430 (i386-avx-linux.c): Likewise.
13431 (amd64-avx.o): Likewise.
13432 (amd64-avx.c): Likewise.
13433 (amd64-avx-linux.o): Likewise.
13434 (amd64-avx-linux.c): Likewise.
13436 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13437 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13438 (srv_amd64_regobj): Add amd64-avx.o.
13439 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13440 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13441 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13442 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13443 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13444 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13445 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13447 * i387-fp.c: Include "i386-xstate.h".
13449 (i387_cache_to_xsave): Likewise.
13450 (i387_xsave_to_cache): Likewise.
13451 (x86_xcr0): Likewise.
13453 * i387-fp.h (i387_cache_to_xsave): Likewise.
13454 (i387_xsave_to_cache): Likewise.
13455 (x86_xcr0): Likewise.
13457 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13458 * linux-crisv32-low.c (target_regsets): Likewise.
13459 * linux-m68k-low.c (target_regsets): Likewise.
13460 * linux-mips-low.c (target_regsets): Likewise.
13461 * linux-ppc-low.c (target_regsets): Likewise.
13462 * linux-s390-low.c (target_regsets): Likewise.
13463 * linux-sh-low.c (target_regsets): Likewise.
13464 * linux-sparc-low.c (target_regsets): Likewise.
13465 * linux-xtensa-low.c (target_regsets): Likewise.
13467 * linux-low.c: Include <sys/uio.h>.
13468 (regsets_fetch_inferior_registers): Support nt_type.
13469 (regsets_store_inferior_registers): Likewise.
13470 (linux_process_qsupported): New.
13471 (linux_target_ops): Add linux_process_qsupported.
13473 * linux-low.h (regset_info): Add nt_type.
13474 (linux_target_ops): Add process_qsupported.
13476 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13478 (init_registers_i386_avx_linux): New.
13479 (init_registers_amd64_avx_linux): Likewise.
13480 (xmltarget_i386_linux_no_xml): Likewise.
13481 (xmltarget_amd64_linux_no_xml): Likewise.
13482 (PTRACE_GETREGSET): Likewise.
13483 (PTRACE_SETREGSET): Likewise.
13484 (x86_fill_xstateregset): Likewise.
13485 (x86_store_xstateregset): Likewise.
13486 (use_xml): Likewise.
13487 (x86_linux_update_xmltarget): Likewise.
13488 (x86_linux_process_qsupported): Likewise.
13489 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13490 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13491 init_registers_i386_linux here. Call
13492 x86_linux_update_xmltarget.
13493 (the_low_target): Add x86_linux_process_qsupported.
13495 * server.c (handle_query): Call target_process_qsupported.
13497 * target.h (target_ops): Add process_qsupported.
13498 (target_process_qsupported): New.
13500 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13502 * inferiors.c (add_thread): Set last_status kind to
13503 TARGET_WAITKIND_IGNORE.
13504 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13505 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13506 (linux_wait_1): Move `thread' local definition to block that uses
13507 it. Don't NULL initialize `event_child'.
13508 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13509 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13510 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13512 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13514 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13515 an extended waitstatus, or by a watchpoint.
13516 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13517 thread was stepping or has been stopped by a watchpoint.
13519 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13521 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13522 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13523 of another, then delete the previous, and validate all
13525 (validate_inserted_breakpoint): New.
13526 (delete_disabled_breakpoints): New.
13527 (validate_breakpoints): New.
13528 (check_mem_read): Validate breakpoints before trusting their
13529 shadow. Delete disabled breakpoints.
13530 (check_mem_write): Validate breakpoints before trusting they
13531 should be inserted. Delete disabled breakpoints.
13532 * mem-break.h (validate_breakpoints):
13533 * server.c (handle_query): Validate breakpoints when we see a
13536 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13538 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13539 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13540 if we could tell there's a GDB breakpoint at stop_pc.
13541 (need_step_over_p): Don't do a step over if we find a GDB
13542 breakpoint at the resume PC.
13544 * mem-break.c (struct raw_breakpoint): New.
13545 (enum bkpt_type): New type `gdb_breakpoint'.
13546 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13547 fields. New field `raw'.
13548 (find_raw_breakpoint_at): New.
13549 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13550 breakpoint instead.
13551 (set_breakpoint_at): Adjust.
13552 (delete_raw_breakpoint): New.
13553 (release_breakpoint): New.
13554 (delete_breakpoint): Rename to...
13555 (delete_breakpoint_1): ... this. Add proc parameter. Use
13556 release_breakpoint. Return ENOENT.
13557 (delete_breakpoint): Reimplement.
13558 (find_breakpoint_at): Delete.
13559 (find_gdb_breakpoint_at): New.
13560 (delete_breakpoint_at): Delete.
13561 (set_gdb_breakpoint_at): New.
13562 (delete_gdb_breakpoint_at): New.
13563 (gdb_breakpoint_here): New.
13564 (set_reinsert_breakpoint): Use release_breakpoint.
13565 (uninsert_breakpoint): Rename to ...
13566 (uninsert_raw_breakpoint): ... this.
13567 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13568 (reinsert_raw_breakpoint): Change parameter type to
13570 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13572 (check_breakpoints): Adjust. Use release_breakpoint.
13573 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13574 (breakpoint_inserted_here): Ditto.
13575 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13576 Don't trust the breakpoint's shadow if it is not inserted.
13577 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13578 (delete_all_breakpoints): Adjust.
13579 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13580 use delete_breakpoint_1.
13582 * mem-break.h (breakpoints_supported): Delete declaration.
13583 (set_gdb_breakpoint_at): Declare.
13584 (gdb_breakpoint_here): Declare.
13585 (delete_breakpoint_at): Delete.
13586 (delete_gdb_breakpoint_at): Declare.
13588 * server.h (struct raw_breakpoint): Forward declare.
13589 (struct process_info): New field `raw_breakpoints'.
13591 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13594 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13596 * linux-low.c (status_pending_p_callback): Fix comment.
13597 (linux_wait_for_event_1): Move most of the internal breakpoint
13598 handling from here...
13599 (linux_wait_1): ... to here.
13600 (count_events_callback): New.
13601 (select_singlestep_lwp_callback): New.
13602 (select_event_lwp_callback): New.
13603 (cancel_breakpoints_callback): New.
13604 (select_event_lwp): New.
13605 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13606 priority to all LWPs that have had events that should be reported
13607 to the client. Cancel breakpoints when about to reporting the
13608 event to the client, not while stopping lwps. No longer cancel
13609 finished single-steps here.
13610 (cancel_finished_single_step): Delete.
13611 (cancel_finished_single_steps): Delete.
13613 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13615 * mem-break.c (enum bkpt_type): New.
13616 (struct breakpoint): New field `type'.
13617 (set_breakpoint_at): Change return type to struct breakpoint
13618 pointer. Set type to `other_breakpoint' by default.
13619 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13620 in the breakpoint list.
13621 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13622 (reinsert_breakpoint): Rename to ...
13623 (reinsert_raw_breakpoint): ... this.
13624 (reinsert_breakpoints_at): Adjust.
13625 * mem-break.h (struct breakpoint): Declare.
13626 (set_breakpoint_at): Change return type to struct breakpoint
13629 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13631 * server.c (handle_query): Assign, not compare.
13633 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13635 Teach linux gdbserver to step-over-breakpoints.
13637 * linux-low.c (can_hardware_single_step): New.
13638 (supports_breakpoints): New.
13639 (handle_extended_wait): If stopping threads, read the stop pc of
13640 the new cloned LWP.
13642 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13643 low target doesn't support retrieving the PC.
13644 (add_lwp): Set last_resume_kind to resume_continue.
13645 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13646 (linux_attach): Don't clear stop_expected. Set the lwp's
13647 last_resume_kind to resume_stop.
13648 (linux_detach_one_lwp): Don't check for removed breakpoints.
13649 (check_removed_breakpoint): Delete.
13650 (status_pending_p): Rename to ...
13651 (status_pending_p_callback): ... this. Don't check for removed
13652 breakpoints. Don't consider threads that are stopped from GDB's
13654 (linux_wait_for_lwp): Always read the stop_pc here.
13655 (cancel_breakpoint): New.
13656 (step_over_bkpt): New global.
13657 (linux_wait_for_event_1): Implement stepping over breakpoints.
13658 (gdb_wants_lwp_stopped): New.
13659 (gdb_wants_all_stopped): New.
13660 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13661 single-step traps here. Store the thread's last reported target
13663 (send_sigstop): Don't clear stop_expected. Always set it,
13665 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13666 (cancel_finished_single_step): New.
13667 (cancel_finished_single_steps): New.
13668 (wait_for_sigstop): Don't cancel finished single-step traps here.
13669 (linux_resume_one_lwp): Don't check for removed breakpoints.
13670 Don't set `step' on non-hardware step archs.
13671 (linux_set_resume_request): Ignore resume_stop requests if already
13672 stopping or stopped. Set the lwp's last_resume_kind.
13673 (resume_status_pending_p): Don't check for removed breakpoints.
13674 (need_step_over_p): New.
13675 (start_step_over): New.
13676 (finish_step_over): New.
13677 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13678 requests. Clear the thread's last reported target waitstatus.
13679 Don't use the `suspended' flag. Don't consider pending breakpoints.
13680 (linux_resume): Start a step-over if necessary.
13681 (proceed_one_lwp): New.
13682 (proceed_all_lwps): New.
13683 (unstop_all_lwps): New.
13684 * linux-low.h (struct lwp_info): Rewrite comment for the
13685 `suspended' flag. Add the `stop_pc' field. Delete the
13686 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13687 Add `'last_resume_kind' and `need_step_over' fields.
13688 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13689 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13690 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13691 (set_raw_breakpoint_at): New.
13692 (set_breakpoint_at): Rewrite to use it.
13693 (reinsert_breakpoint_handler): Delete.
13694 (set_reinsert_breakpoint): New.
13695 (reinsert_breakpoint_by_bp): Delete.
13696 (delete_reinsert_breakpoints): New.
13697 (uninsert_breakpoint): Rewrite.
13698 (uninsert_breakpoints_at): New.
13699 (reinsert_breakpoint): Rewrite.
13700 (reinsert_breakpoints_at): New.
13701 (check_breakpoints): Rewrite.
13702 (breakpoint_here): New.
13703 (breakpoint_inserted_here): New.
13704 (check_mem_read): Adjust.
13705 * mem-break.h (breakpoints_supported, breakpoint_here)
13706 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13707 (reinsert_breakpoint_by_bp): Delete declaration.
13708 (delete_reinsert_breakpoints): Declare.
13709 (reinsert_breakpoint): Delete declaration.
13710 (reinsert_breakpoints_at): Declare.
13711 (uninsert_breakpoint): Delete declaration.
13712 (uninsert_breakpoints_at): Declare.
13713 (check_breakpoints): Adjust prototype.
13714 * server.h: Adjust include order.
13715 (struct thread_info): Declare here. Add a `last_status' field.
13717 2010-03-23 Michael Snyder <msnyder@vmware.com>
13719 * server.c (crc32): New function.
13720 (handle_query): Add handling for 'qCRC:' request.
13722 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13724 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13725 lwp had been stopped by a watchpoint.
13727 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13729 * server.h (internal_error): Declare.
13730 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13731 * utils.c (internal_error): New function.
13733 2010-03-15 Andreas Schwab <schwab@redhat.com>
13735 * configure.srv: Fix typo setting srv_regobj.
13737 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13739 * linux-low.c (fetch_register): Avoid passing a non string literal
13741 (usr_store_inferior_registers): Ditto.
13743 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13745 * linux-low.c (linux_write_memory): Bail out early if peeking
13748 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13750 * linux-low.h (struct lwp_info): New fields
13751 `stopped_by_watchpoint' and `stopped_data_address'.
13752 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13753 here, and cache them in the lwp object.
13754 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13756 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13758 (linux_stopped_by_watchpoint): Rewrite.
13759 (linux_stopped_data_address): Rewrite.
13761 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13763 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13764 switching the current inferior, not before.
13766 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13768 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13769 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13770 i386-linux.c and amd64-linux.c.
13771 (reg-i386.o): Removed.
13772 (reg-i386.c): Likewise.
13773 (reg-i386-linux.o): Likewise.
13774 (reg-i386-linux.c): Likewise.
13775 (reg-x86-64.o): Likewise.
13776 (reg-x86-64.c): Likewise.
13777 (reg-x86-64-linux.o): Likewise.
13778 (reg-x86-64-linux.c): Likewise.
13780 (i386.c): Likewise.
13781 (i386-linux.o): Likewise.
13782 (i386-linux.c): Likewise.
13783 (amd64.o): Likewise.
13784 (amd64.c): Likewise.
13785 (amd64-linux.o): Likewise.
13786 (amd64-linux.c): Likewise.
13788 * configure.srv (srv_i386_regobj): New.
13789 (srv_i386_linux_regobj): Likewise.
13790 (srv_amd64_regobj): Likewise.
13791 (srv_amd64_linux_regobj): Likewise.
13792 (srv_i386_32bit_xmlfiles): Likewise.
13793 (srv_i386_64bit_xmlfiles): Likewise.
13794 (srv_i386_xmlfiles): Likewise.
13795 (srv_amd64_xmlfiles): Likewise.
13796 (srv_i386_linux_xmlfiles): Likewise.
13797 (srv_amd64_linux_xmlfiles): Likewise.
13798 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13799 srv_xmlfiles to $srv_i386_xmlfiles.
13800 (i[34567]86-*-mingw32ce*): Likewise.
13801 (i[34567]86-*-mingw*): Likewise.
13802 (i[34567]86-*-nto*): Likewise.
13803 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13804 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13805 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13806 (x86_64-*-linux*): Likewise.
13808 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13809 (init_registers_amd64_linux): New.
13810 (x86_arch_setup): Replace init_registers_x86_64_linux with
13811 init_registers_amd64_linux.
13813 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13815 * configure.ac: Check for libdl. If it is not available link against
13816 static libthread_db.
13817 * configure: Regenerate.
13819 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13823 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13824 handing a read watchpoint.
13825 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13827 2010-02-12 Doug Evans <dje@google.com>
13829 * linux-low.c (linux_supports_tracefork_flag): Document.
13830 (linux_look_up_symbols): Add comment.
13832 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13834 * regcache.c (supply_register): Clear regcache if buf is NULL.
13836 2010-02-02 Nicolas Roche <roche@sourceware.org>
13837 Joel Brobecker <brobecker@adacore.com>
13839 * inferiors.c (find_inferior): Add function documentation.
13840 (unloaded_dll): Handle the case where the unloaded dll has not
13841 been previously registered in the dll list.
13843 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13845 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13846 (thumb2_breakpoint): New.
13847 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13849 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13851 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13852 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13855 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13857 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13859 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13861 * linux-s390-low.c (s390_collect_ptrace_register)
13862 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13864 2010-01-21 Doug Evans <dje@google.com>
13866 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13867 (PTRACE_ARG4_TYPE): New macro.
13868 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13869 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13870 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13871 (usr_store_inferior_registers): Ditto.
13872 (linux_read_memory, linux_write_memory): Ditto.
13873 (linux_test_for_tracefork): Ditto.
13875 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13876 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13878 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13880 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13883 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13885 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13886 prototype to take a regcache. Adjust.
13888 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13890 * regcache.h (struct thread_info): Forward declare.
13891 (struct regcache): New.
13892 (new_register_cache): Adjust prototype.
13893 (get_thread_regcache): Declare.
13894 (free_register_cache): Adjust prototype.
13895 (registers_to_string, registers_from_string): Ditto.
13896 (supply_register, supply_register_by_name, collect_register)
13897 (collect_register_as_string, collect_register_by_name): Ditto.
13898 * regcache.c (struct inferior_regcache_data): Delete.
13899 (get_regcache): Rename to ...
13900 (get_thread_regcache): ... this. Adjust. Switch inferior before
13901 fetching registers.
13902 (regcache_invalidate_one): Adjust.
13903 (regcache_invalidate): Fix prototype.
13904 (new_register_cache): Return the new register cache.
13905 (free_register_cache): Change prototype.
13906 (realloc_register_cache): Adjust.
13907 (registers_to_string): Change prototype to take a regcache. Adjust.
13908 (registers_from_string): Ditto.
13909 (register_data): Ditto.
13910 (supply_register): Ditto.
13911 (supply_register_by_name): Ditto.
13912 (collect_register): Ditto.
13913 (collect_register_as_string): Ditto.
13914 (collect_register_by_name): Ditto.
13915 * server.c (process_serial_event): Adjust.
13916 * linux-low.h (regset_fill_func, regset_store_func): Change
13918 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13920 * linux-low.c (get_stop_pc): Adjust.
13921 (check_removed_breakpoint): Adjust.
13922 (linux_wait_for_event): Adjust.
13923 (linux_resume_one_lwp): Adjust.
13924 (fetch_register): Add regcache parameter. Adjust.
13925 (usr_store_inferior_registers): Ditto.
13926 (regsets_fetch_inferior_registers): Ditto.
13927 (regsets_store_inferior_registers): Ditto.
13928 (linux_fetch_registers, linux_store_registers): Ditto.
13929 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13931 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13933 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13934 prototype to take a regcache.
13935 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13936 * remote-utils.c (convert_ascii_to_int, outreg)
13937 (prepare_resume_reply): Change prototype to take a regcache.
13939 * target.h (struct target_ops) <fetch_registers, store_registers>:
13940 Change prototype to take a regcache.
13941 (fetch_inferior_registers, store_inferior_registers): Change
13942 prototype to take a regcache. Adjust.
13943 * proc-service.c (ps_lgetregs): Adjust.
13944 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13945 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13946 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13947 take a regcache. Adjust.
13948 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13949 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13950 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13951 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13952 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13953 (cris_cannot_fetch_register):
13954 (cris_breakpoint_at): Change prototype to take a regcache.
13956 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13957 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13958 to take a regcache. Adjust.
13959 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13961 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13962 take a regcache. Adjust.
13963 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13964 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13965 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13966 * linux-mips-low.c (mips_get_pc):
13967 (mips_set_pc): Change prototype to take a regcache. Adjust.
13968 (mips_reinsert_addr): Adjust.
13969 (mips_collect_register): Change prototype to take a regcache.
13971 (mips_supply_register):
13972 (mips_collect_register_32bit, mips_supply_register_32bit)
13973 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13974 (mips_store_fpregset): Ditto.
13975 * linux-ppc-low.c (ppc_supply_ptrace_register)
13976 (ppc_supply_ptrace_register): Ditto.
13977 (parse_spufs_run): Adjust.
13978 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13979 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13980 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13981 take a regcache. Adjust.
13982 * linux-s390-low.c (s390_collect_ptrace_register)
13983 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13984 (s390_set_pc): Change prototype to take a regcache. Adjust.
13985 (s390_arch_setup): Adjust.
13986 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13987 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13988 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13989 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13990 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13992 (sparc_breakpoint_at): Adjust.
13993 * linux-xtensa-low.c (xtensa_fill_gregset):
13994 (xtensa_store_gregset):
13995 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13996 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13997 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13998 prototype to take a regcache. Adjust.
13999 * win32-arm-low.c (arm_fetch_inferior_register)
14000 (arm_store_inferior_register): Change prototype to take a
14002 * win32-i386-low.c (i386_fetch_inferior_register)
14003 (i386_store_inferior_register): Change prototype to take a
14005 * win32-low.c (child_fetch_inferior_registers)
14006 (child_store_inferior_registers): Change prototype to take a
14008 (win32_wait): Adjust.
14009 (win32_fetch_inferior_registers): Change prototype to take a
14011 (win32_store_inferior_registers): Adjust.
14012 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14013 store_inferior_register>: Change prototype to take a regcache.
14015 2010-01-20 Doug Evans <dje@google.com>
14017 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14019 (linux_wait_for_event1, linux_init_signals): Ditto.
14020 (W_STOPCODE): Provide definition if missing.
14022 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14024 * linux-low.c (linux_core_of_thread): New.
14025 (compare_ints, show_process, list_threads): New.
14026 (linux_qxfer_osdata): Report threads and cores.
14027 (linux_target_op): Register linux_core_of_thread.
14028 * remote-utils.c (prepare_resume_reply): Report the core.
14029 (buffer_xml_printf): Support %d specifier.
14030 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14032 (handle_query): Handle qXfer:threads. Announce availability
14034 * target.h (struct target_ops): New field core_of_thread.
14036 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14038 * Makefile.in (clean): Remove new generated files.
14039 (reg-s390.o, reg-s390.c): Remove rules.
14040 (reg-s390x.o, reg-s390x.c): Likewise.
14041 (s390-linux32.o, s390-linux32.c): Add rules.
14042 (s390-linux64.o, s390-linux64.c): Likewise.
14043 (s390x-linux64.o, s390x-linux64.c): Likewise.
14044 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14045 * linux-s390-low.c: Include <elf.h>.
14046 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14047 (init_registers_s390): Remove prototype.
14048 (init_registers_s390x): Likewise.
14049 (init_registers_s390_linux32): Add prototype.
14050 (init_registers_s390_linux64): Likewise.
14051 (init_registers_s390x_linux64): Likewise.
14052 (s390_num_regs_3264): New define.
14053 (s390_regmap_3264): New global variable.
14054 (s390_cannot_fetch_register): Remove obsolete check.
14055 (s390_cannot_store_register): Likewise.
14056 (s390_collect_ptrace_register): Handle upper/lower register halves.
14057 (s390_supply_ptrace_register): Likewise.
14058 (s390_fill_gregset): Update to register number changes.
14059 (s390_get_hwcap): New routine.
14060 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14061 Install appropriate regmap and register set.
14063 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14065 * server.c (gdbserver_version): Update copyright year to 2010.
14066 * gdbreplay.c (gdbreplay_version): Likewise.
14068 2009-12-28 Doug Evans <dje@google.com>
14070 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14071 elf/external.h. Include <elf.h> instead but only if necessary.
14073 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14075 * linux-low.c (linux_remove_process): Remove `detaching'
14076 parameter. Don't release/detach from thread_db here.
14077 (linux_kill): Release/detach from thread_db here, ...
14078 (linux_detach): ... and here, before actually detaching.
14079 (linux_wait_1): ... and here, when a process exits.
14080 * thread-db.c (any_thread_of): New.
14081 (thread_db_free): Switch the current inferior to a thread of the
14084 2009-12-21 Doug Evans <dje@google.com>
14086 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14088 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14089 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14090 warning ifndef __NR_tkill. Move setting of errno there too.
14091 Delete unnecessary resetting of errno after syscall.
14092 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14094 * configure.ac: Check for dladdr.
14095 * config.in: Regenerate.
14096 * configure: Regenerate.
14097 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14098 (try_thread_db_load): Update.
14100 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14102 2009-12-18 Doug Evans <dje@google.com>
14104 * event-loop.c: Include unistd.h if it exists.
14106 * linux-low.c (my_waitpid): Move definition away from being in
14107 between linux_tracefork_child/linux_test_for_tracefork.
14109 * gdb_proc_service.h (psaddr_t): Fix type.
14110 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14111 signature to match glibc.
14113 2009-12-16 Doug Evans <dje@google.com>
14115 * linux-low.c (linux_read_memory): Fix argument to read.
14117 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14119 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14120 events, don't leave current_inferior pointing at null.
14122 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14124 * win32-low.c (LOG): Delete.
14125 (OUTMSG): Output to stderr.
14126 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14127 on compile time LOG macro.
14128 (win32_wait): Fix debug output.
14130 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14132 * win32-low.c (win32_add_one_solib): If the dll name is
14133 "ntdll.dll", prepend the system directory to the dll path.
14135 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14137 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14139 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14140 Vladimir Prus <vladimir@codesourcery.com>
14142 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14143 * configure.ac: Check for __mcoldfire__ and set
14144 gdb_cv_m68k_is_coldfire.
14145 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14146 reg-cf.o and reg-m68k.o.
14147 * configure: Regenerated.
14149 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14151 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14152 Pass it to thread_db_free.
14153 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14154 proper `detaching' argument to linux_remove_process.
14155 * linux-low.h (thread_db_free): Add `detaching' parameter.
14156 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14158 (thread_db_free): Add `detaching' parameter. Only
14159 call td_ta_clear_event if detaching from process.
14161 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14163 * thread-db.c (thread_db_free): Fix typo.
14165 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14168 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14170 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14172 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14173 with an i686 compiler.
14174 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14176 * configure: Rebuilt.
14178 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14182 * server.c (handle_search_memory_1): Correct read_addr initialization
14183 in loop for searching subsequent chunks.
14185 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14187 * configure.ac: New --with-libthread-db option.
14188 * thread-db.c: Allow direct dependence on libthread_db.
14189 (thread_db_free): Adjust.
14190 * config.in: Regenerate.
14191 * configure: Likewise.
14193 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14196 * thread-db.c (attach_thread): New function.
14197 (maybe_attach_thread): Return success/failure.
14198 (find_new_threads_callback): Adjust.
14199 (thread_db_find_new_threads): Loop until no new threads.
14201 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14203 * proc-service.c (ps_lgetregs): Formatting.
14205 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14207 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14208 * configure.ac: Adjust.
14209 * linux-low.h (struct process_info_private): Move members to struct
14211 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14212 * linux-low.c (linux_remove_process): Adjust.
14213 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14214 * server.c (handle_query): Move code ...
14215 (handle_monitor_command): ... here. New function.
14216 * target.h (struct target_ops): New member.
14217 * thread-db.c (struct thread_db): New.
14218 (libthread_db_search_path): New variable.
14219 (thread_db_create_event, thread_db_enable_reporting)
14220 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14221 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14222 (try_thread_db_load_1, dladdr_to_soname): New functions.
14223 (try_thread_db_load, thread_db_load_search): New functions.
14224 (thread_db_init): Search for libthread_db.
14225 (thread_db_free): New function.
14226 (thread_db_handle_monitor_command): Likewise.
14227 * config.in: Regenerate.
14228 * configure: Regenerate.
14230 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14232 * spu-low.c (spu_kill): Wait for inferior to terminate.
14233 Call clear_inferiors.
14234 (spu_detach): Call clear_inferiors.
14236 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14238 * aclocal.m4: Regenerate.
14239 * config.in: Likewise.
14240 * configure: Likewise.
14242 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14244 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14245 (parse_spufs_run): New function.
14246 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14247 (ppc_breakpoint_at): Handle SPU breakpoints.
14249 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14251 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14252 (SPUFS_MAGIC): Define.
14253 (spu_enumerate_spu_ids): New function.
14254 (linux_qxfer_spu): New function.
14255 (linux_target_ops): Install linux_qxfer_spu.
14257 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14259 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14260 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14261 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14262 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14263 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14264 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14265 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14266 (init_registers_powerpc_cell32l): Add prototype.
14267 (init_registers_powerpc_cell64l): Likewise.
14268 (ppc_arch_setup): Detect Cell/B.E. architecture.
14270 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14272 * Makefile.in (datarootdir): New variable.
14274 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14276 * linux-low.c (linux_write_memory): Update debugging output.
14277 * Makefile.in (clean): Add new descriptions.
14278 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14279 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14280 * configure.srv: Add new files for arm*-*-linux*.
14281 * linux-arm-low.c: Add new declarations.
14282 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14283 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14284 (HWCAP_VFPv3D16): New.
14285 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14286 instead of __IWMMXT__.
14287 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14288 (arm_arch_setup): New.
14289 (target_regsets): Remove #ifdef. Add VFP regset.
14290 (the_low_target): Use arm_arch_setup.
14292 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14294 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14295 the main thread again.
14297 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14299 Adding Neutrino gdbserver.
14300 * configure: Regenerated.
14301 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14302 * configure.srv (i[34567]86-*-nto*): New target.
14303 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14304 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14305 (nto_comctrl) [__QNX__]: New function.
14306 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14308 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14310 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14313 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14314 Pedro Alves <pedro@codesourcery.com>
14316 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14317 don't support CONTEXT_EXTENDED_REGISTERS.
14318 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14319 (the_low_target): Install them.
14320 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14321 failing with ERROR_PIPE_NOT_CONNECTED.
14323 2009-06-30 Doug Evans <dje@google.com>
14324 Pierre Muller <muller@ics.u-strasbg.fr>
14326 Add h/w watchpoint support to x86-linux, win32-i386.
14327 * Makefile.in (SFILES): Add i386-low.c
14328 (i386_low_h): Define.
14329 (i386-low.o): Add dependencies.
14330 (linux-x86-low.o): Add i386-low.h dependency.
14331 (win32-i386-low.o): Ditto.
14332 * i386-low.c: New file.
14333 * i386-low.h: New file.
14334 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14335 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14336 * linux-low.c (linux_add_process): Initialize arch_private.
14337 (linux_remove_process): Free arch_private.
14338 (add_lwp): Initialize arch_private.
14339 (delete_lwp): Free arch_private.
14340 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14342 * linux-low.h (process_info_private): New member arch_private.
14343 (lwp_info): New member arch_private.
14344 (linux_target_ops): New members new_process, new_thread,
14346 (ptid_of): New macro.
14347 * linux-x86-low.c: Include stddef.h, i386-low.h.
14348 (arch_process_info): New struct.
14349 (arch_lwp_info): New struct.
14350 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14351 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14352 (i386_dr_low_get_status): New function.
14353 (x86_insert_point, x86_remove_point): New functions.
14354 (x86_stopped_by_watchpoint): New function.
14355 (x86_stopped_data_address): New function.
14356 (x86_linux_new_process, x86_linux_new_thread): New functions.
14357 (x86_linux_prepare_to_resume): New function.
14358 (the_low_target): Add entries for insert_point, remove_point,
14359 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14361 * server.c (debug_hw_points): New global.
14362 (monitor_show_help): Document set debug-hw-points.
14363 (handle_query): Process "set debug-hw-points".
14364 * server.h (debug_hw_points): Declare.
14365 (paddress): Declare.
14366 * utils.c (NUMCELLS, CELLSIZE): New macros.
14367 (get_sell, xsnprintf, paddress): New functions.
14368 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14369 remove_point, stopped_by_watchpoint, stopped_data_address.
14370 * win32-i386-low.c: Include i386-low.h.
14371 (debug_reg_state): Replaces dr.
14372 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14373 (i386_dr_low_get_status): New function.
14374 (i386_insert_point, i386_remove_point): New functions.
14375 (i386_stopped_by_watchpoint): New function.
14376 (i386_stopped_data_address): New function.
14377 (i386_initial_stuff): Update.
14378 (get_thread_context,set_thread_context,i386_thread_added): Update.
14379 (the_low_target): Add entries for insert_point,
14380 remove_point, stopped_by_watchpoint, stopped_data_address.
14381 * win32-low.c (win32_insert_watchpoint): New function.
14382 (win32_remove_watchpoint): New function.
14383 (win32_stopped_by_watchpoint): New function.
14384 (win32_stopped_data_address): New function.
14385 (win32_target_ops): Add entries for insert_watchpoint,
14386 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14387 * win32-low.h (win32_target_ops): New members insert_point,
14388 remove_point, stopped_by_watchpoint, stopped_data_address.
14390 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14392 * server.c (process_serial_event): Re-return unsupported, not
14393 error, if the type isn't recognized. Re-allow supporting only
14394 insert or remove packets. Also call require_running for
14395 breakpoints. Add missing break statement to default case. Tidy.
14396 * target.h (struct target_ops): Rename insert_watchpoint to
14397 insert_point, and remove_watchpoint to remove_point.
14399 * linux-low.h (struct linux_target_ops): Likewise.
14400 * linux-low.c (linux_insert_watchpoint): Rename to ...
14401 (linux_insert_point): ... this. Adjust.
14402 (linux_remove_watchpoint): Rename to ...
14403 (linux_remove_point): ... this. Adjust.
14404 (linux_target_ops): Adjust.
14405 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14406 (cris_insert_point): ... this.
14407 (cris_remove_watchpoint): Rename to ...
14408 (cris_remove_point): ... this.
14409 (the_low_target): Adjust.
14411 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14413 * server.c (handle_v_kill): Pass signal_pid to
14414 kill_inferior if multi_process is zero.
14416 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14418 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14419 * target.h (target_ops): Comment for *_watchpoint to make it clear
14420 the functions can get types '0' and '1'.
14422 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14424 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14425 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14426 * regcache.c (get_regcache): Likewise.
14427 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14428 * win32-low.c (child_fetch_inferior_registers): Remove check for
14431 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14432 Pedro Alves <pedro@codesourcery.com>
14434 * target.h (struct target_ops) <supports_multi_process>: New
14436 (target_supports_multi_process): New.
14437 * server.c (handle_query): Even if GDB reports support, only
14438 enable multi-process if the target also supports it. Report
14439 multi-process support only if the target backend supports it.
14440 * linux-low.c (linux_supports_multi_process): New function.
14441 (linux_target_ops): Install it as target_supports_multi_process
14444 2009-05-24 Doug Evans <dje@google.com>
14446 Global renaming of find_thread_pid to find_thread_ptid.
14447 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14448 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14449 All callers updated.
14451 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14452 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14455 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14456 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14457 (linux_resume_one_lwp): Ditto.
14459 2009-05-23 Doug Evans <dje@google.com>
14461 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14462 from struct inferior_list_entry * to struct lwp_info *.
14463 All callers updated.
14465 2009-05-13 Doug Evans <dje@google.com>
14467 * linux-x86-low.c: Don't include assert.h.
14468 (x86_siginfo_fixup): Use fatal, not assert.
14469 (x86_arch_setup): Fix comment.
14471 2009-05-12 Doug Evans <dje@google.com>
14473 Biarch support for i386/amd64 gdbserver.
14474 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14475 Add linux-x86-low.c.
14476 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14477 (linux-x86-low.o): Add.
14478 * linux-x86-64-low.c: Delete.
14479 * linux-i386-low.c: Delete.
14480 * linux-x86-low.c: New file.
14481 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14483 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14485 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14486 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14487 (linux_child_pid_to_exec_file): New function.
14488 (elf_64_header_p, elf_64_file_p): New functions.
14489 (siginfo_fixup): New function.
14490 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14491 give target a chance to convert layout.
14492 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14493 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14495 2009-05-07 Doug Evans <dje@google.com>
14497 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14498 (regsets_store_inferior_registers): Ditto.
14500 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14504 * linux-low.c (must_set_ptrace_flags): Delete.
14505 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14507 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14508 `lwp->must_set_ptrace_flags' instead.
14509 (linux_wait_for_event_1): Set ptrace options here.
14510 (linux_wait_1): ... not here.
14512 2009-04-30 Doug Evans <dje@google.com>
14514 * inferiors.c (started_inferior_callback): New function.
14515 (attached_inferior_callback): New function.
14516 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14517 * server.c (print_started_pid, print_attached_pid): New functions.
14518 (detach_or_kill_for_exit): New function.
14519 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14520 * server.h (have_started_inferiors_p): Declare.
14521 (have_attached_inferiors_p): Declare.
14523 * inferiors.c (remove_process): Fix memory leak, free process.
14524 * linux-low.c (linux_remove_process): New function.
14525 (linux_kill): Call it instead of remove_process.
14526 (linux_detach, linux_wait_1): Ditto.
14528 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14530 * configure.srv: Add x86 Windows CE target.
14532 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14534 * inferiors.c (get_thread_process): Make global.
14535 * server.h (get_thread_process): Add prototype.
14536 * thread-db.c (find_one_thread): Use get_thread_process
14537 instead of current_process.
14538 (thread_db_get_tls_address): Do not crash if called when
14539 thread layer is not yet initialized.
14541 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14543 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14544 * spu-low.c (current_tid): Rename to ...
14545 (current_ptid): ... this.
14546 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14547 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14548 ptid_get_lwp (current_ptid) instead of current_tid.
14549 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14550 instead of current_tid. Use find_process_pid to verify pid
14551 argument is valid. Pass proper argument to remove_process.
14552 (spu_thread_alive): Compare current_ptid instead of current_tid.
14553 (spu_resume): Likewise.
14555 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14557 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14560 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14562 Implement the multiprocess extensions, and add linux multiprocess
14565 * server.h (ULONGEST): Declare.
14566 (struct ptid, ptid_t): New.
14567 (minus_one_ptid, null_ptid): Declare.
14568 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14569 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14570 (struct inferior_list_entry): Change `id' type from unsigned from
14572 (struct sym_cache, struct breakpoint, struct
14573 process_info_private): Forward declare.
14574 (struct process_info): Declare.
14575 (current_process): Declare.
14576 (all_processes): Declare.
14577 (initialize_inferiors): Declare.
14578 (add_thread): Adjust to use ptid_t.
14579 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14580 (add_process, remove_process, find_thread_pid): Declare.
14581 (find_inferior_id): Adjust to use ptid_t.
14582 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14583 (multi_process): Declare.
14584 (push_event): Adjust to use ptid_t.
14585 (read_ptid, write_ptid): Declare.
14586 (prepare_resume_reply): Adjust to use ptid_t.
14587 (clear_symbol_cache): Declare.
14588 * inferiors.c (all_processes): New.
14589 (null_ptid, minus_one_ptid): New.
14590 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14591 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14592 (add_thread): Change unsigned long to ptid. Remove gdb_id
14594 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14595 (gdb_id_to_thread): Rename to ...
14596 (find_thread_pid): ... this. Change unsigned long to ptid.
14597 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14598 (loaded_dll, pull_pid_from_list): Adjust.
14599 (add_process, remove_process, find_process_pid)
14600 (get_thread_process, current_process, initialize_inferiors): New.
14601 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14602 (struct target_waitstatus) <related_pid>: Ditto.
14603 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14604 return type to int.
14605 (struct target_ops) <join>: Add `pid' argument.
14606 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14607 (struct target_ops) <wait>: Add `ptid' field. Change return type
14609 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14610 (mywait): Add `ptid' argument. Change return type to ptid_t.
14611 (target_pid_to_str): Declare.
14612 * target.c (set_desired_inferior): Adjust to use ptids.
14613 (mywait): Add new `ptid' argument. Adjust.
14614 (target_pid_to_str): New.
14615 * mem-break.h (free_all_breakpoints): Declare.
14616 * mem-break.c (breakpoints): Delelete.
14617 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14618 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14619 to use per-process breakpoint list.
14620 (free_all_breakpoints): New.
14621 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14622 (symbol_cache, all_symbols_looked_up): Delete.
14624 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14626 (prepare_resume_reply): Change ptid argument's type from unsigned
14627 long to ptid_t. Adjust. Implement W;process and X;process.
14628 (free_sym_cache, clear_symbol_cache): New.
14629 (look_up_one_symbol): Adjust to per-process symbol cache. *
14630 * server.c (cont_thread, general_thread, step_thread): Change type
14632 (attached): Delete.
14633 (multi_process): New.
14634 (last_ptid): Change type to ptid_t.
14635 (struct vstop_notif) <ptid>: Change type to ptid_t.
14636 (queue_stop_reply, push_event): Change `ptid' argument's type to
14638 (discard_queued_stop_replies): Add `pid' argument.
14639 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14640 changes. Don't reference the `attached' global.
14641 (attach_inferior): Adjust to mywait interface changes.
14642 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14643 features. Handle and report "multiprocess+". Handle
14645 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14647 (handle_v_kill): New.
14648 (handle_v_stopped): Adjust to use target_pid_to_str.
14649 (handle_v_requests): Allow multiple attaches and runs when
14650 multiprocess extensions are in effect. Handle "vKill".
14651 (myresume): Adjust to use ptids.
14652 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14653 (handle_status): Adjust to discard_queued_stop_replies interface
14655 (first_thread_of, kill_inferior_callback)
14656 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14657 (main): Call initialize_inferiors. Adjust to use ptids, killing
14658 and detaching from all inferiors. Handle multiprocess packet
14660 * linux-low.h: Include gdb_proc_service.h.
14661 (struct process_info_private): New.
14662 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14663 <lwpid_of>: Use ptid_get_lwp.
14664 (get_lwp_thread): Adjust.
14665 (struct lwp_info): Add `dead' member.
14666 (find_lwp_pid): Declare.
14667 * linux-low.c (thread_db_active): Delete.
14668 (new_inferior): Adjust comment.
14669 (inferior_pid): Delete.
14670 (linux_add_process): New.
14671 (handle_extended_wait): Adjust.
14672 (add_lwp): Change unsigned long to ptid.
14673 (linux_create_inferior): Add process to processes table. Adjust
14674 to use ptids. Don't set new_inferior here.
14675 (linux_attach_lwp): Rename to ...
14676 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14677 it. Adjust to use ptids.
14678 (linux_attach_lwp): New.
14679 (linux_attach): Add process to processes table. Don't set
14681 (struct counter): New.
14682 (second_thread_of_pid_p, last_thread_of_process_p): New.
14683 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14684 multiple processes.
14685 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14686 processes. Remove process from process table.
14687 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14688 to multiple processes.
14689 (any_thread_of): New.
14690 (linux_detach): Add `pid' argument, and handle it. Remove process
14691 from processes table.
14692 (linux_join): Add `pid' argument. Handle it.
14693 (linux_thread_alive): Change unsighed long argument to ptid_t.
14694 Consider dead lwps as not being alive.
14695 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14696 threads we're not interested in.
14697 (same_lwp, find_lwp_pid): New.
14698 (linux_wait_for_lwp): Change `pid' argument's type from int to
14700 (linux_wait_for_event): Rename to ...
14701 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14702 from int to ptid_t. Adjust.
14703 (linux_wait_for_event): New.
14704 (linux_wait_1): Add `ptid' argument. Change return type to
14705 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14706 that exit from the process table.
14707 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14709 (mark_lwp_dead): New.
14710 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14711 stopping all threads, mark its main lwp as dead.
14712 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14714 (fetch_register, usr_store_inferior_registers)
14715 (regsets_fetch_inferior_registers)
14716 (regsets_store_inferior_registers, linux_read_memory)
14717 (linux_write_memory): Inline `inferior_pid'.
14718 (linux_look_up_symbols): Adjust to use per-process
14719 `thread_db_active'.
14720 (linux_request_interrupt): Adjust to use ptids.
14721 (linux_read_auxv): Inline `inferior_pid'.
14722 (initialize_low): Don't reference thread_db_active.
14723 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14724 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14725 (ps_getpid): Return the pid of the current inferior.
14726 * thread-db.c (proc_handle, thread_agent): Delete.
14727 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14729 (find_one_thread): Change argument type to ptid_t. Adjust to
14731 (maybe_attach_thread): Adjust to per-process data and ptids.
14732 (thread_db_find_new_threads): Ditto.
14733 (thread_db_init): Ditto.
14734 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14735 processes table. Adjust to use ptids.
14736 (spu_kill, spu_detach): Adjust interface. Remove process from
14738 (spu_join, spu_thread_alive): Adjust interface.
14739 (spu_wait): Adjust interface. Remove process from processes
14740 table. Adjust to use ptids.
14741 * win32-low.c (current_inferior_tid): Delete.
14742 (current_inferior_ptid): New.
14743 (debug_event_ptid): New.
14744 (thread_rec): Take a ptid. Adjust.
14745 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14746 (child_delete_thread): Ditto.
14747 (do_initial_child_stuff): Add `attached' argument. Add process to
14749 (child_fetch_inferior_registers, child_store_inferior_registers):
14751 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14752 (win32_attach): Pass 1 to do_initial_child_stuff.
14753 (win32_kill): Adjust interface. Remove process from processes
14755 (win32_detach): Ditto.
14756 (win32_join): Adjust interface.
14757 (win32_thread_alive): Take a ptid.
14758 (win32_resume): Adjust to use ptids.
14759 (get_child_debug_event): Ditto.
14760 (win32_wait): Adjust interface. Remove exiting process from
14763 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14765 Non-stop mode support.
14767 * server.h (non_stop): Declare.
14768 (gdb_client_data, handler_func): Declare.
14769 (delete_file_handler, add_file_handler, start_event_loop):
14771 (handle_serial_event, handle_target_event, push_event)
14772 (putpkt_notif): Declare.
14773 * target.h (enum resume_kind): New.
14774 (struct thread_resume): Replace `step' field by `kind' field.
14775 (TARGET_WNOHANG): Define.
14776 (struct target_ops) <wait>: Add `options' argument.
14777 <supports_non_stop, async, start_non_stop>: New fields.
14778 (target_supports_non_stop, target_async): New.
14779 (start_non_stop): Declare.
14780 (mywait): Add `options' argument.
14781 * target.c (mywait): Add `options' argument. Print child exit
14782 notifications here.
14783 (start_non_stop): New.
14784 * server.c (non_stop, own_buf, mem_buf): New globals.
14785 (struct vstop_notif): New.
14786 (notif_queue): New global.
14787 (queue_stop_reply, push_event, discard_queued_stop_replies)
14788 (send_next_stop_reply): New.
14789 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14791 (attach_inferior): In non-stop mode, don't wait for the target
14793 (handle_general_set): Handle QNonStop.
14794 (handle_query): When handling qC, return the current general
14795 thread, instead of the first thread of the list.
14796 (handle_query): If the backend supports non-stop mode, include
14797 QNonStop+ in the qSupported query response.
14798 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14800 (handle_v_attach, handle_v_run): Handle non-stop mode.
14801 (handle_v_stopped): New.
14802 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14803 (myresume): Adjust to use resume_kind. Handle non-stop.
14804 (queue_stop_reply_callback): New.
14805 (handle_status): Handle non-stop mode.
14806 (main): Clear non_stop flag on reconnection. Use the event-loop.
14807 Refactor serial protocol handling from here ...
14808 (process_serial_event): ... to this new function. When GDB
14809 selects any thread, select one here. In non-stop mode, wait until
14810 GDB acks all pending events before exiting.
14811 (handle_serial_event, handle_target_event): New.
14812 * remote-utils.c (remote_open): Install remote_desc in the event
14814 (remote_close): Remove remote_desc from the event loop.
14815 (putpkt_binary): Rename to...
14816 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14817 (putpkt_binary): New as wrapper around putpkt_binary_1.
14818 (putpkt_notif): New.
14819 (prepare_resume_reply): In non-stop mode, don't change the
14821 * event-loop.c: New.
14822 * Makefile.in (OBJ): Add event-loop.o.
14823 (event-loop.o): New rule.
14825 * linux-low.h (pid_of): Moved here.
14827 (get_lwp_thread): Use lwpid_of.
14828 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14829 * linux-low.c (pid_of): Delete.
14830 (inferior_pid): Use lwpid_of.
14831 (linux_event_pipe): New.
14832 (target_is_async_p): New.
14834 (handle_extended_wait): Use lwpid_of.
14835 (add_lwp): Don't set lwpid field.
14836 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14837 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14838 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14839 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14840 first. Adjust to linux_wait_for_event interface changes. Use
14842 (linux_detach): Don't delete the main lwp here.
14843 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14844 (status_pending_p): Don't consider explicitly suspended lwps.
14845 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14846 pointer. Add OPTIONS argument. Change return type to int. Use
14847 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14848 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14849 pointer. Add status pointer argument. Return a pid instead of a
14850 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14851 changes. In non-stop mode, don't switch to a random thread.
14852 (linux_wait): Rename to...
14853 (linux_wait_1): ... this. Add target_options argument, and handle
14854 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14855 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14856 clean exit and signal exit code. Don't stop all threads in
14857 non-stop mode. In all-stop mode, only stop all threads when
14858 reporting a stop to GDB. Handle explicit thread stop requests.
14859 (async_file_flush, async_file_mark): New.
14861 (send_sigstop): Use lwpid_of.
14862 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14863 interface changes. In non-stop mode, don't switch to a random
14865 (linux_resume_one_lwp): Use lwpid_of.
14866 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14867 (linux_resume_one_thread): ... this. Handle resume_stop. In
14868 non-stop mode, don't look for pending flag in all threads.
14869 (resume_status_pending_p): Don't consider explicitly suspended
14871 (my_waitpid): Reimplement. Emulate __WALL.
14872 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14874 (sigchld_handler, linux_supports_non_stop, linux_async)
14875 (linux_start_non_stop): New.
14876 (linux_target_ops): Register linux_supports_non_stop, linux_async
14877 and linux_start_non_stop.
14878 (initialize_low): Install SIGCHLD handler.
14879 * thread-db.c (thread_db_create_event, find_one_thread)
14880 (thread_db_get_tls_address): Use lwpid_of.
14881 * win32-low.c (win32_detach): Adjust to use resume_kind.
14882 (win32_wait): Add `options' argument.
14883 * spu-low.c (spu_resume): Adjust to use resume_kind.
14884 (spu_wait): Add `options' argument.
14886 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14888 Decouple target code from remote protocol.
14890 * target.h (enum target_waitkind): New.
14891 (struct target_waitstatus): New.
14892 (struct target_ops) <wait>: Return an unsigned long. Take a
14893 target_waitstatus pointer instead of a char pointer.
14894 (mywait): Likewise.
14895 * target.c (mywait): Change prototype to return an unsigned long.
14896 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14897 * server.h (thread_from_wait, old_thread_from_wait): Delete
14899 (prepare_resume_reply): Change prototype to take a
14901 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14902 (last_status, last_ptid): New.
14903 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14904 pid instead of a signal.
14905 (attach_inferior): Remove "status" and "signal" parameters.
14907 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14909 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14910 (handle_v_requests, myresume): Remove "status" and "signal"
14911 parameters. Adjust.
14912 (handle_status): New.
14913 (main): Delete local `status'. Adjust.
14914 * remote-utils.c: Include target.h.
14915 (prepare_resume_reply): Change prototype to take a
14916 target_waitstatus. Adjust.
14918 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14920 * spu-low.c (spu_wait): Adjust.
14921 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14923 (win32_wait): Adjust.
14925 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14927 * target.h (struct thread_resume): Delete leave_stopped member.
14928 (struct target_ops): Add a `n' argument to the `resume' callback.
14929 * server.c (start_inferior): Adjust.
14930 (handle_v_cont, myresume): Adjust.
14931 * linux-low.c (check_removed_breakpoint): Adjust to resume
14932 interface change, and to removed leave_stopped field.
14933 (resume_ptr): Delete.
14934 (struct thread_resume_array): New.
14935 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14936 resume interface change.
14937 (linux_continue_one_thread, linux_queue_one_thread)
14938 (resume_status_pending_p): Check if the resume field is NULL
14939 instead of checking the leave_stopped member.
14940 (linux_resume): Adjust to the target resume interface change.
14941 * spu-low.c (spu_resume): Adjust to the target resume interface
14943 * win32-low.c (win32_detach, win32_resume): Ditto.
14945 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14947 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14949 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14951 (linux_continue_one_thread): Only preserve the stepping flag if
14952 there's a pending breakpoint.
14954 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14956 * server.c (main): After the inferior having exited, call
14957 remote_close before exiting gdbserver.
14959 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14961 Fix size of FPSCR in Power 7 processors.
14962 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14963 (PPC_FEATURE_HAS_DFP): New #define.
14964 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14967 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14969 * server.c (handle_query) Whitespace and formatting.
14971 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14973 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14974 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14975 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14976 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14977 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14978 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14979 Makefile.in, configure.ac: Fix whitespace throughout.
14980 * configure: Regenerate.
14982 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14984 * inferiors.c (find_inferior): Make it safe for the callback
14985 function to delete the currently iterated inferior.
14987 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14989 * Makefile.in (linuw_low_h): Move higher.
14990 (thread-db.o): Depend on $(linux_low_h).
14992 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14994 Rename "process" to "lwp" throughout.
14996 * linux-low.c (all_processes): Rename to...
14997 (all_lwps): ... this.
14998 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14999 (add_process): Rename to ...
15000 (add_lwp): ... this. Adjust.
15001 (linux_create_inferior): Adjust.
15002 (linux_attach_lwp): Adjust.
15003 (linux_attach): Adjust.
15004 (linux_kill_one_process): Rename to ...
15005 (linux_kill_one_lwp): ... this. Adjust.
15006 (linux_kill): Adjust.
15007 (linux_detach_one_process): Rename to ...
15008 (linux_detach_one_lwp): ... this. Adjust.
15009 (linux_detach): Adjust.
15010 (check_removed_breakpoint): Adjust.
15011 (status_pending_p): Adjust.
15012 (linux_wait_for_process): Rename to ...
15013 (linux_wait_for_lwp): ... this. Adjust.
15014 (linux_wait_for_event): Adjust.
15015 (send_sigstop): Adjust.
15016 (wait_for_sigstop): Adjust.
15017 (stop_all_processes): Rename to ...
15018 (stop_all_lwps): ... this.
15019 (linux_resume_one_process): Rename to ...
15020 (linux_resume_one_lwp): ... this. Adjust.
15021 (linux_set_resume_request, linux_continue_one_thread)
15022 (linux_queue_one_thread, resume_status_pending_p)
15023 (usr_store_inferior_registers, regsets_store_inferior_registers)
15024 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15026 * linux-low.h (get_process): Rename to ...
15027 (get_lwp): ... this. Adjust.
15028 (get_thread_process): Rename to ...
15029 (get_thread_lwp): ... this. Adjust.
15030 (get_process_thread): Rename to ...
15031 (get_lwp_thread): ... this. Adjust.
15032 (struct process_info): Rename to ...
15033 (struct lwp_info): ... this.
15034 (all_processes): Rename to ...
15035 (all_lwps): ... this.
15036 * proc-service.c (ps_lgetregs): Adjust.
15037 * thread-db.c (thread_db_create_event, find_one_thread)
15038 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15040 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15042 * server.c (handle_query): Handle "qAttached".
15044 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15046 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15047 GPLv3, update license URL.
15049 2009-03-01 Doug Evans <dje@google.com>
15051 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15052 (server_h): Add gdb_signals.h.
15053 (signals.o): Update.
15054 * server.h (target_signal_from_host,target_signal_to_host_p)
15055 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15057 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15059 * remote-utils.c (getpkt): Also generate remote-debug
15060 information if noack_mode is set.
15062 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15064 * server.c (handle_query): Report qXfer:siginfo:read and
15065 qXfer:siginfo:write as supported and handle them.
15066 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15067 * linux-low.c (linux_xfer_siginfo): New.
15068 (linux_target_ops): Set it.
15070 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15072 * server.c (gdbserver_usage): Mention --remote-debug.
15073 (main): Accept '--remote-debug' switch.
15075 2009-01-18 Doug Evans <dje@google.com>
15077 * regcache.c (new_register_cache): No need to check result of xcalloc.
15078 * server.c (handle_search_memory): Back out calls to xmalloc,
15079 result is checked and error is returned to user upon failure.
15080 (handle_query): Ditto. Add more checks for result of malloc.
15081 (handle_v_cont): Check result of malloc, report error back to
15083 (handle_v_run): Ditto. Call freeargv.
15084 * server.h (freeargv): Declare.
15085 * utils.c (freeargv): New fn.
15087 2009-01-15 Doug Evans <dje@google.com>
15089 * gdbreplay.c (perror_with_name): Make arg const char *.
15090 * server.h (target_signal_to_name): Make return type const char *.
15091 * thread-db.c (thread_db_err_str): Make return type const char *.
15092 * utils.c (perror_with_name): Make arg const char *.
15094 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15096 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15097 when handling a EXIT_PROCESS_DEBUG_EVENT.
15099 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15101 * gdbreplay.c (gdbreplay_version): Update copyright year.
15102 * server.c (gdbserver_version): Likewise.
15104 2009-01-05 Doug Evans <dje@google.com>
15106 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15107 (handle_extended_wait): Improve comment.
15109 2008-12-13 Doug Evans <dje@google.com>
15111 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15112 * server.h (ATTR_MALLOC): New macro.
15113 (xmalloc,xcalloc,xstrdup): Declare.
15114 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15115 * inferiors.c: Ditto.
15116 * linux-low.c: Ditto.
15117 * mem-break.c: Ditto.
15118 * regcache.c: Ditto.
15119 * remote-utils.c: Ditto.
15122 * win32-low.c: Ditto.
15124 2008-12-12 Doug Evans <dje@google.com>
15126 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15127 in debugging printf.
15129 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15131 2008-12-09 Doug Evans <dje@google.com>
15133 * linux-low.h (struct process_info): Delete member tid, unused.
15134 * thread-db.c (find_one_thread): Update.
15135 (maybe_attach_thread): Update.
15137 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15139 * target.h (struct target_ops): Add qxfer_osdata member.
15140 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15142 (linux_qxfer_osdata): New functions.
15143 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15145 * server.c (handle_query): Handle "qXfer:osdata:read:".
15146 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15147 (buffer_xml_printf): New functions.
15148 * server.h (struct buffer): New.
15149 (buffer_grow_str, buffer_grow_str0): New macros.
15150 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15151 (buffer_xml_printf): Declare.
15153 2008-11-24 Doug Evans <dje@google.com>
15155 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15157 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15159 * server.c (handle_v_run): Always use the supplied argument list.
15161 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15163 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15164 (xtensa_regmap_table): Add entry for scompare1.
15166 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15168 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15169 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15170 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15171 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15172 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15173 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15174 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15175 XML target descriptions.
15176 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15177 when inferior is running on an ISA 2.05 or later processor. Add
15178 special case to return offset for full 64-bit slot of FPSCR when
15181 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15183 * Makefile.in (SFILES, clean): Added sparc64 files.
15184 (reg-sparc64.o, reg-sparc64.c): New.
15185 * configure.srv (sparc*-*-linux*): New configuration.
15186 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15187 syscall arguments for SPARC.
15188 (regsets_store_inferior_registers): Likewise.
15189 * linux-sparc-low.c: New file.
15191 2008-10-21 Doug Evans <dje@google.com>
15193 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15194 (READLINE_DIR,READLINE_DEP): Delete.
15195 (INTERNAL_CFLAGS): Update.
15196 (LINTFLAGS): Update.
15198 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15200 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15201 whole argv from the last run, not just argv[0].
15203 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15205 * regcache.c (new_register_cache): Return NULL if the register
15206 cache size isn't known yet.
15207 (free_register_cache): Avoid dereferencing a NULL regcache.
15209 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15211 * configure.srv: Merge MIPS and MIPS64.
15213 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15215 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15217 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15219 * Makefile.in: Add required vsx dependencies.
15221 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15222 Declare init_registers_powerpc_vsx32l.
15223 Declare init_registers_powerpc_vsx64l.
15224 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15225 (ppc_arch_setup): Check for VSX in hwcap.
15226 (ppc_fill_vsxregset): New function.
15227 (ppc_store_vsxregset): New function.
15228 Add new VSX entry in regset_info target_regsets.
15230 * configure.srv: Add new VSX dependencies.
15232 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15234 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15235 (remote_open): Set or clear transport_is_reliable.
15236 (putpkt_binary): Don't expect acks in noack mode.
15237 (getpkt): Don't send ack/nac in noack mode.
15238 * server.c (handle_general_set): Handle QStartNoAckMode.
15239 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15241 (main): Reset noack_mode on every connection.
15242 * server.h (noack_mode): Declare.
15244 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15246 * Makefile.in (GDBREPLAY_OBS): New variable.
15247 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15249 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15250 Daniel Jacobowitz <dan@codesourcery.com>
15252 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15253 (usr_store_inferior_registers): Likewise.
15254 (regsets_store_inferior_registers): Likewise.
15256 2008-07-31 Rolf Jansen <rj@surtec.com>
15257 Pedro Alves <pedro@codesourcery.com>
15259 * configure.ac: Check for memmem declaration.
15260 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15261 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15262 (disable_packet_qfThreadInfo): Unconditionally compile.
15263 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15264 * configure, config.in: Regenerate.
15266 2008-07-28 Doug Kwan <dougkwan@google.com>
15268 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15269 (linux_write_memory): Remove declaration of errno.
15271 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15273 * linux-low.c (handle_extended_wait): Do not use "status"
15274 variable uninitialized.
15276 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15278 * server.c (handle_v_attach): Inhibit reporting dll changes.
15280 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15282 * remote-utils.c (prepare_resume_reply): If requested, don't
15283 output "thread:TID" in the T stop reply.
15285 * server.c (disable_packet_vCont, disable_packet_Tthread)
15286 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15287 (handle_query): If requested, disable support for qC, qfThreadInfo
15289 (handle_v_requests): If requested, disable support for vCont.
15290 (gdbserver_show_disableable): New.
15291 (main): Handle --disable-packet and --disable-packet=LIST.
15293 * server.h (disable_packet_vCont, disable_packet_Tthread)
15294 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15296 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15298 * server.c (gdbserver_usage): Mention --version.
15300 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15302 * Makefile.in (gdbreplay.o): New rule.
15304 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15306 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15307 message, not gdbserver.
15309 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15310 Nathan Sidwell <nathan@codesourcery.com>
15311 Joseph Myers <joseph@codesourcery.com>
15313 * acinclude.m4: Include ../../config/acx.m4.
15314 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15315 * configure, config.in: Regenerate.
15316 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15317 * server.c (gdbserver_version): Print PKGVERSION.
15318 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15319 (main): Adjust gdbserver_usage calls.
15320 * gdbreplay.c (version, host_name): Add declarations.
15321 (gdbreplay_version, gdbreplay_usage): New.
15322 (main): Accept --version and --help options.
15324 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15326 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15327 (arm_breakpoint_at): Handle Thumb.
15328 (the_low_target): Add comment.
15330 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15332 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15334 2008-05-09 Doug Evans <dje@google.com>
15336 * server.h (decode_search_memory_packet): Declare.
15337 * remote-utils.c (decode_search_memory_packet): New fn.
15338 * server.c (handle_search_memory_1): New fn.
15339 (handle_search_memory): New fn.
15340 (handle_query): Process qSearch:memory packets.
15342 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15344 * regcache.c (registers_length): Remove.
15345 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15346 full register packet.
15347 * regcache.h (registers_length): Remove prototype.
15348 * server.h (PBUFSIZ): Define to 16384.
15350 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15352 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15353 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15354 powerpc-64l.o, and powerpc-altivec64l.o.
15355 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15356 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15357 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15358 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15359 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15362 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15363 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15364 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15365 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15366 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15367 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15368 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15369 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15370 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15371 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15374 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15375 (init_registers_powerpc_32l): ... this new prototype.
15376 (init_registers_powerpc_32): Remove, replace by ...
15377 (init_registers_powerpc_altivec32l): ... this new prototype.
15378 (init_registers_powerpc_e500): Remove, replace by ...
15379 (init_registers_powerpc_e500l): ... this new prototype.
15380 (init_registers_ppc64): Remove, replace by ...
15381 (init_registers_powerpc_64l): ... this new prototype.
15382 (init_registers_powerpc_64): Remove, replace by ...
15383 (init_registers_powerpc_altivec64l): ... this new prototype.
15384 (ppc_num_regs): Set to 73.
15385 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15386 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15387 (ppc_cannot_store_register): Handle orig_r3 and trap.
15388 (ppc_arch_setup): Update init_registers_... calls.
15389 (ppc_fill_gregset): Handle orig_r3 and trap.
15391 * inferiors.c (clear_inferiors): Reset current_inferior.
15393 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15395 * acinclude.m4: Add override.m4.
15396 * configure: Regenerate.
15398 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15400 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15401 initial call to init_register_ppc64.
15403 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15405 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15406 single powerpc*-*-linux* case.
15407 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15409 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15411 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15412 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15414 * linux-ppc-low.c: Include <elf.h>.
15415 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15416 (ppc_hwcap): New global variable.
15417 (ppc_regmap): Remove __SPE__ #ifdef sections.
15418 (ppc_regmap_e500): New global variable.
15419 (ppc_cannot_store_register): Update __SPE__ special case.
15420 (ppc_get_hwcap): New function.
15421 (ppc_arch_setup): Use it to determine whether inferior supports
15422 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15423 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15424 Do not access registers if target does not support AltiVec.
15425 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15426 Do not access registers if target does not support SPE.
15427 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15429 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15431 * linux-low.c (disabled_regsets, num_regsets): New.
15432 (use_regsets_p): Delete.
15433 (linux_wait_for_process): Clear disabled_regsets.
15434 (regsets_fetch_inferior_registers): Check and set it.
15435 (regsets_store_inferior_registers): Likewise.
15436 (linux_fetch_registers, linux_store_registers): Do not use
15438 (initialize_low): Allocate disabled_regsets.
15440 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15442 * Makefile.in (LIBOBJS): New.
15443 (OBS): Use LIBOBJS.
15444 (memmem.o): New rule.
15445 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15446 * configure: Regenerated.
15448 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15450 * server.c (handle_query): Never return "unsupported" for
15451 qXfer:features:read queries.
15453 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15455 * server.c (get_features_xml): Fix inverted condition.
15456 (handle_query): Always support qXfer:feature:read.
15458 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15460 * server.c (wrapper_argv): New.
15461 (start_inferior): Handle wrapper_argv. If set, expect an extra
15463 (gdbserver_usage): Document --wrapper.
15464 (main): Parse --wrapper.
15466 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15468 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15469 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15470 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15471 (ppc_set_pc): Likewise.
15472 (ppc_arch_setup): New function.
15473 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15474 of collect_register.
15475 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15477 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15479 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15480 instead of linux-ppc64-low.o.
15481 * linux-ppc64-low.c: Remove file.
15482 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15483 (linux-ppc64-low.o): Remove rule.
15485 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15486 (init_registers_powerpc_64): Likewise.
15487 (ppc_regmap): Conditionally define depending on __powerpc64__.
15488 (ppc_cannot_store_register): Do not special-case "fpscr" when
15489 compiled on __powerpc64__.
15490 (ppc_collect_ptrace_register): New function.
15491 (ppc_supply_ptrace_register): New function.
15492 (ppc_breakpoint): Change type to "unsigned int".
15493 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15494 (the_low_target): Conditionally provide initializers for the
15495 arch_setup member depending on __powerpc64__. Install
15496 collect_ptrace_register and supply_ptrace_register members.
15498 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15500 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15501 * server.c (gdbserver_xmltarget): Define.
15502 (get_features_xml): Use it to replace "target.xml" and arch_string.
15504 * configure.srv: Remove srv_xmltarget. Add XML files that were
15505 mentioned there to srv_xmlfiles instead. Remove conditional tests
15506 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15507 srv_xmlfiles and srv_regobj to include all possible choices.
15508 * configure.ac (srv_xmltarget): Remove.
15509 (srv_xmlfiles): Do not add "target.xml".
15510 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15511 checks for supplementary target information.
15512 * configure: Regenerate.
15513 * Makefile.in (XML_TARGET): Remove.
15514 (target.xml): Remove rule.
15515 (clean): Do not clean up target.xml.
15516 (.PRECIOUS): Do not mention target.xml.
15518 * target.h (struct target_ops): Remove arch_string member.
15519 * linux-low.c (linux_arch_string): Remove.
15520 (linux_target_ops): Remove arch_string initializer.
15521 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15522 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15523 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15524 * spu-low.c (spu_arch_string): Remove.
15525 (spu_target_ops): Remove arch_string initializer.
15526 * win32-low.c (win32_arch_string): Remove.
15527 (win32_target_ops): Remove arch_string initializer.
15528 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15529 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15530 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15532 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15534 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15535 by collect_ptrace_register and supply_ptrace_register hooks.
15536 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15537 instead of checking for the_low_target.left_pad_xfer.
15538 (usr_store_inferior_registers): Use collect_ptrace_register callback
15539 instead of checking for the_low_target.left_pad_xfer.
15541 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15542 (s390_supply_ptrace_register): Likewise.
15543 (s390_fill_gregset): Call s390_collect_ptrace_register.
15544 (the_low_target): Update.
15546 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15547 (ppc_supply_ptrace_register): Likewise.
15548 (the_low_target): Update.
15550 * linux-i386-low.c (the_low_target): Update.
15551 * linux-x86-64-low.c (the_low_target): Update.
15553 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15555 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15556 reg-s390.o and reg-s390x.o.
15558 * linux-low.c (new_inferior): New global variable.
15559 (linux_create_inferior, linux_attach): Set it.
15560 (linux_wait_for_process): Call the_low_target.arch_setup after the
15561 target has stopped for the first time.
15562 (initialize_low): Do not call the_low_target.arch_setup.
15564 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15565 (s390_set_pc): Likewise.
15566 (s390_arch_setup): New function.
15567 (the_low_target): Use s390_arch_setup as arch_setup routine.
15569 * regcache.c (realloc_register_cache): New function.
15570 (set_register_cache): Call it for each existing regcache.
15572 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15574 * server.h (init_registers): Remove prototype.
15576 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15577 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15578 instead of init_registers ().
15579 * linux-arm-low.c (init_registers_arm): Add prototype.
15580 (init_registers_arm_with_iwmmxt): Likewise.
15581 (the_low_target): Add initializer for arch_setup field.
15582 * linux-cris-low.c (init_registers_cris): Add prototype.
15583 (the_low_target): Add initializer for arch_setup field.
15584 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15585 (the_low_target): Add initializer for arch_setup field.
15586 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15587 (the_low_target): Add initializer for arch_setup field.
15588 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15589 (the_low_target): Add initializer for arch_setup field.
15590 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15591 (the_low_target): Add initializer for arch_setup field.
15592 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15593 (the_low_target): Add initializer for arch_setup field.
15594 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15595 (init_registers_mips64_linux): Likewise.
15596 (the_low_target): Add initializer for arch_setup field.
15597 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15598 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15599 (the_low_target): Add initializer for arch_setup field.
15600 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15601 (init_registers_powerpc_64): Likewise.
15602 (the_low_target): Add initializer for arch_setup field.
15603 * linux-s390-low.c (init_registers_s390): Add prototype.
15604 (init_registers_s390x): Likewise.
15605 (the_low_target): Add initializer for arch_setup field.
15606 * linux-sh-low.c (init_registers_sh): Add prototype.
15607 (the_low_target): Add initializer for arch_setup field.
15608 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15609 (the_low_target): Add initializer for arch_setup field.
15610 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15611 (the_low_target): Add initializer for arch_setup field.
15613 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15614 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15615 instead of init_registers ().
15616 * win32-arm-low.c (init_registers_arm): Add prototype.
15617 (the_low_target): Add initializer for arch_setup field.
15618 * win32-i386-low.c (init_registers_i386): Add prototype.
15619 (the_low_target): Add initializer for arch_setup field.
15621 * spu-low.c (init_registers_spu): Add prototype.
15622 (initialize_low): Call initialie_registers_spu () instead of
15623 initialize_registers ().
15625 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15627 * server.c (handle_v_requests): When handling the vRun and vAttach
15628 packets, if already debugging a process, don't kill it. Return an
15631 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15633 * server.c (handle_query): Correct length check.
15635 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15637 * win32-low.c (do_initial_child_stuff): Add process handle
15638 parameter. Set current_process_handle and current_process_id from the
15639 parameters. Clear globals.
15640 (win32_create_inferior): Don't set current_process_handle and
15641 current_process_id here. Instead pass them on the call to
15642 do_initial_child_stuff.
15643 (win32_attach): Likewise.
15644 (win32_clear_inferiors): New.
15645 (win32_kill): Don't close the current process handle or the
15646 current thread handle here. Instead call win32_clear_inferiors.
15647 (win32_detach): Don't open a new handle to the process. Call
15648 win32_clear_inferiors.
15649 (win32_join): Don't rely on current_process_handle; open a new
15650 handle using the process id.
15651 (win32_wait): Call win32_clear_inferiors when the inferior process
15654 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15656 * server.c (monitor_show_help): Add "exit".
15658 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15660 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15661 (clean): Add reg-xtensa.c.
15662 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15663 * configure.srv (xtensa*-*-linux*) New target.
15664 * linux-xtensa-low.c: New.
15665 * xtensa-xtregs.c: New.
15667 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15669 * hostio.c: Don't include errno.h.
15670 (errno_to_fileio_errno): Move to hostio-errno.
15671 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15672 error number outputting to the target->hostio_last_error callback.
15673 (hostio_packet_error): Use FILEIO_EINVAL directly.
15674 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15675 calls to hostio_error.
15676 * hostio-errno.c: New.
15677 * server.h (hostio_last_error_from_errno): Declare.
15678 * target.h (target_ops): Add hostio_last_error member.
15679 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15680 as hostio_last_error handler.
15681 * spu-low.c (spu_target_ops): Likewise.
15682 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15683 (wince_hostio_last_error): New functions.
15684 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15685 as hostio_last_error handler.
15686 (win32_target_ops) [!_WIN32_WCE]: Register
15687 hostio_last_error_from_errno as hostio_last_error handler.
15688 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15689 (hostio-errno.o): New rule.
15690 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15691 * configure.srv (srv_hostio_err_objs): New variable. Default to
15693 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15694 * configure: Regenerate.
15696 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15698 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15699 (linux_kill, linux_detach): Clean up the process list.
15700 * remote-utils.c (remote_open): Improve port number parsing.
15701 (putpkt_binary, input_interrupt): Only send interrupts if the target
15703 * server.c (extended_protocol): Make static.
15704 (attached): Define earlier.
15705 (exit_requested, response_needed, program_argv): New variables.
15706 (target_running): New.
15707 (start_inferior): Clear attached here.
15708 (attach_inferior): Set attached here.
15709 (require_running): Define.
15710 (handle_query): Use require_running and target_running. Implement
15712 (handle_v_attach, handle_v_run): New.
15713 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15714 (gdbserver_usage): Update.
15715 (main): Redo argument parsing. Handle --debug and --multi. Handle
15716 --attach along with other options or after the port. Save
15717 program_argv. Support no initial program. Resynchronize
15718 communication with GDB after an error. Handle "monitor exit".
15719 Use require_running and target_running. Always allow the extended
15720 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15721 restart in extended mode.
15722 * README: Refer to the GDB manual. Update --attach usage.
15724 2007-12-20 Andreas Schwab <schwab@suse.de>
15726 * linux-low.c (STACK_SIZE): Define.
15727 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15728 (linux_test_for_tracefork): Likewise.
15730 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15732 * linux-low.c (linux_wait_for_event): Update messages. Do not
15733 reinsert auto-delete breakpoints.
15734 * mem-break.c (struct breakpoint): Change return type of handler to
15736 (set_breakpoint_at): Update handler type.
15737 (reinsert_breakpoint_handler): Return 1 instead of calling
15739 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15741 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15742 * mem-break.h (set_breakpoint_at): Update handler type.
15743 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15744 * win32-low.c (auto_delete_breakpoint): New.
15745 (get_child_debug_event): Use it.
15747 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15749 * configure.ac: Check for pread and pwrite.
15750 * hostio.c (handle_pread): Fall back to lseek and read.
15751 (handle_pwrite): Fall back to lseek and write.
15752 * config.in, configure: Regenerated.
15754 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15756 * server.c (myresume): Add own_buf argument.
15757 (main): Update calls.
15759 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15761 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15762 * remote-utils.c (remote_open): Do not call disable_async_io.
15763 (block_async_io): Delete.
15764 (unblock_async_io): Make static.
15765 (initialize_async_io): New.
15766 * server.c (handle_v_cont): Handle async I/O here.
15767 (myresume): Likewise. Move other common resume tasks here...
15768 (main): ... from here. Call initialize_async_io. Disable async
15769 I/O before the main loop.
15770 * server.h (initialize_async_io): Declare.
15771 (block_async_io, unblock_async_io): Delete prototypes.
15772 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15774 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15776 * remote-utils.c (readchar): Allow binary data in received messages.
15778 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15780 * win32-low.c (attaching): New global.
15781 (win32_create_inferior): Clear the `attaching' global.
15782 (win32_attach): Set the `attaching' global.
15783 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15784 attaching. Only set a breakpoint at the entry point if not
15787 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15789 * server.c (main): Don't report dll events on the initial
15790 connection on attaches.
15792 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15794 * server.c (main): Relax numerical bases supported for the pid of
15795 the --attach command line argument.
15797 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15799 * win32-low.c (win32_attach): Call OpenProcess before
15800 DebugActiveProcess, not after. Add last error output to error
15803 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15805 * win32-low.c (win32_get_thread_context)
15806 (win32_set_thread_context): New functions.
15807 (thread_rec): Use win32_get_thread_context.
15808 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15809 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15812 2007-12-03 Leo Zayas
15813 Pedro Alves <pedro_alves@portugalmail.pt>
15815 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15817 (child_add_thread): Minor cleanup.
15818 (child_continue): Resume artificially suspended threads before
15819 calling ContinueDebugEvent.
15820 (suspend_one_thread): New.
15821 (fake_breakpoint_event): New.
15822 (get_child_debug_event): Change return type to int. Check here if
15823 gdb sent an interrupt request. If a soft interrupt was requested,
15824 fake a breakpoint event. Return 0 if there is no event to handle,
15826 (win32_wait): Don't check here if gdb sent an interrupt request.
15827 Ensure there is a valid event to handle.
15828 (win32_request_interrupt): Add soft interruption method as last
15831 2007-12-03 Leo Zayas
15832 Pedro Alves <pedro_alves@portugalmail.pt>
15834 * win32-low.h (win32_thread_info): Add descriptions to the
15835 structure members. Replace `suspend_count' counter by a
15837 * win32-low.c (thread_rec): Update condition of when to get the
15838 context from the inferior. Rely on ContextFlags being set if it
15839 has already been retrieved. Only suspend the inferior thread if
15840 we haven't already. Warn if that fails.
15841 (continue_one_thread): s/suspend_count/suspended/. Only call
15842 ResumeThread once. Warn if that fails.
15844 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15846 * win32-low.c (win32_wait): Don't read from the inferior when it
15847 has already exited.
15849 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15851 * Makefile.in (win32_low_h): New variable.
15852 (win32-low.o): Add dependency on $(win32_low_h).
15853 (win32-arm-low.o, win32-i386-low.o): New rules.
15855 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15857 * hostio.c: Correct copyright year.
15859 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15861 * Makefile.in (OBS): Add hostio.o.
15862 (hostio.o): New rule.
15863 * server.h (handle_vFile): Declare.
15864 * hostio.c: New file.
15865 * server.c (handle_v_requests): Take packet_len and new_packet_len
15866 for binary packets. Call handle_vFile.
15867 (main): Update call to handle_v_requests.
15869 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15871 * linux-low.c: Include <sched.h>.
15873 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15875 * linux-low.c (linux_tracefork_grandchild): New.
15876 (linux_tracefork_child): Use clone.
15877 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15879 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15881 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15883 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15885 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15887 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15889 * inferiors.c (change_inferior_id): Delete.
15890 (add_pid_to_list, pull_pid_from_list): New.
15891 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15892 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15893 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15894 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15895 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15896 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15897 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15898 (using_threads): Always set to 1.
15899 (handle_extended_wait): New.
15900 (add_process): Do not set TID.
15901 (linux_create_inferior): Set must_set_ptrace_flags.
15902 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15903 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15904 (linux_thread_alive): Rename TID argument to LWPID.
15905 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15906 (linux_wait_for_event): Do not use TID or check using_threads. Update
15907 call to dead_thread_notify. Call handle_extended_wait.
15908 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15909 (send_sigstop): Delete sigstop_sent.
15910 (wait_for_sigstop): Avoid TID.
15911 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15912 (linux_test_for_tracefork): New.
15913 (linux_lookup_signals): Use thread_db_active and
15914 linux_supports_tracefork_flag.
15915 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15916 * linux-low.h (get_process_thread): Avoid TID.
15917 (struct process_ifo): Move thread_known and tid to the end. Remove
15919 (linux_attach_lwp, thread_db_init): Update prototypes.
15920 * server.h (change_inferior_id): Delete prototype.
15921 (add_pid_to_list, pull_pid_from_list): New prototypes.
15922 * thread-db.c (thread_db_use_events): New.
15923 (find_first_thread): Rename to...
15924 (find_one_thread): ...this. Update callers and messages. Do not
15925 call fatal. Check thread_db_use_events. Do not call
15926 change_inferior_id or new_thread_notify.
15927 (maybe_attach_thread): Update. Do not call new_thread_notify.
15928 (thread_db_init): Set thread_db_use_events. Check use_events.
15929 * utils.c (fatal, warning): Correct message prefix.
15931 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15933 * Makefile.in (clean): Remove new files.
15934 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15935 (powerpc-64.o, powerpc-64.c): New rules.
15936 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15937 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15939 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15941 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15942 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15943 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15944 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15945 (target_regsets): Add AltiVec and SPE register sets.
15946 * configure.ac: Check for AltiVec and SPE.
15947 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15948 (ppc_fill_vrregset, ppc_store_vrregset): New.
15949 (target_regsets): Add AltiVec register set.
15950 * configure: Regenerated.
15952 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15954 * linux-low.c (O_LARGEFILE): Define.
15955 (linux_read_memory): Use /proc/PID/mem.
15956 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15957 * configure, config.in: Regenerated.
15959 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15961 * linux-low.c (linux_wait_for_event): Do not pass signals while
15964 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15966 * win32-low.c (create_process): New.
15967 (win32_create_inferior): Use create_process instead of
15968 CreateProcess. If create_process failed retry appending an ".exe"
15969 suffix. Store the GetLastError result immediatelly after
15970 create_process calls and use it on the call to error.
15972 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15974 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15976 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15978 * configure.ac: Switch license to GPLv3.
15980 2007-08-01 Michael Snyder <msnyder@access-company.com>
15982 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15984 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15986 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15988 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15989 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15990 CloseToolhelp32Snapshot.
15991 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15992 CloseToolhelp32Snapshot.
15994 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15996 * server.c (main): Check for inferior exit before main loop.
15998 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16000 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16001 instead of on tmp_desc.
16003 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16004 Daniel Jacobowitz <dan@codesourcery.com>
16006 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16007 (add_thread): Minor cleanups.
16008 (clear_inferiors): Move lower in the file. Clear the DLL
16010 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16011 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16012 (xml_escape_text): New.
16013 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16015 (handle_v_cont): Report errors.
16016 (gdbserver_version): Update.
16017 (main): Correct size of own_buf. Do not report initial DLL events.
16018 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16019 (unloaded_dll, xml_escape_text): New.
16020 * win32-low.c (enum target_waitkind): Update comments.
16021 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16022 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16023 (win32_EnumProcessModules, win32_GetModuleInformation)
16024 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16025 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16026 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16027 (win32_Module32First, win32_Module32Next, load_toolhelp)
16028 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16029 (get_child_debug_event): Handle DLL events.
16030 (win32_wait): Likewise.
16032 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16034 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16035 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16037 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16039 * win32-low.c (handle_output_debug_string): Ignore event if not
16042 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16044 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16046 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16048 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16050 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16052 * inferiors.c (change_inferior_id): Add comment.
16053 * linux-low.c (check_removed_breakpoint): Add an early
16054 prototype. Improve debug output.
16055 (linux_attach): Doc update.
16056 (linux_detach_one_process, linux_detach): Clean up before releasing
16058 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16059 * linux-low.h (struct process_info): Doc improvement.
16060 * mem-break.c (delete_all_breakpoints): New.
16061 * mem-break.h (delete_all_breakpoints): New prototype.
16062 * thread-db.c (find_first_thread): New.
16063 (thread_db_create_event): Call it instead of
16064 thread_db_find_new_threads. Clean up unused variables.
16065 (maybe_attach_thread): Remove first thread handling.
16066 (thread_db_find_new_threads): Use find_first_thread.
16067 (thread_db_get_tls_address): Likewise.
16069 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16071 * thread-db.c (thread_db_find_new_threads): Add prototype.
16072 (thread_db_create_event): Check for the main thread before adding
16074 (maybe_attach_thread): Only enable event reporting if TID == 0.
16075 (thread_db_get_tls_address): Check for new threads.
16077 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16079 * linux-low.c (linux_create_inferior): Try execv before execvp.
16080 * spu-low.c (spu_create_inferior): Likewise.
16082 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16084 * linux-low.c (linux_create_inferior): Change execv to execvp.
16085 * spu-low.c (spu_create_inferior): Likewies.
16087 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16089 * Makefile.in (clean): Clean new files instead of deleted ones.
16090 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16091 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16093 * configure.srv: Specify XML files and new regformats for MIPS and
16095 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16096 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16097 an entry for the restart register.
16098 (mips_cannot_fetch_register, mips_cannot_store_register)
16099 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16100 register names to match the XML descriptions.
16101 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16102 restart register instead of $0.
16104 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16105 Markus Deuling <deuling@de.ibm.com>
16107 * remote-utils.c (decode_xfer_write): New function.
16108 * server.h (decode_xfer_write): Add prototype.
16109 * server.c (handle_query): Add PACKET_LEN argument. Support
16110 qXfer:spu:read and qXfer:spu:write packets.
16111 (main): Pass packet_len to handle_query.
16112 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16113 * target.h (target_ops): Add qxfer_spu.
16115 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16117 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16118 accessing non-seekable spufs files.
16120 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16122 * server.c (handle_query): Add reply for qC packet.
16124 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16125 Leo Zayas <lerele@champenstudios@com>
16127 * server.h (check_remote_input_interrupt_request): New function.
16128 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16129 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16130 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16131 (check_remote_input_interrupt_request): New function.
16132 * server.h (check_remote_input_interrupt_request): Declare.
16133 * win32-low.c (winapi_DebugBreakProcess,
16134 winapi_GenerateConsoleCtrlEvent): New typedefs.
16135 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16137 (win32_wait): Check for remote interrupt request
16138 with check_remote_input_interrupt_request.
16139 (win32_request_interrupt): New function.
16140 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16142 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16144 * win32-low.c (debug_registers_changed,
16145 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16146 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16147 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16148 (thread_rec): Get context using the low target.
16149 (child_add_thread): Call thread_added on the low target,
16150 which does the same thing.
16152 (do_initial_child_stuff): Remove debug registers references.
16153 Set context using the low target. Resume threads after
16154 setting the contexts.
16155 (child_continue): Remove dead variable. Remove debug
16156 registers references.
16157 (child_fetch_inferior_registers): Go through the low target.
16158 (do_child_store_inferior_registers): Remove.
16159 (child_store_inferior_registers): Go through the low target.
16160 (win32_resume): Remove debug registers references.
16161 Set context using the low target.
16162 (handle_exception): Change return type to void. Don't record
16163 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16164 first chance exception.
16165 (get_child_debug_event): Change return type to void. Remove
16166 goto loop. Always return after waiting for debug event.
16167 (win32_wait): Convert to switch statement. Handle spurious
16170 * win32-i386-low.c (debug_registers_changed,
16171 debug_registers_used): New.
16172 (initial_stuff): Rename to ...
16173 (i386_initial_stuff): ... this. Clear debug registers
16175 (store_debug_registers): Delete.
16176 (i386_get_thread_context): New.
16177 (load_debug_registers): Delete.
16178 (i386_set_thread_context): New.
16179 (i386_thread_added): New.
16180 (single_step): Rename to ...
16181 (i386_single_step): ... this.
16182 (do_fetch_inferior_registers): Rename to ...
16183 (i386_fetch_inferior_register): ... this.
16184 (i386_store_inferior_register): New.
16185 (the_low_target): Adapt to new interface.
16187 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16188 (arm_get_thread_context): New.
16189 (arm_set_thread_context): New.
16191 (do_fetch_inferior_registers): Rename to ...
16192 (arm_fetch_inferior_register): ... this.
16193 (arm_store_inferior_register): New.
16194 (arm_wince_breakpoint): Reimplement as unsigned long.
16195 (arm_wince_breakpoint_len): Define.
16196 (the_low_target): Adapt to new interface.
16198 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16199 load_debug_registers. Add get_thread_context, set_thread_context,
16200 thread_added and store_inferior_register. Rename
16201 fetch_inferior_registers to fetch_inferior_register.
16202 (regptr): Remove declaration.
16204 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16206 * linux-low.c (linux_detach): Change return type to int. Return 0.
16207 * spu-low.c (spu_detach): Likewise.
16209 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16211 * target.h (target_ops): Change return type of detach to int.
16213 (join_inferior): New.
16214 * server.c (main): Don't skip detach support on mingw32.
16215 If the inferior doesn't support detaching return error.
16216 Call join_inferior instead of using waitpid.
16217 * linux-low.c (linux_join): New.
16218 (linux_target_op): Add linux_join.
16219 * spu-low.c (spu_join): New.
16220 (spu_target_ops): Add spu_join.
16221 * win32-low.c (win32_detach): Adapt to new interface.
16222 Reopen current_process_handle before detaching. Issue a child
16223 resume before detaching.
16225 (win32_target_op): Add win32_join.
16227 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16229 * win32-low.c (win32-attach): Fix return value.
16230 * target.h (target_ops): Describe ATTACH return values.
16232 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16234 * win32-low.c (GETPROCADDRESS): Define.
16235 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16236 (winapi_DebugSetProcessKillOnExit): Likewise.
16237 (win32_create_inferior): Force usage of ansi CreateProcessA.
16238 (win32_attach): Use GETPROCADDRESS.
16239 (win32_detach): Likewise.
16241 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16243 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16245 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16247 * win32-low.c: Commit leftover changes from 2007-03-29.
16249 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16251 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16252 fields short instead of int. Add explicit padding.
16253 (i387_cache_to_fsave): Remove unnecessary casts.
16254 (i387_fsave_to_cache): Doc fix.
16255 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16257 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16259 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16260 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16262 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16264 * configure.srv (arm*-*-mingw32ce*): Move near the other
16267 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16269 * configure.ac: Add errno checking.
16270 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16271 sys/file.h and malloc.h.
16272 (AC_CHECK_DECLS): Add perror.
16273 (srv_mingwce): Handle.
16274 * configure.srv (i[34567]86-*-cygwin*): Add
16275 win32-i386-low.o to srv_tgtobj.
16276 (i[34567]86-*-mingw*): Likewise.
16277 (arm*-*-mingw32ce*): Add case.
16278 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16279 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16280 [__MINGW32CE__] (strerror): New function.
16281 [__MINGW32CE__] (errno): Define to GetLastError.
16282 [__MINGW32CE__] (COUNTOF): New macro.
16283 (remote_open): Remove extra close call.
16284 * mem-break.c (delete_breakpoint_at): New function.
16285 * mem-break.h (delete_breakpoint_at): Declare.
16286 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16287 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16288 [USE_WIN32API] (read, write): Add char* casts.
16289 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16290 * server.h: Include wincecompat.h on Windows CE.
16291 [HAVE_ERRNO_H]: Check.
16292 (perror): Declare if not declared.
16293 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16294 (perror_with_name): Remove errno declaration.
16295 * wincecompat.h: New.
16296 * wincecompat.c: New.
16297 * win32-low.h: New.
16298 * win32-arm-low.c: New.
16299 * win32-i386-low.c: New.
16300 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16301 (OUTMSG2): Make it safe.
16303 (COUNTOF): New macro.
16304 (NUM_REGS): Get it from the low target.
16305 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16306 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16307 (thread_rec): Let low target handle debug registers.
16308 (child_add_thread): Likewise.
16309 (child_init_thread_list): Likewise.
16310 (continue_one_thread): Likewise.
16312 (do_child_fetch_inferior_registers): Move to ...
16313 * win32-i386-low.c: ... here, and rename to ...
16314 (do_fetch_inferior_registers): ... this.
16315 * win32-low.c (child_fetch_inferior_registers):
16316 Go through the low target.
16317 (do_child_store_inferior_registers): Use regptr.
16318 (strwinerror): New function.
16319 (win32_create_inferior): Handle Windows CE.
16320 Use strwinerror instead of strerror on Windows error
16321 codes. Add program to the error output.
16322 Don't close the main thread handle on Windows CE.
16323 (win32_attach): Use coredll.dll on Windows CE.
16324 (win32_kill): Close current process and current
16326 (win32_detach): Use coredll.dll on Windows CE.
16327 (win32_resume): Let low target handle debug registers, and
16329 (handle_exception): Add/Remove initial breakpoint. Avoid
16330 non-existant WSTOPSIG on Windows CE.
16331 (win32_read_inferior_memory): Cast to remove warning.
16332 (win32_arch_string): Go through the low target.
16333 (initialize_low): Call set_breakpoint_data with the low
16334 target's breakpoint.
16335 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16336 FOP_REGNUM, mappings): Move to ...
16337 * win32-i386-low.c: ... here.
16338 * win32-low.c (win32_thread_info): Move to ...
16339 * win32-low.h: ... here.
16340 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16341 win32-arm-low.c and wincecompat.c.
16342 (all:): Add $EXEEXT.
16343 (install-only:): Likewise.
16344 (gdbserver:): Likewise.
16345 (gdbreplay:): Likewise.
16346 * config.in: Regenerate.
16347 * configure: Regenerate.
16349 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16351 * win32-low.c: Rename typedef thread_info to
16352 win32_thread_info throughout.
16354 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16356 * win32-i386-low.c: Rename to ...
16357 * win32-low.c: ... this.
16358 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16359 * Makefile.in: Likewise.
16361 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16363 * remote-utils.c (monitor_output): Constify msg parameter.
16364 * server.h (monitor_output): Likewise.
16365 * win32-i386-low.c (handle_output_debug_string): New.
16366 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16367 handle_output_debug_string.
16368 (get_child_debug_event): Likewise.
16370 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16372 * server.c (main): Correct strtoul check.
16374 2007-03-27 Jon Ringle <jon@ringle.org>
16376 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16378 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16380 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16382 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16384 * terminal.h: Check HAVE_SGTTY_H.
16386 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16388 * remote-utils.c (remote_open): Print out the assigned port number.
16390 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16392 * remote-utils.c (monitor_output): New function.
16393 * server.c (debug_threads): Define here.
16394 (monitor_show_help): New function.
16395 (handle_query): Handle qRcmd.
16396 (main): Do not handle 'd' packet.
16397 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16398 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16401 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16403 * Makefile.in (EXEEXT): New.
16404 (clean): Use $(EXEEXT).
16406 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16408 * target.h (target_ops): Rename send_signal to request_interrupt,
16409 and remove enum target_signal parameter.
16410 * linux-low.c (linux_request_interrupt): Rename from
16411 linux_send_signal, and always send SIGINT.
16412 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16413 and always send SIGINT.
16414 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16416 (input_interrupt): Likewise.
16418 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16420 * server.c (get_features_xml): Check if target implemented
16422 * win32-i386-low.c (win32_arch_string): New.
16423 (win32_target_ops): Add win32_arch_string as arch_string member.
16425 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16427 * spu-low.c (spu_arch_string): New.
16428 (spu_target_ops): Add spu_arch_string.
16430 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16432 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16433 * configure.ac: Do not check for terminal.h.
16434 * configure, config.in: Regenerated.
16436 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16438 * Makefile.in (OBS): Add $(XML_BUILTIN).
16439 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16441 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16442 (arm-with-iwmmxt.c): New.
16443 * config.in, configure: Regenerate.
16444 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16445 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16446 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16447 (arm*-*-linux*): Add iWMMXt and regset support.
16448 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16449 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16450 (arm_store_wmmxregset, target_regsets): New.
16451 * server.c (get_features_xml): Take annex argument. Check builtin
16453 (handle_query): Handle multiple annexes.
16455 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16457 * remote-utils.c [USE_WIN32API] (read, write): Define.
16458 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16461 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16463 * linux-i386-low.c (the_low_target): Set arch_string.
16464 * linux-x86-64-low.c (the_low_target): Likewise.
16465 * linux-low.c (linux_arch_string): New.
16466 (linux_target_ops): Add it.
16467 * linux-low.h (struct linux_target_ops): Add arch_string.
16468 * server.c (write_qxfer_response): Use const void * for DATA.
16469 (get_features_xml): New.
16470 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16471 * target.h (struct target_ops): Add arch_string method.
16473 2007-01-03 Denis Pilat <denis.pilat@st.com>
16474 Daniel Jacobowitz <dan@codesourcery.com>
16476 * linux-low.c (linux_kill): Handle being called with no threads.
16477 * win32-i386-low.c (win32_kill): Likewise.
16478 (get_child_debug_event): Clear current_process_handle.
16480 2006-12-30 Denis PILAT <denis.pilat@st.com>
16481 Daniel Jacobowitz <dan@codesourcery.com>
16483 * remote-utils.c (remote_open): Check the type of specified
16484 serial port devices before opening them.
16485 * server.c (main): Kill the inferior if an error occurs during
16486 the first remote_open.
16488 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16490 * README: Update supported targets.
16492 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16494 * Makefile.in (clean): Remove reg-mips64.c.
16495 (reg-mips64.c, reg-mips64.o): New rules.
16496 * configure.srv: Handle mips64. Include regset support for mips.
16497 * linux-mips-low.c (union mips_register): New.
16498 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16499 (mips_breakpoint, mips_breakpoint_at): Use int.
16500 (mips_collect_register, mips_supply_register)
16501 (mips_collect_register_32bit, mips_supply_register_32bit)
16502 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16503 (mips_store_fpregset, target_regsets): New.
16504 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16506 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16508 * configure.srv: Add target "spu*-*-*".
16509 * Makefile.in (clean): Remove reg-spu.c.
16510 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16511 * spu-low.c: New file.
16513 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16515 * configure.ac: Correct td_thr_tls_get_addr test.
16516 * configure: Regenerated.
16518 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16520 * linux-low.c (linux_wait_for_event): Reformat. Use the
16521 pass_signals array.
16522 * remote-utils.c (decode_address_to_semicolon): New.
16523 * server.c (pass_signals, handle_general_set): New.
16524 (handle_query): Mention QPassSignals for qSupported.
16525 (main): Call handle_general_set.
16526 * server.h (pass_signals, decode_address_to_semicolon): New.
16528 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16530 * server.c (handle_query): Correct error handling for read_auxv.
16532 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16534 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16535 and srv_linux_thread_db to yes.
16536 * linux-s390-low.c (s390_fill_gregset): New function.
16537 (target_regsets): Define data structure.
16539 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16541 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16542 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16543 * config.in, configure: Regenerated.
16544 * inferiors.c (gdb_id_to_thread): New function.
16545 (gdb_id_to_thread_id): Use it.
16546 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16547 * linux-low.h (struct process_info): Add th member.
16548 (thread_db_get_tls_address): New prototype.
16549 * remote-utils.c (decode_address): Make non-static.
16550 * server.c (handle_query): Handle qGetTLSAddr.
16551 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16552 * target.h (struct target_ops): Add get_tls_address.
16553 * thread-db.c (maybe_attach_thread): Save the thread handle.
16554 (thread_db_get_tls_address): New.
16556 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16558 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16559 (linux_resume_one_process): Take a siginfo_t *. Update all
16560 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16561 (struct pending_signals): Add a siginfo_t.
16562 (linux_wait_for_process): Always set last_status.
16563 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16564 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16565 * linux-low.h (struct process_info): Add last_status.
16567 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16569 * remote-utils.c (try_rle): New function.
16570 (putpkt_binary): Use it.
16572 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16574 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16575 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16576 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16577 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16578 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16581 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16583 * server.c (terminal_fd): New variable.
16584 (old_foreground_pgrp): Likewise.
16585 (restore_old_foreground_pgrp): New function.
16586 (start_inferior): Record the terminal file descriptor in terminal_fd
16587 and its original foreground group in old_foreground_pgrp. Register
16588 restore_old_foreground_pgrp with atexit().
16590 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16592 * server.c (handle_query): Correct qPart to qXfer.
16594 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16596 * configure.ac: Check for more headers which are missing on
16597 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16598 * configure.srv: Add Cygwin and mingw32.
16599 * remote-utils.c: Don't include headers unconditionally which
16600 are missing on mingw32. Include <winsock.h> for mingw32.
16601 (remote_open): Adjust for mingw32 support. Flush
16602 standard error after writing to it.
16603 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16604 (unblock_async_io, enable_async_io, disable_async_io)
16605 (readchar, getpkt): Update for Winsock support.
16606 (prepare_resume_reply): Expect a protocol signal number.
16607 * server.c: Disable <sys/wait.h> on mingw32.
16608 (start_inferior): Adjust for mingw32 support. Flush
16609 standard error after writing to it.
16610 (attach_inferior): Likewise. Use protocol signal
16612 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16614 * win32-i386-low.c: New file.
16615 * Makefile.in (XM_CLIBS): Set.
16616 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16617 (win32-i386-low.o): New dependency rule.
16618 * linux-low.c (linux_wait): Use target signal numbers.
16619 * target.h (struct target_ops): Doc fix.
16620 * server.h (target_signal_to_name): New prototype.
16621 * gdbreplay.c: Don't include headers unconditionally which
16622 are missing on mingw32. Include <winsock.h> for mingw32.
16623 (remote_close, remote_open): Adjust for Winsock support.
16624 * configure, config.in: Regenerated.
16626 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16628 * server.c (decode_xfer_read, write_qxfer_response): New.
16629 (handle_query): Take a packet length argument. Handle
16630 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16631 the qSupported response.
16632 (main): Update call to handle_query.
16634 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16636 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16637 (putpkt_binary): Renamed from putpkt and adjusted for binary
16639 (putpkt): New wrapper for putpkt_binary.
16640 (readchar): Don't mask off the high bit.
16641 (decode_X_packet): New function.
16642 * server.c (main): Call putpkt_binary if a handler sets the packet
16643 length. Save the length of the incoming packet. Handle 'X'.
16644 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16646 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16648 * server.c (handle_query): Handle qSupported.
16650 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16652 * remote-utils.c (all_symbols_looked_up): New variable.
16653 (look_up_one_symbol): Check it.
16654 * server.h (look_up_one_symbol): New declaration.
16655 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16657 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16659 * Makefile.in (linux-arm-low.o): Update dependencies.
16660 * linux-arm-low.c: Include "gdb_proc_service.h".
16661 (PTRACE_GET_THREAD_AREA): Define.
16662 (ps_get_thread_area): New function.
16664 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16666 * configure.srv (m68k*-*-uclinux*): New target.
16667 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16668 (linux_resume_one_process): Remove extraneous cast.
16669 (linux_read_offsets): New.
16670 (linux_target_op): Add linux_read_offsets on mmuless systems.
16671 * server.c (handle_query): Add qOffsets logic.
16672 * target.h (struct target_ops): Add read_offsets.
16674 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16676 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16677 (PTRACE_GET_THREAD_AREA): Define.
16678 (ps_get_thread_area): New function.
16679 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16680 (linux-x86-64-low.o): Update.
16682 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16684 * configure.ac: Remove checks for prfpregset_t.
16685 * gdb_proc_service.h: New file.
16686 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16687 new "gdb_proc_service.h".
16688 * proc-service.c: Likewise.
16689 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16690 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16691 * Makefile.in (gdb_proc_service_h): Updated.
16692 * configure, config.in: Regenerated.
16694 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16696 * remote-utils.c (prepare_resume_reply): Move declaration
16697 of gdb_id_from_wait to the top of the block.
16699 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16701 * linux-low.c (regsets_store_inferior_registers): Read the regset
16702 from the target before filling it.
16704 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16706 * server.c (attach_inferior): Return SIGTRAP for a successful
16709 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16711 * Makefile.in (OBS): Add version.o.
16712 (STAGESTUFF): Delete.
16713 (version.o): Add dependencies.
16714 (version.c): Replace rule.
16715 (clean): Remove version.c.
16716 * server.c (gdbserver_version): New.
16717 (gdbserver_usage): Use printf.
16718 (main): Handle --version and --help.
16719 * server.h (version, host_name): Add declarations.
16721 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16733 * linux-x86-64-low.c:
16735 * linux-s390-low.c:
16736 * linux-ppc64-low.c:
16738 * linux-mips-low.c:
16739 * linux-m68k-low.c:
16740 * linux-m32r-low.c:
16743 * linux-ia64-low.c:
16744 * linux-i386-low.c:
16745 * linux-crisv32-low.c:
16757 * gdbserver.1: Add (C) after Copyright. Update the FSF
16760 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16762 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16763 (arm_breakpoint_at): Recognize both breakpoints.
16764 (the_low_target): Use the correct breakpoint instruction.
16766 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16768 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16769 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16770 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16771 (the_low_target): Update.
16773 2005-10-25 Andreas Schwab <schwab@suse.de>
16775 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16777 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16778 (ia64_num_regs): Reduce to 462.
16780 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16782 * acinclude.m4: Correct quoting.
16783 * aclocal.m4: Regenerated.
16785 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16786 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16787 (thread_db_init): Call thread_db_err_str.
16788 * configure.ac: Check for TD_VERSION.
16789 * config.in, configure: Regenerated.
16791 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16793 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16795 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16797 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16798 is not available. Define HAVE_PTRACE_GETREGS if it is.
16799 * config.in, configure: Regenerated.
16800 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16801 * linux-i386-low.c, linux-m68k-low.c: Update to use
16802 HAVE_PTRACE_GETREGS.
16803 * linux-low.c (regsets_fetch_inferior_registers)
16804 (regsets_store_inferior_registers): Only return 0 if we processed
16806 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16807 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16809 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16811 * inferiors.c (struct thread_info): Add gdb_id.
16812 (add_thread): Add gdb_id argument.
16813 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16814 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16815 calls to add_thread.
16816 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16817 * server.c (handle_query): Use thread_to_gdb_id.
16818 (handle_v_cont, main): Use gdb_id_to_thread_id.
16819 * server.h (add_thread): Update prototype.
16820 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16823 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16825 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16826 left-padded registers.
16827 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16828 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16830 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16832 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16833 * configure: Regenerate.
16834 * config.in: Regenerate.
16835 * server.h (NEED_DECLARATION_STRERROR):
16836 Replace with !HAVE_DECL_STRERROR.
16838 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16840 * linux-low.c (linux_wait, linux_send_signal): Don't test
16841 an unsigned long variable for > 0 if it could be MAX_ULONG.
16842 * server.c (myresume): Likewise.
16843 * target.c (set_desired_inferior): Likewise.
16845 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16847 * configure.ac: Simplify and improve check for socklen_t.
16848 * configure, config.in: Regenerate.
16850 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16852 * acconfig.h: Remove.
16853 * configure.ac: Add a test for socklen_t. Use three-argument
16854 AC_DEFINE throughout.
16855 * config.in: Regenerated using autoheader 2.59.
16856 * configure: Regenerated.
16858 * gdbreplay.c (socklen_t): Provide a default.
16859 (remote_open): Use socklen_t.
16860 * remote-utils.c (socklen_t): Provide a default.
16861 (remote_open): Use socklen_t.
16862 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16865 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16867 * linux-low.c (linux_read_memory, linux_write_memory)
16868 (linux_read_auxv): Likewise.
16869 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16870 (check_mem_write): Likewise.
16871 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16873 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16874 (registers_from_string, register_data): Likewise.
16875 * server.c (handle_query, main): Likewise.
16876 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16877 (decode_M_packet): Likewise.
16878 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16879 * target.h (struct target_ops): Update read_memory, write_memory,
16881 (read_inferior_memory, write_inferior_memory): Update.
16882 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16883 to unsigned char *.
16884 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16885 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16886 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16887 linux-s390-low.c, linux-sh-low.c: Update for changes in
16888 read_inferior_memory and the_low_target->breakpoint.
16890 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16892 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16893 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16894 * configure.srv: Add powerpc64-*-linux*.
16895 * linux-ppc64-low.c: New file.
16897 2005-05-23 Orjan Friberg <orjanf@axis.com>
16899 * linux-cris-low.c: New file with support for CRIS.
16900 * linux-crisv32-low.c: Ditto for CRISv32.
16901 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16902 (clean): Add reg-cris.c and reg-crisv32.c.
16903 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16904 reg-crisv32.o, and reg-crisv32.c to make rules.
16905 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16906 recognized targets.
16908 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16910 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16911 of sizeof (PTRACE_XFER_TYPE).
16912 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16914 2005-05-12 Orjan Friberg <orjanf@axis.com>
16916 * target.h (struct target_ops): Add insert_watchpoint,
16917 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16918 pointers for hardware watchpoint support.
16919 * linux-low.h (struct linux_target_ops): Ditto.
16920 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16921 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16922 to linux_target_ops.
16923 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16925 * server.c (main): Recognize 'Z' and 'z' packets.
16927 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16929 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16930 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16931 (the_low_target): Add new members.
16933 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16935 * proc-service.c (ps_lgetregs): Search all_processes instead of
16938 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16940 * server.c (start_inferior): Change return type to int.
16941 (attach_inferior): Change sigptr to int *.
16942 (handle_v_cont, handle_v_requests): Change signal to int *.
16943 (main): Change signal to int.
16945 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16947 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16948 * configure.srv: Add m32r*-*-linux*.
16949 * linux-m32r-low.c: New file.
16951 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16953 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16955 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16957 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16958 Take unsigned long arguments for PIDs.
16959 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16960 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16961 (wait_for_sigstop, linux_resume_one_process)
16962 (regsets_fetch_inferior_registers, linux_send_signal)
16963 (linux_read_auxv): Likewise. Update the types of variables holding
16964 PIDs. Update format string specifiers.
16965 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16966 * remote-utils.c (prepare_resume_reply): Likewise.
16967 * server.c (cont_thread, general_thread, step_thread)
16968 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16970 (handle_query): Update format specifiers.
16971 (handle_v_cont, main): Use strtoul for thread IDs.
16972 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16973 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16974 (general_thread, step_thread, thread_from_wait)
16975 (old_thread_from_wait): Update.
16976 * target.h (struct thread_resume): Use unsigned long for THREAD.
16977 (struct target_ops): Use unsigned long for arguments to attach and
16980 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16982 * acinclude.m4: Include bfd/bfd.m4 directly.
16983 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16984 <agriffis@toolchain.org>.
16985 * aclocal.m4, configure: Regenerated.
16987 2005-01-07 Andrew Cagney <cagney@gnu.org>
16989 * configure.ac: Rename configure.in, require autoconf 2.59.
16990 * configure: Re-generate.
16992 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16994 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16995 LIBS when finished.
16996 * aclocal.m4: Regenerated.
16997 * configure: Regenerated.
16999 2004-11-21 Andreas Schwab <schwab@suse.de>
17001 * linux-m68k-low.c (m68k_num_gregs): Define.
17002 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17003 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17004 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17005 (m68k_breakpoint_at): New. Add to the_low_target.
17007 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17008 srv_linux_thread_db to yes.
17010 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17012 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17013 (ARCH_SET_FS): Likewise.
17014 (ARCH_GET_FS): Likewise.
17015 (ARCH_GET_GS): Likewise.
17017 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17019 * linux-i386-low.c (ps_get_thread_area): New.
17020 * linux-x86-64-low.c (ps_get_thread_area): New.
17021 * linux-low.c: Include <sys/syscall.h>.
17022 (linux_kill_one_process): Don't kill the first thread here.
17023 (linux_kill): Kill the first thread here.
17024 (kill_lwp): New function.
17025 (send_sigstop, linux_send_signal): Use it.
17026 * proc-service.c: Clean up #ifdefs.
17027 (fpregset_info): Delete.
17028 (ps_lgetregs): Update and enable implementation.
17029 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17031 * remote-utils.c (struct sym_cache, symbol_cache): New.
17032 (input_interrupt): Print a clearer message.
17033 (async_io_enabled): New variable.
17034 (enable_async_io, disable_async_io): Use it. Update comments.
17035 (look_up_one_symbol): Use the symbol cache.
17036 * thread-db.c (thread_db_look_up_symbols): New function.
17037 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17039 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17041 * configure.in: Test for -rdynamic.
17042 * configure: Regenerated.
17043 * Makefile (INTERNAL_LDFLAGS): New.
17044 (gdbserver, gdbreplay): Use it.
17046 2004-09-02 Andrew Cagney <cagney@gnu.org>
17048 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17050 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17052 * linux-low.c (linux_wait): Clear all_processes list also.
17054 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17056 * linux-low.c: Include <errno.h>. Remove extern declaration of
17059 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17061 * gdbreplay.c, server.h, utils.c: Update copyright years.
17063 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17065 * server.c (main): Print child status or termination signal from
17066 variable 'signal', not 'sig'.
17068 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17070 * linux-low.c (linux_read_memory): Change return type to
17071 int. Check for and return error from ptrace().
17072 * target.c (read_inferior_memory): Change return type to int. Pass
17073 back return status from the_target->read_memory().
17074 * target.h (struct target_ops): Adapt *read_memory() prototype.
17076 (read_inferior_memory): Adapt prototype.
17077 * server.c (main): Return an error packet if
17078 read_inferior_memory() returns an error.
17080 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17082 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17083 Unify with other clean targets.
17085 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17087 * server.c (handle_v_cont): Call set_desired_inferior.
17089 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17091 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17093 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17095 * linux-low.c (linux_wait): Unblock async I/O.
17096 (linux_resume): Block and enable async I/O.
17097 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17098 * server.h (block_async_io, unblock_async_io): Add prototypes.
17100 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17102 * remote-utils.c (remote_open): Print a status notice after
17103 opening a TCP port.
17104 * server.c (attach_inferior): Print a status notice after
17107 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17109 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17111 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17113 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17115 * server.c, target.h: Update copyright years.
17117 2004-02-25 Roland McGrath <roland@redhat.com>
17119 * target.h (struct target_ops): New member `read_auxv'.
17120 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17121 * linux-low.c (linux_read_auxv): New function.
17122 (linux_target_ops): Initialize `read_auxv' member to that.
17124 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17126 Committed by Jim Blandy <jimb@redhat.com>.
17128 * linux-s390-low.c (s390_num_regs): Update.
17129 (s390_regmap): Remove control registers. Use __s390x__ predefine
17130 instead of GPR_SIZE to distiguish s390 and s390x targets.
17132 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17134 * linux-low.c: Update copyright year.
17135 (check_removed_breakpoint): Clear pending_is_breakpoint.
17136 (linux_set_resume_request, linux_queue_one_thread)
17137 (resume_status_pending_p): New functions.
17138 (linux_continue_one_thread): Use process->resume.
17139 (linux_resume): Only resume threads if there are no pending events.
17140 * linux-low.h (struct process_info): Add resume request
17143 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17145 * regcache.c (new_register_cache): Clear the allocated register
17146 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17148 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17150 * linux-low.c (linux_resume): Take a struct thread_resume *
17152 (linux_wait): Update call.
17153 (resume_ptr): New static variable.
17154 (linux_continue_one_thread): Renamed from
17155 linux_continue_one_process. Use resume_ptr.
17156 (linux_resume): Use linux_continue_one_thread.
17157 * server.c (handle_v_cont, handle_v_requests): New functions.
17158 (myresume): New function.
17159 (main): Handle 'v' case.
17160 * target.h (struct thread_resume): New type.
17161 (struct target_ops): Change argument of "resume" to struct
17163 (myresume): Delete macro.
17165 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17167 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17168 (uninstall): Support DESTDIR.
17170 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17172 * configure.srv: Add xscale*linux copy of arm*linux entry.
17174 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17176 * linux-arm-low.c (arm_reinsert_addr): New function.
17177 (the_low_target): Add arm_reinsert_addr.
17179 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17181 * mem-break.c: Remove whitespace at end of file.
17183 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17185 * configure.in: Check whether we need to prototype strerror.
17186 * server.h: Optionally prototype strerror.
17187 * gdbreplay.c (perror_with_name): Use strerror.
17188 * linux-low.c (linux_attach_lwp): Use strerror.
17189 * utils.c (perror_with_name): Use strerror.
17190 * config.in, configure: Regenerated.
17192 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17194 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17195 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17197 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17199 * Makefile.in (SFILES): Update.
17200 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17201 low-sun3.c: Remove files.
17203 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17205 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17206 (linux_detach_one_process, linux_detach): New functions.
17207 (linux_target_ops): Add linux_detach.
17208 * server.c (main): Handle 'D' packet.
17209 * target.h (struct target_ops): Add "detach" member.
17210 (detach_inferior): Define.
17212 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17214 From Kelley Cook <kelleycook@wideopenwest.com>:
17215 * configure.srv: Accept i[34567]86 variants.
17217 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17219 * linux-low.c (linux_wait_for_event): Correct comment typos.
17220 (linux_resume_one_process): Call check_removed_breakpoint.
17221 (linux_send_signal): New function.
17222 (linux_target_ops): Add linux_send_signal.
17223 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17225 * target.h (struct target_ops): Add send_signal.
17227 2003-05-29 Jim Blandy <jimb@redhat.com>
17229 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17230 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17231 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17232 away part of the register's value.
17234 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17236 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17237 (linux_wait_for_event, linux_init_signals): Likewise.
17239 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17241 * configure.in: Check for stdlib.h.
17242 * configure: Regenerated.
17243 * config.in: Regenerated.
17245 2003-01-04 Andreas Schwab <schwab@suse.de>
17247 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17249 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17251 * Makefile.in: Remove obsolete code.
17253 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17255 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17256 defined(PT_FPR0_HI).
17258 2002-11-17 Stuart Hughes <seh@zee2.com>
17260 * linux-arm-low.c (arm_num_regs): Increase.
17261 (arm_regmap): Include status register.
17263 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17265 * linux-low.c (register_addr): Remove incorrect -1 check.
17267 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17269 * linux-low.c (linux_create_inferior): Call setpgid. Return
17271 (unstopped_p, linux_signal_pid): Remove.
17272 (linux_target_ops): Remove linux_signal_pid.
17273 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17274 global instead of target method.
17275 * target.h (struct target_ops): Remove signal_pid. Update comment
17276 for create_inferior.
17277 * server.c (signal_pid): New variable.
17278 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17279 gdbserver. Set the child to be the foreground process group.
17280 (attach_inferior): Set signal_pid.
17282 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17284 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17286 2002-08-20 Jim Blandy <jimb@redhat.com>
17288 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17291 2002-08-01 Andrew Cagney <cagney@redhat.com>
17293 * Makefile.in: Make chill references obsolete.
17295 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17297 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17298 * configure: Regenerate.
17299 * config.in: Regenerate.
17301 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17303 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17304 (perror_with_name, remote_close, remote_open, expect, play): Static.
17306 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17308 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17309 byte offsets instead of an array of indexes.
17310 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17312 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17314 * regcache.c: Add comment.
17316 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17318 * thread-db.c: New file.
17319 * proc-service.c: New file.
17320 * acinclude.m4: New file.
17321 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17322 proc-service.o, and thread-db.o.
17323 (linux-low.o): Add USE_THREAD_DB.
17324 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17325 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17326 * aclocal.m4: Regenerated.
17327 * config.in: Regenerated.
17328 * configure: Regenerated.
17329 * configure.in: Check for proc_service.h, sys/procfs.h,
17330 thread_db.h, and linux/elf.h headrs.
17331 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17332 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17333 Check for -lthread_db and thread support.
17334 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17335 PowerPC, and SuperH.
17336 * i387-fp.c: Constify arguments.
17337 * i387-fp.h: Likewise.
17338 * inferiors.c: (struct thread_info): Renamed from
17339 `struct inferior_info'. Remove PID member. Use generic inferior
17340 list header. All uses updated.
17341 (inferiors, signal_pid): Removed.
17342 (all_threads): New variable.
17343 (get_thread): Define.
17344 (add_inferior_to_list): New function.
17345 (for_each_inferior): New function.
17346 (change_inferior_id): New function.
17347 (add_inferior): Removed.
17348 (remove_inferior): New function.
17349 (add_thread): New function.
17350 (free_one_thread): New function.
17351 (remove_thread): New function.
17352 (clear_inferiors): Use for_each_inferior and free_one_thread.
17353 (find_inferior): New function.
17354 (find_inferior_id): New function.
17355 (inferior_target_data): Update argument type.
17356 (set_inferior_target_data): Likewise.
17357 (inferior_regcache_data): Likewise.
17358 (set_inferior_regcache_data): Likewise.
17359 * linux-low.c (linux_bp_reinsert): Remove.
17360 (all_processes, stopping_threads, using_thrads)
17361 (struct pending_signals, debug_threads, pid_of): New.
17362 (inferior_pid): Replace with macro.
17363 (struct inferior_linux_data): Remove.
17364 (get_stop_pc, add_process): New functions.
17365 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17366 Use add_process and add_thread.
17367 (linux_attach_lwp): New function, based on old linux_attach. Use
17368 add_process and add_thread. Set stop_expected for new threads.
17369 (linux_attach): New function.
17370 (linux_kill_one_process): New function.
17371 (linux_kill): Kill all LWPs.
17372 (linux_thread_alive): Use find_inferior_id.
17373 (check_removed_breakpoints, status_pending_p): New functions.
17374 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17375 Update. Use WNOHANG. Wait for cloned processes also. Update process
17376 struct for the found process.
17377 (linux_wait_for_event): New function.
17378 (linux_wait): Use it. Support LWPs.
17379 (send_sigstop, wait_for_sigstop, stop_all_processes)
17380 (linux_resume_one_process, linux_continue_one_process): New functions.
17381 (linux_resume): Support LWPs.
17382 (REGISTER_RAW_SIZE): Remove.
17383 (fetch_register): Use register_size instead. Call supply_register.
17384 (usr_store_inferior_registers): Likewise. Call collect_register.
17385 Fix recursive case.
17386 (regsets_fetch_inferior_registers): Improve error message.
17387 (regsets_store_inferior_registers): Add debugging.
17388 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17389 (unstopped_p, linux_signal_pid): New functions.
17390 (linux_target_ops): Add linux_signal_pid.
17391 (linux_init_signals): New function.
17392 (initialize_low): Call it. Initialize using_threads.
17393 * regcache.c (inferior_regcache_data): Add valid
17395 (get_regcache): Fetch registers lazily. Add fetch argument
17396 and update all callers.
17397 (regcache_invalidate_one, regcache_invalidate): New
17399 (new_register_cache): Renamed from create_register_cache.
17400 Return the new regcache.
17401 (free_register_cache): Change argument to a void *.
17402 (registers_to_string, registers_from_string): Call get_regcache
17403 with fetch flag set.
17404 (register_data): Make static. Pass fetch flag to get_regcache.
17405 (supply_register): Call get_regcache with fetch flag clear.
17406 (collect_register): Call get_regcache with fetch flag set.
17407 (collect_register_as_string): New function.
17408 * regcache.h: Update.
17409 * remote-utils.c (putpkt): Flush after debug output and use
17411 Handle input interrupts while waiting for an ACK.
17412 (input_interrupt): Use signal_pid method.
17413 (getpkt): Flush after debug output and use stderr.
17414 (outreg): Use collect_register_as_string.
17415 (new_thread_notify, dead_thread_notify): New functions.
17416 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17417 and general_thread.
17418 (look_up_one_symbol): Flush after debug output.
17419 * server.c (step_thread, server_waiting): New variables.
17420 (start_inferior): Don't use signal_pid. Update call to mywait.
17421 (attach_inferior): Update call to mywait.
17422 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17423 (main): Don't fetch/store registers explicitly. Use
17424 set_desired_inferior. Support proposed ``Hs'' packet. Update
17426 * server.h: Update.
17427 (struct inferior_list, struct_inferior_list_entry): New.
17428 * target.c (set_desired_inferior): New.
17429 (write_inferior_memory): Constify.
17430 (mywait): New function.
17431 * target.h: Update.
17432 (struct target_ops): New signal_pid method.
17433 (mywait): Removed macro, added prototype.
17435 * linux-low.h (regset_func): Removed.
17436 (regset_fill_func, regset_store_func): New.
17437 (enum regset_type): New.
17438 (struct regset_info): Add type field. Use new operation types.
17439 (struct linux_target_ops): stop_pc renamed to get_pc.
17440 Add decr_pc_after_break and breakpoint_at.
17441 (get_process, get_thread_proess, get_process_thread)
17442 (strut process_info, all_processes, linux_attach_lwp)
17443 (thread_db_init): New.
17445 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17446 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17447 (the_low_target): Add new members.
17448 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17449 (i386_store_fpxregset): Constify.
17450 (target_regsets): Add new kind identifier.
17451 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17452 (i386_set_pc): Add debugging.
17453 (i386_breakpoint_at): New function.
17454 (the_low_target): Add new members.
17455 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17456 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17457 (mips_breakpoint_at): New.
17458 (the_low_target): Add new members.
17459 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17460 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17461 (the_low_target): Add new members.
17462 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17463 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17464 (the_low_target): Add new members.
17465 * linux-x86-64-low.c (target_regsets): Add new kind
17468 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17470 From Martin Pool <mbp@samba.org>:
17471 * server.c (gdbserver_usage): New function.
17474 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17476 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17477 stop_at -> stop_pc.
17479 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17481 * Makefile.in: Remove obsolete code.
17483 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17485 * linux-low.c (regsets_fetch_inferior_registers),
17486 (regsets_store_inferior_registers): Removed cast to int from
17488 * regcache.h: Added declaration of struct inferior_info.
17490 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17492 * inferiors.c (struct inferior_info): Add regcache_data.
17493 (add_inferior): Call create_register_cache.
17494 (clear_inferiors): Call free_register_cache.
17495 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17496 * regcache.c (struct inferior_regcache_data): New.
17497 (registers): Remove.
17498 (get_regcache): New function.
17499 (create_register_cache, free_register_cache): New functions.
17500 (set_register_cache): Don't initialize the register cache here.
17501 (registers_to_string, registers_from_string, register_data): Call
17503 * regcache.h: Add prototypes.
17504 * server.h: Likewise.
17506 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17508 * mem-break.c: New file.
17509 * mem-break.h: New file.
17510 * Makefile.in: Add mem-break.o rule; update server.h
17512 * inferiors.c (struct inferior_info): Add target_data
17514 (clear_inferiors): Free target_data member if set.
17515 (inferior_target_data, set_inferior_target_data): New functions.
17516 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17517 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17518 * linux-low.c (linux_bp_reinsert): New variable.
17519 (struct inferior_linux_data): New.
17520 (linux_create_inferior): Use set_inferior_target_data.
17521 (linux_attach): Likewise. Call add_inferior.
17522 (linux_wait_for_one_inferior): New function.
17523 (linux_wait): Call it.
17524 (linux_write_memory): Add const.
17525 (initialize_low): Call set_breakpoint_data.
17526 * linux-low.h (struct linux_target_ops): Add breakpoint
17528 * server.c (attach_inferior): Remove extra add_inferior
17530 * server.h: Include mem-break.h. Update inferior.c
17532 * target.c (read_inferior_memory)
17533 (write_inferior_memory): New functions.
17534 * target.h (read_inferior_memory)
17535 (write_inferior_memory): Change macros to prototypes.
17536 (struct target_ops): Update comments. Add const to write_memory
17539 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17541 * linux-low.c (usr_store_inferior_registers): Support
17542 registers which are allowed to fail to store.
17543 * linux-low.h (linux_target_ops): Likewise.
17544 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17545 (ppc_cannot_store_register): FPSCR may not be storable.
17547 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17549 * server.h: Include <string.h> if HAVE_STRING_H.
17550 * ChangeLog: Correct paths in last ChangeLog entry.
17552 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17554 * linux-low.h: Remove obsolete prototypes.
17555 (struct linux_target_ops): New.
17556 (extern the_low_target): New.
17557 * linux-low.c (num_regs, regmap): Remove declarations.
17558 (register_addr): Use the_low_target explicitly.
17559 (fetch_register): Likewise.
17560 (usr_fetch_inferior_registers): Likewise.
17561 (usr_store_inferior_registers): Likewise.
17562 * linux-arm-low.c (num_regs): Remove.
17563 (arm_num_regs): Define.
17564 (arm_regmap): Renamed from regmap, made static.
17565 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17567 (arm_cannot_store_register): Renamed from cannot_store_register,
17569 (the_low_target): New.
17570 * linux-i386-low.c (num_regs): Remove.
17571 (i386_num_regs): Define.
17572 (i386_regmap): Renamed from regmap, made static.
17573 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17575 (i386_cannot_store_register): Renamed from cannot_store_register,
17577 (the_low_target): New.
17578 * linux-ia64-low.c (num_regs): Remove.
17579 (ia64_num_regs): Define.
17580 (ia64_regmap): Renamed from regmap, made static.
17581 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17583 (ia64_cannot_store_register): Renamed from cannot_store_register,
17585 (the_low_target): New.
17586 * linux-m68k-low.c (num_regs): Remove.
17587 (m68k_num_regs): Define.
17588 (m68k_regmap): Renamed from regmap, made static.
17589 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17591 (m68k_cannot_store_register): Renamed from cannot_store_register,
17593 (the_low_target): New.
17594 * linux-mips-low.c (num_regs): Remove.
17595 (mips_num_regs): Define.
17596 (mips_regmap): Renamed from regmap, made static.
17597 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17599 (mips_cannot_store_register): Renamed from cannot_store_register,
17601 (the_low_target): New.
17602 * linux-ppc-low.c (num_regs): Remove.
17603 (ppc_num_regs): Define.
17604 (ppc_regmap): Renamed from regmap, made static.
17605 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17607 (ppc_cannot_store_register): Renamed from cannot_store_register,
17609 (the_low_target): New.
17610 * linux-s390-low.c (num_regs): Remove.
17611 (s390_num_regs): Define.
17612 (s390_regmap): Renamed from regmap, made static.
17613 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17615 (s390_cannot_store_register): Renamed from cannot_store_register,
17617 (the_low_target): New.
17618 * linux-sh-low.c (num_regs): Remove.
17619 (sh_num_regs): Define.
17620 (sh_regmap): Renamed from regmap, made static.
17621 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17623 (sh_cannot_store_register): Renamed from cannot_store_register,
17625 (the_low_target): New.
17626 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17627 (the_low_target): New.
17629 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17631 * Makefile.in: Add stamp-h target.
17632 * configure.in: Create stamp-h.
17633 * configure: Regenerated.
17635 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17637 * inferiors.c: New file.
17638 * target.c: New file.
17639 * target.h: New file.
17640 * Makefile.in: Add target.o and inferiors.o. Update
17642 * linux-low.c (inferior_pid): New static variable,
17643 moved from server.c.
17644 (linux_create_inferior): Renamed from create_inferior.
17645 Call add_inferior. Return 0 on success instead of a PID.
17646 (linux_attach): Renamed from myattach.
17647 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17648 (linux_thread_alive): Renamed from mythread_alive.
17649 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17651 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17652 (regsets_store_inferior_registers): Correct error message.
17653 Add missing ``return 0''.
17654 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17655 (linux_store_registers): Renamed from store_inferior_registers.
17656 (linux_read_memory): Renamed from read_inferior_memory.
17657 (linux_write_memory): Renamed from write_inferior_memory.
17658 (linux_target_ops): New structure.
17659 (initialize_low): Call set_target_ops ().
17660 * remote-utils.c (unhexify): New function.
17661 (hexify): New function.
17662 (input_interrupt): Send signals to ``signal_pid''.
17663 * server.c (inferior_pid): Remove.
17664 (start_inferior): Update create_inferior call.
17665 (attach_inferior): Call add_inferior.
17666 (handle_query): New function.
17667 (main): Call handle_query for `q' packets.
17668 * server.h: Include "target.h". Remove obsolete prototypes.
17669 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17671 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17673 * Makefile.in: Add WARN_CFLAGS. Update configury
17675 * configure.in: Check for <string.h>
17676 * configure: Regenerate.
17677 * config.in: Regenerate.
17678 * gdbreplay.c: Include needed system headers.
17679 (remote_open): Remove strchr prototype.
17680 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17681 * regcache.c (supply_register): Change buf argument to const void *.
17682 (supply_register_by_name): Likewise.
17683 (collect_register): Change buf argument to void *.
17684 (collect_register_by_name): Likewise.
17685 * regcache.h: Add missing prototypes.
17686 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17687 * server.c (handle_query): New function.
17688 (attached): New static variable, moved out of main.
17689 (main): Quiet longjmp clobber warnings.
17690 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17691 * utils.c (error): Remove NORETURN.